GamePassService
A service associated with the legacy game pass system. Use MarketplaceService for all new work.
Memory category | Instances |
---|
Member index 1
Removed member index 1
History | Member | |
---|---|---|
311 | SetPlayerHasPassUrl(playerHasPassUrl: string): void |
Description
The GamePassService is a service that supports legacy game passes using Asset IDs. MarketplaceService should be used for all new game passes.
For more information about game passes, please see Game Passes.
History 8
- 484 Change Parameters of PlayerHasPass from (player: Instance, gamePassId: int64) to (player: Player, gamePassId: int64)
- 462 Change ThreadSafety of PlayerHasPass from to Unsafe
- 368 Change Tags of PlayerHasPass from [Yields] to [Yields, Deprecated]
- 322 Change Parameters of PlayerHasPass from (player: Instance, gamePassId: int) to (player: Instance, gamePassId: int64)
- 311 Remove SetPlayerHasPassUrl
- 72 Add SetPlayerHasPassUrl
- 72 Add PlayerHasPass
- 72 Add GamePassService
Members 1
PlayerHasPass
Parameters (2) | ||
---|---|---|
player | Player | |
gamePassId | int64 | |
Returns (1) | ||
bool |
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.
See Passes 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 | GamePassService:PlayerHasPass() | MarketplaceService:UserOwnsGamePassAsync() |
Prompt a purchase | MarketplaceService:PromptPurchase() | MarketplaceService:PromptGamePassPurchase() |
Prompted purchase finished | MarketplaceService.PromptPurchaseFinished | MarketplaceService.PromptGamePassPurchaseFinished |
Thread safety | Unsafe |
---|
History 5
- 484 Change Parameters of PlayerHasPass from (player: Instance, gamePassId: int64) to (player: Player, gamePassId: int64)
- 462 Change ThreadSafety of PlayerHasPass from to Unsafe
- 368 Change Tags of PlayerHasPass from [Yields] to [Yields, Deprecated]
- 322 Change Parameters of PlayerHasPass from (player: Instance, gamePassId: int) to (player: Instance, gamePassId: int64)
- 72 Add PlayerHasPass
Removed members 1
SetPlayerHasPassUrl
Parameters (1) | ||
---|---|---|
playerHasPassUrl | string | |
Returns (1) | ||
void |
Security | LocalUserSecurity |
---|
History 2
- 311 Remove SetPlayerHasPassUrl
- 72 Add SetPlayerHasPassUrl