How to grab players gamepasses, pants, shirts and tshirts with proxy?

I have been using this script to get all players Gamepasses, Shirts, etc. It works well but sometimes the proxy gets rate limited or just goes down for a while. How can I use my own proxy using the ProxyService module? I want the data to be structured the same way as it is now that I grab it using roproxy. Could anyone help me out?

	["TShirt"] = 2,
	["Shirt"] = 11,
	["Pant"] = 12,
	["GamePass"] = 34
}

local function GetContent(username,userid)
	local Contents = {}
	for iid,vv in pairs(assetid) do
		local linkforplayer = "https://www.roproxy.com/users/inventory/list-json?assetTypeId="..vv.."&cursor=&itemsPerPage=100&pageNumber=%25x&sortOrder=Desc&userId="..userid
		local datafromlink = http:GetAsync(linkforplayer,true)
		local readabledata = http:JSONDecode(datafromlink)
		local suc, er = pcall(function()
			for i,v in pairs(readabledata["Data"]["Items"]) do
				if v["Creator"]["Id"] == userid then
					if v["Product"] then
						if v["Product"]["IsForSale"] == true then
							table.insert(Contents, v["Item"]["AssetId"])
						end
					end
				end
			end
		end)
		if not suc then
			warn(er)
		end
	end
	print(Contents)
	return Contents
end

I know that Iā€™m not supposed to ask you to just write a script for me. I just have a very hard time wrapping my head around how these proxies actually work. I would very much appreciate if you could help me with this!

1 Like