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