Script:
local Teams = game:GetService("Teams")
local Main = script.Parent
local Frame = Main.Teams
local Me = Main.Parent.Parent
for i,v in pairs(Teams:GetTeams()) do
local TB = Instance.new("TextButton")
TB.Text = v.Name
TB.BackgroundColor = v.TeamColor
TB.TextColor3 = Color3.new(0,0,0)
TB.Size = UDim2.new(1,0,0,15)
TB.Position = UDim2.new(0,0,(i/#Teams:GetTeams())-(1/#Teams:GetTeams()),0)
TB.Parent = Frame
Frame.Size = UDim2.new(0,100,0,15*#Teams:GetTeams())
TB.MouseButton1Click:connect(function()
Me.TeamColor = TB.BackgroundColor
if Me.Character ~= nil then
Me.Character:Destroy()
wait(3)
Me:LoadCharacter()
end
end)
end
--If script doesn't work contact me through Facebook,Instagram(#CoolGames), or PM me --on ROBLOX
--Created by coolali333