Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How can I make a GUI that has gamepasses inside?

Asked by
goodlead -62
4 years ago

I am trying to make a gamepass shop in game?

Please help!

1 answer

Log in to vote
0
Answered by 4 years ago

So, basically what you want to do is make the frame, and have all the gui buttons in them. Then, you put this LocalScript in each button:

local plr = game.Players.LocalPlayer
local mps = game:GetService("MarketplaceService")

script.Parent.MouseButton1Down:Connect(function()
    mps:PromptGamePassPurchase(plr, 12345) --Change 12345 to the id of your gamepass.--
end)

This belongs in a LocalScript. Not a regular one.

Ad

Answer this question