I have a developer product integrated into a GUI and it works just fine. It gives you 100 gold on purchase. However, when you buy it a second time it gives you 200! Can you smarter guys help me out?
local MarketplaceService = game:GetService('MarketplaceService')
local devproductid = 44193926
MarketplaceService.ProcessReceipt=function(receiptInfo)
for i, player in pairs(game.Players:GetChildren())do
if player.userId == receiptInfo.PlayerId then
if receiptInfo.ProductId == devproductid then
player.Wealth.Gold.Value = player.Wealth.Gold.Value + 100
end
end
end
return Enum.ProductPurchaseDecision.PurchasedGranted
end

3 comments
thanks bro! I'll try it.
I've run into another problem that wasn't an issue before. return Enum.ProductPurchaseDecision.PurchasedGranted pops up in my outfit whenever I attempt to purchase. Any thoughts on that?
well, one thing I have to say is that I forgot an extra end after "debounce = false" in like 18 to close that if. Also, you are returning Enum.ProductPurchaseDecision.PurchaseGranted, perhaps it is in the wrong code block?