Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- bossbarcolor : PINK
- bossbarstyle : SOLID
- every tick:
- loop all entities:
- loop-entity is a living entity
- loop-entity is not armor stand
- loop-entity is not a wither
- loop-entity is not ender dragon
- loop-entity is player
- {ISplayer.%UUID of loop-entity%} is set
- {Isvanish.%loop-entity%} is not set
- health of loop-entity > 0
- if {bossbar.%UUID of loop-entity%} is not set:
- set {bossbar.%UUID of loop-entity%} to new bossbar
- set color of bar {bossbar.%UUID of loop-entity%} to {@bossbarcolor}
- set style of bar {bossbar.%UUID of loop-entity%} to {@bossbarstyle}
- if name of loop-entity is set:
- if {%loop-entity%.overhealth} is not set:
- set name of bar {bossbar.%UUID of loop-entity%} to "%name of loop-entity% %health of loop-entity%/%max health of loop-entity% %loop-entity's level%LEVEL"
- else:
- set {_health} to {%loop-entity%.overhealth}/2
- set name of bar {bossbar.%UUID of loop-entity%} to "%name of loop-entity% %health of loop-entity%/%max health of loop-entity%+%{_health}% %loop-entity's level%LEVEL"
- else if name of loop-entity is not set:
- if {%loop-entity%.overhealth} is not set:
- set name of bar {bossbar.%UUID of loop-entity%} to "%loop-entity% %health of loop-entity%/%max health of loop-entity% %loop-entity's level%LEVEL"
- else:
- set {_health} to {%loop-entity%.overhealth}/2
- set name of bar {bossbar.%UUID of loop-entity%} to "%loop-entity% %health of loop-entity%/%max health of loop-entity%+%{_health}% %loop-entity's level%LEVEL"
- if {%loop-entity%.overhealth} is 0:
- set {_health} to {%loop-entity%.overhealth}/2
- set {_health2} to {%loop-entity%.overhealthmax}/2
- set {_health} to {_health}+loop-entity's health
- set {_health2} to {_health2}+loop-entity's max health
- set progress of bar {bossbar.%UUID of loop-entity%} to {_health}/{_health2}
- else if {%loop-entity%.overhealth} is not set:
- set progress of bar {bossbar.%UUID of loop-entity%} to health of loop-entity/max health of loop-entity
- else:
- set {_health} to {%loop-entity%.overhealth}/2
- set {_health2} to {%loop-entity%.overhealthmax}/2
- set {_health} to {_health}+loop-entity's health
- set {_health2} to {_health2}+loop-entity's max health
- set progress of bar {bossbar.%UUID of loop-entity%} to {_health}/{_health2}
- loop all players:
- if distance between loop-player-1 and loop-entity-1 < 101:
- add loop-player-1 to bar {bossbar.%UUID of loop-entity-1%}
- if distance between loop-player-1 and loop-entity-1 > 100:
- remove loop-player-1 from bar {bossbar.%UUID of loop-entity-1%}
- on death:
- if {bossbar.%UUID of victim%} is set:
- wait 10 tick
- remove all players from bar {bossbar.%UUID of victim%}
- delete {bossbar.%UUID of victim%}
- on quit:
- if {bossbar.%UUID of player%} is set:
- wait 10 tick
- remove all players from bar {bossbar.%UUID of player%}
- delete {bossbar.%UUID of player%}
- every 1 seconds:
- loop all entities:
- if {bossbar.%UUID of loop-entity%} is set:
- {ISplayer.%UUID of loop-entity%} is not set
- wait 10 tick
- remove all players from bar {bossbar.%UUID of loop-entity%}
- delete {bossbar.%UUID of loop-entity%}
- loop all players:
- set {ISplayer.%UUID of loop-player%} to true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement