## test for if the player has skills but not the right attribute after joining the server.

## running the next function to fix it.

execute as @a[nbt={Attributes:[{Name:"minecraft:max_health",Base:20.0d}]},scores={Skill-1=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:max_health",Base:20.0d}]},scores={Skill-1=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:max_health"
execute as @a[nbt={Attributes:[{Name:"minecraft:max_health",Base:20.0d}]},scores={Skill-1=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:armor",Base:0.3d}]},scores={Skill-2=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:armor",Base:0.3d}]},scores={Skill-2=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:armor"
execute as @a[nbt={Attributes:[{Name:"minecraft:armor",Base:0.3d}]},scores={Skill-2=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:attack_speed",Base:4.0d}]},scores={Skill-3=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:attack_speed",Base:4.0d}]},scores={Skill-3=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:attack_speed"
execute as @a[nbt={Attributes:[{Name:"minecraft:attack_speed",Base:4.0d}]},scores={Skill-3=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:luck",Base:0.1d}]},scores={Skill-6=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:luck",Base:0.1d}]},scores={Skill-6=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:luck"
execute as @a[nbt={Attributes:[{Name:"minecraft:luck",Base:0.1d}]},scores={Skill-6=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:knockback_resistance",Base:0.0d}]},scores={Skill-7=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:knockback_resistance",Base:0.0d}]},scores={Skill-7=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:knockback_resistance"
execute as @a[nbt={Attributes:[{Name:"minecraft:knockback_resistance",Base:0.0d}]},scores={Skill-7=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:armor_toughness",Base:0.0d}]},scores={Skill-8=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:armor_toughness",Base:0.0d}]},scores={Skill-8=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:armor_toughness"
execute as @a[nbt={Attributes:[{Name:"minecraft:armor_toughness",Base:0.0d}]},scores={Skill-8=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:attack_damage",Base:1.3d}]},scores={Skill-9=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:attack_damage",Base:1.3d}]},scores={Skill-9=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:attack_damage"
execute as @a[nbt={Attributes:[{Name:"minecraft:attack_damage",Base:1.3d}]},scores={Skill-9=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:jump_strength",Base:0.41999998688697815d}]},scores={Skill-10=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:jump_strength",Base:0.41999998688697815d}]},scores={Skill-10=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:jump_strength"
execute as @a[nbt={Attributes:[{Name:"minecraft:jump_strength",Base:0.41999998688697815d}]},scores={Skill-10=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:gravity",Base:0.08d}]},scores={Skill-11=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix-grav

execute as @a[nbt={Attributes:[{Name:"minecraft:safe_fall_distance",Base:3.0d}]},scores={Skill-12=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:safe_fall_distance",Base:3.0d}]},scores={Skill-12=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:safe_fall_distance"
execute as @a[nbt={Attributes:[{Name:"minecraft:safe_fall_distance",Base:3.0d}]},scores={Skill-12=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:fall_damage_multiplier",Base:1.0d}]},scores={Skill-13=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:fall_damage_multiplier",Base:1.0d}]},scores={Skill-13=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:fall_damage_multiplier"
execute as @a[nbt={Attributes:[{Name:"minecraft:fall_damage_multiplier",Base:1.0d}]},scores={Skill-13=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:step_height",Base:0.6d}]},scores={Skill-14=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:step_height",Base:0.6d}]},scores={Skill-14=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:step_height"
execute as @a[nbt={Attributes:[{Name:"minecraft:step_height",Base:0.6d}]},scores={Skill-14=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:block_break_speed",Base:1.0d}]},scores={Skill-15=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:block_break_speed",Base:1.0d}]},scores={Skill-15=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:block_break_speed"
execute as @a[nbt={Attributes:[{Name:"minecraft:block_break_speed",Base:1.0d}]},scores={Skill-15=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:block_interaction_range",Base:4.5d}]},scores={Skill-16=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:block_interaction_range",Base:4.5d}]},scores={Skill-16=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:block_interaction_range"
execute as @a[nbt={Attributes:[{Name:"minecraft:block_interaction_range",Base:4.5d}]},scores={Skill-16=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

execute as @a[nbt={Attributes:[{Name:"minecraft:entity_interaction_range",Base:3.0d}]},scores={Skill-17=1..}] run data modify storage minecraft:serverfix input.uuid set from entity @s UUID[0]
execute as @a[nbt={Attributes:[{Name:"minecraft:entity_interaction_range",Base:3.0d}]},scores={Skill-17=1..}] run data modify storage minecraft:serverfix input.skill set value "minecraft:entity_interaction_range"
execute as @a[nbt={Attributes:[{Name:"minecraft:entity_interaction_range",Base:3.0d}]},scores={Skill-17=1..}] run function k_skills:skills/attributes/serverfix/attri_serverfix3 with storage minecraft:serverfix input

