Am I able to use code to change how the teams are set?

I’m not sure if there is a way to make players see their class but when there is a way that you can change their team name to ‘mafia’ or ‘townsfolk’, so, when they open the scoreboard, they can see their team name as what u set them to be.

The way you can do this is by using a ‘team settings and inventory’ device. Set one team name as mafia and set the other team name as ‘townsfolk’ and make mafia spawn in the team called mafia and rest in the townsfolk.

Note: make sure ‘team size’ in the settings is set to ‘Dynamic’ (so you can freely manipulate the number of people on a team the way you want)