How do I make a scrolling frame with the names of people who bought a gamepass?

I know how to use scrolling frames, but I do not know how to find the names of those who bought a certain pass.

Right now I have this:

local guiMain = Instance.new(“GuiMain”)
guiMain.text = (however I detect the name)

You can’t check who bought your game pass unless the ScrollingFrame is only intended for players who bought the game pass in the current session rather than overall, which then you can just search and test first before continuing on with this thread. It’s a matter of seeing who bought a game pass (PromptGamePassPurchaseFinished) and then adding their name to a ScrollingFrame in your own way.

By the way, GuiMain is deprecated. Use ScreenGui.

1 Like

You could check if the gamepass has been bought then put their Name into a database.

When the server is initalized, you could run a for loop iterating through the contents of the database and for every value, you could create a textlabel with the name, As for the organizing, use a UIGridLayout

P.S Be careful of the limit, If alot of players buy your gamepass, it may surpass the limit.

1 Like

Keep in mind of players who buy the gamepass from the site possibly, you may have to keep a datastore record of every player that has the gamepass or after buying it.

Keep in mind that gamepasses are deletable at any time if you want to check for that unless you rather just force players to keep gamepasses forever even if it isn’t in their inventory.

I would make a data store, and make a key called game pass or whatever and the value of the key is a list of the userids of everyone who bought it.
Then, whenever someone buys it add their user id too the list.