execute positioned ~ ~2 ~ as @e[type=minecraft:shulker,limit=1,sort=nearest,distance=..0.5,tag=slider_shulker] run tag @s add ss_skip
execute positioned ~ ~2.5 ~ if block ^ ^ ^-0.49 minecraft:air if block ^ ^ ^0.51 minecraft:air positioned ^ ^ ^0.05 positioned ~-0.5 ~-0.5 ~-0.5 unless entity @e[dx=0,dy=0,dz=0,tag=slider_shulker,tag=!ss_skip] positioned ~0.5 ~0.5 ~0.5 positioned ^ ^ ^-0.05 positioned ~ ~-2.5 ~ run teleport ^ ^ ^0.05
execute positioned ~ ~2 ~ as @e[type=minecraft:shulker,limit=1,sort=nearest,distance=..0.5,tag=slider_shulker] run tag @s remove ss_skip

execute as @s[tag=slider_up] positioned ~ ~2.5 ~ if block ^ ^ ^0.51 minecraft:air if block ^ ^ ^2.5 minecraft:air positioned ~ ~-2.5 ~ positioned ~-0.5 ~2.05 ~-0.5 as @a[dx=0,dy=0.2,dz=0] at @s if block ~ ~1 ~ air run tag @s add ridingup


execute as @s[tag=slider_up] at @s align xz run tp ~0.5 ~ ~0.5
execute as @s[tag=slider_down] at @s align xz run tp ~0.5 ~ ~0.5
execute as @s[tag=slider_east] at @s align z run tp ~ ~ ~0.5
execute as @s[tag=slider_west] at @s align z run tp ~ ~ ~0.5
execute as @s[tag=slider_north] at @s align x run tp ~0.5 ~ ~
execute as @s[tag=slider_south] at @s align x run tp ~0.5 ~ ~
