local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DataStore = game:GetService("DataStoreService"):GetDataStore("Test")
local player = Players:GetPlayers()
local character = player.Character or player.CharacterAdded:Wait()
local Data = {}
local playerGui = player.PlayerGui
local GUI = playerGui.GUI
local Teams = GUI.TeamSelection
local Buttons = Teams.Buttons
local Ban = GUI.Ban
local Menu = GUI.Menu
local Locker = Menu.Locker
local Equipping = Locker.Equipping
local lMain = Locker.Main
local Emotes = Locker.Emotes
Ban.Visible = false
Menu.Visible = true
Locker.Visible = false
Equipping.Visible = false
lMain.Visible = true
Emotes.Visible = true
local pData = player:WaitForChild("Data")
local pStatus = player:WaitForChild("Status")
local Events = ReplicatedStorage.Events
local EFunctions = Events.Functions
local JoinTeamEvent = Events:WaitForChild("JoinTeam")
local Developers = --ids
local DevTeams = {"Pur", "Ylw", "Grn", "Orn"}
local GameTeams = {"Blu", "Red", "Ylw", "Grn", "Pur", "Orn"}
local Toggles = {"LockerBTN", "Deploy", "LevelBar", "Title", "Username"}
local function JoinTeam(team)
local team = GameTeams
local isATeam = false
local player = Players:GetPlayers()
for _, name in pairs(Buttons:GetChildren()) do
if team == name.Name then
player.Team = game.Teams[team]
isATeam = true
end
end
if isATeam then
Events.JoinTeam:FireServer(team)
end
end
Events.JoinTeam.OnServerEvent:Connect(JoinTeam)
for _, team in pairs(DevTeams) do
if not player:FindFirstChild("IsAdmin") then
Buttons[team].Visible = false
end
end
Buttons.Blu.MouseButton1Click:Connect(function()
if not Buttons.Blu:FindFirstChild("lock").Visible then
JoinTeam("TBC")
gamesounds.PlaySounds[joinsound]:Play()
local starttime = tick()
repeat
wait()
if (tick() - starttime) >= 2 then
Teams.bad.Visible = true
ToggleTeamSelection(true)
return
end
until Status.Team ~= "Spectator"
Teams.bad.Visible = false
else
if not player:FindFirstChild("IsAdmin") then
return
else
JoinTeam("TBC")
end
end
end
Buttons.Red.MouseButton1Click:Connect(function()
if not Buttons.Red:FindFirstChild("lock").Visible then
JoinTeam("TRC")
gamesounds.PlaySounds[joinsound]:Play()
local starttime = tick()
repeat
wait()
if (tick() - starttime) >= 2 then
Teams.bad.Visible = true
ToggleTeamSelection(true)
return
end
until Status.Team ~= "Spectator"
Teams.bad.Visible = false
else
if not player:FindFirstChild("IsAdmin") then
return
else
JoinTeam("TRC")
end
end
end
Buttons.Ylw.MouseButton1Click:Connect(function()
if wkspc.TwoTeams.Value == false and not Buttons.Ylw:FindFirstChild("lock").Visible then
JoinTeam("TYC")
gamesounds.PlaySounds[joinsound]:Play()
local starttime = tick()
repeat
wait()
if (tick() - starttime) >= 2 then
Teams.bad.Visible = true
ToggleTeamSelection(true)
return
end
until Status.Team ~= "Spectator"
Teams.bad.Visible = false
elseif wkspc.TwoTeams.Value == true and not player:FindFirstChild("IsAdmin") then
return
else
if wkspc.TwoTeams.Value == true and player:FindFirstChild("IsAdmin") then
JoinTeam("TYC")
end
end
end
Buttons.Grn.MouseButton1Click:Connect(function()
if wkspc.TwoTeams.Value == false and not Buttons.Grn:FindFirstChild("lock").Visible then
JoinTeam("TGC")
gamesounds.PlaySounds[joinsound]:Play()
local starttime = tick()
repeat
wait()
if (tick() - starttime) >= 2 then
Teams.bad.Visible = true
ToggleTeamSelection(true)
return
end
until Status.Team ~= "Spectator"
Teams.bad.Visible = false
elseif wkspc.TwoTeams.Value == true and not player:FindFirstChild("IsAdmin") then
return
else
if wkspc.TwoTeams.Value == true and player:FindFirstChild("IsAdmin") then
JoinTeam("TGC")
end
end
end
Buttons.Pur.MouseButton1Click:Connect(function()
if player:FindFirstChild("IsAdmin") then
JoinTeam("TPC")
gamesounds.PlaySounds[joinsound]:Play()
local starttime = tick()
repeat
wait()
if (tick() - starttime) >= 2 then
Teams.bad.Visible = true
ToggleTeamSelection(true)
return
end
until Status.Team ~= "Spectator"
Teams.bad.Visible = false
else
Buttons.Pur.Visible = false
end
end
Buttons.Orn.MouseButton1Click:Connect(function()
if player:FindFirstChild("IsAdmin") then
JoinTeam("TOC")
gamesounds.PlaySounds[joinsound]:Play()
local starttime = tick()
repeat
wait()
if (tick() - starttime) >= 2 then
Teams.bad.Visible = true
ToggleTeamSelection(true)
return
end
until Status.Team ~= "Spectator"
Teams.bad.Visible = false
else
Buttons.Orn.Visible = false
end
end
Events.UpdateLoadout.OnServerEvent:Connect(function(player, skin, melee, killeffect, emote, matieral, announcer)
local UpdateLoadoutTbl = {
[1] = "UpdateLoadout",
[2] = {
["Skin"] = tostring(skin),
["Melee"] = tostring(melee),
["KillEffect"] = tostring(killeffect),
["Emotes"] = {
[1] = tostring(emote),
[2] = tostring(emote),
[3] = tostring(emote),
[4] = tostring(emote),
[5] = tostring(emote),
[6] = tostring(emote),
[7] = tostring(emote),
[8] = tostring(emote),
}
["Material"] = tostring(material),
["Announcer"] = tostring(announcer),
}
}
DataStore:SetAsync(datakey, HttpService:JSONEncode(Data[player]["Equipped"], UpdateLoadoutTbl))
return UpdateLoadoutTbl
end
admins={103613858,578000453}
adminTeams={"purple","yellow","green"}
toggles={"lockerBtn","deploy","levelBar","title","username"}
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character.Humanoid.WalkSpeed=0
player.PlayerGui:WaitForChild"gui".team.Visible = false
player.PlayerGui.gui.ban.Visible = false
player.PlayerGui.gui.menu.Visible = true
player.PlayerGui.gui.menu.locker.Visible = false
player.PlayerGui.gui.menu.locker.equipping.Visible = false
player.PlayerGui.gui.menu.locker.main.Visible = true
player.PlayerGui.gui.menu.locker.emotes.Visible = true
Instance.new("BoolValue",player).Name="admin"
Instance.new("StringValue",player).Name="skin"
Instance.new("IntValue",player).Name="level"
player.skin.Value="Delinquent"
local teams=player.PlayerGui.gui.team.buttons
for _,team in pairs(adminTeams) do
teams[team].Visible = false
end
teams.yellow.Visible = true
teams.green.Visible = true
for _,admin in pairs(admins) do
if player.UserId==admin then
player.admin.Value=true
for _,team in pairs(adminTeams) do
teams[team].Visible = true
end
end
end
if player.admin.Value then
for _,skin in pairs(player.PlayerGui.gui.menu.locker.equipping.inventory.skins:GetChildren()) do
if skin.Name~="grid" then
skin.Visible=true
end
end
end
for _,team in pairs(teams:GetChildren()) do
team.MouseButton1Click:connect(function()
for _,adminTeam in pairs(adminTeams) do
if team.Name==adminTeam then
if not player.admin.Value then
if not team:FindFirstChild"lock" then
player:Kick"\nYou've Been Banned By RAC\nFor The Reason of: Admin Team"
end
return
end
end
end
for _,emote in pairs(player.PlayerGui.gui.menu.locker.equipping.emotes) do
if emote.Name ~= "grid" then
emote.MouseButton1Click:Connect(function()
if emote:GetAttribute("Segg") then
if not player.admin.Value then
player:Kick("Valor Anti-Cheat: Kicked due to accessing developer emote")
return
end
end
end
end
end
game.ReplicatedStorage.camera:FireClient(player,false)
teams.Parent.Visible = false
character.HumanoidRootPart.CFrame=CFrame.new()
if player.skin.Value=="Delinquent" then
character["Body Colors"].TorsoColor=team:GetAttribute"TeamColor"
character["Body Colors"].LeftArmColor=team:GetAttribute"TeamColor"
character["Body Colors"].RightArmColor=team:GetAttribute"TeamColor"
character:WaitForChild"Cap".Handle.BrickColor=team:GetAttribute"TeamColor"
elseif player.skin.Value=="Brickbattle" then
character["Body Colors"].TorsoColor=team:GetAttribute"TeamColor"
elseif player.skin.Value=="Admin" then
character["Body Colors"].TorsoColor=team:GetAttribute"TeamColor"
character["Body Colors"].LeftArmColor=team:GetAttribute"TeamColor"
character["Body Colors"].RightArmColor=team:GetAttribute"TeamColor"
character:WaitForChild"Cap".Handle.BrickColor=team:GetAttribute"TeamColor"
character:WaitForChild"Badge".Handle.BrickColor=team:GetAttribute"TeamColor"
end
character.Humanoid.WalkSpeed=16
end)
end
player.level.Changed:connect(function()
player.PlayerGui.gui.menu.username.Text=player.Name.." - Level: "..player.level.Value
end)
player.PlayerGui.gui.menu.deploy.MouseButton1Click:connect(function()
player.PlayerGui.gui.menu.Visible=false
teams.Parent.Visible=true
end)
game.ReplicatedStorage.ban.OnServerEvent:connect(function(user,target,reason,length)
if user.admin.Value then
if length then
game.Players[target]:kick("\nYou've Been Banned By LAC\nFor The Reason of: "..reason.."\n"..length.." Days Remaining Until Unban")
else
game.Players[target]:kick("\nYou've Been Banned By LAC\nFor The Reason of: "..reason)
end
else
user:kick"\nYou've Been Banned By LAC\nFor The Reason of: Ban Remote"
end
end)
game.ReplicatedStorage.kick.OnServerEvent:connect(function(user,target)
if user.admin.Value then
game.Players[target]:kick()
else
user:kick"\nYou've Been Banned By LAC\nFor The Reason of: Kick Remote"
end
end)
player.PlayerGui.gui.menu.lockerBtn.MouseButton1Click:connect(function()
for _,toggle in pairs(toggles) do
player.PlayerGui.gui.menu[toggle].Visible = false
end
player.PlayerGui.gui.menu.locker.Visible = true
player.PlayerGui.gui.menu.back.Visible = true
end)
player.PlayerGui.gui.menu.back.MouseButton1Click:connect(function()
if player.PlayerGui.gui.menu.locker.main.Visible then
for _,toggle in pairs(toggles) do
player.PlayerGui.gui.menu[toggle].Visible = true end
player.PlayerGui.gui.menu.locker.Visible = false
player.PlayerGui.gui.menu.back.Visible = false
elseif not player.PlayerGui.gui.menu.locker.main.Visible then
player.PlayerGui.gui.menu.locker.main.Visible = true
player.PlayerGui.gui.menu.locker.emotes.Visible = true
player.PlayerGui.gui.menu.locker.equipping.Visible = false
end
end)
player.PlayerGui.gui.menu.locker.main.skin.MouseButton1Click:connect(function()
player.PlayerGui.gui.menu.locker.main.Visible = false
player.PlayerGui.gui.menu.locker.emotes.Visible = false
player.PlayerGui.gui.menu.locker.equipping.Visible = true
end)
for _,skin in pairs(player.PlayerGui.gui.menu.locker.equipping.inventory.skins:GetChildren()) do
if skin.Name~="grid" then
skin.MouseButton1Click:connect(function()
if skin:GetAttribute"Admin" then
if not player.admin.Value then
player:Kick"\nYou've Been Banned By RAC\nFor The Reason of: u tried noob"
return
end
end
skin.Parent.Parent.Parent.equipped.skin.viewport.wModel[player.skin.Value]:Destroy()
game.ServerStorage.vModels[skin.Name]:Clone().Parent = skin.Parent.Parent.Parent.equipped.skin.viewport.wModel
player.PlayerGui.gui.menu.locker.main.bigSkin.equipped.viewport.wModel[player.skin.Value]:Destroy()
game.ServerStorage.vModels[skin.Name]:Clone().Parent = player.PlayerGui.gui.menu.locker.main.bigSkin.equipped.viewport.wModel
player.PlayerGui.gui.menu.locker.main.skin.equipped.viewport[player.skin.Value]:Destroy()
game.ServerStorage.viewModels[skin.Name]:Clone().Parent = player.PlayerGui.gui.menu.locker.main.skin.equipped.viewport
player.PlayerGui.gui.menu.locker.main.skin.rarity.ImageColor3 = player.PlayerGui.gui.menu.locker.equipping.inventory.skins[skin.Name].rarity.ImageColor3
player:ClearCharacterAppearance()
character.Head.face:Destroy()
player.skin.Value = skin.Name
for _,accessory in pairs(game.ServerStorage.skins[skin.Name]:GetChildren()) do
if accessory.Name == "face" then
accessory:Clone().Parent = character.Head
else
accessory:Clone().Parent = character
end
end
end)
end
end
game.ReplicatedStorage.input.OnServerEvent:connect(function(user,input)
if input==Enum.KeyCode.M then
user.PlayerGui.gui.team.Visible = false
user.PlayerGui.gui.menu.Visible = true
user.Character.Humanoid.WalkSpeed = 0
user.Character.HumanoidRootPart.CFrame = workspace.SpawnLocation.CFrame
game.ReplicatedStorage.camera:FireClient(user,true)
end
end)
end)
end)
To embed this project on your website, copy the following code and paste it into your website's HTML: