Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local idiot=Color(255,0,0)
- local mode=0
- local lastidiot=0
- local overlay=GetOverlayPanel()
- local lastflash=0
- local len=.25
- overlay.Paint=function() hook.Call"HUDPaint" end
- hook.Add("HUDPaint","idiot",function()
- if(lastidiot<CurTime()) then
- lastidiot=CurTime()+5
- for i=1,6 do
- timer.Simple((i-1)/32,function() surface.PlaySound("idiot.mp3") end)
- end
- end
- if(lastflash<CurTime()) then
- mode=math.random(1,3)
- --if(mode==4) then mode=1 end
- lastflash=CurTime()+len
- end
- if(mode==1) then
- idiot=Color((lastflash-CurTime())/len*255,0,0)
- elseif(mode==2) then
- idiot=Color(0,(lastflash-CurTime())/len*255,0)
- elseif(mode==3) then
- idiot=Color(0,0,(lastflash-CurTime())/len*255)
- end
- surface.SetDrawColor(idiot)
- surface.DrawRect(0,0,ScrW(),ScrH())
- end)
Advertisement
Add Comment
Please, Sign In to add comment