game.MarketplaceService.ProcessReceipt = function(reciptInfo)
local plr = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
if reciptInfo.ProductId == 1166140314 then
plr.leaderstats.Tokens.Value = plr.leaderstats.Tokens.Value + 50
elseif reciptInfo.ProductId == 1166140360 then
plr.leaderstats.Tokens.Value = plr.leaderstats.Tokens.Value + 100
elseif reciptInfo.ProductId == 1166140438 then
plr.leaderstats.Tokens.Value = plr.leaderstats.Tokens.Value + 250
elseif reciptInfo.ProductId == 1166140622 then
plr.leaderstats.Tokens.Value = plr.leaderstats.Tokens.Value + 500
elseif reciptInfo.ProductId == 1166140682 then
plr.leaderstats.Tokens.Value = plr.leaderstats.Tokens.Value + 1000
end
end
for some reason, when i buy something, for example the first one, it adds 50 tokens. But when i buy it again, it adds 100 tokens. and when i buy it for the third time, it add 150 tokens this time. It seems like it's adding 50 to every thing. how do i fix this?

4 comments
Ok I will try!
Uh sorry, that didn't work. But do you have any idea how to use productpurchasefinished?
Oh wait, PromptProductPurchaseFinished wouldn't help because it could be like when the player closes the thing.
uh you could do like if canceled then return end