Advertisement
4zx16

VIP Door (Non-Gamepass)

Nov 24th, 2021 (edited)
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. --[[
  2.  || πŸ“œ AUTHOR: @4zx16 || VIP DOOR (NON-GAMEPASS) || ONLY CHANGE PERMISSION!
  3. ]]
  4. local permission = {}
  5. local door = script.Parent
  6.  
  7. local function checkOkToLetIn(name)
  8.     for i = 1, #permission do
  9.        
  10.         if string.upper(name) == string.upper(permission[i]) then return true end
  11.     end
  12.     return false
  13. end
  14. local function onTouched(hit)
  15.     local human = hit.Parent:FindFirstChild("Humanoid")
  16.    
  17.     if human ~= nil then
  18.         if checkOkToLetIn(human.Parent.Name) then
  19.             door.Transparency = 0.7
  20.             door.CanCollide = false
  21.             wait(1)
  22.             door.CanCollide = true
  23.             door.Transparency = 0
  24.         else
  25.             human.Health = 0
  26.         end
  27.     end
  28. end
  29. script.Parent.Touched:Connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement