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)
You have already asked this question before, and I have already answered it. You can find the question right here -- However, here is a more updated code, because now I know where your buttons are located so that I can make the entire script. For guidance, go to my previous answer. Here is the same code as last time, but completed because I know where the frame is:
-- local script inside the button local allow = false local Player = game.Players.LocalPlayer if game.MarketplaceService:PlayerOwnsAsset(Player,773709832) then -- checks if he has it, again, replace the id allow = true -- sets a variable to true end --( they will have to reset after purchasing the gamepass) script.Parent.MouseButton1Down:Connect(function() if allow then-- if they have it, do which ever you want script.Parent.Parent.Frame.Visible = true -- here is your new line. else -- if they do not have it, ask them to purchase game.MarketplaceService:PromptPurchase(Player, 773709832) -- change the number to the ID of the gamepass, found in its link of your gamepass end end)