I'm making a donate button which allows people to donate to me. I have everything setup but now I just need the script that actually allows people to make the transaction. This is how the setup goes game > starter GUI > screen GUI > Frame >text button > script.
Edit: Figured it out, here is the script:
MPS = game:GetService("MarketplaceService")
id = 1138682487
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
MPS:PromptProductPurchase(player, id)
end)

5 comments
If you are going to provide an answer, please make sure the code is actually spelled correctly. game.replicatedstorage doesn't exist, game.ReplicatedStorage does.
sorry, i will fix that, but in my defense its pretty obvious of what it means
Where do I put the developer product ID? The server needs to know what to give the people.
in your question, you said you set everything else up... what did you set up? "I have everything setup"
I meant the GUI's