--by pavetr.top surface.CreateFont ("gayfont", { font = "Open Sans Bold", size = 30, weight = 800, antialias = true }) hook.Add("PlayerTraceAttack", "KeyPresstest", function(ply, damageinfo, vector, trace) ply = LocalPlayer() lox = ply:GetEyeTrace().Entity damage = 100 - lox:Health() totaldamage = damageinfo:GetDamage() if damage != 0 then if lox:IsValid() then if IsValid(damagenum) then damagenum:Remove() end ply:EmitSound("garrysmod/ui_hover.wav") randoms = math.Rand(50, -50) damagenum = vgui.Create("Button") damagenum:SetSize(40 + damage / 3, 30 + damage / 3) damagenum:SetFont("gayfont") damagenum:SetPos(1050, 500) damagenum:MoveTo(1050, 450, 2, 0, 1) damagenum:SizeTo(60, 0, 2, 0, 1) damagenum:AlphaTo(0, 1, 0.5) damagenum:ColorTo(Color(255,255,255), 3, 0) if (damage >= 30) then damagenum:SetColor(Color(255, 123, 123)) end if (damage >= 50) then damagenum:SetColor(Color(255, 63, 63)) end if (damage >= 80) then damagenum:SetColor(Color(163, 0, 0)) end if (damage >= 1) then damagenum:SetText(damage) end if (lox:Health() <= 0) then damagenum:SetText("Death") end damagenum.Paint = function(_ , w, h) draw.RoundedBox(40, 0, 0, w, h, Color(255, 255, 255)) end end end end) print("gay")