Boss Bar Hp Bar For Player

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

Juppi

New Member
Jun 5, 2017
7
0
0
This is code is used awhile back, just got back into everything. Cant pinpoint what plugin i might be missing or what. Error i get is simple "Condition can not be understand".

code_language.skript:
on join:
    set {bossbar::%player%} to new boss bar
    add player player to {bossbar::%player%}
on damage:
    victim is not a player
    set {_bossbar} to {bossbar::%attacker%}
    show boss bar {_bossbar}
    set {_health} to health of victim / max health of victim - 0.1 # Boss Bar progress is in between 0 and 1. 0.5 = 50% etc.
    set bar progress of {_bossbar} to {_health}
    set bar title of {_bossbar} to "&b&l%victim%"
    if {_health} is equal to 0.7 or 0.6 or 0.5:
        set bar color of {_bossbar} to yellow
    else if {_health} is equal to 0.4 or 0.3 or 0.2 or 0.1 or 0:
        set bar color of {_bossbar} to red
    else if {_health} is greater than 0.7:
        set bar color of {_bossbar} to green
    wait 5 seconds
    hide boss bar {_bossbar}
 
1.12.2 , SkQuerry . Sklib , SharpSk , skRayfall all latest versions