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

How do I make a button that you can click, that lets you make in-game purchases?

(Like Kestrel, not a drop down)

2 answers

local PassId = script.Parent.Parent.Parent.Parent.Settings.PassId.Value 

script.Parent.MouseButton1Click:connect(function(player)
	Game:GetService("MarketplaceService"):PromptPurchase(player,PassId)
end)


script.Parent.Text = "Purchase " .. script.Parent.Parent.Parent.Settings.PassName.Value

Hi. first make a Text Button I recommend you go a test and make a DevProduct than insert this into a local script inside the text-button:

MPS = game:GetService("MarketplaceService")
id = 653936051 
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
	MPS:PromptProductPurchase(player, id)
end)

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