I found an elevator skript but it doesen't work and I can't quite figure out how to fix it, any help would be appreciated.
options:
block: dirt
on jumping:
if block below player is {@block}:
loop 256 times:
if block loop-number up player is {@block}:
loop 256 times:
if block loop-number-2 down player's location is {@block}:
add 1 to {_floor}
teleport player to location loop-number+1 up player's location
send player title "&a⬆ &8┃ &a&lUp" with subtitle "" for 1 seconds
stop
on sneak toggle:
if block at player's location is {@block}:
loop 256 times:
if block loop-number+1 below player is {@block}:
loop 256 times:
if block loop-number-2 down location of player is {@block}:
add 1 to {_floor}
teleport player to location loop-number down player's location
send player title "&c⬇ &8┃ &c&lDown" with subtitle "" for 1 seconds
stop