Gamepass Description

I’m wanting to get all the information from a gamepass through some script, does anyone know what I should do?

image

1 Like

You would use GetProductInfo to get the information of the specified gamepass via script: MarketplaceService | Roblox Creator Documentation

2 Likes
local MarketplaceService = game:GetService("MarketplaceService")

local gamePassId = 12345678  -- Replace this with the actual game pass ID

local function getGamePassInfo(gamePassId)
    local success, gamePassInfo = pcall(function()
        return MarketplaceService:GetProductInfo(gamePassId, Enum.InfoType.GamePass)
    end)
    
    if success then
        return gamePassInfo
    else
        warn("Failed to get game pass info:", gamePassInfo)
        return nil
    end
end

local gamePassInfo = getGamePassInfo(gamePassId)

if gamePassInfo then
    print("Game Pass ID:", gamePassInfo.AssetTypeId)
    print("Name:", gamePassInfo.Name)
    print("Description:", gamePassInfo.Description)
    print("Price:", gamePassInfo.PriceInRobux)
    print("Icon URL:", gamePassInfo.IconImageAssetId)
    print("Creator:", gamePassInfo.Creator.Name, "(" .. gamePassInfo.Creator.Id .. ")")
end
1 Like