BAE 2.0 and NON BAE Auto assign command

I have made a command for BAE that auto assign players under a group rank to your groups that you want them to be in. I also put a command without BAE also

-- PUT AT A MODULE SCRIPT
local Plugin = function(...)
	local Data = {...}

	local GroupId = 33054377 --// Put your's here

	local remoteEvent = Data[1][1]
	local remoteFunction = Data[1][2]
	local returnPermissions = Data[1][3]
	local Commands = Data[1][4]
	local Prefix = Data[1][5]
	local returnPlayers = Data[1][7]
	local cleanData = Data[1][8] 
	local pluginName = 'autoassign'
	local pluginPrefix = Prefix
	local pluginLevel = 2
	local pluginUsage = "" 
	local pluginDescription = "Assign Players under a certain rank"
	local playerService = game:GetService('Players')
	local function pluginFunction(Args)
		local Player = Args[1]
		for _, p in ipairs(game.Players:GetPlayers()) do
			if p:GetRankInGroup(GroupId) <= 255 then
				local playerteam = math.random(0,3)
				
				if playerteam == 0 then
					p.Team = game.Teams.(GROUP NAME)
				elseif playerteam == 1 then
					p.Team = game.Teams.(GROUP NAME)
				elseif playerteam == 2 then
					p.Team = game.Teams.(GROUP NAME)
				elseif playerteam == 3 then
					p.Team = game.Teams.(GROUP NAME)
				end
			end				
			remoteEvent:FireClient(Player,'Hint','Success','You have roled all LRs, please continue as normal.')
		end		

			
		
	end


	local descToReturn
	if pluginUsage ~= "" then
		descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
	else
		descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
	end

	return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end




return Plugin
-- SERVERSCRIPTSERVICE
local Players = game:GetService("Players")
local GroupId = 33054377 --// Put your's here

Players.PlayerAdded:Connect(function(player)
	player.Chatted:Connect(function(Message)
		if Message == "!autoassign" then
			if player:GetRankInGroup(GroupId) >= 225 then
				for _, p in ipairs(Players:GetPlayers()) do
					if p:GetRankInGroup(GroupId) <= 255 then
						local playerteam = math.random(0,3)
						if playerteam == 0 then
							p.Team = game.Teams.GroupA
						elseif playerteam == 1 then
							p.Team = game.Teams.GroupB
						elseif playerteam == 2 then
							p.Team = game.Teams.GroupC
						elseif playerteam == 3 then
							p.Team = game.Teams.GroupD
						end
					end
				end
			end
		end
	end)
end)

'''

Why not just say this:

local teams = {Teams.GroupA, Teams.GroupB, Teams.GroupC, Teams.GroupD};

-- later on:
p.Team = teams[math.random(#teams)]

Eh, they can do that, i want people to understand math.random as a beginner