local httpService = game:GetService("HttpService")
local gameID = game.GameId
local baseUrl = "https://games.roproxy.com/v1/games/%s/game-passes?limit=100&sortOrder=Asc"
local URL = baseUrl:format(gameID)
local response
local jsonData
local success, err = pcall(function()
response = httpService:GetAsync(URL)
end)
if success then
jsonData = httpService:JSONDecode(response)
print(jsonData.data[1].name)
else
print(err)
end
This code uses the RoProxy endpoint to get the gamepasses.
If you want to do this with other games, you will need to get their UniverseID
. To do this, you can visit the endpoint below and replace PLACEID
with the game’s PlaceID.
FROM:
TO:
Then you can change the variable gameID
to the numbers displayed in the brackets.