Gamepass Enables Script Script

Hello, I am no scripter, and have no experience, so I may need extra assistance with this.

I am trying to make a script where if a players owns a gamepass, a certain script in StarterCharacterScripts scripts in enabled. It would be nice if someone could give me a little info on how I would go about making this, to try and further research making this script, as I have seen no other problems under this (or any) catagory that relates to this.

1 Like

MarketPlaceService:UserOwnsGamePassAsync(passID)
end)

This detects if a player owns a gamepass. If so, you continue the script. Otherwise, you continue after the end.

You can find more information here: UserOwnsGamePassAsync

To enable the script, you can make a remote event and it can be fired if the player owns the gamepass. Afterward, just do:

game.RemoteEvents.<REMOTEEVENT>.OnClientEvent:Connect(function()…

Use “OnClientEvent” because it is in “StarterCharacterScripts” and it is local. Hope this helps and reply if you need more direct help! Be sure to include draft scripts here!

So, It detects that the user owns the gamepass, then in fires an event to enable script?
Is that how it works?

Yes, that is how it should work. Just add this in the gamepass script and it should work. Let me know if you need any more help! :slight_smile:

Well, one thing, do I need insert a remote event, and if so, where? I have no experience, so please bear with me.

No you don’t need a remote event. You just need to detect if a player has the gamepass. If they do then the script where it detects if you have a script will enable the script that you want to turn on if you have the gamepass.