I want to make a dev product that adds volume to a sound when you buy it. Whenever you but the dev product it starts by adding .5 so it works. then it adds an extra .5 per purchase so after the first purchase it adds 1 then 1.5 then 2 and so on.
Here is the code and a video
local one = 1501302078
local two = 1501302364
local MarketplaceService = game:GetService("MarketplaceService")
local players = game:GetService("Players")
local function processRecipt(reciptInfo)
print("e")
local plr = players:GetPlayerByUserId(reciptInfo.PlayerId)
if not plr then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if reciptInfo.ProductId == one then
if plr then
--if reciptInfo.PurchaseId == one then
print(plr.Name)
--local next = plr.Character.HumanoidRootPart.talking.Volume + 1
plr.Character.HumanoidRootPart.talking.Volume += .5
print(plr.Character.HumanoidRootPart.talking.Volume + .5)
print(plr.Character.HumanoidRootPart.talking.Volume)
end
end
if reciptInfo.ProductId == two then
print("t")
end
end