Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on any movement:
- if block at location of player is water:
- if glide state of player is false:
- set glide state of player to true
- on glide toggle:
- if block at location of player is water:
- if glide state of player is true:
- cancel event
- on join:
- set {healthbar.%UUID of player%} to new bar
- on damage:
- attacker is a player
- victim is not a armor stand
- if victim is not {lastbartarget.%attacker%}:
- remove attacker from bar {healthbar.%UUID of attacker%}
- wait 1 tick
- set progress of bar {healthbar.%UUID of attacker%} to health of victim/max health of victim
- set color of bar {healthbar.%UUID of attacker%} to RED
- if name of victim is set:
- set name of bar {healthbar.%UUID of attacker%} to "%name of victim%"
- else:
- set name of bar {healthbar.%UUID of attacker%} to "%victim%"
- add attacker to bar {healthbar.%UUID of attacker%}
- wait 1 tick
- set progress of bar {healthbar.%UUID of attacker%} to health of victim/max health of victim
- set {lastbartarget.%attacker%} to victim
- set {removebartime.%attacker%} to 3
- every second:
- loop all players:
- if {removebartime.%loop-player%} >= 1:
- remove 1 from {removebartime.%loop-player%}
- if {removebartime.%loop-player%} is 0:
- remove loop-player from bar {healthbar.%UUID of loop-player%}
- delete {removebartime.%loop-player%}
- delete {lastbartarget.%loop-player%}
- every tick:
- loop all players:
- if {removebartime.%loop-player%} >= 1:
- 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