So this is what i mean by it. Is like when you click on the button it asks you to buy the gamepass before getting into the GUI then it opens.
I tried my best but this is my result
https://gyazo.com/01eaf3905aa7503fc398f35e968728c8
Script that i made
script.Parent.MouseButton1Down:connect(function() script.Parent.Parent.Frame.Visible = not script.Parent.Parent.Frame.Visible end) local player = game.Players.LocalPlayer local id = 884659792 game:GetService("MarketplaceService"):promptPurchase(player, id) end)

2 comments
nice block code :D
first make another gui and put the gamepass code in that gui's text button