# This file is automatically generated. Please don't edit it manually. # To submit a bug report on the content, see # https://devforum.roblox.com/c/bug-reports/documentation-issues/72 name: GamePassService type: class memory_category: Instances summary: | A service associated with the legacy game pass system. Use `Class.MarketplaceService` for all new work. description: | The GamePassService is a service that supports legacy game passes using _Asset IDs_. `Class.MarketplaceService` should be used for all new game passes. For more information about game passes, please see [Game Passes](../../../production/monetization/passes.md). code_samples: [] inherits: - Instance descendants: [] tags: - NotCreatable - Service deprecation_message: '' properties: [] methods: - name: GamePassService:PlayerHasPass summary: | Returns `true` if the `Class.Player` has the specified **legacy** game pass. Does not work with new game passes. description: | This function will not work with new game passes; use `Class.MarketplaceService:UserOwnsGamePassAsync()` instead. This function returns `true` if the `Class.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. See [Passes](../../../production/monetization/passes.md) for further information. #### Legacy Game Passes Historically, game passes on Roblox had an **asset ID** associated with them. Although such game passes still have an asset ID, they now also have a **pass ID**. All new game passes created **only** have a pass ID. Whether you are using an **Asset ID** or a **pass ID** determines which API members you can use.
Asset ID (Legacy) Pass ID (Current)
Verify Ownership Class.GamePassService:PlayerHasPass() Class.MarketplaceService:UserOwnsGamePassAsync()
Prompt a purchase Class.MarketplaceService:PromptPurchase() Class.MarketplaceService:PromptGamePassPurchase()
Prompted purchase finished Class.MarketplaceService.PromptPurchaseFinished Class.MarketplaceService.PromptGamePassPurchaseFinished
code_samples: - GamePassService-PlayerHasPass1 parameters: - name: player type: Player default: summary: | The `Class.Player` for which to check ownership. - name: gamePassId type: int64 default: summary: | The _Asset ID_ of the game pass. This is **not** the _Game Pass ID_ (see above). returns: - type: boolean summary: | Whether the `Class.Player` owns the game pass. tags: - Yields - Deprecated deprecation_message: '' security: None thread_safety: Unsafe capabilities: - Monetization events: [] callbacks: []