Someone in an earlier question helped me make a script that gives the player a certain amount of cash when purchasing a dev product. It worked with one but after stacking multiple products it didn't work. Here it is:
game:GetService("MarketplaceService").ProcessReceipt = function(purchaseInfo)
local plr = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId) --Defines the player who bought the product
if purchaseInfo.ProductId == 951160290 then --Replace with your product ID
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 100 --Cash to be given
end
if purchaseInfo.ProductId == 951160339 then --Replace with your product ID
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 500 --Cash to be given
end
if purchaseInfo.ProductId == 951160900 then --Replace with your product ID
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 1500 --Cash to be given
end
if purchaseInfo.ProductId == 951160941 then --Replace with your product ID
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 3000 --Cash to be given
end
if purchaseInfo.ProductId == 951160984 then --Replace with your product ID
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 5000 --Cash to be given
end
if purchaseInfo.ProductId == 951161055 then --Replace with your product ID
plr.leaderstats.Money.Value = plr.leaderstats.Money.Value + 10000 --Cash to be given
end
return Enum.ProductPurchaseDecision.PurchaseGranted --Makes sure the player has bought the DevProduct
end
NOTE: I also tried separating them into separate scripts but it still didn't work.

2 comments
That's what I originally did. I tried separate scripts and together, still didn't work
bruh just use a print function if you dont know whats going on