Help With Script That Opens A Gui Only If Player Owns Gamepass

I Am Working On A Button That Opens A GUI Only If You Own The Gamepass (And If You Don’t Own The Gamepass It Will Promt You To Buy It)

I Have Been Looking Through The Devforum And Youtube And Couldn’t Find Much To Help

I Am NOT A Scripter So I Have No Idea What Is Wrong

I Have The Following Code In A Local Script Under The Button I Want To Open The GUI

This Is Probably Really Simple But I Have No Idea What I’m Doing When It Comes To Scripting

Thanks!

1 Like

You can check if a gamepass is owned by MarketplaceService:UserOwnsGamePassAsync(userid,gamepassId)d

More about it here

1 Like

Thanks!

This Worked Perfectly.

1 Like