Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

1 answer

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)

1 comment

0

Didnt work

This discussion is preserved as it was. New answers, comments, and votes are closed.