You would need to make a request to https://users.roblox.com/v1/users/{id}/status where id is the ID of the player.
Since Roblox doesn’t allow developers to send requests to their own endpoints using HttpService you will need a proxy. For this one I would use https://rprxy.xyz. So you would request to https://users.rprxy.xyz/v1/users/{id}/status
local USER_ID = 1 -- Roblox
local URL = string.format("https://users.rprxy.xyz/v1/users/%d/status", USER_ID)
local HttpService = game:GetService("HttpService")
local response = HttpService:RequestAsync({
Url = URL,
Method = "GET" -- GETting the data + this endpoint only accepts
-- this request type
})
if response.Success then
local status = HttpService:JSONDecode(response.Body).status
-- response.Body would be a JSON-encoded table,
-- so it would look like {"status": "[the status]"}, so it needs to be
-- decoded into a Lua table
end
Then you can use %s which means string. There are a lot of cool specifiers you can “make”, for instance %02d pads a 0 to a number if it isn’t 2 digits long already, e.g string.format("%02d", 5) == "05" but string.format("%02d", 12) == "12" but this is beyond the scope of your topic