I have a working Music command but for some reason this hat catalog search errors...
Any idea's why this is erroring? Im using the same code other then Im using a differant URL.
Error... Cant parse JSON
Cmd(4,'Search Http Hat','Sh','Search Hats From HttpService','<returns Service value>',function(Owner,Msg) if not V3['HttpEnabled']==true then Tablet(Owner,'Please Enable HttpService!',function() Tablet(Owner,'https://www.youtube.com/watch?v=MJr-_1YVBr0',function() end) end) else local KeyWords=game:service'HttpService':UrlEncode(Msg) local Url='http://rproxy.tk/catalog/browse.aspx?CatalogContext=1&Subcategory=9&Keyword='..tostring(KeyWords)..'&LegendExpanded=true&Category=3' local Assets=game:service'HttpService':JSONDecode(game:service'HttpService':GetAsync(Url)) for i=1,#Assets do Tablet(Owner,Assets[i].Name,function() Dismiss(Owner) Tablet(Owner,'Insert '..Assets[i].Name..'?',function() local x=game:service'InsertService':LoadAsset(Assets[i].Assets) for _,v in pairs(x:GetChildren()) do if v:IsA('Accoutrement') then pcall(function() v.Parent=Owner.Character end) end end table.insert(V3['HatLogs'],{IDN=Owner.Name,NAME=Assets[i].Name,ID=Assets[i].AssetId}) Tablet(Owner,'Now Inserting '..Assets[i].Name,function() Dismiss(Owner) end) end) end) end end end)
For each ROBLOX Asset there is a category;
So Audio is: &Category=9
Gear is: &Category=5
And Hat would be: &Category=8
So maybe do
"http://rproxy.tk/catalog/browse.aspx?Keyword="..tostring(KeyWords).. "&Category=8&LegendExpanded"