surface.CreateFont( "dank", {
    font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
    extended = false,
    size = 30,
    weight = 500,
    blursize = 0,
    scanlines = 0,
    antialias = false,
    underline = false,
    italic = false,
    strikeout = false,
    symbol = false,
    rotary = false,
    shadow = true,
    additive = false,
    outline = true,

} )


function HoveringNames()

    for _, target in pairs(player.GetAll()) do
        if target:Alive() and target != LocalPlayer() then

            local teamn = target:Team()
            local team_color = team.GetColor ( teamn )
            local targetPos = target:GetPos() + Vector(0,0,80)
            local targetDistance = math.floor((LocalPlayer():GetPos():Distance( targetPos ))/40)
            local targetScreenpos = targetPos:ToScreen()
            draw.SimpleText(target:Nick(), "dank", tonumber(targetScreenpos.x), tonumber(targetScreenpos.y), Color(team_color.r,team_color.g,team_color.b,255 - ((255/75)*targetDistance)), TEXT_ALIGN_CENTER)
            -- change the 600 in (255/600) to set a range 
        end
    end
end
hook.Add("HUDPaint", "HoveringNames", HoveringNames)