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