You can disable a variable in a scoreboard by using PlayerAction: Show Scoreboard and Set Score block, inside the set score put a text in the first slot and your variable in the 2nd slot, the text in the first slot will be the name of the score, so you can even use %default to display a player's kills. you can name a text %var(variable name) to turn a number variable to a text so you can use it in player action: set bossbar