so here is the code
local player = script.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
local MarketplaceService = game:GetService("MarketplaceService")
local productID = 994379939
MarketplaceService:PromptProductPurchase(player,productID)
MarketplaceService.PromptProductPurchaseFinished:Connect(function(player, productID, isPurchased) -- isPurchased is a bool value which tells you whether or not the player purchased the product
if isPurchased == true then -- if player purchased the product
script.Parent.Parent.Parent.Parent.Parent.leaderstats.lives.Value = script.Parent.Parent.Parent.Parent.Parent.leaderstats.lives.Value + 10
end
end)
end)
what happens is that the first time they buy it, it adds 10 lives like it should then if they buy it again it increases it by 20, then 30, then 40, etc how do i make it increase by the same amount every time?

3 comments
You can add a debounce.
ok it worked
could you put that into an answer to mark it as answered?