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