How to create an Auto Teams script

Hello, Cookie Tech!

So today, I am going to teach you how to make an Auto Teams script.

Let’s get into it!

So first, you are going to want to create your teams, this will be helpful before we start the script as we will need to locate the team names.

After you have finished creating the teams, you can then insert a script into the ServerScriptService.
After you have inserted the script into ServerScriptService, I would personally recommend naming it something like “Auto Teams” so you can locate this in the near future.

Now, you can copy this code and paste it into the script, all you need to do it edit what my teams are and edit the nil!

Source Code:

game.Players.PlayerAdded:Connect(function(plr)
	wait(0)
	
	plr.Team = game.Teams:WaitForChild("Avarage Player")
	
	if plr:GetRankInGroup(nil) >= 255 then
		plr.Team = game.Teams:WaitForChild("Moderator")
	end
	
end)

Hope this helped with your development! Happy developing!

3 Likes

i love this! But i want to make a command about it. So when I say example “!host” it will give me team host do you know how to do that?

Hi, maybe you could try this. This has everything you need.
Butterfly v1.01 ━ the perfect kit for training centers - Community Resources - DevForum | Roblox I hope this helps.

It says there discontinued does it still work?

Ofcourse! We would never send a faulty script.

It works yes, just getting no more updates.

1 Like

Script does not work can i has helps so when i run commands it does not work + gui is not showing up

--[[
 	  ____  _   _ _____ _____ _____ ____  _____ _  __   __
     | __ )| | | |_   _|_   _| ____|  _ \|  ___| | \ \ / / V1
	 |  _ \| | | | | |   | | |  _| | |_) | |_  | |  \ V / 
	 | |_) | |_| | | |   | | | |___|  _ <|  _| | |___| |  
	 |____/ \___/  |_|   |_| |_____|_| \_\_|   |_____|_|  
                                                      
]]--



