Hey, I'm making a game and I want to know how to check if they have the gamepass to activate a function. Does it require an if statement? Is this suppose to be in a local script?
Here is a place to help you http://wiki.roblox.com/index.php?title=Game_Pass
here's some code of the wiki and a little edited by me
local passId = 0000000 -- change this to your game pass ID. function isAuthenticated(player) -- checks to see if the player owns your pass return game:GetService("GamePassService"):PlayerHasPass(player, passId) -- this method will check to see if player has the pass from the passId end function Start(plr) print(plr.Name .. " has bought the game pass with id " .. passId) end game.Players.PlayerAdded:connect(function(plr) if isAuthenticated(plr) then -- checks to see if player is authenticaded Start(plr) -- activate function end end)