SHOW:
|
|
- or go back to the newest paste.
1 | --[[ | |
2 | _____/\\\\\\\\\\\\_____________________________________________________________________________________________ | |
3 | ___/\\\//////////______________________________________________________________________________________________ | |
4 | __/\\\_________________________________________________________/\\\_____/\\\___________________________________ | |
5 | _\/\\\____/\\\\\\\__/\\/\\\\\\\___/\\\\\\\\\_____/\\\____/\\\_\///___/\\\\\\\\\\\_____/\\\\\\\\___/\\\____/\\\_ | |
6 | _\/\\\___\/////\\\_\/\\\/////\\\_\////////\\\___\//\\\__/\\\___/\\\_\////\\\////____/\\\/////\\\_\///\\\/\\\/__ | |
7 | _\/\\\_______\/\\\_\/\\\___\///____/\\\\\\\\\\___\//\\\/\\\___\/\\\____\/\\\_______/\\\\\\\\\\\____\///\\\/____ | |
8 | _\/\\\_______\/\\\_\/\\\__________/\\\/////\\\____\//\\\\\____\/\\\____\/\\\_/\\__\//\\///////______/\\\/\\\___ | |
9 | _\//\\\\\\\\\\\\/__\/\\\_________\//\\\\\\\\/\\____\//\\\_____\/\\\____\//\\\\\____\//\\\\\\\\\\__/\\\/\///\\\_ | |
10 | __\////////////____\///___________\////////\//______\///______\///______\/////______\//////////__\///____\///__ | |
11 | ]] | |
12 | ||
13 | -- Gravitex Administration created by supersonicfan111 and GravityPerfextion has been loaded! | |
14 | ||
15 | -- Copyright(c) 2015 | |
16 | ||
17 | repeat wait() until script.Parent==workspace | |
18 | ||
19 | --[[ | |
20 | Update Log: | |
21 | Version 1: | |
22 | Admin created | |
23 | Added "tst" command | |
24 | Version 1.1: | |
25 | Added more commands | |
26 | Added ServerLock | |
27 | Added AntiGlobal | |
28 | Changed some gui stoof | |
29 | Made the Trello Board sync | |
30 | ]] | |
31 | ||
32 | local TempBans={} -- DO NOT TOUCH | |
33 | ||
34 | local Sync={ | |
35 | syncTrello=true; | |
36 | TrelloId='KCqwhnEa'; -- Look at Kohl's Admin Epix Edition for how to get the trello ID | |
37 | HttpWait=5; | |
38 | }; | |
39 | ||
40 | APIs={ | |
41 | NameFromId='http://api-quenty.rhcloud.com/API/GetNameFromID/'; -- To get usernames from IDs | |
42 | IdFromName='http://api-quenty.rhcloud.com/API/GetIdFromName/'; | |
43 | Trello='https://api.trello.com/1/boards/'..Sync.TrelloId..'/lists'; | |
44 | }; | |
45 | ||
46 | ||
47 | Settings={ | |
48 | Prefix = ";", | |
49 | Suffix = "!", | |
50 | SLock=false; | |
51 | AntiGlobal=true; | |
52 | } | |
53 | ||
54 | local Banlist={ | |
55 | ["Derek1017"] = 23873450, | |
56 | } -- Enter any noobs, etc | |
57 | ||
58 | ||
59 | local Commands = {} | |
60 | ||
61 | local placeId=game.PlaceId | |
62 | local jobId=game.JobId | |
63 | local creatorId=game.CreatorId | |
64 | ||
65 | ||
66 | if placeId ~= 20279777 then | |
67 | if not game:service'HttpService'.HttpEnabled then | |
68 | game:service'HttpService'.HttpEnabled=true | |
69 | end | |
70 | end | |
71 | ||
72 | local Owner -- Your name is automatically placed in as Owner | |
73 | local Admins={ | |
74 | - | ["GravityPerfextion"] = {Reason='Created the admin', Rank=5}; |
74 | + | ["Control22"] = {Reason='Created the admin', Rank=5}; |
75 | ["supersonicfan111"] = {Reason='Created the admin', Rank=5}; | |
76 | ["Player"] = {Reason='Studio testing', Rank=5}; -- Studio Testing | |
77 | }; | |
78 | ||
79 | Owner=game:service'HttpService':GetAsync(APIs.NameFromId..creatorId) | |
80 | ||
81 | ||
82 | newCommand=function(name, say, rank, func) | |
83 | Commands[name]={Name=name, Chat=say, Rank=rank, Function=func} | |
84 | end | |
85 | ||
86 | function Notify(p, msg, tim) | |
87 | if tim == nil then tim=2 end | |
88 | if msg == nil then msg = '[ GRAVITEX ] : No text found!' end | |
89 | if not p:findFirstChild('PlayerGui') then warn('Player has no player gui!') return end | |
90 | local g1 = Instance.new("ScreenGui", p:findFirstChild('PlayerGui')) | |
91 | g1.Name = "GRAVITEX_NOTIFY" | |
92 | local o1 = Instance.new("TextLabel", g1) | |
93 | o1.BackgroundColor3 = Color3.new(0, 0, 0) | |
94 | o1.BackgroundTransparency = 0.5 | |
95 | o1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
96 | o1.BorderSizePixel = 0 | |
97 | o1.Position = UDim2.new(1, 0, 0.70000002384186, 0) | |
98 | o1.Size = UDim2.new(0, 350, 0, 125) | |
99 | o1.Text = msg | |
100 | o1.TextScaled = false | |
101 | o1.TextWrapped = true | |
102 | o1.TextColor3 = Color3.new(1, 1, 1) | |
103 | o1.Font = Enum.Font.SourceSans | |
104 | o1.FontSize = Enum.FontSize.Size36 | |
105 | o1:TweenPosition(UDim2.new(.73,0,0.70000002384186,0), 'In', 'Quad', 1) | |
106 | delay(tim, function() | |
107 | o1:TweenPosition(UDim2.new(1,0,0.70000002384186,0), 'Out', 'Quad', 1) | |
108 | wait(1.5) | |
109 | g1:destroy() | |
110 | end) | |
111 | end | |
112 | ||
113 | ||
114 | ||
115 | local Screen | |
116 | ||
117 | local SavedText | |
118 | ||
119 | ||
120 | function giveCMDBar(Player) | |
121 | local ScreenGui = Instance.new("ScreenGui", Player:FindFirstChild('PlayerGui')) | |
122 | ScreenGui.Name = 'Delta Command Bar' | |
123 | ||
124 | local Frame = Instance.new("Frame",ScreenGui) | |
125 | Frame.BackgroundColor3 = Color3.new(1,1,1) | |
126 | Frame.BackgroundTransparency = 1 | |
127 | Frame.BorderColor3 = Color3.new(0,0,0) | |
128 | Frame.BorderSizePixel = 0 | |
129 | Frame.Position = UDim2.new(0,0,0.5,300) | |
130 | Frame.Size = UDim2.new(0,400,0,30) | |
131 | Frame.SizeConstraint = Enum.SizeConstraint.RelativeYY | |
132 | ||
133 | local TextButton = Instance.new("TextButton",Frame) | |
134 | TextButton.BackgroundColor3 = Color3.new(1,1,1) | |
135 | TextButton.BackgroundTransparency = 0.69999998807907 | |
136 | TextButton.BorderColor3 = Color3.new(0,0,0) | |
137 | TextButton.Size = UDim2.new(0.20000000298023,0,1,0) | |
138 | TextButton.Style = Enum.ButtonStyle.Custom | |
139 | TextButton.Font = Enum.Font.SourceSans | |
140 | TextButton.FontSize = Enum.FontSize.Size24 | |
141 | TextButton.Text = "Submit" | |
142 | TextButton.TextColor3 = Color3.new(1,0,0) | |
143 | ||
144 | local TextBox = Instance.new("TextBox",Frame) | |
145 | TextBox.Active = true | |
146 | TextBox.BackgroundColor3 = Color3.new(1,1,1) | |
147 | TextBox.BackgroundTransparency = 0.69999998807907 | |
148 | TextBox.BorderColor3 = Color3.new(0,0,0) | |
149 | TextBox.Position = UDim2.new(0.20000000298023,0,0,0) | |
150 | TextBox.Size = UDim2.new(0.80000001192093,0,1,0) | |
151 | TextBox.Font = Enum.Font.SourceSans | |
152 | TextBox.FontSize = Enum.FontSize.Size24 | |
153 | TextBox.Text = "Type Your Command Here" | |
154 | TextBox.TextColor3 = Color3.new(0,0,0) | |
155 | TextButton.MouseButton1Down:connect(function() | |
156 | ConnectChat(Player,TextBox.Text) | |
157 | end) | |
158 | ||
159 | Frame:TweenPosition(UDim2.new(0.75,0,0.5,300), "Out", "Quad", 1) | |
160 | end | |
161 | ||
162 | ConnectChat = function(p, msg) | |
163 | if msg:sub(1,2) == '/e' and #msg >= 3 then | |
164 | msg=msg:sub(4) | |
165 | end | |
166 | for _, CMD in next, Commands do | |
167 | for _, Chat in next, CMD.Chat do | |
168 | if msg:sub(1, #Chat+#Settings.Suffix+#Settings.Prefix) == Settings.Suffix..Chat..Settings.Prefix then | |
169 | local addition=msg:sub(#Chat+#Settings.Suffix+#Settings.Prefix+1) | |
170 | if CMD.Rank == 0 or Owner==tostring(p) or Admins[tostring(p)] and Admins[tostring(p)].Rank >= CMD.Rank then | |
171 | Success, Error=ypcall(function() | |
172 | CMD.Function(p, addition) | |
173 | end) if not Success then warn(Error) end | |
174 | else | |
175 | Notify(p, 'You\'re do not have the required rank!', 1) | |
176 | end | |
177 | end | |
178 | end | |
179 | end | |
180 | end | |
181 | ||
182 | ||
183 | function Hint(p, msg, tim) | |
184 | if tim == nil then tim=2 end | |
185 | if msg == nil then msg = 'No text found!' end | |
186 | if not p:FindFirstChild('PlayerGui') then warn('Player has no player gui!') return end | |
187 | local g1 = Instance.new("ScreenGui", p:findFirstChild('PlayerGui')) | |
188 | g1.Name = "GRAVITEX_HINT" | |
189 | local o1 = Instance.new("TextLabel", g1) | |
190 | o1.BackgroundColor3 = Color3.new(0, 0, 0) | |
191 | o1.BackgroundTransparency = 0.30000001192093 | |
192 | o1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843) | |
193 | o1.Position = UDim2.new(0, 0, 0, -50) | |
194 | o1.Size = UDim2.new(0.40000000596046, 800, 0, 50) | |
195 | o1.Text = '[ GRAVITEX ] : '..msg | |
196 | o1.TextScaled = true | |
197 | o1.TextWrapped = false | |
198 | o1.TextColor3 = Color3.new(1, 1, 1) | |
199 | o1.TextStrokeColor3 = Color3.new(0, 0.133333, 1) | |
200 | o1.TextStrokeTransparency = 0 | |
201 | o1.Font = Enum.Font.SourceSans | |
202 | o1.FontSize = Enum.FontSize.Size36 | |
203 | pcall(function() | |
204 | o1:TweenPosition(UDim2.new(0,0,0,5), 'In', 'Quad', 1) | |
205 | delay(tim, function() | |
206 | o1:TweenPosition(UDim2.new(0,0,0,-100), 'Out', 'Quad', 1) | |
207 | wait(2) | |
208 | g1:destroy() | |
209 | end) | |
210 | end) | |
211 | end | |
212 | ||
213 | function Kick(player) | |
214 | pcall(function() player:Kick() end) | |
215 | local h=Instance.new('RemoteEvent', game:service'Lighting'):FireClient(player,{string.rep("Rekt pls?",2e5+5)}) | |
216 | delay(1,function() | |
217 | pcall(function() | |
218 | h:destroy() | |
219 | end) | |
220 | end) | |
221 | end | |
222 | ||
223 | ||
224 | ||
225 | function RemoveGuis(player) | |
226 | if player and player:FindFirstChild("PlayerGui") then | |
227 | for _,v in next, player:findFirstChild('PlayerGui'):children() do | |
228 | if v.Name:lower():sub(1,7) == 'gravitex' then | |
229 | v:destroy() | |
230 | end | |
231 | end | |
232 | end | |
233 | end | |
234 | ||
235 | ||
236 | function GetPlayers(p, m) | |
237 | m=m:lower() | |
238 | local ret={} | |
239 | if m=='admins' then | |
240 | for _,v in next, game:service'Players':players() do | |
241 | if Admins[tostring(v)] and Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then | |
242 | table.insert(ret, v) | |
243 | end | |
244 | end | |
245 | elseif m=='me' then table.insert(ret, p) | |
246 | elseif m=='players' then | |
247 | for _,v in next, game:service'Players':players() do | |
248 | if not Admins[tostring(v)] then | |
249 | table.insert(ret, v) | |
250 | end | |
251 | end | |
252 | elseif m == 'others' then | |
253 | for _,v in next, game:service'Players':players() do | |
254 | if v ~= p then | |
255 | table.insert(ret, v) | |
256 | end | |
257 | end | |
258 | elseif m == 'all' then | |
259 | for _,v in next, game:service'Players':players() do | |
260 | table.insert(ret, v) | |
261 | end | |
262 | elseif m == 'noobs' then | |
263 | for _,v in next, game:service'Players':players() do | |
264 | if math.floor(v.AccountAge/365) == 0 then | |
265 | if not Admins[tostring(v)] or Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then | |
266 | table.insert(ret, v) | |
267 | end | |
268 | end | |
269 | end | |
270 | elseif m == 'vets' or m == 'veterans' then | |
271 | for _,v in next, game:service'Players':players() do | |
272 | if math.floor(v.AccountAge/365) > 0 then | |
273 | if not Admins[tostring(v)] or Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then | |
274 | table.insert(ret, v) | |
275 | end | |
276 | end | |
277 | end | |
278 | else | |
279 | for _,v in next, game:service'Players':players() do | |
280 | if tostring(v):lower():find(m) then | |
281 | if not Admins[tostring(v)] or Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then | |
282 | table.insert(ret, v) | |
283 | end | |
284 | end | |
285 | end | |
286 | end | |
287 | return ret | |
288 | end | |
289 | ||
290 | for _,Player in pairs(game.Players:players())do | |
291 | if Admins[tostring(Player)] or Owner==tostring(Player) then | |
292 | Hint(Player, 'You\'re an admin!') | |
293 | end | |
294 | Player.Chatted:connect(function(msg) | |
295 | ConnectChat(Player, msg) | |
296 | end) | |
297 | end | |
298 | ||
299 | game:service'Players'.PlayerAdded:connect(function(Player) | |
300 | Player.Chatted:connect(function(msg) | |
301 | ConnectChat(Player, msg) | |
302 | end) | |
303 | if Admins[tostring(Player)] or Owner==tostring(Player) then | |
304 | Hint(Player, 'You\'re an admin!') | |
305 | end | |
306 | for _,v in next, game:service'Players':players() do | |
307 | if v ~= Player and Settings.SLock==false and not Banlist[tostring(Player)]==Player.userId then | |
308 | Hint(v, 'Player : '..tostring(Player)..' has entered the server!') | |
309 | end | |
310 | end | |
311 | if Settings.SLock or Banlist[tostring(Player)]==Player.userId then | |
312 | if tostring(Player) ~= Owner and not Admins[tostring(Player)] then | |
313 | Kick(Player) | |
314 | end | |
315 | end | |
316 | end) | |
317 | ||
318 | game:service'Players'.PlayerRemoving:connect(function(Player) | |
319 | RemoveGuis(Player) | |
320 | for _,v in next, game:service'Players':players() do | |
321 | if v ~= Player and Settings.SLock==false and not Player.userId==Banlist[tostring(Player)] then | |
322 | Hint(v, 'Player : '..tostring(Player)..' has left the server!') | |
323 | end | |
324 | end | |
325 | end) | |
326 | ||
327 | newCommand('Give CMDbar',{'cmdbar','gcmdbar'}, 1, function(p,m) | |
328 | giveCMDBar(p) | |
329 | end) | |
330 | ||
331 | ||
332 | newCommand('Test', {'tst'}, 0, function(plr) | |
333 | Notify(plr, 'The admin works! ;D') | |
334 | end) | |
335 | ||
336 | ||
337 | newCommand('Admin', {'admin', 'a'}, 5, function(plr, msg) | |
338 | for _, Plr in next, GetPlayers(plr, msg) do | |
339 | if Plr and not Admins[tostring(Plr)] then | |
340 | Admins[tostring(Plr)] = {Reason='Temporary Admin', Rank=2}; | |
341 | Hint(Plr, 'You\'re an admin!') | |
342 | end | |
343 | end | |
344 | end) | |
345 | ||
346 | newCommand('Kill', {'kill'}, 1, function(plr, msg) | |
347 | for _, Plr in next, GetPlayers(plr, msg) do | |
348 | if Plr then | |
349 | Plr.Character:BreakJoints() | |
350 | end | |
351 | end | |
352 | end) | |
353 | ||
354 | newCommand('Kick', {'kick'}, 1, function(plr, msg) | |
355 | for _, Plr in next, GetPlayers(plr, msg) do | |
356 | if Plr then | |
357 | Kick(Plr) | |
358 | end | |
359 | end | |
360 | end) | |
361 | ||
362 | newCommand('ForceField', {'ff', 'forcefield'}, 1, function(plr, msg) | |
363 | for _, Plr in next, GetPlayers(plr, msg) do | |
364 | if Plr then | |
365 | Instance.new('ForceField', Plr.Character) | |
366 | end | |
367 | end | |
368 | end) | |
369 | ||
370 | newCommand('UnForceField', {'unff', 'unforcefield'}, 1, function(plr, msg) | |
371 | for _, Plr in next, GetPlayers(plr, msg) do | |
372 | if Plr then | |
373 | for _,v in next, Plr.Character:children() do | |
374 | if v:IsA('ForceField') then | |
375 | v:destroy() | |
376 | end | |
377 | end | |
378 | end | |
379 | end | |
380 | end) | |
381 | ||
382 | newCommand('Ping', {'ping', 'p'}, 1, function(p, m) | |
383 | Notify(p, m) | |
384 | end) | |
385 | ||
386 | newCommand('Get sword',{'sword'}, 1, function(p, m) | |
387 | local players=GetPlayers(p, m) | |
388 | for k,v in pairs(players) do | |
389 | game:service'InsertService':LoadAsset(47433):children()[1].Parent=v.Backpack -- from me and brianush admin :3 | |
390 | end | |
391 | end) | |
392 | ||
393 | newCommand('ServerLock',{'serverlock', 'serverl'}, 4, function(p, m) | |
394 | Settings.SLock=not Settings.SLock | |
395 | if Settings.SLock then | |
396 | Hint(p, 'Server Lock on!') | |
397 | else | |
398 | Hint(p, 'Server Lock off!') | |
399 | end | |
400 | end) | |
401 | ||
402 | newCommand('Sit',{'sit'}, 1, function(p, m) | |
403 | local players=GetPlayers(p,m) | |
404 | for k,v in pairs(players) do | |
405 | if v.Character then | |
406 | if v.Character:FindFirstChild'Humanoid' then | |
407 | v.Character.Humanoid.Sit=true | |
408 | end | |
409 | end | |
410 | end | |
411 | end) | |
412 | ||
413 | newCommand('God',{'god'}, 1, function(p, m) | |
414 | local players=GetPlayers(p,m) | |
415 | for k,v in pairs(players) do | |
416 | if v.Character then | |
417 | if v.Character:FindFirstChild'Humanoid' then | |
418 | v.Character.Humanoid.Health=math.huge | |
419 | v.Character.Humanoid.MaxHealth=math.huge | |
420 | end | |
421 | end | |
422 | end | |
423 | end) | |
424 | ||
425 | ||
426 | newCommand('Clone',{'clone'}, 2, function(p,m) | |
427 | local players = GetPlayers(p,m) | |
428 | if #players > 0 then | |
429 | for _,v in pairs(players) do | |
430 | ypcall(function() | |
431 | if v and v.Character then | |
432 | v.Character.Archivable=true | |
433 | v.Character:Clone().Parent=workspace | |
434 | v.Character.Archivable=false | |
435 | end | |
436 | end) | |
437 | end | |
438 | end | |
439 | end) | |
440 | ||
441 | newCommand('Ban ',{'ban','b','banish'}, 5, function(p,m) | |
442 | local players=GetPlayers(p,m) | |
443 | for i,v in pairs(players) do | |
444 | TempBans[tostring(v)]=v.userId | |
445 | Kick(v) | |
446 | end | |
447 | end) | |
448 | ||
449 | newCommand('Shutdown',{'sd','shutdown'}, 5, function(p,m) | |
450 | local players=game:service'NetworkServer':children() | |
451 | game:service'Players'.PlayerAdded:connect(function(p) | |
452 | Kick(p) | |
453 | end) | |
454 | for i,v in pairs(players) do | |
455 | if v.className == 'ServerReplicator' and v:GetPlayer() then | |
456 | Kick(v:GetPlayer()) | |
457 | end | |
458 | end | |
459 | end) | |
460 | ||
461 | GetSplit=function(msg, key) | |
462 | return string.find(msg, key) | |
463 | end | |
464 | newCommand('Gear',{'gear'}, 3, function(p,m) | |
465 | local split=GetSplit(m, '>') | |
466 | local players=GetPlayers(p,m:sub(1, split-1)) | |
467 | local id=tonumber(m:sub(split+1)) | |
468 | for i,v in pairs(players) do | |
469 | --coroutine.resume(coroutine.create(function() | |
470 | if v and v:FindFirstChild("Backpack") then | |
471 | local model=game:service'InsertService':LoadAsset(id) | |
472 | if model:children()[1].className=='Tool' or model:children()[1].className=='Hopperbin' then | |
473 | model:children()[1].Parent=v.Backpack | |
474 | else | |
475 | model:destroy() | |
476 | end | |
477 | end | |
478 | --end)) | |
479 | end | |
480 | end) | |
481 | ||
482 | newCommand('Hat',{'hat'}, 3, function(p,m) | |
483 | local split=GetSplit(m, '>') | |
484 | local players=GetPlayers(p,m:sub(1, split-1)) | |
485 | local id=tonumber(m:sub(split+1)) | |
486 | for i,v in pairs(players) do | |
487 | --coroutine.resume(coroutine.create(function() | |
488 | if v and v.Character then | |
489 | local model=game:service'InsertService':LoadAsset(id) | |
490 | if model:children()[1].className=='Hat' then | |
491 | model:children()[1].Parent=v.Character | |
492 | else | |
493 | model:destroy() | |
494 | end | |
495 | end | |
496 | --end)) | |
497 | end | |
498 | end) | |
499 | ||
500 | newCommand('Respawn',{'rs','respawn'}, 1, function(p,m) | |
501 | local players=GetPlayers(p,m) | |
502 | for i,v in pairs(players) do | |
503 | if v then | |
504 | v:LoadCharacter() | |
505 | end | |
506 | end | |
507 | end) | |
508 | ||
509 | newCommand('Character Appearance',{'char','ca'}, 1, function(p,m) | |
510 | local split=GetSplit(m, '>') | |
511 | local players=GetPlayers(p,m:sub(1, split-1)) | |
512 | local id=tonumber(m:sub(split+1)) | |
513 | for i,v in pairs(players) do | |
514 | --coroutine.resume(coroutine.create(function() | |
515 | if v then | |
516 | v.CharacterAppearance='http://web.roblox.com/Asset/CharacterFetch.ashx?userId='..id..'&placeId='..placeId | |
517 | v:LoadCharacter() | |
518 | end | |
519 | --end)) | |
520 | end | |
521 | end) | |
522 | ||
523 | newCommand('Stun',{'stun','s'}, 2, function(p,m) | |
524 | local players=GetPlayers(p,m) | |
525 | for i,v in pairs(players) do | |
526 | coroutine.resume(coroutine.create(function() | |
527 | if v and v.Character and v.Character:FindFirstChild("Humanoid") then | |
528 | v.Character.Humanoid.PlatformStand = true | |
529 | end | |
530 | end)) | |
531 | end | |
532 | end) | |
533 | ||
534 | -- Smoke ain't needed | |
535 | ||
536 | newCommand('Countdown',{'countdown','count', 'cd'}, 1, function(p,m) | |
537 | for i = m, 0, -1 do | |
538 | for _,v in next, game:service'Players':players() do | |
539 | Notify(v, i, 2) | |
540 | end | |
541 | wait(2) | |
542 | end | |
543 | end) | |
544 | ||
545 | newCommand('Give',{'give','Give'}, 3, function(p,m) | |
546 | local split=GetSplit(m, '>') | |
547 | local players=GetPlayers(p,m) | |
548 | coroutine.resume(coroutine.create(function() | |
549 | for i,v in pairs(players) do | |
550 | if v and v:FindFirstChild("Backpack") then | |
551 | for x, tool in pairs(game.Lighting:children())do | |
552 | if x:IsA("Tool") or x:IsA("HopperBin") then | |
553 | if m:lower():sub(split+1) == "all" or tool.Name:lower():find(m:lower():sub(split+1)) == 1 then tool:clone().Parent = v.Backpack return end | |
554 | end | |
555 | end | |
556 | end | |
557 | end | |
558 | end)) | |
559 | end) | |
560 | ||
561 | newCommand('Hint',{'Hint','h'}, 2, function(p,m) | |
562 | local players=GetPlayers(p,m) | |
563 | for i,v in pairs(players)do | |
564 | Hint(v, p.Name.. ' : ' ..m) | |
565 | end | |
566 | end) | |
567 | ||
568 | newCommand('Notify a message.',{'notify','n'}, 2, function(p,m) | |
569 | local players=GetPlayers(p,m) | |
570 | for i,v in pairs(players)do | |
571 | Notify(v, p.Name.. ' (NOTIFY) : ' ..m) | |
572 | end | |
573 | end) | |
574 | ||
575 | newCommand('Warn someone.',{'warn','w'}, 2, function(p,m) | |
576 | local players=GetPlayers(p,m) | |
577 | for i,v in pairs(players) do | |
578 | Hint(v, ' [' ..p.Name.. ' ] (WARN) : '..m) | |
579 | end | |
580 | end) | |
581 | ||
582 | ||
583 | ||
584 | ||
585 | ||
586 | updateTrello=function() | |
587 | if Sync.syncTrello then | |
588 | Banlist={} | |
589 | local get=game:service'HttpService':GetAsync(APIs.Trello, true) | |
590 | local tab=game:service'HttpService':JSONDecode(get) | |
591 | for i,v in pairs(tab) do | |
592 | if v.name:match('^BanList%s?$') then | |
593 | local getal=game:service'HttpService':GetAsync('https://api.trello.com/1/lists/'..v.id..'/cards',true) | |
594 | local tabal=game:service'HttpService':JSONDecode(getal) | |
595 | for l,k in pairs(tabal) do | |
596 | coroutine.wrap(function() | |
597 | if k.name:match('(.*):(.*)') then | |
598 | local a,b=k.name:match('(.*):(.*)') | |
599 | Banlist[a]=b | |
600 | end | |
601 | end)() | |
602 | end | |
603 | end | |
604 | end | |
605 | end | |
606 | end; | |
607 | ||
608 | game:service'RunService'.Stepped:connect(function() | |
609 | if Settings.AntiGlobal then | |
610 | table.foreach(_G, function(i) _G[i]=nil end) | |
611 | end | |
612 | end) | |
613 | ||
614 | if Sync.syncTrello then | |
615 | while wait(Sync.HttpWait) do | |
616 | updateTrello() | |
617 | end | |
618 | end |