Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script for a GUI that you can click and buy the gamepass?

Asked by 10 years ago

So I want it when you click the button it says do you want to buy this gamepass and you click buy

1 answer

Log in to vote
1
Answered by
LAC44 20
10 years ago

Put this LocalScript in the gui

buybutton = script.Parent
msp = game:GetService("MarketplaceService")
id = 0 --pruduct id here
p = game.Players.LocalPlayer
buybutton.MouseButton1Click:connect(function ()
    msp:PromptPruductPurchase(p,id)
end)
0
Didnt work Firecoolboy123 0 — 10y
Ad

Answer this question