Joriangames

VIP door LocalScript

Oct 26th, 2020 (edited)
2,900
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. --Watch my tutorial to understand this script: https://youtu.be/TXkRiHSg41o
  2. local doorPart = game.Workspace.VIPdoor
  3. local MarketPlaceService = game:GetService("MarketplaceService")
  4. local player = game.Players.LocalPlayer
  5. local passId = 12289847
  6. local ownsGamePass = MarketPlaceService:UserOwnsGamePassAsync(player.UserId, passId)
  7.  
  8. if ownsGamePass then
  9.     print("User owns gamepass") --so we can see in the output if the player owns the ownsGamePass
  10.     doorPart.CanCollide = false
  11. else
  12.     print("User doesn't own the gamepass")
  13.     doorPart.CanCollide = true
  14. end
Add Comment
Please, Sign In to add comment