So I have recently created several more developer product purchases that do the same thing as my first one but more lives. I was trying to convert it over to the multi developer product purchase script to get them all working since it obviously breaks all but the last one in this script if I repeat it. I tried multiple times to convert it and was just wondering if anyone could help me with the conversion.
Here is a portion of my current script for just one developer product purchase since the rest would be a copy of the conversion with different values.
local mpService = game:GetService("MarketplaceService")
mpService.ProcessReceipt = function(purchaseInfo)
local plr = game:GetService("Players"):GetPlayerByUserId(purchaseInfo.PlayerId)
if not plr then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
if purchaseInfo.ProductId == 55131820 then
local Lives = plr.leaderstats.Souls;
Lives.Value = Lives.Value +1
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
and Here is a portion of the multi developer product purchase script from the wiki.
local Products = {
-- productId 1111 for a heal up
[1111] = function(receipt,player)
-- Check if we can actual heal him
if not player.Character then return end
local human = player.Character:findFirstChild("Humanoid")
if not human then return end
-- Heal him, and return true, indicating the purchase is done
human.Health = human.MaxHealth
return true
end;
-- productId 2222 for 100 gold
[2222] = function(receipt,player)
-- again, do checks, this time for the Gold value
local stats = player:findFirstChild("leaderstats")
local gold = stats and stats:findFirstChild("Gold")
if not gold then return end -- no leaderstats, or "Gold" in them
gold.Value = gold.Value + 100 -- give gold
return true -- tell them of our success
end;
I tried changing the
local stats = player:findFirstChild("leaderstats")
local gold = stats and stats:findFirstChild("Gold")
if not gold then return end -- no leaderstats, or "Gold" in them
gold.Value = gold.Value + 100 -- give gold
portion of the script to my values but with no such luck. Anyone who can help would be greatly appreciated.

4 comments
What's a developer option?
It's a option you can use by: Games/Places, Gamepasses, Products, Decals, Assets, Animations & more. It have a option between and for all these Dev things. If you like to know more then tell me.
@minecraftjul are you sure this person doesn't mean developer product?
I do mean developer product