Advertisement
4zx16

VIP Door (Gamepass)

Nov 24th, 2021 (edited)
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. --[[
  2.  || 📜 AUTHOR: @4zx16 || VIP DOOR (GAMEPASS) || ONLY CHANGE ID
  3. ]]
  4. local itemId = 0
  5. local MPS = game:GetService("MarketplaceService")
  6. local door = script.Parent
  7.  
  8. local function onTouched(hit)
  9.     local player = game.Players:GetPlayerFromCharacter(hit.Parent)
  10.    
  11.     if player ~= nil then
  12.         if MPS:UserOwnsGamePassAsync(player.UserId, itemId) then
  13.             door.CanCollide = false
  14.             door.Transparency = 0.7
  15.             wait(1)
  16.             door.CanCollide = true
  17.             door.Transparency = 0
  18.         else
  19.             player.Character:BreakJoints()
  20.             MPS:PromptGamePassPurchase(player, itemId)
  21.         end
  22.     end
  23. end
  24. script.Parent.Touched:Connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement