execute store result score .bank banker.playercount if entity @a[team=banker]
execute if score .bank banker.playercount matches 2.. run return run title @a[team=banker] actionbar {"translate":"toomanyplayers","color":"red"}
scoreboard players remove @e[type=marker,tag=banker.core] banker.cd 1
execute as @e[type=marker,tag=banker.core,scores={banker.cd=..0},limit=1] run function ws:work/misc/tier2/banker/core
execute as @a[scores={banker.capital=1..},team=banker] run function ws:work/misc/tier2/banker/pay
execute as @e[type=interaction,tag=banker.buy.button] if data entity @s interaction at @s run function ws:work/misc/tier2/banker/invest
execute as @e[type=interaction,tag=banker.sell.button] if data entity @s interaction at @s run function ws:work/misc/tier2/banker/sell