Untested but parsed in parser.skunity.com
options:
world: world
every 10 ticks:
loop all players where [block below input is a diamond block]:
add loop-player to {_list::*}
send action bar "&6Players Waiting: &e&l%size of {_list::*}%" to {_list::*}
if size of {_list::*} = 20:
set {_index} to 1
loop {_list::*}:
if {_index} is 1:
set {_index} to 0
add (loop-value parsed as player) to {_group1::*}
else:
add 1 to {_index}
add (loop-value parsed as player) to {_group2::*}
teleport {_group1::*} to location(0, 60, 0, world("{@world}"))
teleport {_group2::*} to location(1, 80, 1, world("{@world}"))
play sound "entity.firework_rocket.blast" at {_group1::*} for {_group1::*}
play sound "entity.firework_rocket.blast" at {_group2::*} for {_group2::*}