ADVERTISEMENTREMOVE ADS
Mad city | Esp Role Team Check
1,335 views
Script Preview
Description
Mad city chapter 1: ESP Team Check. Adapted to different role: - Prisoner
- Criminal
- Police
- Hero
- Vilain
Features:
- Esp team heck
- Highlight esp
- Esp
- Mad city esp
- Esp mad city
- Op esp
- Esp Team Check
ADVERTISEMENTREMOVE ADS
102 Lines • 3.12 KiB
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
-- Réglages
local IGNORE_LOCAL_PLAYER = true
local MAX_FADE_DISTANCE = 9000
local OUTLINE_TRANSPARENCY = 1 -- aucune bordure visible
local FILL_TRANSPARENCY = 0.1 -- couleur visible, mais pas opaque
-- Fonction : rend une couleur très intense (saturation maximale)
local function getIntenseColor(color)
local ok, h, s, v = pcall(function()
return Color3.toHSV(color)
end)
if ok then
return Color3.fromHSV(h, 1, 1)
end
return color
end
-- Crée un Highlight pour un joueur donné
local function createHighlightForCharacter(player)
if IGNORE_LOCAL_PLAYER and player == LocalPlayer then return end
local character = player.Character
if not character then return end
-- Supprime un ancien highlight s’il existe
local old = character:FindFirstChild("TeamHighlight")
if old then
old:Destroy()
end
-- Crée le nouveau highlight
local highlight = Instance.new("Highlight")
highlight.Name = "TeamHighlight"
highlight.Parent = character
highlight.Adornee = character
highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
-- Couleur basée sur l’équipe Roblox
local teamColor = player.Team and player.Team.TeamColor and player.Team.TeamColor.Color or Color3.fromRGB(255, 255, 255)
local intenseColor = getIntenseColor(teamColor)
highlight.FillColor = intenseColor
highlight.FillTransparency = FILL_TRANSPARENCY
highlight.OutlineTransparency = OUTLINE_TRANSPARENCY
end
-- Supprime le Highlight d’un joueur
local function removeHighlightForCharacter(player)
if player.Character and player.Character:FindFirstChild("TeamHighlight") then
player.Character.TeamHighlight:Destroy()
end
end
-- Gère tout le cycle de vie du joueur (spawn, changement d’équipe, etc.)
local function setupPlayer(player)
-- Quand le joueur spawn
player.CharacterAdded:Connect(function()
task.wait(0.2) -- petit délai pour laisser le temps au Character d’apparaître
createHighlightForCharacter(player)
end)
-- Quand le joueur change d’équipe
player:GetPropertyChangedSignal("Team"):Connect(function()
removeHighlightForCharacter(player)
task.wait(0.2)
createHighlightForCharacter(player)
end)
-- Crée le highlight initial si le joueur est déjà présent
if player.Character then
createHighlightForCharacter(player)
end
end
-- Quand un joueur rejoint le serveur
Players.PlayerAdded:Connect(setupPlayer)
-- Supprime le highlight quand un joueur quitte
Players.PlayerRemoving:Connect(function(player)
removeHighlightForCharacter(player)
end)
-- Applique le système à tous les joueurs déjà présents
for _, player in ipairs(Players:GetPlayers()) do
setupPlayer(player)
end
-- Mise à jour continue (au cas où un highlight serait perdu)
RunService.RenderStepped:Connect(function()
for _, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer then
local character = player.Character
if character and not character:FindFirstChild("TeamHighlight") then
createHighlightForCharacter(player)
end
end
end
end)
ADVERTISEMENTREMOVE ADS
ADVERTISEMENTREMOVE ADS





Comments