If you want to keep the numbers, first copy the scores to a temporary scoreboard, because some will get removed during the calculation. This command copies everyone's score in the scoreboard
tasks to the scoreboard
/execute as @a run scoreboard players operation @s temp = @s tasks
Then you give a dummy player the lowest possible value in that scoreboard. A name starting with
$ cannot occur as a real player name.
/scoreboard players set $highest temp -2147483648
Here comes the magic:
scoreboard players operation […] > assigns the higher of two values to the left side, in this case
$highest's score in
temp. By comparing every player's score with $highest this way, you end up with the highest value, because it increases the score of
$highest every time it encounters a higher value in any of the players' scores.
/execute as @a run scoreboard players operation $highest temp > @s temp
Now you can do something with a player that has the same score as
$highest in that scoreboard:
/execute as @a if score @s temp = $highest temp run tp @s <coordinates>
To get the second player, the third and so on, you just need to repeat that process without the player(s) with the highest value:
/execute as @a if score @s temp = $highest temp run scoreboard players reset @s temp
Now use commands 2, 3 and 4 again, with a new teleport target.