on damage: if attacker is a player: if victim is not a player: set {_percent} to (victim's health/victim's max health)*100 set {_} to random integer between 1 and 999999 create bossbar title "%victim's name% - %victim's health%/%victim's max health%" and id {_} for attacker with progress {_percent}