ScripterJoin Date: 2007-10-09 Post Count: 1192 |
--[[Thanks to anaminus for making. Thanks to scripter for publishing. THIS SCRIPT WILL REPLACE ADMIN ROOMS AS WE KNOW IT!!]]--
--[[Put the weapons to be given in the Lighting]]--
--[[This script gives admin weapons, extra health, and a force field.]]--
--[[It has a permission list and an admin shirt]]--
admins = {"???","???","???"}
ShirtID = "#######" --Replace ####### with shirt's ID.
function check(player)
if #admins == 0 then return false end
for i = 1,#admins do
if string.lower(player.Name)==string.lower(admins[i]) then return true end
end
return false
end
function checkShirt(player)
if player.Character.Torso.roblox.Texture == ("http://www.roblox.com/asset/?version=1&id="..ShirtID) then
return true
end
return false
end
function onPlayerRespawned(newPlayer)
if newPlayer == nil then return end
if check(newPlayer) or checkShirt(newPlayer) then
local w = game.Lighting:GetChildren()
for i = 1,#w do
if w[i].className == "Tool" or w[i].className == "HopperBin" then
w[i]:Clone().Parent = newPlayer.Backpack
end
end
local shield = Instance.new("ForceField")
shield.Parent = newPlayer.Character
local h = newPlayer.Character.Humanoid
h.MaxHealth = 2147483648
h.Health = 2147483648
end
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered) |
|
ipod525Join Date: 2007-09-15 Post Count: 8973 |
Nice dude. I don't think that I'll ever need a admin room again. |
|
|
Is the ) around the 2nd to last End nessicary? |
|
|
Ih and nice job. And its very easy to add more stuff too. |
|
ScripterJoin Date: 2007-10-09 Post Count: 1192 |
And everything is nessecary! |
|
|
This script is wesome, but I dont think it will put an end to admin rooms. Think about what also could be in admin rooms: Morphs, rides, etc. |
|
ScripterJoin Date: 2007-10-09 Post Count: 1192 |
Im glad people like it... |
|
ScripterJoin Date: 2007-10-09 Post Count: 1192 |
Who will use this awesome script? |
|
hk1777Join Date: 2007-10-03 Post Count: 6522 |
i used it and your one of the admins |
|
RomulusJoin Date: 2008-02-25 Post Count: 187 |
admins = { }
tools = { }
local l = game.Lighting:GetChildren()
for i = 1,#l do
if l[i].className == "HopperBin" or l[i].className == "Tool" then
table.insert(tools, l[i])
end
end
function onRespawn(player)
while true do
if player.Character~=nil then break end
wait()
end
for i = 1,#admins do
if string.lower(admins[i]) == string.lower(player.Name) then
for b = 1,#tools do
tools[b]:Clone().Parent = player.Backpack
end
Instance.new("ForceField").Parent = player.Character
player.Character.Humanoid.MaxHealth = 99999999
player.Character.Humanoid:TakeDamage(-99999999)
end
end
function onEntered(newPlayer)
newPlayer.Changed:connect(function(property) if property == "Character" then onRespawn(newPlayer) end)
for i = 1,#admins do
if string.lower(admins[i]) == string.lower(newPlayer.Name) then return end
end
while true do
if newPlayer.Character~=nil then break end
wait()
end
if newPlayer.Character.ShirtGraphic.Graphic == "!!!!!!!!!!!!!!!" then
table.insert(admins, newPlayer.Name)
end
end
game.Players.ChildAdded:connect(onEntered) |
|
RomulusJoin Date: 2008-02-25 Post Count: 187 |
Mines better. Don't put anything in tools, but you can put names in admins. |
|
ipod525Join Date: 2007-09-15 Post Count: 8973 |
How come it's not working? |
|
|
Cuz romulus is a noob and she/he is Zuka who is also a noob. |
|
CullJoin Date: 2007-12-16 Post Count: 1252 |
the shirt part doesn't work for me... |
|
|
brOofrangeTop 100 PosterJoin Date: 2007-12-06 Post Count: 7945 |
=O! Scripter copied off that other forum i cant remember |
|