I have watched the FE scripts and the currency does not add the currency that the players requested though robux.
✓ ANSWER ACCEPTED
How to add currency when a players brought a purchase?(Purchase script would be great aswell)
1 answer
✓ Accepted answer
local Player = nil --Provide the player
local MS = game:GetService("MarketplaceService")
local Id = 0 --DevProduct id
MS:PromptProductPurchase(Player,Id)
MS.ProcessReceipt = function(receiptInfo)
if Enum.ProductPurchaseDecision.PurchaseGranted and receiptInfo.PlayerId == Player.userId then
Player.leaderstats.Cash.Value = Player.leaderstats.Cash.Value + 500 --Example
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Make sure it's Normal script