CapsAdmin

Untitled

Apr 14th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. local function OKAY(tbl)
  2.     local i = 0
  3.     local data
  4.     local spos = Vector()
  5.     hook.Add("HUDPaint",1,function()
  6.    
  7.     data = tbl[i] or data
  8.    
  9.     if data then
  10.         spos = spos + ((data - spos) * FrameTime() * 2)
  11.         surface.SetDrawColor(255, 255, 255, 255)
  12.         surface.DrawRect(spos.x * ScrW(), spos.y * ScrH(), 50, 50)
  13.     end
  14.    
  15.     i = i + 1
  16.     end)
  17. end
  18.  
  19. http.Get("http://behindallgalaxies.free.fr/osu/17044%20NH22%20-%20Corrosion/NH22%20-%20Corrosion%20(Lena)%20%5BNormal%5D.osu","",function(str)
  20.     local go = false
  21.     local tbl = {}
  22.     for _, line in pairs(str:Split("\n")) do
  23.     if go then
  24.         local x,y,pos = line:match("(%d-),(%d-),(%d-),")
  25.        
  26.         if not pos then
  27.         return OKAY(tbl)
  28.         end
  29.        
  30.         pos = math.Round(pos / 20)
  31.         x = (x / 512)
  32.         y = (y / 512)
  33.            
  34.         tbl[pos] = Vector(x,y)     
  35.     end
  36.    
  37.     if line:lower():find("hitobjects") then
  38.         go = true
  39.     end
  40.     end
  41. end)
Advertisement
Add Comment
Please, Sign In to add comment