local http = game:GetService("HttpService")
local MarketplaceService = game:GetService("MarketplaceService")
local DOONATE = {}
local function getPlayerGamePasses(assetId)
local allItems = {}
local success, errormsg = pcall(function()
local done = false
local nextPageCursor
while done == false do
local data
if nextPageCursor then
data = http:GetAsync("https://www.roproxy.com/users/inventory/list-json?assetTypeId="..tostring(assetId).."&cursor="..nextPageCursor.."&itemsPerPage=100&userId="..tostring(userId))
else
data = http:GetAsync("https://www.roproxy.com/users/inventory/list-json?assetTypeId="..tostring(assetId).."&cursor=&itemsPerPage=100&userId="..tostring(userId))
end
if data then
data = http:JSONDecode(data)
local items = data["Data"]["Items"]
for _, item in pairs(items) do
table.insert(allItems, item)
print(item["Item"]["Name"])
end
if data["Data"]["nextPageCursor"] then
nextPageCursor = data["Data"]["nextPageCursor"]
--print(nextPageCursor)
else
done = true
end
else
warn("No data.")
end
end
end)
if success then
--print("Successfully retrieved data.")
else
warn(errormsg)
end
local createdByUser = {}
for i, item in pairs(allItems) do
pcall(function()
if (item["Creator"]["Id"] == userId) and (item["Product"]["IsForSale"] == true) then
table.insert(DOONATE,item)
end
end)
end
end
getPlayerGamePasses(2)
getPlayerGamePasses(11)
getPlayerGamePasses(12)
getPlayerGamePasses(34)
print(DOONATE)