Level Progress (Expression) — Skript
Addon: Skript · Category: Expression · Since: 2.0
Syntax
[the] level progress of %players%Description
The player's progress in reaching the next level, this represents the experience bar in the game. Please note that this value is between 0 and 1 (e.g. 0.5 = half experience bar). Changing this value can cause the player's level to change if the resulting level progess is negative or larger than 1, e.g. <code>increase the player's level progress by 0.5</code> will make the player gain a level if their progress was more than 50%.
Examples
# use the exp bar as mana
on rightclick with a blaze rod:
player's level progress is larger than 0.2
shoot a fireball from the player
reduce the player's level progress by 0.2
every 2 seconds:
loop all players:
level progress of loop-player is smaller than 0.9:
increase level progress of the loop-player by 0.1
else:
set level progress of the loop-player to 0.99
on xp spawn:
cancel event