KashTheKingYT

Manage Gamepass Script

Dec 14th, 2021
1,372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. local gui = script.Parent
  2. local btn = gui.PromptGamepass
  3.  
  4. local gamepassId = "26064990"
  5.  
  6. local plr = game.Players.LocalPlayer
  7. local ms = game:GetService("MarketplaceService")
  8.  
  9. btn.Activated:Connect(function()
  10.     ms:PromptGamePassPurchase(plr, gamepassId)
  11. end)
  12.  
  13. if ms:UserOwnsGamePassAsync(plr.UserId, gamepassId) == true then
  14.     btn.Visible = false
  15. end
Advertisement
Add Comment
Please, Sign In to add comment