I was wondering how I could make a button gui when you click it will detect if you have the gamepass to open another frame but all the ways i try it wont work.
1 | local id = 10590821 -- change the id to yours! |
2 |
3 | game.Players.PlayerAdded:connect( function (player) |
4 | if game:GetService( "MarketplaceService" ):UserOwnsGamePassAsync(player.UserId, id) then |
5 | player.PlayerGui.Gamepass.Button.Visible = true |
6 | end |
7 | end ) |
i have done it