local MarketplaceService = game:GetService("MarketplaceService")
local buyButton = game.Workspace["Coin Stand"].Part.SurfaceGui.Frame["1000"]
local player = game.Players.LocalPlayer
local id = 25821928
local isPurchased = true
buyButton.MouseButton1Click:connect(function()
MarketplaceService:PromptProductPurchase (player, id, true, 2)
MarketplaceService.PromptPurchaseFinished:connect(function(player, id, isPurchased)
if isPurchased then
player.leaderstats.Coins = game.Players.LocalPlayer.leaderstats.Coins +1000
end
end)
end)
Basically a long time ago I created a leaderboard script, it works.
Now after I buy the item, I don't get an extra 1,000 coins to use as I please.... In fact, this line;
MarketplaceService.PromptPurchaseFinished:connect(function(player, id, isPurchased)
if isPurchased then
Doesn't even run, because apparently even though I'm buying it, It returns false? I even stated that it is true above..
I have used the wiki for this PromptPurchaseFinished part... let's just say the wiki needs a clearer explanation.
And all It needs to do is return true as I am wasting one tix every time I test this code :'(

2 comments
is that the only script? I would have a server script that does the process receipt , then it gives the perk when receipt is confirmed.
Good idea, that way once the receipt is confirmed that means the purchase was confirmed. Server script? I could just do it in this local script, right?