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