You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Making a buy cash GUI
-
What is the issue? The cash is not going to the player. There are no errors in output
-
What solutions have you tried so far? I’ve looked through the dev forum and youtube
local MPS = game:GetService("MarketplaceService")
MPS.ProcessReceipt = function(receiptInfo)
local player = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
if not player then return Enum.ProductPurchaseDecision.NotProcessedYet
end
if receiptInfo.ProductId == 1213752687 then
player.leaderstats.Cash.Value += 10
elseif receiptInfo.ProductId == 1213752803 then
player.leaderstats.Cash.Value += 100
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end