I was wondering how to make a textbutton use a certain script but only use the script if the user has a certain gamepass.
script is an example, not made to work as most of the variables arent defined.
-- detect when they use the button textbutton.MouseButton1Click:Connect(function() -- checks if player owns the gamepass if marketplaceservice:UserOwnsGamePassAsync(userid, gamepassid) then --[[ you know that they own the gamepass now add whatever you wanted to do here if you are using another script, you can use bindableevent:Fire() and bindableevent.Event:Connect() ]] end end)
next time, you should attempt to make a script before coming here.