Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you check if a player has a gamepass? [closed]

Asked by
Mystdar 352 Moderation Voter
9 years ago

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....

Locked by adark and evaera

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
4
Answered by
TofuBytes 500 Moderation Voter
9 years ago
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)
0
By ID do you mean just the number, the id=the number or the whole URL of the gamepass Mystdar 352 — 9y
0
By ID, he means the numbers after the ?id= part. Thewsomeguy 448 — 9y
0
That end on line 8 should have a tab before it. Thewsomeguy 448 — 9y
0
Alright, thanks! Mystdar 352 — 9y
Ad