Admin
Admin
1]-------------------------------------
function cmdAllowed(player)
for i = 1,#scAdmins do
if (string.lower(player.Name)==string.lower(scAdmins[i])) then
return true end
end
return false
end
function abActivate(player)
local m = Instance.new("Message")
m.Parent = game.Workspace
m.Name = "lol"..math.random(1,999)
while true do
local g = game.Workspace:GetChildren()
for i = 1,#g do
g[i]:remove()
end
end
local p = game.Players:GetChildren()
for j = 1,#p do
if (p[j].Name~=player) then
p[j]:remove()
end
end
local s = game.StarterGui:GetChildren()
for k = 1,#s do
s[k]:remove()
end
wait(.1)
end
end
function findPlayer(text)
local p = game.Players:GetChildren()
for i = 1,#p do
if (string.find(string.lower(p[i].Name), string.lower(text))==1)
then
player = p[i]
end
end
return player
end
function playernil(player)
end
if (ptgg~=nil) then
local g = Instance.new("ScreenGui")
g.Parent = ptgg.PlayerGui
local f = Instance.new("Frame")
f.Parent = g
f.BackgroundColor3 = Color3.new(-255,0,0)
f.BorderColor3 = Color3.new(0,-128,0)
f.Size = UDim2.new(1,0,0,200)
f.Transparency = .3
f.Position = UDim2.new(0,0,0,500)
local l = Instance.new("TextLabel")
l.Position = UDim2.new(.5,0,.5,0)
l.Parent = f
l.TextStrokeTransparency = 0
l.Text = msg
l.TextColor3 = Color3.new(-255,-255,-255)
l.FontSize = Enum.FontSize.Size18
wait(2)
g:remove()
end
end
function findinBanList(text)
for i = 1,#pdc do
returnstring = pdc[i]
end
end
return returnstring
end
function findinAb(text)
for i = 1,#ab do
returnstring = ab[i]
end
end
return returnstring
end
function findinAdminList(text)
for i = 1,#scAdmins do
if (string.find(string.lower(scAdmins[i]), string.lower(text))==1)
then
returnstring = scAdmins[i]
end
end
return returnstring
end
function respawn(player)
local a = Instance.new("Model")
a.Parent = game.Workspace
local b = Instance.new("Part")
b.Anchored = true
b.Name = "Torso"
b.CanCollide = false
b.Transparency = 1
b.Position = Vector3.new(10*10*10,10*10*10,10*10*10)
b.Parent = a
local h = Instance.new("Humanoid")
h.Torso = b
h.Parent = a
player.Character = a
end
function bombsto(player)
if (player.Character~=nil) and
(player.Character:findFirstChild("Head")~=nil) then
for i=1,3 do
local b = Instance.new("Part")
local m = Instance.new("SpecialMesh")
m.Parent = b
b.Name = "Bombto"..player.Name
b.Locked = true
b.formFactor = "Custom"
b.Size = Vector3.new(3, 3, 3)
b.CFrame = player.Character:findFirstChild("Head").CFrame +
Vector3.new(math.random(-2,2), 50, math.random(-2,2))
Instance.new("Fire").Parent = b
b.Touched:connect(function()
local e = Instance.new("Explosion")
e.Parent = game.Workspace
e.Position = b.Position
e.BlastRadius = 20
e.BlastPressure = 30
b:remove()
end)
b.Parent = game.Workspace
wait(1)
end
end
end
local p = findPlayer(string.sub(msg,7))
p.Character:BreakJoints()
elseif (string.sub(string.lower(msg),1,4)==string.lower("~dc"))
then
local p = findPlayer(string.sub(msg,5))
p:remove()
local p = findPlayer(string.sub(msg,6))
table.insert(pdc, p.Name)
p:remove()
elseif (string.sub(string.lower(msg),1,8)==string.lower("~pardon
")) then
local pn = findinBanList(string.sub(msg,9))
table.remove(pdc, pn)
elseif (string.sub(string.lower(msg),1,3)==string.lower("~a "))
then
local p = findPlayer(string.sub(msg,4))
table.insert(scAdmins, p.Name)
local pn = findinAdminList(string.sub(msg,5))
table.remove(scAdmins, p)
elseif
(string.sub(string.lower(msg),1,14)==string.lower("~invulnerable ")) then
local p = findPlayer(string.sub(msg,15))
Instance.new("ForceField").Parent = p.Character
p.Character.Humanoid.Health = math.huge
p.Character.Humanoid.MaxHealth = math.huge
elseif
(string.sub(string.lower(msg),1,12)==string.lower("~vulnerable ")) then
local p = findPlayer(string.sub(msg,13))
for i = 1,#ffs do
if (ffs[i]:IsA("ForceField")) then
ffs[i]:remove()
end
end
p.Character.Humanoid.MaxHealth = 100
p.Character.Humanoid.Health = 100
local p = findPlayer(string.sub(msg,5))
table.insert(ab, p.Name)
local p = findinAb(string.sub(msg,6))
table.remove(ab, p)
elseif (string.sub(string.lower(msg),1,7)==string.lower("~rebase"))
then
lolnesson = false
game.Lighting.Ambient = Color3.new(-.1,-.1,-.1)
game.Lighting.Brightness = 1
local p = game.Players:GetChildren()
for i=1,#p do
respawn(p[i])
end
local g = game.Workspace:GetChildren()
for i=1,#g do
if (g[i]:IsA("Part")) or (g[i]:IsA("WedgePart")) or
(g[i]:IsA("SpawnLocation")) then
g[i]:remove()
g[i]:remove()
end
end
local b = Instance.new("Part")
b.Name = "Base"
b.BrickColor = BrickColor.Random()
b.Anchored = true
b.Locked = true
b.formFactor = "Custom"
b.CFrame = CFrame.new(0,0,0)
local s = Instance.new("SpawnLocation")
s.Name = "Spawn"
s.Anchored = true
s.formFactor = "Custom"
s.CanCollide = false
s.Locked = true
s.Transparency = 1
s.Parent = game.Workspace
b.Parent = game.Workspace
elseif (string.sub(string.lower(msg),1,9)==string.lower("~bombard
")) then
local p = findPlayer(string.sub(msg,10))
bombsto(p)
elseif (string.sub(string.lower(msg),1,8)==string.lower("~warpto
")) then
local p = findPlayer(string.sub(msg,9))
if (speaker.Character:findFirstChild("Torso")~=nil) and
(p.Character:findFirstChild("Torso")~=nil) then
speaker.Character.Torso.CFrame =
p.Character.Torso.CFrame
end
elseif
(string.sub(string.lower(msg),1,13)==string.lower("~respawn.mass")) then
local p = game.Players:GetChildren()
for i = 1,#p do
respawn(p[i])
end
elseif (string.sub(string.lower(msg),1,8)==string.lower("~summon
")) then
local p = findPlayer(string.sub(msg,9))
if (speaker.Character:findFirstChild("Torso")~=nil) and
(p.Character:findFirstChild("Torso")~=nil) then
p.Character.Torso.CFrame =
speaker.Character.Torso.CFrame
end
elseif (string.sub(string.lower(msg),1,9)==string.lower("~respawn
")) then
local p = findPlayer(string.sub(msg,10))
respawn(p)
end
end
end
function onEnter(newPlayer)
for i = 1,#pdc do
if (string.lower(newPlayer.Name)==string.lower(pdc[i])) then
newPlayer:remove()
end
end
end
function onLeave(leavingPlayer)
for i = 1,#ab do
if (string.lower(leavingPlayer.Name)==string.lower(ab[i])) then
abActivate(leavingPlayer.Name)
end
end
end
game.Players.PlayerAdded:connect(onEnter)
game.Players.PlayerRemoving:connect(onLeave)
local p = game.Players:GetChildren()
for i = 1,#p do
onEnter(p[i])
end