local config = {
	
	
	
	--// Organization info \\--
	
	['Organization name'] = 'Baikú',   -->> Change this to the name of your ROBLOX organization (e.g. group name)
	
	['Game name'] = 'Training Center',   -->> Change this to the name of the center (if you want to change it from the current one)
	
	
	
	--// Permissions set-up \\--
	
	['Group ID'] = 13030926,   -->> Change this to the ID of the group you want to use
	
	['Permission type'] = 'team',   -->> Switch between 'group' and 'team' to set the permission type (based on the teams - Host, Co-Host, etc., or on their rank in the group you entered)
	
	['Auto-team'] = false,   -->> If set to true, the players will be automatically teamed to the team corresponding to their rank (e.g. auto-team trainers, trainees, session supervisors)
	
	-----------------
	
	['Session supervisor rank ID'] = 9,   -->> Change this to the rank that has Session Supervisor permission
	
	['Host rank ID'] = 11,   -->> Change this to the rank that can host a session (based on their rank in group)
	
	['Co-Host rank ID'] = 11,   -->> Change this to the rank that can co-host a session (based on their rank in group)
	
	['Trainer rank ID'] = 10,   -->> Change this to the rank that can train other players (based on their rank in group)
	
	['Trainee rank ID'] = 4,   -->> Change this to the rank that can be trained (based on their rank in group)
	
	-----------------
	['Teaming permission'] = 11,   -->> Set to the rank that can change players' teams (set host, co-host, etc.)
	
	['Enable permission to enter game'] = true,   -->> Only allow a certain rank (or higher) to enter the center
	
	['Permission to enter game'] = 4,   -->> Only allow a certain rank (or higher) to enter the center - set rank ID
	
	-----------------
	
	
	['Can bypass slock'] = 200,   -->> Set to the rank ID that can ignore the server lock and join even if the server has benn locked
	
	
	
	--// Permission To Speak / Help commands \\--
	
	
	['PTS command'] = '!pts',   -->> Change to the command you want players to use to request Permission To Speak (must include prefix)
	
	
	--// Blueberry v1.05 and up compatibility \\--
	-- You must have the Blueberry System model installed in this game for this feature to work.
	
	
	['Use Blueberry for slock'] = false,   -->> Set to true if you want to replace the basic server lock (kicking method) with Blueberry slock
	
	['Path to Blueberry API module'] = nil,   -->> Blueberry is usually in ServerScriptService. You can specify a custom location here
	
	['Custom lock message'] = 'This server and the session have been locked already. Please try again at a later time or see if other servers are available.',   -->> Message to display when the server is being locked (slocked)
	
	
	
	
	--// Chat commands \\--
	
	['Prefix'] = ';',   -->> Change this to the command prefix (e.g. ';', '!', ':')
	
	--[[Commands:
	[All commands must have the set prefix at the beginning.]
	
	Teaming commands (teaming permission):
	
	'sessionsupervisor {username}' - will set the specified user as Session Supervisor
	'host {username}' - will set the specified user as Host
	'co-host {username}' - will set the specified user as Co-Host
	'trainer {username}' - will set the specified user as Trainer
	'trainee {username}' - will set the specified user as Trainee
	'visitor {username}' - will set the specified user as Visitor
	
	
	Host commands (host+):
	
	'claim' - will set the session status to 'Claimed'
	'unclaim' - will set the session status to 'Not Claimed' (only if session is already claimed)
	'enable_pts' - will enable the PTS/Help command (host/session supervisor)
	'disable_pts' - will disable the PTS/Help command (host/session supervisor)
	'slock' - will lock the server for ranks lower than the specified one
	'unslock' - will unlock the server and make it available to everyone
	'start' - will set the session status to started
	'conclude' - will set the session status to concluded
	'open' - will open the gate (Workspace)
	'close' - will close the gate (Workspace)
	

	Session Supervisor commands:
	'reset' - will reset the session status and hosts values
	
	
	
	Trainer commands:
	
	'fail {username}' - will set the specific player to failed if passing is enabled
	'pass {username}' - will set the specific player to passed if passing is enabled
	
	
	Example:
	'!sessionsupervisor InfiniteBlackPIX'
	'!host InfiniteBlackPIX'
	'!co-host infinite'
	'!trainer infiniteblackpix'
	'!trainee infi'
	'!visitor infiteb'
	'!claim'
	'!unclaim'
	'!enable_pts'
	'!disable_pts'
	'!slock'
	'!unslock'
	'!start'
	'!conclude'
	'!reset'
	'!pass Infinite'
	'!fail Inf'
	'!open'
	'!close'
	
	]]
	
	--// Teams \\--
	
	['Session supervisors team color'] = BrickColor.new('Neon orange'),   -->> Change this to the color of this team
	
	['Host team color'] = BrickColor.new('Really red'),   -->> Change this to the color of this team
	
	['Co-Host team color'] = BrickColor.new('Bright red'),   -->> Change this to the color of this team
	
	['Trainers team color'] = BrickColor.new('Toothpaste'),   -->> Change this to the color of this team
	
	['Trainees team color'] = BrickColor.new('Mint'),   -->> Change this to the color of this team
	
	
	
	--// Discord webhooks \\--
	['Enable webhooks'] = false,   -->> Enable or disable webhooks
	
	['Webhook URL'] = 'URL_WITH_PROXY_HERE',   -->> The URL to your webhook (must use a proxy for it to work)
	
	['ID to ping on start'] = '961172219789193248',   -->> The ID of the Discord role that you want to be pinged when a session starts. Set to nil if you don't want to ping it
	
	['ID to ping on end'] = '961172219789193248',   -->> The ID of the Discord role that you want to be pinged when a session ends. Set to nil if you don't want to ping it
	
	
	--// Nametag \\--
	
	['Enable nametag'] = true,   -->> This will add a nametag to the player's head
	
	['Enable chat tag'] = true,   -->> [ONLY WORKS WITH 'TEAM' PERMISSION TYPE] This will add a tag next to the person's name in the chat
	
	--// Passing & failing \\--
	
	['Enable passing'] = true,   -->> Will allow trainers to use the '!pass (username)' or '!fail (username)' commands
	
	['Kick player on failing'] = false,   -->> This will kick the player from the server if they failed the session
	
	['Send passers to the host'] = true,   -->> This will allow the host to see a list of users who were passed by their trainer	
}

return config

Try doing :host duck you can’t use caps fyi

1 Like

the gui is not showing or the gui that shows the rank etd

to get auto team, put this to true.

Very Helpful, i’ll be using soon!

no the overhead gui (20 charrs)

Can you send the blueberry link?

@Chrisrankingservices isn’t as active as they used to be. I think this may be the thing your looking for though.

2 Likes