Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
# ============================================
# Enhanced HP 1.0 by Antikore
# See SkUnity Resource post for documentation
# ============================================
# CONFIG
# ============================================
options:
HealthBar: "&f%victim% [%{realhp.%victim%}% &cHP&f]" # How the health bar is displayed above the player or entity.
PlayerBar: "&f%victim% [%{realhp.%victim%}% &cHP&f]" # How the health bar is displayed for players in case of different bars with entities
PlayerAndMobDifferent: false # Check this true if you want a different bar design for players and entities
PlayerEnabled: true # Check this true if you want players to have HP Bar
EntityEnabled: true # Check this true if you want entities to have HP Bar
# %victim% is the name of the player/entity
# %victim's health% is the number of hearts of the player/entity
# %{realhp.%victim%}% is the real health number of the player/entity
# %{percentagehp.%victim%}% is the health percentage. 100% it's at max health and 0% is dead.
# =============================================================
# START OF CODE
# =============================================================
on damage:
victim is a living entity:
if {@PlayerAndMobDifferent} is true:
victim is a player:
if {@PlayerEnabled} is true:
set {realhp.%victim%} to victim's health * 2
set {percentagehp.%victim%} to (victim's health * 100) / victim's max health
set victim's display name to {@PlayerBar}
else:
if {@EntityEnabled} is true:
set {realhp.%victim%} to victim's health * 2
set {percentagehp.%victim%} to (victim's health * 100) / victim's max health
set victim's display name to {@HealthBar}
else:
victim is a player:
if {@PlayerEnabled} is true:
set {realhp.%victim%} to victim's health * 2
set {percentagehp.%victim%} to (victim's health * 100) / victim's max health
set victim's display name to {@HealthBar}
else:
if {@EntityEnabled} is true:
set {realhp.%victim%} to victim's health * 2
set {percentagehp.%victim%} to (victim's health * 100) / victim's max health
set victim's display name to {@HealthBar}
command /eh:
trigger:
make player execute command "/skript reload EnhancedHP"
# ====================================================
# END OF CODE
# ====================================================