Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local door = script.Parent
- local mps = game:GetService("MarketplaceService")
- local isOpen = false
- door.Touched:Connect(function(touch)
- local char = touch.Parent
- local plr = game.Players:GetPlayerFromCharacter(char)
- if not plr then return end
- if plr.MembershipType == Enum.MembershipType.Premium then
- if isOpen then return end
- isOpen = true
- door.Transparency = 1
- door.CanCollide = false
- wait(2)
- door.Transparency = 0
- door.CanCollide = true
- isOpen = false
- else
- mps:PromptPremiumPurchase(plr)
- end
- end)
Add Comment
Please, Sign In to add comment