Log in to vote

How to Make a Textbutton use a script if the user has a certain gamepass?

Asked by 13 days ago

I was wondering how to make a textbutton use a certain script but only use the script if the user has a certain gamepass.

1 answer

Log in to vote
Answered by 12 days ago
Edited 12 days ago

script is an example, not made to work as most of the variables arent defined.

-- detect when they use the button
    -- 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()

next time, you should attempt to make a script before coming here.


Answer this question