In this script I’m attempting to have a developer product add the cash value by 1000. Although after purchasing it again, instead of it going from 1000 to 2000. It goes form 1000 to 3000. And when continuing to purchase it adds up even higher.
local MarketPlaceService = game:GetService("MarketplaceService")
local Cash = 1860163525
MarketPlaceService.ProcessReceipt = function(receiptInfo)
local plr = players:GetPlayerByUserId(receiptInfo.PlayerId)
if not plr then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if receiptInfo.ProductId == Cash then
plr.leaderstats.Cash.Value += 1000
end
end