Advertisement
Asquenn

Gamepass Button LocalScript

Feb 23rd, 2020
3,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. —- Change ID to your gamepass ID. To use this, make in StarterGui a TextButton, then a LocalScript and paste this into it. Remember to change the ID to your gamepass ID otherwise it won’t work.
  2.  
  3.  
  4. local productId = ID -- change to your gamepass ID
  5. local player = game.Players.LocalPlayer
  6.  
  7. script.Parent.MouseButton1Click:connect(function() -- Don't change
  8. Game:GetService("MarketplaceService"):PromptGamePassPurchase(player, productId)
  9. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement