local Developers = 578000453
local DevTeams = {"Pur", "Ylw", "Grn", "On", "Rn"}
local Toggles = {"LockerBTN", "Deploy", "LevelBar", "Title", "Username"}
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
-- Don't want the player to walk for now, as they're automatically in the menu.
character.Humanoid.WalkSpeed = 0
-- GUI
player.PlayerGui:WaitForChild("GUI").TeamSelection.Visible = false
player.PlayerGui.GUI.Ban.Visible = false
player.PlayerGui.GUI.Menu.Visible = false
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
-- Creating instances to store data
if player.UserId == Developers then
Instance.new("BoolValue", player).Name = "IsAdmin" -- Used for testing, by giving themselves items, perks, and tools, along with just plain fun lol
player.IsAdmin.Value = true
end
Instance.new("Folder", player).Name = "Status" -- The folder given to the player that has the current match status
Instance.new("Folder", player).Name = "Data" -- The folder given to the player to that has the current data of the player
Instance.new("StringValue", player.Data).Name = "Skin" -- Player's current equipped skin
Instance.new("IntValue", player.Data).Name = "Level" -- Player XP level
Instace.new("StringValue", player.Status).Name = "Team" -- Player's current team (CAN NEVER BE NIL)
Instance.new("IntValue", player.Status).Name = "Level" -- Player match level
Instance.new("StringValue", player.Data).Name = "Melee" -- Player's current equipped melee
local teams = player.PlayerGui.GUI.TeamSelection.Buttons
teams.Ylw.Visible = true
teams.Grn.Visible = true
for _, team in pairs(DevTeams) do
teams[team].Visible = false
end
for _, dev in pairs(Developers) do
if player:FindFirstChild("IsAdmin") and player:FindFirstChild("IsAdmin").Value then
for _, team in pairs(DevTeams) do
teams[team].Visible = true
end
end
end
if player:FindFirstChild("IsAdmin").Value then
for _, skin in pairs(player.PlayerGui.GUI.Menu.Locker.Equipping.Inventory.Skins:GetChildren()) do
if skin.Name ~= "Grid" then
game.ReplicatedStorage.Events.LoadLoadout:FireServer(player)
end
end
end
for _, team in pairs(teams:GetChildren()) do
team.MouseButton1Click:Connect(function()
for _, devteam in pairs(DevTeams) do
if team.Name == devteam then
if not player:FindFirstChild("IsAdmin") or not player:FindFirstChild("IsAdmin").Value then
if not team:FindFirstChild("lock") then
player:Kick("Illegal access to a developer only team")
end
return
end
end
end
game.ReplicatedStorage.Events.Camera:FireClient(player, false)
teams.Parent.Visible = false
character.HumanoidRootPart.CFrame = CFrame.new()
if player.Status.Team ~= "Spectator" or player.Status.Team ~= "RNBOW" then
TeamColoring()
else
if player.Status.Team ~= "Spectator" and player.Status.Team == "RNBOW" then
SkittlezBoiLOL()
end
end
character.Humanoid.WalkSpeed = 16
end)
end
end)
end)
To embed this project on your website, copy the following code and paste it into your website's HTML: