execute unless items entity @s armor.* *[minecraft:custom_data~{scientist:1}] run return run function ws:work/join/fail {work:scientist}
execute store result score .science scientist.players if entity @a[team=scientist]
execute if score .science scientist.players matches 4.. run return run function ws:work/join/fail.player {work:scientist}
team join scientist @s
tp @s -509 42 -500 90 0