Can anyone tell me how to make a GUI that you can buy Developer Products from?
I do this sort of thing all the time. This script is what I put inside of a GUI button. Here's the code I use:
script.Parent.MouseButton1Click:connect(function() id = 123456 -- This is a random ID, be sure to replace this with the Developer Product's actual id service = game:GetService("MarketplaceService") service:PromptProductPurchase(player, id) end) service.ProcessReceipt = function(receiptInfo) if receiptInfo.ProductId == id then -- Whatever the developer product does, put that here end end
Keep in mind that you need to set the variable "player" before using PromptProductPurchase().
Closed as Too Broad by adark, Spongocardo, and BlueTaslem
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?