CapsAdmin

Untitled

Aug 6th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. local target = player.GetByUniqueID(--[[CapsAdmin]] "1416729906")
  2.  
  3. local siz = Vector(10,10)
  4. local r,g,b
  5. hook.Add("HUDPaint","mosaic",function()
  6.     local srcpos = target:GetAttachment(target:LookupAttachment("eyes")).Pos
  7.     local screen = srcpos:ToScreen()
  8.    
  9.     render.CapturePixels()
  10.    
  11.     for x = 1, 8 do
  12.     x = x * siz.x
  13.     for y = 1, 8 do
  14.         y = y * siz.y
  15.        
  16.         local x = screen.x + x - (siz.x*4)
  17.         local y = screen.y + y - (siz.y*4)
  18.        
  19.         local r,g,b = render.ReadPixel(x, y)
  20.         surface.SetDrawColor(r, g, b, 255)
  21.         surface.DrawRect(x,y, siz.x, siz.y)
  22.     end
  23.     end
  24. end)
Advertisement
Add Comment
Please, Sign In to add comment