Universal chams
Key RequiredUniversal

Universal chams

Universal ScriptGrokGrok 3.5K views 1.7K executesUpdated Oct 19, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•158 lines (5113 chars)
-- Universal Chams 
-- StarterPlayerScripts -> LocalScript

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer

-- CONFIG
local ENABLE_CHAMS = true
local UPDATE_INTERVAL = 0.12
local MAX_DISTANCE = 1000
local OUTLINE_ENABLED = true
local OUTLINE_THICKNESS = 1
local TEAM_CHECK = true

local highlights = {}

local function getOrCreateHighlight(character)
    if not character then return nil end
    if highlights[character] and highlights[character].Parent then
        return highlights[character]
    end

    local highlight = Instance.new("Highlight")
    highlight.Name = "UniversalChams_Highlight"
    highlight.Adornee = character
    highlight.FillTransparency = 0.75 -- 🔥 más transparente (antes 0.5)
    highlight.OutlineTransparency = 0.3
    highlight.OutlineColor = Color3.new(0, 0, 0)
    highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
    highlight.Parent = LocalPlayer:WaitForChild("PlayerGui")

    highlights[character] = highlight
    return highlight
end

local function destroyHighlight(character)
    local h = highlights[character]
    if h then
        if h.Parent then pcall(function() h:Destroy() end) end
        highlights[character] = nil
    end
end

local function computeColors(targetPlayer, targetHumanoid)
    local fill = Color3.new(1, 0, 0)
    local outline = Color3.new(0.2, 0, 0)
    local fillTransparency = 0.65 -- 🔥 menos opaco
    local outlineTransparency = 0.3

    local isTeammate = false
    if TEAM_CHECK and LocalPlayer and targetPlayer then
        if LocalPlayer.Team and targetPlayer.Team then
            isTeammate = (LocalPlayer.Team == targetPlayer.Team)
        else
            isTeammate = (LocalPlayer.TeamColor == targetPlayer.TeamColor)
        end
    end

    if isTeammate then
        local healthRatio = 1
        if targetHumanoid and targetHumanoid.MaxHealth > 0 then
            healthRatio = math.clamp(targetHumanoid.Health / targetHumanoid.MaxHealth, 0, 1)
        end
        local minG = 0.08
        local gValue = minG + (0.92 * healthRatio)
        fill = Color3.new(0, gValue, 0)
        outline = Color3.new(0, math.max(0.2, gValue * 0.6), 0)
        fillTransparency = 0.6 + (1 - healthRatio) * 0.25 -- 🔥 deja ver más al player
        outlineTransparency = 0.3
    else
        fill = Color3.new(1, 0.12, 0.12)
        outline = Color3.new(0.45, 0, 0)
        fillTransparency = 0.6
        outlineTransparency = 0.25
    end

    return fill, outline, fillTransparency, outlineTransparency
end

local function updateCharacterHighlight(player, character)
    if not ENABLE_CHAMS then return end
    if not character or not player then return end
    local hrp = character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Torso") or character:FindFirstChildWhichIsA("BasePart")
    if not hrp then
        destroyHighlight(character)
        return
    end

    if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
        local dist = (LocalPlayer.Character.HumanoidRootPart.Position - hrp.Position).Magnitude
        if dist > MAX_DISTANCE then
            destroyHighlight(character)
            return
        end
    end

    local humanoid = character:FindFirstChildOfClass("Humanoid")
    local fill, outline, fillT, outlineT = computeColors(player, humanoid)
    local h = getOrCreateHighlight(character)
    if not h then return end

    h.FillColor = fill
    h.OutlineColor = outline
    h.FillTransparency = fillT
    h.OutlineTransparency = outlineT
end

local function onCharacterAdded(player, character)
    destroyHighlight(character)
    character.AncestryChanged:Connect(function(_, parent)
        if not parent then
            destroyHighlight(character)
        end
    end)
    task.spawn(function()
        while character.Parent do
            pcall(function()
                updateCharacterHighlight(player, character)
            end)
            task.wait(UPDATE_INTERVAL)
        end
        destroyHighlight(character)
    end)
end

local function onPlayerAdded(player)
    if player == LocalPlayer then return end
    player.CharacterAdded:Connect(function(char) onCharacterAdded(player, char) end)
    if player.Character then
        onCharacterAdded(player, player.Character)
    end
end

for _, p in ipairs(Players:GetPlayers()) do
    if p ~= LocalPlayer then
        onPlayerAdded(p)
    end
end

Players.PlayerAdded:Connect(onPlayerAdded)
Players.PlayerRemoving:Connect(function(p)
    if p and p.Character then destroyHighlight(p.Character) end
end)

local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    if input.KeyCode == Enum.KeyCode.Equals then
        ENABLE_CHAMS = not ENABLE_CHAMS
        if not ENABLE_CHAMS then
            for c,_ in pairs(highlights) do destroyHighlight(c) end
        end
        print("Chams toggled:", ENABLE_CHAMS)
    end
end)

print("✅ Universal Chams v2 loaded — more transparent version.")

Features & Information

Chams bro

Community Comments (4)

CR1MCR1MOct 19, 2025

Just use iy chams

SyrexGenesisSyrexGenesisOct 19, 2025

What da house doing up there

KentmnKentmnOct 20, 2025

i alwaye see you everywhere @SyrexGenesis

Replying to @Kentmn
SyrexGenesisSyrexGenesisOct 20, 2025

@Kentmn ik I became xvc or is something like that he always commented but now he doesn't idk why

More Scripts for Universal Scripts