How to detect when a user buys an asset in-game?

How to detect when a user buys an asset in-game? (An asset, NOT A DEVELOPER PRODUCT)

game.MarketplaceService.ProcessReceipt is only for developer products, so i wanna know how to implement this for assets. (such as gamepasses,shirts and t-shirts)

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished

https://developer.roblox.com/en-us/api-reference/event/MarketplaceService/PromptGamePassPurchaseFinished

1 Like

Would this work since the third argument is a boolean

MarketplaceService.PromptGamePassPurchaseFinished:Connect(function(player, pass_id, was_purchased)
   if was_purchased == true then
      print("Was Purchased")
   end
end)
1 Like

Yes, you can also remove the “== true” bit.

“was_purchased” is going to be either true or false.