Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function()
- if UnitExists("target") then
- local unit = "target"
- local current, max = UnitHealth(unit), UnitHealthMax(unit)
- local health = string.format("%.2f", current/1000) .. "k"
- local healthP = ("%i"):format(current / max * 100) .. "%"
- return healthP .. " - " .. health
- else
- return "0%"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement