Advertisement
sniperwolf1130

damage indicator

Jun 6th, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. on damage:
  2. attacker is player
  3. {di.%attacker%} is not 1
  4. wait 1 tick
  5. set {damage.%victim's uuid%} to 1
  6. set action bar of attacker to "<gold>%victim% <gray>HP: <light red>%victim's health%<gray>/<light green>%victim's max health% <gray>(<yellow>-%damage%<gray>)"
  7. wait 1 second
  8. set {damage.%victim's uuid%} to 0
  9.  
  10. on any movement:
  11. player's target entity is set
  12. {di.%player%} is not 1
  13. "%player's target entity%" is not "experience orb"
  14. "%player's target entity%" is not "dropped item"
  15. {damage.%player's target entity's uuid%} is not 1
  16. loop blocks between block at location 1 meter above the player and block at location 1 meter above the player's target entity:
  17. if loop-block is not air:
  18. set {_block} to 1
  19. if {_block} is not 1:
  20. set action bar of player to "<gold>%player's target entity% <gray>HP: <light green>%player's target entity's max health%"
  21.  
  22. command /di:
  23. trigger:
  24. if {di.%player%} is not 1:
  25. set {di.%player%} to 1
  26. message "<gold>damage indicator off"
  27. else:
  28. set {di.%player%} to 0
  29. message "<gold>damage indicator on"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement