I've looked around and couldn't find anything so far. If someone could help me write the script for it that would be awesome!
COMMUNITY QUESTION
How would I set up a Surface Gui that prompts a purchase for a Roblox Product?
1 answer
-- Server
local MarketPlaceService = game:GetService("MarketplaceService")
MarketPlaceService.ProcessReceipt = function(receiptInfo)
local userId = receiptInfo.PlayerId
if receiptInfo.ProductId == 0000 then -- 100 Cash Id
local Player = game.players:GetPlayerFromUserIdAsync(userId)
local Cash = Player.leaderstats.Cash
Cash.Value = Cash.Value + 100
end
end
-- Client
local Player = game.Players.LocalPlayer
local ProductId = 0000
local MarketPlaceService = game:GetService("MarketplaceService")
local Button = script.Parent.Button
Button.MouseButton1Click:Connect(function()
MarketPlaceService:PromptPurchase(ProductId)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
U write the script for it
make a screengui and put a SurfaceGui inside it as set the adornee to the part, and put a textbutton in it
then just listen for when the user clicks the button and do the stuff
omg this freaking question has "request" written all over it