READ: You must change "Player1" on line 4 into your username in ROBLOX. You may add or erase more.
This easy, reliable, short tutorial gives you the exact information you need to keep your admin door up and running. You must copy and paste the script below onto the script you attach to your admin door. Erase line 32 if you want a non-killing door.
print("VIP Door Script loaded")
-- list of account names allowed to go through the door.
permission = {"Player1", "Player2", "Player3"}--Put your friends name's here. You can add more.
function checkOkToLetIn(name)
for i = 1,#permission do
-- convert strings to all upper case, otherwise we will let in,
-- "conrad105," and, "builderman," but not, "blast1."
-- Why? Because, "blast1," is how it is spelled in the permissions.
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end
local Door = script.Parent
function onTouched(hit)
print("Door Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
if (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.7
Door.CanCollide = false
wait(4) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
else human.Health= 0 -- delete this line of you want a non-killing VIP door
end
end
end
script.Parent.Touched:connect(onTouched)
Legal Information:
I do not own ROBLOX. ROBLOX is a free online building game for kids and adults all ages.