Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function()
  2. if UnitExists("target") then
  3. local unit = "target"
  4. local current, max = UnitHealth(unit), UnitHealthMax(unit)
  5.  
  6. local health = string.format("%.2f", current/1000) .. "k"
  7. local healthP = ("%i"):format(current / max * 100) .. "%"
  8.  
  9. return healthP .. " - " .. health
  10. else
  11. return "0%"
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement