Anyone want to add a VIP door
#4
Code:
allowed = {"Guest","Aroblix",""} --Who is allowed through the door?
opentime = 1 --How much time will the door be open?
transparency = 0.5 --How transparent is the door when open?

function check(playername)
    for count,name in pairs(allowed) do
        if (string.lower(playername) == string.lower(name)) then
            return true
        end
    end
    return false
end


function open(part)
    if part.Parent:isA('Character') then
        if check(part.Parent.Name) then
            script.Parent.Collidable = false
            script.Parent.Transparency = transparency
            sleep(opentime)
            script.Parent.Collidable = true
            script.Parent.Transparency = 0
        end
    end
end
link(script.Parent.Collided, open)
--Coded by Aroblix.


Attached Files
.txt   VIP Door Script.txt (Size: 725 bytes / Downloads: 26)
Reply


Messages In This Thread
Anyone want to add a VIP door - by BuildistGuard - 01-15-2011, 06:32 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)