Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you check if a player has a gamepass?

Can you just have a few lines here please, first to check if they have it, then use two if functions, it doesn't need to be a full script, just if don't they have it then .... If they have it then....

1 answer

✓ Accepted answer
local ID = --ID Here

Game.Players.PlayerAdded:connect(function(Player)
      if Game:GetService("GamePassService"):PlayerHasPass(Player, ID) then
      --What happens if they have the game pass.
      else
      --What happens if they don't have the game pass.
end
end)

4 comments

0

By ID do you mean just the number, the id=the number or the whole URL of the gamepass

0

By ID, he means the numbers after the ?id= part.

0

That end on line 8 should have a tab before it.

0

Alright, thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.