akon1248

Untitled

Nov 14th, 2018
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. on any movement:
  2. if block at location of player is water:
  3. if glide state of player is false:
  4. set glide state of player to true
  5. on glide toggle:
  6. if block at location of player is water:
  7. if glide state of player is true:
  8. cancel event
  9. on join:
  10. set {healthbar.%UUID of player%} to new bar
  11. on damage:
  12. attacker is a player
  13. victim is not a armor stand
  14. if victim is not {lastbartarget.%attacker%}:
  15. remove attacker from bar {healthbar.%UUID of attacker%}
  16. wait 1 tick
  17. set progress of bar {healthbar.%UUID of attacker%} to health of victim/max health of victim
  18. set color of bar {healthbar.%UUID of attacker%} to RED
  19. if name of victim is set:
  20. set name of bar {healthbar.%UUID of attacker%} to "%name of victim%"
  21. else:
  22. set name of bar {healthbar.%UUID of attacker%} to "%victim%"
  23. add attacker to bar {healthbar.%UUID of attacker%}
  24. wait 1 tick
  25. set progress of bar {healthbar.%UUID of attacker%} to health of victim/max health of victim
  26. set {lastbartarget.%attacker%} to victim
  27. set {removebartime.%attacker%} to 3
  28. every second:
  29. loop all players:
  30. if {removebartime.%loop-player%} >= 1:
  31. remove 1 from {removebartime.%loop-player%}
  32. if {removebartime.%loop-player%} is 0:
  33. remove loop-player from bar {healthbar.%UUID of loop-player%}
  34. delete {removebartime.%loop-player%}
  35. delete {lastbartarget.%loop-player%}
  36. every tick:
  37. loop all players:
  38. if {removebartime.%loop-player%} >= 1:
  39. set progress of bar {healthbar.%UUID of loop-player%} to health of {lastbartarget.%loop-player%}/max health of {lastbartarget.%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment