## Get Y position
execute store result score @s vb.dummy1 run data get entity @s Pos[1]
execute unless dimension minecraft:overworld store result score @s vb.dummy1 run random value -76..94

$execute if entity @s[scores={vb.dummy1=..-46}] unless items entity @s weapon.$(slot) *[custom_model_data={floats:[6]}] run item modify entity @s weapon.$(slot) {function:"minecraft:set_components",components:{"minecraft:custom_model_data":{floats:[6]}}}
$execute if entity @s[scores={vb.dummy1=-46..-16}] unless items entity @s weapon.$(slot) *[custom_model_data={floats:[5]}] run item modify entity @s weapon.$(slot) {function:"minecraft:set_components",components:{"minecraft:custom_model_data":{floats:[5]}}}
$execute if entity @s[scores={vb.dummy1=-16..14}] unless items entity @s weapon.$(slot) *[custom_model_data={floats:[4]}] run item modify entity @s weapon.$(slot) {function:"minecraft:set_components",components:{"minecraft:custom_model_data":{floats:[4]}}}
$execute if entity @s[scores={vb.dummy1=14..44}] unless items entity @s weapon.$(slot) *[custom_model_data={floats:[3]}] run item modify entity @s weapon.$(slot) {function:"minecraft:set_components",components:{"minecraft:custom_model_data":{floats:[3]}}}
$execute if entity @s[scores={vb.dummy1=44..64}] unless items entity @s weapon.$(slot) *[custom_model_data={floats:[2]}] run item modify entity @s weapon.$(slot) {function:"minecraft:set_components",components:{"minecraft:custom_model_data":{floats:[2]}}}
$execute if entity @s[scores={vb.dummy1=64..}] unless items entity @s weapon.$(slot) *[custom_model_data={floats:[1]}] run item modify entity @s weapon.$(slot) {function:"minecraft:set_components",components:{"minecraft:custom_model_data":{floats:[1]}}}

## Utility bar display
execute unless items entity @s weapon.mainhand #vb:utility run function vb:tick_player/utility_bar/depth_meter