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

I need help with a click to buy with a gamepass?

Im makeing a game were you donate in a gui by clicking a TextButton and it will do a donate pop up that like the Are you sure you want to buy? How?

1 comment

0

attempt it yourself first

1 answer

✓ Accepted answer
local id = 16630147--change it to your own id
local textbutton = --locate it here by your own
local plr = game.Players.LocalPlayer --locating the local player

textbutton.MouseButton1Click:Connect(function()--an event which occurs when the player clicks the button
	game:GetService("MarketplaceService"):PromptPurchase(plr,  id) --popping up a prompt purchase
end)

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