print ("VIP T-Shirt Door Script Loaded by jordonbrooks")
permission = { "","","" } --This is how many people can get get through, so you don't have to change the t-shirt (put your name here.)
texture = "" --This is where you can put the link for the t-shirt what you want them to wear.For no t-shirt leave blank.
function checkOkToLetIn(name)
for i = 1,#permission do
-- convert strings to all upper case, otherwise we will let in
-- "Username" but not "username" or "uSERNAME"
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
if human.Parent.Torso.roblox.Texture == texture then
Door.Transparency = 0.7 Door.CanCollide = false wait(1)
Door.CanCollide = true Door.Transparency = 0 print("Human touched door")
elseif (checkOkToLetIn(human.Parent.Name)) then print("Human passed test") Door.Transparency = 0.7
Door.CanCollide = false wait(1)
Door.CanCollide = true Door.Transparency = 0
else human.Health = 0 -- delete this line of you want a non-killing VIP door. I reccomend you don't delete it.
end
end
end
script.Parent.Touched:connect(onTouched) My website:
http://www.jordonsweb.webs.com
My company website:
http://effect.frederickgent.derbyshir...
Live streaming on Twitch.TV
/ jordonbc
Please subscribe for more, and don't forget to like the video if you like it, it helps a lot!