showing off here cuz some of y'all helped me make it.
java 1.21: http://adfoc.us/8643931, https://www.mediafire.com/file/ux42lmop3p3zt9f/nazars_teamwork.zip/file
works on singleplayer vanilla, not paper. allows players to set their own teams without intervention.
runs on text prompt for java, trigger for bedrock (in theory), and alternate method of nbt apples when enabled. the only thing i haven't tested is the cooldown, which would need me to wait 20 minutes or build another function that shows the cooldown in the side. which i should probably do anyway... but it works!