Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- _____/\\\\\\\\\\\\_____________________________________________________________________________________________
- ___/\\\//////////______________________________________________________________________________________________
- __/\\\_________________________________________________________/\\\_____/\\\___________________________________
- _\/\\\____/\\\\\\\__/\\/\\\\\\\___/\\\\\\\\\_____/\\\____/\\\_\///___/\\\\\\\\\\\_____/\\\\\\\\___/\\\____/\\\_
- _\/\\\___\/////\\\_\/\\\/////\\\_\////////\\\___\//\\\__/\\\___/\\\_\////\\\////____/\\\/////\\\_\///\\\/\\\/__
- _\/\\\_______\/\\\_\/\\\___\///____/\\\\\\\\\\___\//\\\/\\\___\/\\\____\/\\\_______/\\\\\\\\\\\____\///\\\/____
- _\/\\\_______\/\\\_\/\\\__________/\\\/////\\\____\//\\\\\____\/\\\____\/\\\_/\\__\//\\///////______/\\\/\\\___
- _\//\\\\\\\\\\\\/__\/\\\_________\//\\\\\\\\/\\____\//\\\_____\/\\\____\//\\\\\____\//\\\\\\\\\\__/\\\/\///\\\_
- __\////////////____\///___________\////////\//______\///______\///______\/////______\//////////__\///____\///__
- ]]
- -- Gravitex Administration created by supersonicfan111 and GravityPerfextion has been loaded!
- -- Copyright(c) 2015
- repeat wait() until script.Parent==workspace
- --[[
- Update Log:
- Version 1:
- Admin created
- Added "tst" command
- Version 1.1:
- Added more commands
- Added ServerLock
- Added AntiGlobal
- Changed some gui stoof
- Made the Trello Board sync
- ]]
- local TempBans={} -- DO NOT TOUCH
- local Sync={
- syncTrello=true;
- TrelloId='KCqwhnEa'; -- Look at Kohl's Admin Epix Edition for how to get the trello ID
- HttpWait=5;
- };
- APIs={
- NameFromId='http://api-quenty.rhcloud.com/API/GetNameFromID/'; -- To get usernames from IDs
- IdFromName='http://api-quenty.rhcloud.com/API/GetIdFromName/';
- Trello='https://api.trello.com/1/boards/'..Sync.TrelloId..'/lists';
- };
- Settings={
- Prefix = ";",
- Suffix = "!",
- SLock=false;
- AntiGlobal=true;
- }
- local Banlist={
- ["Derek1017"] = 23873450,
- } -- Enter any noobs, etc
- local Commands = {}
- local placeId=game.PlaceId
- local jobId=game.JobId
- local creatorId=game.CreatorId
- if placeId ~= 20279777 then
- if not game:service'HttpService'.HttpEnabled then
- game:service'HttpService'.HttpEnabled=true
- end
- end
- local Owner -- Your name is automatically placed in as Owner
- local Admins={
- ["Control22"] = {Reason='Created the admin', Rank=5};
- ["supersonicfan111"] = {Reason='Created the admin', Rank=5};
- ["Player"] = {Reason='Studio testing', Rank=5}; -- Studio Testing
- };
- Owner=game:service'HttpService':GetAsync(APIs.NameFromId..creatorId)
- newCommand=function(name, say, rank, func)
- Commands[name]={Name=name, Chat=say, Rank=rank, Function=func}
- end
- function Notify(p, msg, tim)
- if tim == nil then tim=2 end
- if msg == nil then msg = '[ GRAVITEX ] : No text found!' end
- if not p:findFirstChild('PlayerGui') then warn('Player has no player gui!') return end
- local g1 = Instance.new("ScreenGui", p:findFirstChild('PlayerGui'))
- g1.Name = "GRAVITEX_NOTIFY"
- local o1 = Instance.new("TextLabel", g1)
- o1.BackgroundColor3 = Color3.new(0, 0, 0)
- o1.BackgroundTransparency = 0.5
- o1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- o1.BorderSizePixel = 0
- o1.Position = UDim2.new(1, 0, 0.70000002384186, 0)
- o1.Size = UDim2.new(0, 350, 0, 125)
- o1.Text = msg
- o1.TextScaled = false
- o1.TextWrapped = true
- o1.TextColor3 = Color3.new(1, 1, 1)
- o1.Font = Enum.Font.SourceSans
- o1.FontSize = Enum.FontSize.Size36
- o1:TweenPosition(UDim2.new(.73,0,0.70000002384186,0), 'In', 'Quad', 1)
- delay(tim, function()
- o1:TweenPosition(UDim2.new(1,0,0.70000002384186,0), 'Out', 'Quad', 1)
- wait(1.5)
- g1:destroy()
- end)
- end
- local Screen
- local SavedText
- function giveCMDBar(Player)
- local ScreenGui = Instance.new("ScreenGui", Player:FindFirstChild('PlayerGui'))
- ScreenGui.Name = 'Delta Command Bar'
- local Frame = Instance.new("Frame",ScreenGui)
- Frame.BackgroundColor3 = Color3.new(1,1,1)
- Frame.BackgroundTransparency = 1
- Frame.BorderColor3 = Color3.new(0,0,0)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0,0,0.5,300)
- Frame.Size = UDim2.new(0,400,0,30)
- Frame.SizeConstraint = Enum.SizeConstraint.RelativeYY
- local TextButton = Instance.new("TextButton",Frame)
- TextButton.BackgroundColor3 = Color3.new(1,1,1)
- TextButton.BackgroundTransparency = 0.69999998807907
- TextButton.BorderColor3 = Color3.new(0,0,0)
- TextButton.Size = UDim2.new(0.20000000298023,0,1,0)
- TextButton.Style = Enum.ButtonStyle.Custom
- TextButton.Font = Enum.Font.SourceSans
- TextButton.FontSize = Enum.FontSize.Size24
- TextButton.Text = "Submit"
- TextButton.TextColor3 = Color3.new(1,0,0)
- local TextBox = Instance.new("TextBox",Frame)
- TextBox.Active = true
- TextBox.BackgroundColor3 = Color3.new(1,1,1)
- TextBox.BackgroundTransparency = 0.69999998807907
- TextBox.BorderColor3 = Color3.new(0,0,0)
- TextBox.Position = UDim2.new(0.20000000298023,0,0,0)
- TextBox.Size = UDim2.new(0.80000001192093,0,1,0)
- TextBox.Font = Enum.Font.SourceSans
- TextBox.FontSize = Enum.FontSize.Size24
- TextBox.Text = "Type Your Command Here"
- TextBox.TextColor3 = Color3.new(0,0,0)
- TextButton.MouseButton1Down:connect(function()
- ConnectChat(Player,TextBox.Text)
- end)
- Frame:TweenPosition(UDim2.new(0.75,0,0.5,300), "Out", "Quad", 1)
- end
- ConnectChat = function(p, msg)
- if msg:sub(1,2) == '/e' and #msg >= 3 then
- msg=msg:sub(4)
- end
- for _, CMD in next, Commands do
- for _, Chat in next, CMD.Chat do
- if msg:sub(1, #Chat+#Settings.Suffix+#Settings.Prefix) == Settings.Suffix..Chat..Settings.Prefix then
- local addition=msg:sub(#Chat+#Settings.Suffix+#Settings.Prefix+1)
- if CMD.Rank == 0 or Owner==tostring(p) or Admins[tostring(p)] and Admins[tostring(p)].Rank >= CMD.Rank then
- Success, Error=ypcall(function()
- CMD.Function(p, addition)
- end) if not Success then warn(Error) end
- else
- Notify(p, 'You\'re do not have the required rank!', 1)
- end
- end
- end
- end
- end
- function Hint(p, msg, tim)
- if tim == nil then tim=2 end
- if msg == nil then msg = 'No text found!' end
- if not p:FindFirstChild('PlayerGui') then warn('Player has no player gui!') return end
- local g1 = Instance.new("ScreenGui", p:findFirstChild('PlayerGui'))
- g1.Name = "GRAVITEX_HINT"
- local o1 = Instance.new("TextLabel", g1)
- o1.BackgroundColor3 = Color3.new(0, 0, 0)
- o1.BackgroundTransparency = 0.30000001192093
- o1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
- o1.Position = UDim2.new(0, 0, 0, -50)
- o1.Size = UDim2.new(0.40000000596046, 800, 0, 50)
- o1.Text = '[ GRAVITEX ] : '..msg
- o1.TextScaled = true
- o1.TextWrapped = false
- o1.TextColor3 = Color3.new(1, 1, 1)
- o1.TextStrokeColor3 = Color3.new(0, 0.133333, 1)
- o1.TextStrokeTransparency = 0
- o1.Font = Enum.Font.SourceSans
- o1.FontSize = Enum.FontSize.Size36
- pcall(function()
- o1:TweenPosition(UDim2.new(0,0,0,5), 'In', 'Quad', 1)
- delay(tim, function()
- o1:TweenPosition(UDim2.new(0,0,0,-100), 'Out', 'Quad', 1)
- wait(2)
- g1:destroy()
- end)
- end)
- end
- function Kick(player)
- pcall(function() player:Kick() end)
- local h=Instance.new('RemoteEvent', game:service'Lighting'):FireClient(player,{string.rep("Rekt pls?",2e5+5)})
- delay(1,function()
- pcall(function()
- h:destroy()
- end)
- end)
- end
- function RemoveGuis(player)
- if player and player:FindFirstChild("PlayerGui") then
- for _,v in next, player:findFirstChild('PlayerGui'):children() do
- if v.Name:lower():sub(1,7) == 'gravitex' then
- v:destroy()
- end
- end
- end
- end
- function GetPlayers(p, m)
- m=m:lower()
- local ret={}
- if m=='admins' then
- for _,v in next, game:service'Players':players() do
- if Admins[tostring(v)] and Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then
- table.insert(ret, v)
- end
- end
- elseif m=='me' then table.insert(ret, p)
- elseif m=='players' then
- for _,v in next, game:service'Players':players() do
- if not Admins[tostring(v)] then
- table.insert(ret, v)
- end
- end
- elseif m == 'others' then
- for _,v in next, game:service'Players':players() do
- if v ~= p then
- table.insert(ret, v)
- end
- end
- elseif m == 'all' then
- for _,v in next, game:service'Players':players() do
- table.insert(ret, v)
- end
- elseif m == 'noobs' then
- for _,v in next, game:service'Players':players() do
- if math.floor(v.AccountAge/365) == 0 then
- if not Admins[tostring(v)] or Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then
- table.insert(ret, v)
- end
- end
- end
- elseif m == 'vets' or m == 'veterans' then
- for _,v in next, game:service'Players':players() do
- if math.floor(v.AccountAge/365) > 0 then
- if not Admins[tostring(v)] or Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then
- table.insert(ret, v)
- end
- end
- end
- else
- for _,v in next, game:service'Players':players() do
- if tostring(v):lower():find(m) then
- if not Admins[tostring(v)] or Admins[tostring(v)].Rank <= Admins[tostring(p)].Rank then
- table.insert(ret, v)
- end
- end
- end
- end
- return ret
- end
- for _,Player in pairs(game.Players:players())do
- if Admins[tostring(Player)] or Owner==tostring(Player) then
- Hint(Player, 'You\'re an admin!')
- end
- Player.Chatted:connect(function(msg)
- ConnectChat(Player, msg)
- end)
- end
- game:service'Players'.PlayerAdded:connect(function(Player)
- Player.Chatted:connect(function(msg)
- ConnectChat(Player, msg)
- end)
- if Admins[tostring(Player)] or Owner==tostring(Player) then
- Hint(Player, 'You\'re an admin!')
- end
- for _,v in next, game:service'Players':players() do
- if v ~= Player and Settings.SLock==false and not Banlist[tostring(Player)]==Player.userId then
- Hint(v, 'Player : '..tostring(Player)..' has entered the server!')
- end
- end
- if Settings.SLock or Banlist[tostring(Player)]==Player.userId then
- if tostring(Player) ~= Owner and not Admins[tostring(Player)] then
- Kick(Player)
- end
- end
- end)
- game:service'Players'.PlayerRemoving:connect(function(Player)
- RemoveGuis(Player)
- for _,v in next, game:service'Players':players() do
- if v ~= Player and Settings.SLock==false and not Player.userId==Banlist[tostring(Player)] then
- Hint(v, 'Player : '..tostring(Player)..' has left the server!')
- end
- end
- end)
- newCommand('Give CMDbar',{'cmdbar','gcmdbar'}, 1, function(p,m)
- giveCMDBar(p)
- end)
- newCommand('Test', {'tst'}, 0, function(plr)
- Notify(plr, 'The admin works! ;D')
- end)
- newCommand('Admin', {'admin', 'a'}, 5, function(plr, msg)
- for _, Plr in next, GetPlayers(plr, msg) do
- if Plr and not Admins[tostring(Plr)] then
- Admins[tostring(Plr)] = {Reason='Temporary Admin', Rank=2};
- Hint(Plr, 'You\'re an admin!')
- end
- end
- end)
- newCommand('Kill', {'kill'}, 1, function(plr, msg)
- for _, Plr in next, GetPlayers(plr, msg) do
- if Plr then
- Plr.Character:BreakJoints()
- end
- end
- end)
- newCommand('Kick', {'kick'}, 1, function(plr, msg)
- for _, Plr in next, GetPlayers(plr, msg) do
- if Plr then
- Kick(Plr)
- end
- end
- end)
- newCommand('ForceField', {'ff', 'forcefield'}, 1, function(plr, msg)
- for _, Plr in next, GetPlayers(plr, msg) do
- if Plr then
- Instance.new('ForceField', Plr.Character)
- end
- end
- end)
- newCommand('UnForceField', {'unff', 'unforcefield'}, 1, function(plr, msg)
- for _, Plr in next, GetPlayers(plr, msg) do
- if Plr then
- for _,v in next, Plr.Character:children() do
- if v:IsA('ForceField') then
- v:destroy()
- end
- end
- end
- end
- end)
- newCommand('Ping', {'ping', 'p'}, 1, function(p, m)
- Notify(p, m)
- end)
- newCommand('Get sword',{'sword'}, 1, function(p, m)
- local players=GetPlayers(p, m)
- for k,v in pairs(players) do
- game:service'InsertService':LoadAsset(47433):children()[1].Parent=v.Backpack -- from me and brianush admin :3
- end
- end)
- newCommand('ServerLock',{'serverlock', 'serverl'}, 4, function(p, m)
- Settings.SLock=not Settings.SLock
- if Settings.SLock then
- Hint(p, 'Server Lock on!')
- else
- Hint(p, 'Server Lock off!')
- end
- end)
- newCommand('Sit',{'sit'}, 1, function(p, m)
- local players=GetPlayers(p,m)
- for k,v in pairs(players) do
- if v.Character then
- if v.Character:FindFirstChild'Humanoid' then
- v.Character.Humanoid.Sit=true
- end
- end
- end
- end)
- newCommand('God',{'god'}, 1, function(p, m)
- local players=GetPlayers(p,m)
- for k,v in pairs(players) do
- if v.Character then
- if v.Character:FindFirstChild'Humanoid' then
- v.Character.Humanoid.Health=math.huge
- v.Character.Humanoid.MaxHealth=math.huge
- end
- end
- end
- end)
- newCommand('Clone',{'clone'}, 2, function(p,m)
- local players = GetPlayers(p,m)
- if #players > 0 then
- for _,v in pairs(players) do
- ypcall(function()
- if v and v.Character then
- v.Character.Archivable=true
- v.Character:Clone().Parent=workspace
- v.Character.Archivable=false
- end
- end)
- end
- end
- end)
- newCommand('Ban ',{'ban','b','banish'}, 5, function(p,m)
- local players=GetPlayers(p,m)
- for i,v in pairs(players) do
- TempBans[tostring(v)]=v.userId
- Kick(v)
- end
- end)
- newCommand('Shutdown',{'sd','shutdown'}, 5, function(p,m)
- local players=game:service'NetworkServer':children()
- game:service'Players'.PlayerAdded:connect(function(p)
- Kick(p)
- end)
- for i,v in pairs(players) do
- if v.className == 'ServerReplicator' and v:GetPlayer() then
- Kick(v:GetPlayer())
- end
- end
- end)
- GetSplit=function(msg, key)
- return string.find(msg, key)
- end
- newCommand('Gear',{'gear'}, 3, function(p,m)
- local split=GetSplit(m, '>')
- local players=GetPlayers(p,m:sub(1, split-1))
- local id=tonumber(m:sub(split+1))
- for i,v in pairs(players) do
- --coroutine.resume(coroutine.create(function()
- if v and v:FindFirstChild("Backpack") then
- local model=game:service'InsertService':LoadAsset(id)
- if model:children()[1].className=='Tool' or model:children()[1].className=='Hopperbin' then
- model:children()[1].Parent=v.Backpack
- else
- model:destroy()
- end
- end
- --end))
- end
- end)
- newCommand('Hat',{'hat'}, 3, function(p,m)
- local split=GetSplit(m, '>')
- local players=GetPlayers(p,m:sub(1, split-1))
- local id=tonumber(m:sub(split+1))
- for i,v in pairs(players) do
- --coroutine.resume(coroutine.create(function()
- if v and v.Character then
- local model=game:service'InsertService':LoadAsset(id)
- if model:children()[1].className=='Hat' then
- model:children()[1].Parent=v.Character
- else
- model:destroy()
- end
- end
- --end))
- end
- end)
- newCommand('Respawn',{'rs','respawn'}, 1, function(p,m)
- local players=GetPlayers(p,m)
- for i,v in pairs(players) do
- if v then
- v:LoadCharacter()
- end
- end
- end)
- newCommand('Character Appearance',{'char','ca'}, 1, function(p,m)
- local split=GetSplit(m, '>')
- local players=GetPlayers(p,m:sub(1, split-1))
- local id=tonumber(m:sub(split+1))
- for i,v in pairs(players) do
- --coroutine.resume(coroutine.create(function()
- if v then
- v.CharacterAppearance='http://web.roblox.com/Asset/CharacterFetch.ashx?userId='..id..'&placeId='..placeId
- v:LoadCharacter()
- end
- --end))
- end
- end)
- newCommand('Stun',{'stun','s'}, 2, function(p,m)
- local players=GetPlayers(p,m)
- for i,v in pairs(players) do
- coroutine.resume(coroutine.create(function()
- if v and v.Character and v.Character:FindFirstChild("Humanoid") then
- v.Character.Humanoid.PlatformStand = true
- end
- end))
- end
- end)
- -- Smoke ain't needed
- newCommand('Countdown',{'countdown','count', 'cd'}, 1, function(p,m)
- for i = m, 0, -1 do
- for _,v in next, game:service'Players':players() do
- Notify(v, i, 2)
- end
- wait(2)
- end
- end)
- newCommand('Give',{'give','Give'}, 3, function(p,m)
- local split=GetSplit(m, '>')
- local players=GetPlayers(p,m)
- coroutine.resume(coroutine.create(function()
- for i,v in pairs(players) do
- if v and v:FindFirstChild("Backpack") then
- for x, tool in pairs(game.Lighting:children())do
- if x:IsA("Tool") or x:IsA("HopperBin") then
- 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
- end
- end
- end
- end
- end))
- end)
- newCommand('Hint',{'Hint','h'}, 2, function(p,m)
- local players=GetPlayers(p,m)
- for i,v in pairs(players)do
- Hint(v, p.Name.. ' : ' ..m)
- end
- end)
- newCommand('Notify a message.',{'notify','n'}, 2, function(p,m)
- local players=GetPlayers(p,m)
- for i,v in pairs(players)do
- Notify(v, p.Name.. ' (NOTIFY) : ' ..m)
- end
- end)
- newCommand('Warn someone.',{'warn','w'}, 2, function(p,m)
- local players=GetPlayers(p,m)
- for i,v in pairs(players) do
- Hint(v, ' [' ..p.Name.. ' ] (WARN) : '..m)
- end
- end)
- updateTrello=function()
- if Sync.syncTrello then
- Banlist={}
- local get=game:service'HttpService':GetAsync(APIs.Trello, true)
- local tab=game:service'HttpService':JSONDecode(get)
- for i,v in pairs(tab) do
- if v.name:match('^BanList%s?$') then
- local getal=game:service'HttpService':GetAsync('https://api.trello.com/1/lists/'..v.id..'/cards',true)
- local tabal=game:service'HttpService':JSONDecode(getal)
- for l,k in pairs(tabal) do
- coroutine.wrap(function()
- if k.name:match('(.*):(.*)') then
- local a,b=k.name:match('(.*):(.*)')
- Banlist[a]=b
- end
- end)()
- end
- end
- end
- end
- end;
- game:service'RunService'.Stepped:connect(function()
- if Settings.AntiGlobal then
- table.foreach(_G, function(i) _G[i]=nil end)
- end
- end)
- if Sync.syncTrello then
- while wait(Sync.HttpWait) do
- updateTrello()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement