execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-2 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-3 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-4 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-5 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-6 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-7 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-8 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-9 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~-10 ~ minecraft:iron_block if block ~ ~-1 ~ minecraft:air run effect give @s levitation 1 201 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~2 ~ minecraft:iron_block run effect give @s levitation 1 255 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~3 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run tp @s ~ ~0.2 ~
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~4 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run effect give @s levitation 1 49 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~5 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run effect give @s levitation 1 49 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~6 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run effect give @s levitation 1 49 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~7 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run effect give @s levitation 1 49 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~8 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run effect give @s levitation 1 49 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~9 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run effect give @s levitation 1 49 true
execute as @a[nbt={SelectedItem:{id:"minecraft:flint"}}] at @s if block ~ ~10 ~ minecraft:iron_block if block ~ ~2 ~ minecraft:air run effect give @s levitation 1 49 true
execute as @a[nbt=!{SelectedItem:{id:"minecraft:flint"}},tag=!PlayingIn2D] run effect clear @s levitation