Advertisement
Descaii

Assets

Jul 27th, 2014
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.15 KB | None | 0 0
  1. local I = Instance.new("Part",script)
  2. I.FormFactor = "Custom"
  3. I.Size = Vector3.new(20,20,1)
  4. I.Anchored = true
  5. I.CFrame = CFrame.new(0,11,0)
  6. local Screen = Instance.new("SurfaceGui",I)
  7. Screen.CanvasSize = Vector2.new(1000,1000)
  8. local Background = Instance.new("Frame",Screen)
  9. Background.Size = UDim2.new(1,0,1,0)
  10. Background.BackgroundColor3 = Color3.new(0,0,0)
  11. T = Instance.new("TextLabel",Background)
  12. T.Text = "Current ID:"
  13. T.Size = UDim2.new(1,0,0,20)
  14. local S = 100
  15. local UI = {}
  16. local baseTexture = "http://www.roblox.com/Thumbs/Asset.ashx?format=png&width=%d&height=%d&assetId=%d";
  17. function GetAssetTexture(aId, w, h)
  18.     if aId == nil or type(aId) ~= "number" or aId%1 ~= 0 then
  19.         error("Bad argument #1 to GetAssetTexture (integer expected, got " .. type(aId) .. ")")
  20.     end
  21.     return baseTexture:format(w or 110, h or 110, aId);
  22. end
  23. Assets = {[1]="Image";[2]="T-Shirt";[3]="Audio";[4]="Mesh";[5]="Lua";[6]="HTML";[7]="Text";[8]="Hat";[9]="Place";[10]="Model";[11]="Shirt";[12]="Pants";[13]="Decal";[14]="Head";[15]="Audio";[16]="Avatar";[17]="Head";[18]="Face";[19]="Gear";[20]="";[21]="Badge";[22]="Group Emblem";[23]="";[24]="Animation";[25]="Arms";[26]="Legs";[27]="Torso";[28]="Right Arm";[29]="Left Arm";[30]="Left Leg";[31]="Right Leg";[32]="Package";[33]="YouTubeVideo";[34]="Game Pass";[35]="App";[36]="";[37]="Code";[38]="Plugin";}
  24. function GetAssetType(N)
  25.     if Assets[N] then
  26.         return Assets[N]
  27.     else
  28.         return ""
  29.     end
  30. end
  31. function New(IM,T)
  32.     ypcall(function()
  33.         for i,v in pairs(UI) do
  34.             v.Position = v.Position +UDim2.new(0,S,0,0)
  35.             if v.AbsolutePosition.X+S > Screen.CanvasSize.X then
  36.                 v.Position = UDim2.new(0,0,0,v.AbsolutePosition.Y+S)
  37.             end
  38.             if (v.AbsolutePosition.Y+S)-20 > Screen.CanvasSize.Y then
  39.                 v:Destroy()
  40.                 table.remove(UI,i)
  41.             end
  42.         end
  43.         local N = Instance.new("ImageLabel",Background)
  44.         N.Size = UDim2.new(0,S,0,S)
  45.         N.Position = UDim2.new(0,0,0,20)
  46.         N.BackgroundColor3 = BrickColor.random().Color
  47.         N.Image = GetAssetTexture(IM,S,S)
  48.         local TX = Instance.new("TextLabel",N)
  49.         TX.Size = UDim2.new(1,0,0.2,0)
  50.         TX.Position = UDim2.new(0,0,1-0.2,0)
  51.         TX.Text = T or ""
  52.         TX.TextWrapped = true
  53.         TX.Size = UDim2.new(1,0,0,20)
  54.         N.Changed:connect(function()
  55.             GetAssetTexture(IM,S,S)
  56.         end)
  57.         if not T then
  58.             TX.BackgroundTransparency = 1
  59.         end
  60.         table.insert(UI,N)
  61.     end)
  62. end
  63. http = game:GetService("HttpService")
  64. local ID = http:JSONDecode(http:GetAsync("http://rproxy.tk/catalog/json?SortType=RecentlyUpdated&ResultsPerPage=1&Page=1&IncludeNotForSale=true"))[1].AssetId
  65. market = game:GetService("MarketplaceService")
  66. function checkid(id)
  67.     local i
  68.     pcall(function()
  69.         i = market:GetProductInfo(id)
  70.     end)
  71.     return i
  72. end
  73. Tim = tick()
  74. Diff = tick()-Tim
  75. while wait() do
  76.     Delay(0,function()
  77.         local C = checkid(ID+1)
  78.         if C then
  79.             local R = GetAssetType(C.AssetTypeId)
  80.             ID = ID+1
  81.             if R ~= "Image" and R ~= "Decal" then
  82.                 New(ID,tostring(C.Name).."|"..R)
  83.             end
  84.             Diff = tick()-Tim
  85.             Tim = tick()
  86.         end
  87.     end)
  88.     T.Text = "Current ID:"..ID.."   New Asset Speed:" ..( (Diff < 1 and math.ceil(1/Diff).." assets per second") or (Diff > 1 and "One asset every "..math.ceil(Diff).." second(s)") or "")
  89. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement