Need help in Developer Products Urgent!

Hi guys,

I was working on my game and now I am in a trouble. I have multiple developer products but how can I script them all? Because when I do them together then only one works and the other doesn’t.

I am using this:
local MPS = game:GetService(“MarketplaceService”)

MPS.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1194441332 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 200
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end

Pls, help me it is urgent!

1 Like

Check out this.
https://education.roblox.com/en-us/resources/multiple-conditions-with-if-elseif-and-else

local MPS = game:GetService(“MarketplaceService”)

MPS.ProcessReceipt = function(receiptInfo)
     if receiptInfo.ProductId == 1194441332 then
         local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
         plr.leaderstats.Coins.Value = plr.leaderstats.Coins.Value + 200
     return Enum.ProductPurchaseDecision.PurchaseGranted
  end
end)

Try that.