It will let someone purchase both 1,000,000 cash and 10,000,000 cash, however, only the 10,000,000 will get added. The 1,000,000 will not work. This is extremely confusing.
Here's the script:
local MarketplaceService = game:GetService('MarketplaceService') local devproductid = 32819350 -- 10,000,000 Cash local devproductid2 = 32819339 MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == devproductid then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 10000000 end elseif receiptInfo.ProductId == devproductid2 then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 1000000 end end return Enum.ProductPurchaseDecision.PurchaseGranted end
You ended the if statement that was comparing the developer product ids!
local MarketplaceService = game:GetService('MarketplaceService') local devproductid = 32819350 -- 10,000,000 Cash local devproductid2 = 32819339 MarketplaceService.ProcessReceipt = function(receiptInfo) for i, player in ipairs(game.Players:GetChildren()) do if player.userId == receiptInfo.PlayerId then if receiptInfo.ProductId == devproductid then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 10000000 elseif receiptInfo.ProductId == devproductid2 then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 1000000 end end end -- You were also missing one end. return Enum.ProductPurchaseDecision.PurchaseGranted end