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

How to Make a in game Gamepass GUI Shop?

I've been trying to look up this question on Google and Youtube trying to find a video or something on this subject. But all I'm finding is videos that use the old "GamepassService", instead of "MarketPlaceService". Is there anyone that could help a brother out on this subject cause I'm completely lost at this point lol.

1 answer

You can use PromtGamePassPurchase and put it into a mouseclick or mousebutton1down event function (depending on whether or not you use a GUI). I would also recommend checking the Object Browser for MarketplaceService if you want to put other in-game purchases into your game because this example only works with game passes.

local mps = game:GetService("MarketplaceService")
local gpid = -- Insert ID Here

script.ScreenGui.ResetOnSpawn = false

game.Players.PlayerAdded:Connect(function(player)
	 mps:PromptGamePassPurchase(player, gpid) -- game pass ID can also go here
end)

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