game.ReplicatedStorage.BuyPoints.OnServerEvent:Connect(function(plr, value)
local gamepassservice = game:GetService("MarketplaceService")
gamepassservice:PromptProductPurchase(plr, 1040843938)
gamepassservice.PromptProductPurchaseFinished:Connect(function(...)
local t = {...}
local h = t[3]
wait(3)
if h == true then
plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value + value
end
end)
end)
This is my code and when ever this is fired the value added to my currency is being doubled.
First purchase will give me 100K cash and second purchase will give me 300K cash then third purchase will give 600K cash. How do I stop this?