execute align xyz if block ~ ~ ~ minecraft:lapis_block run function q:lastblockfound
execute align xyz if block ~ ~ ~ minecraft:redstone_block run function q:lastblockfound
execute align xyz if block ~ ~ ~ minecraft:purpur_block run function q:lastblockfound
execute align xyz if block ~ ~ ~ minecraft:emerald_block run function q:lastblockfound

execute if block ~ ~ ~ minecraft:purpur_block align xyz positioned ~ ~-100 ~ unless entity @e[tag=floater,distance=..0.5] run function q:floatcubestart
execute if block ~ ~ ~ minecraft:emerald_block unless block ~ ~-1 ~ minecraft:green_shulker_box align xyz positioned ~0.5 ~-2 ~0.5 unless entity @e[tag=slider,distance=..0.5] positioned ~-0.5 ~2 ~-0.5 run function q:slidersstart

execute if score @s lastblocklooking matches 1 unless block ~ ~ ~ minecraft:stone_bricks unless block ~ ~ ~ minecraft:andesite unless block ~ ~ ~ minecraft:cobblestone unless block ~ ~ ~ minecraft:observer unless block ~ ~ ~ minecraft:polished_andesite unless block ~ ~ ~ minecraft:piston unless block ~ ~ ~ minecraft:piston_head unless block ~ ~ ~ minecraft:sticky_piston unless block ~ ~ ~ minecraft:stone unless block ~ ~ ~ minecraft:barrier if entity @p[distance=..7] positioned ^ ^ ^0.05 run function q:lastblockloop
