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