Advertisement
zack785

Untitled

May 22nd, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. -- Get the assets of everything a ROBLOX user is wearing. [Excluding gear]
  2. -- @Acecateer
  3.  
  4. local Http = game:GetService("HttpService")
  5. local UserId = 21386552
  6.  
  7. local AppearanceAssets = Http:GetAsync("http://roproxy.tk/Asset/AvatarAccoutrements.ashx?userId="..UserId, true)
  8.  
  9. local Assets = {}
  10.  
  11. -- Table Conversion
  12. local Previous = 1
  13. local Next = nil
  14. while true do
  15.     if Previous ~= 1 then
  16.         Next = string.find(AppearanceAssets, ";", Previous + 1)
  17.         if not Next then break end
  18.         Asset = string.sub(AppearanceAssets, Previous + 1, Next - 1)
  19.     else
  20.         Next = string.find(AppearanceAssets, ";", Previous)
  21.         if not Next then break end
  22.         Asset = string.sub(AppearanceAssets, Previous, Next - 1)
  23.     end
  24.     table.insert(Assets, Asset)
  25.     Previous = Next
  26.     Next = nil
  27.     wait()
  28. end
  29.  
  30. -- Gather AssetIds
  31. for a, c in pairs(Assets) do
  32.     if not string.find(c, "BodyColors") and not string.find(c, "equipped") then
  33.         local AssetId = string.sub(c, string.find(tostring(c), "=", 1) + 1, string.len(tostring(c)))
  34.         print("Asset number "..a..": "..AssetId)
  35.     elseif string.find(c, "BodyColors") then
  36.         print("Asset number "..a.." rejected due to it being BodyColors.")
  37.     else
  38.         print("Asset number "..a.." rejected due to it being a gear.")
  39.     end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement