function()
if UnitIsDead("target") then
return "0"
end
local health = UnitHealth("target")
if health >= 1000000 then
health = string.format("%.1fm", health / 1000000) -- 2.4m
elseif health >= 10000 then
health = string.format("%dk", health / 1000) -- 24k, 240k
elseif health >= 1000 then
health = string.format("%.1fk", health / 1000) -- 2.4k
end
if UnitIsDead("target") then
return "0"
end
local targethp = string.format("%.f", (UnitHealth("target")/UnitHealthMax("target"))*100)
return string.format("%s", health)
end