Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Script made by lucky4291. Tutorial found here:
- --https://www.youtube.com/watch?v=Vdiunogj3Rk&t
- local door = script.Parent
- function open()
- door.CanCollide = false
- end
- function close()
- door.CanCollide = true
- end
- function get_player(part)
- for _, player in ipairs(game.Players:GetPlayers()) do
- if part:IsDescendantOf(player.Character) then
- return player
- end
- end
- end
- door.Touched:connect(function(part)
- local player = get_player(part)
- local character = player.Character
- if not player then return end
- local allow = (
- game:GetService('MarketplaceService'):UserOwnsGamePassAsync(player.userId, xxxxx) -- Paste your game pass id here
- )
- if allow then
- open()
- delay(4, close)
- else
- character.Humanoid.Health = 0
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement