Also something interesting, it prints only the last ones rap. Not the combined rap.
(My combined rap is around 14k+)
Current code:
local HttpService = game:GetService("HttpService")
local UserId = 1397701424
local Endpoint = "https://inventory.rprxy.xyz/v1/users/%d/assets/collectibles"
local success, result = pcall(HttpService.GetAsync, HttpService, Endpoint:format(UserId))
local data = HttpService:JSONDecode(result)
if data then
local averagePrice = 0
for i, v in pairs (data["data"]) do
if data["data"][i]["recentAveragePrice"] then
averagePrice += data["data"][i]["recentAveragePrice"]
end
end
print(averagePrice)
end
local HttpService = game:GetService("HttpService")
local UserId = 1397701424
local Endpoint = "https://inventory.rprxy.xyz/v1/users/%d/assets/collectibles"
local Success, Result = pcall(HttpService.GetAsync, HttpService, Endpoint:format(UserId))
local Response = HttpService:JSONDecode(Result)
local TotalRap = 0
for i, Asset in pairs(Response.data) do
print(Asset.recentAveragePrice)
TotalRap += Asset.recentAveragePrice
end
warn(TotalRap)