There is a bug with my give Cash script where only the last developer product in the script works. (here is an example) In this script, (Which is the script I am using) the only developer product that gives you Cash is 100k (the last script area) local mps = game:GetService(“MarketplaceService”)
mps.ProcessReceipt = function(reciptInfo)
if reciptInfo.ProductId == 980125722 then
local Player = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 1000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
mps.ProcessReceipt = function(reciptInfo)
if reciptInfo.ProductId == 980126287 then
local Player = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 2500
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
mps.ProcessReceipt = function(reciptInfo)
if reciptInfo.ProductId == 980126614 then
local Player = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 10000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
mps.ProcessReceipt = function(reciptInfo)
if reciptInfo.ProductId == 980126950 then
local Player = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 25000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
mps.ProcessReceipt = function(reciptInfo)
if reciptInfo.ProductId == 980127210 then
local Player = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 50000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
mps.ProcessReceipt = function(reciptInfo)
if reciptInfo.ProductId == 980127849 then
local Player = game.Players:GetPlayerByUserId(reciptInfo.PlayerId)
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 100000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end