So the first time I buy the skip stage gamepass it adds 1 correctly but when I buy it the second time, then it goes like this: 0 + 1 = 1 1 + 1 = 3 I can't figure out why it's duplicating it. Any help will be appreciated :)
-- Variables
local marketPlaceService = game:GetService("MarketplaceService")
local add = 1
marketPlaceService.ProcessReceipt = function(receiptinfo)
if receiptinfo.ProductId == 1112744038 then
local player = game.Players:GetPlayerByUserId(receiptinfo.PlayerId)
player.leaderstats.Stage.Value = player.leaderstats.Stage.Value + 1
local hum = player.Character:FindFirstChild("Humanoid")
if hum then
hum.Health = 0
end
end
end

2 comments
Your solution helped, thank you!
np. also pls make sure to accept the answer whenever its a solution :).