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

Buy Developer Product issue?

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

0

nvm i figured it out

1 answer

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