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

How to Make a in game Gamepass GUI Shop?

Asked by 4 years ago

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

Log in to vote
0
Answered by 4 years ago

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)
Ad

Answer this question