I want 100 coins to be given to the player when you buy the dev product but when I buy the dev product 2 times, instead giving 100 coins then another 100 coins, it gives 100 coins then 200 coins on the second purchase
wait(3)
local marketplaceService = game:GetService("MarketplaceService")
local amount = 100
marketplaceService.ProcessReceipt = function(receiptinfo)
for i, player in pairs(game.Players:GetChildren())do
if player.userId == receiptinfo.PlayerId then
if receiptinfo.ProductId == 104571033 then
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + amount
end
end
end
end

1 comment
nvm i figured it out