Get all gamepasses from a game?

Hey I don’t want to add an image button everytime I upload a gamepasses on my game. Is it possible to get all the gamepasses in a sort of table from your game?

Tell me if this is possible this can help a lot!

1 Like

Based on this feature request, I don’t think there is.

However, I encountered this problem too. How I solved it is by adding all the game pass IDs into a table, and looping through them and getting their market place info (name, price, description, image, etc). After that I would create an image label/frame/etc and make the layout order either the price or -price to sort it (if using grid layouts etc) from most expensive or cheapest. I then just used the description and other information to create further purchase frames. All of this is automated as long as I manually add the id.

If you want it to update the game pass list without shutting down servers, you could store a JSON table with game pass IDs on paste bin or a similar service and cache it every X seconds/minutes.

13 Likes

Really smart! Thanks for your help! :+1:

1 Like

No problem. If you need any help implementing this or anything, feel free to dm me!

1 Like

They have:

game:GetService("MarketplaceService"):GetDeveloperProductsAsync()

which returns a page object, so I’m not sure why we can’t equally have:

game:GetService("MarketplaceService"):GetGamepassesAsync()

which also return a page object :thinking:

9 Likes