[ create a new paste ] login | about

Link: http://codepad.org/FQKHlKHd    [ raw code | fork ]

Lua, pasted on Nov 14:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
	if ply and ply:IsValid() and ply:GetVelocity() then
		local defSpeedWidth = (math.min(velocity,2000))/2000
		speedWidth = math.Round(defSpeedWidth*250)
	end
	
	if ply:Health() >= 60 then
		healthColour = Color(0, 150, 100)
	elseif ply:Health() >= 30 and ply:Health() < 60 then
		healthColour = Color(180, 120, 50)
	elseif ply:Health() < 30 then
		healthColour = Color(255,0,0)
	end

	surface.SetDrawColor(255,255,255)
	surface.DrawOutlinedRect(99, ScrH() - 73, 252, 52)
	draw.RoundedBox(0, 100, ScrH() - 72, 250, 50, Color(100,100,100))
	draw.RoundedBox(0, 350, ScrH() - 72, speedWidth, 50, healthColour)


Create a new paste based on this one


Comments: