Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- || π AUTHOR: @4zx16 || VIP DOOR (NON-GAMEPASS) || ONLY CHANGE PERMISSION!
- ]]
- local permission = {}
- local door = script.Parent
- local function checkOkToLetIn(name)
- for i = 1, #permission do
- if string.upper(name) == string.upper(permission[i]) then return true end
- end
- return false
- end
- local function onTouched(hit)
- local human = hit.Parent:FindFirstChild("Humanoid")
- if human ~= nil then
- if checkOkToLetIn(human.Parent.Name) then
- door.Transparency = 0.7
- door.CanCollide = false
- wait(1)
- door.CanCollide = true
- door.Transparency = 0
- else
- human.Health = 0
- end
- end
- end
- script.Parent.Touched:Connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement