local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera
-- // Setup Storage in Camera to avoid 291 Kicks
local Storage = Camera:FindFirstChild("VisualBuffer") or Instance.new("Folder", Camera)
Storage.Name = "VisualBuffer"
local highlights = {}
local function getTeamColor(player)
local char = player.Character
local teamObj = player.Team
-- 1. Check by Folder Name (Workspace Hierarchy)
if char and char.Parent then
local pName = char.Parent.Name:lower()
-- DEBUG: Uncomment the line below to see team names in F9 console
-- print("Player: " .. player.Name .. " | Folder: " .. pName)
if pName:find("counter") or pName:find("police") or pName:find("blue") or pName == "ct" then
return Color3.fromRGB(0, 160, 255) -- Blue
elseif pName:find("terror") or pName:find("attack") or pName == "t" then
return Color3.fromRGB(255, 140, 0) -- Orange
end
end
-- 2. Check by Team Object Color (Common in Blox Strike)
if teamObj then
if teamObj.TeamColor == BrickColor.new("Deep blue") or teamObj.TeamColor == BrickColor.new("Bright blue") then
return Color3.fromRGB(0, 160, 255)
elseif teamObj.TeamColor == BrickColor.new("Bright orange") or teamObj.TeamColor == BrickColor.new("Neon orange") then
return Color3.fromRGB(255, 140, 0)
end
end
-- 3. Fallback: If player is on YOUR team, make them Blue. Everyone else Orange.
if player.Team == LocalPlayer.Team then
return Color3.fromRGB(0, 160, 255)
end
return Color3.fromRGB(255, 140, 0)
end
local function refresh()
for _, player in pairs(Players:GetPlayers()) do
if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
if not highlights[player] or not highlights[player].Parent then
local hl = Instance.new("Highlight")
hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
hl.FillTransparency = 0.5
hl.OutlineTransparency = 0
hl.Adornee = player.Character
hl.Parent = Storage
highlights[player] = hl
end
local color = getTeamColor(player)
highlights[player].FillColor = color
highlights[player].OutlineColor = color
else
if highlights[player] then
highlights[player]:Destroy()
highlights[player] = nil
end
end
end
end
-- Fast refresh for colors
task.spawn(function()
while true do
refresh()
task.wait(0.2)
end
end)
To embed this project on your website, copy the following code and paste it into your website's HTML: