My goal is to have a VIP type gamepass that allows players to access a certain gui in the game shop. How do I make it so when the player clicks on the textbutton or imagebutton a gui pops up only if the that player has the gamepass. So if the player does not have the gamepass the gui will not show up for them. If anyone knows how that would be great. Thanks!
I cannot spoon feed you as the purpose of this site is to HELP users.
I can give you a push in the right direction, though.
You’ll have to look into the MarketplaceService
.
Run code if a player owns a pass.
local marketplace = game:GetService'MarketplaceService' if marketplace:UserOwnsGamePassAsync(player.UserId, gamepassId) then --do code. I recommend putting this in an event/loop so it can run multiple times. end --Remember to define your player and game pass Id
Closed as Not Constructive by User#19524, Amiaa16, evaera, and User#21908
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?