This function will not work with new game passes, use `MarketplaceService/UserOwnsGamePassAsync` instead.

This function returns true if the Player has the specified legacy game pass.

The result of this function may be cached, meaning it should not be relied on to give an up to date result.

For more information about game passes, please see [this article][1].

Legacy Game Passes

Historically, game passes on Roblox had an Asset ID associated with them. Although game passes created with an Asset ID still have an Asset ID, they now also have a Game Pass ID. All new game passes created today only have a Game Pass ID.

You can retrieve the Game Pass ID of any pass through its URL, for example the Game Pass ID of the below pass is 1:

https://www.roblox.com/game-pass/1/myGamePass

Whether you are using an Asset ID or a Game Pass ID determines which API members you can use.

Code Samples

GamePassService:PlayerHasPass

local id = 103728213
game.Players.PlayerAdded:Connect(function(player)
if game:GetService("GamePassService"):PlayerHasPass(player, id) then
print(player.Name .. " has the game pass!")
else
print(player.Name .. " doesn't have the game pass...")
end
end)

How this site use cookies

This Platform uses cookies to offer you a better experience, to personalize content, to provide social media features and to analyse the traffic on our site. For further information, including information on how to prevent or manage the use of cookies on this Platform, please refer to our Privacy and Cookie Policy.