Somepotato

urdumb

Oct 2nd, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. local idiot=Color(255,0,0)
  2. local mode=0
  3. local lastidiot=0
  4. local overlay=GetOverlayPanel()
  5. local lastflash=0
  6. local len=.25
  7. overlay.Paint=function() hook.Call"HUDPaint" end
  8. hook.Add("HUDPaint","idiot",function()
  9. if(lastidiot<CurTime()) then
  10. lastidiot=CurTime()+5
  11. for i=1,6 do
  12. timer.Simple((i-1)/32,function() surface.PlaySound("idiot.mp3") end)
  13.  
  14. end
  15. end
  16. if(lastflash<CurTime()) then
  17. mode=math.random(1,3)
  18. --if(mode==4) then mode=1 end
  19.  
  20. lastflash=CurTime()+len
  21. end
  22.  
  23. if(mode==1) then
  24. idiot=Color((lastflash-CurTime())/len*255,0,0)
  25. elseif(mode==2) then
  26. idiot=Color(0,(lastflash-CurTime())/len*255,0)
  27. elseif(mode==3) then
  28. idiot=Color(0,0,(lastflash-CurTime())/len*255)
  29. end
  30. surface.SetDrawColor(idiot)
  31. surface.DrawRect(0,0,ScrW(),ScrH())
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment