Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I code a gamepass shop in my game?

I know that first I have to make the gamepass, then I have to script it out with a GUI.

If you answer this CORRECTLY I will ACCEPT your answer.

2 answers

✓ Accepted answer

local mps = game:GetService("MarketplaceService")
 
local id = 7550418
 
local player = game.Players.LocalPlayer
 
 
script.Parent.MouseButton1Click:Connect(function()
           
    mps:PromptGamePassPurchase(player, id) 
end)


local mps = game:GetService("MarketplaceService")

local id = 7550418

local player = game.Players.LocalPlayer


script.Parent.MouseButton1Click:Connect(function()
			
	mps:PromptGamePassPurchase(player, id)	
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.