`variables:
{buttons::%player%} = 0
on step on pressure plate:
if player is in region "uphub":
teleport player to location at 107, 64, 271
set player's yaw to 269.4
set player's pitch to 3.386
set {_bar} to boss bar with id "findup" with title "1:00" with color red with progress 100
add player to {_bar}
wait 1 second
loop 60 times:
set {_second} to 60 - loop-value
set bar title of {_bar} to "0:%{_second}%"
wait 1 second
remove player from {_bar}
send "&1You ran out of time" to player
teleport player to location at 98, 64, 257
on right click on stone button:
if player is in region "uphub":
set {buttons::%player%::%location of event-block%} to true
send "You have pressed %size of {buttons::%player%::}% buttons" to player
if size of {buttons::%player%::} is 4:
remove player from {_bar}
teleport player to location at 98, 64, 257
send "&6Congrats! You found all four buttons under the time limit!" to player
delete {buttons::%player%::*}`