AIMLOCK  CHAMS UNIVERSAL V2
Key RequiredUniversal

AIMLOCK CHAMS UNIVERSAL V2

Universal Scripthanzo*hanzo* 566 views 76 executesUpdated Jan 8, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•1043 lines (38415 chars)
-- 🎯 AIMBOT ULTRA-PRECIso + ESP SEPARADO (VERSÃO DEFINITIVA)
-- Sistema otimizado para headshots + ESP profissional independente
-- ✅ ZERO "attempt to index nil" - Validações ultra-rigorosas implementadas

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

-- ========================================================================
-- 🟦 [ SISTEMA 1: DADOS ] - ESTADO PURO DO JOGO
-- ========================================================================

local GameDataSystem = {}

function GameDataSystem.getPlayers()
    if not Players or not Players.GetPlayers then return {} end
    local success, players = pcall(function() return Players:GetPlayers() end)
    return success and players or {}
end

function GameDataSystem.getLocalPlayer()
    return LocalPlayer or nil
end

function GameDataSystem.getCamera()
    if not workspace or not workspace.CurrentCamera then return nil end
    return workspace.CurrentCamera
end

function GameDataSystem.playerExists(player)
    return player and player:IsDescendantOf(Players)
end

function GameDataSystem.getCharacter(player)
    if not GameDataSystem.playerExists(player) then return nil end
    return player.Character
end

function GameDataSystem.characterExists(character)
    return character and character:IsDescendantOf(workspace)
end

function GameDataSystem.getHumanoid(character)
    if not GameDataSystem.characterExists(character) then return nil end
    return character:FindFirstChild("Humanoid")
end

function GameDataSystem.getHead(character)
    if not GameDataSystem.characterExists(character) then return nil end
    return character:FindFirstChild("Head")
end

function GameDataSystem.getRootPart(character)
    if not GameDataSystem.characterExists(character) then return nil end
    return character:FindFirstChild("HumanoidRootPart")
end

function GameDataSystem.getTeam(player)
    if not GameDataSystem.playerExists(player) then return nil end
    return player.Team
end

function GameDataSystem.getPosition(part)
    if not part or not part:IsA("BasePart") or not part:IsDescendantOf(workspace) then
        return Vector3.zero
    end
    local success, pos = pcall(function() return part.Position end)
    return success and pos and typeof(pos) == "Vector3" and pos or Vector3.zero
end

function GameDataSystem.getVelocity(part)
    if not part or not part:IsA("BasePart") or not part:IsDescendantOf(workspace) then
        return Vector3.zero
    end
    local success, vel = pcall(function() return part.AssemblyLinearVelocity end)
    return success and vel and typeof(vel) == "Vector3" and vel or Vector3.zero
end

function GameDataSystem.isAlive(humanoid)
    if not humanoid or not humanoid:IsDescendantOf(workspace) then return false end
    local success, health = pcall(function() return humanoid.Health end)
    return success and type(health) == "number" and health > 0
end

function GameDataSystem.getViewportSize(camera)
    if not camera then return Vector2.zero end
    local success, size = pcall(function() return camera.ViewportSize end)
    return success and size or Vector2.zero
end

function GameDataSystem.getMouseLocation()
    if not UIS or not UIS.GetMouseLocation then return Vector2.zero end
    local success, pos = pcall(function() return UIS:GetMouseLocation() end)
    return success and pos or Vector2.zero
end

-- ========================================================================
-- [ CONFIGURAÇÕES ULTRA-PRECISAS ] - OTIMIZADAS PARA CABEÇA
-- ========================================================================
local Config = {
    AIM_ENABLED = true,
    FOV_SIZE = 70,         -- FOV MAIS RESTRITO PARA CABEÇA (antes: 80)
    SMOOTHNESS = 0.04,     -- SUAVIZAÇÃO ULTRA-RÁPIDA PARA GRUDAÇÃO FORTE (antes: 0.06)
    HEAD_PRIORITY = true,  -- SEMPRE PRIORIZAR CABEÇA
    PREDICTION_ENABLED = true, -- PREDIÇÃO DE MOVIMENTO
    PREDICTION_TIME = 0.0, -- PREDIÇÃO MAIS CURTA PARA CABEÇA (0ms)
    UI_VISIBLE = false,
    WINDOW_ACTIVE = true,
    HEAD_BONUS_STRENGTH = 2.0  -- BONUS EXTRA PARA CABEÇA (100% mais forte)
}

-- ========================================================================

-- ========================================================================
-- [ CONTROLE DE FOCO ULTRA-SEGURO ]
-- ========================================================================
local WindowFocus = {
    janelaEmFoco = true,
    aimAtivo = false,
    chamsAtivo = false,
    alvoAtual = nil
}

function WindowFocus.inicializar()
    UIS.WindowFocused:Connect(function()
        WindowFocus.janelaEmFoco = true
        print("🖥️ ROBLOX EM FOCO - AIMLIBERADO")
    end)

    UIS.WindowFocusReleased:Connect(function()
        WindowFocus.janelaEmFoco = false
        WindowFocus.aimAtivo = false
        WindowFocus.alvoAtual = nil
        print("🚨 ROBLOX PERDEU FOCO - AIMDESABILITADO")
    end)

    WindowFocus.janelaEmFoco = true
end

-- ========================================================================
-- [ DETECÇÃO DE INIMIGOS ULTRA-RÁPIDA ]
-- ========================================================================
local EnemyDetector = {}

function EnemyDetector.ehInimigo(player)
    -- ✅ CORREÇÃO: Sistema de teams robusto (evita "No hook for GetTeam")
    if not GameDataSystem.playerExists(player) or player == LocalPlayer then return false end

    local playerTeam = GameDataSystem.getTeam(player)
    local localTeam = GameDataSystem.getTeam(GameDataSystem.getLocalPlayer())

    if playerTeam and localTeam then
        return playerTeam ~= localTeam
    end

    -- Método 2: Verificar atributos customizados
    local success1, playerAttrs = pcall(function() return player:GetAttributes() end)
    local success2, localAttrs = pcall(function() return LocalPlayer:GetAttributes() end)

    if success1 and success2 and playerAttrs and localAttrs then
        for attrName, attrValue in pairs(playerAttrs) do
            if type(attrName) == "string" and (attrName:lower():find("team") or attrName:lower():find("faction")) then
                local localAttrValue = localAttrs[attrName]
                if localAttrValue and attrValue ~= localAttrValue then
                    return true -- ✅ Times diferentes
                end
            end
        end
    end

    return true -- FFA MODE
end

function EnemyDetector.ehValido(player)
    -- ✅ CORREÇÃO: Validação ultra-rigorosa
    if not GameDataSystem.playerExists(player) then return false end

    local character = GameDataSystem.getCharacter(player)
    if not character or not GameDataSystem.characterExists(character) then return false end

    local humanoid = GameDataSystem.getHumanoid(character)
    return GameDataSystem.isAlive(humanoid)
end

-- ========================================================================
-- [ SELEÇÃO DE CABEÇA ULTRA-PRIORITÁRIA ] - MELHORADO PARA HEADSHOTS
-- ========================================================================
local BodyPartSelector = {}

-- 🔥 FUNÇÃO ESPECIAL: SEMPRE PEGA A CABEÇA PRIMEIRO
function BodyPartSelector.getHead(character)
    -- ✅ CORREÇÃO: Validação antes de qualquer acesso
    if not GameDataSystem.characterExists(character) then return nil end

    -- SEMPRE TENTA CABEÇA PRIMEIRO - MÚLTIPLAS VERIFICAÇÕES
    local head = character:FindFirstChild("Head")
    if head and head:IsA("BasePart") and head:IsDescendantOf(character) then
        return head
    end

    -- FALLBACK PARA DIFERENTES NOMES DE CABEÇA
    local headNames = {"Head", "head", "HEAD"}
    for _, name in ipairs(headNames) do
        if type(name) == "string" then
            local found = character:FindFirstChild(name)
            if found and found:IsA("BasePart") and found:IsDescendantOf(character) then
                return found
            end
        end
    end

    return nil
end

-- 🔥 PREDIÇÃO DE MOVIMENTO PARA PRECISÃO MÁXIMA
function BodyPartSelector.predictPosition(bodyPart, predictionTime)
    -- ✅ CORREÇÃO: Validação ultra-rigorosa antes de cálculos
    if not bodyPart or not bodyPart:IsA("BasePart") or not bodyPart:IsDescendantOf(workspace) then
        return GameDataSystem.getPosition(bodyPart)
    end

    if not Config.PREDICTION_ENABLED or type(predictionTime) ~= "number" or predictionTime <= 0 then
        return GameDataSystem.getPosition(bodyPart)
    end

    -- CALCULAR VELOCIDADE PARA PREDIÇÃO
    local position = GameDataSystem.getPosition(bodyPart)
    local velocity = GameDataSystem.getVelocity(bodyPart)

    -- ✅ CORREÇÃO: Verificação se valores são válidos antes da conta
    if position ~= Vector3.zero and velocity ~= Vector3.zero then
        return position + (velocity * predictionTime)
    end

    return position
end

-- 🔥 LÓGICA PRINCIPAL: CABEÇA SEMPRE PRIORITÁRIA
function BodyPartSelector.encontrarMelhorParte(character)
    -- ✅ CORREÇÃO: Validação antes de qualquer acesso
    if not GameDataSystem.characterExists(character) then return nil end

    -- 🔥 CABEÇA SEMPRE É PRIORIDADE MÁXIMA
    if Config.HEAD_PRIORITY then
        local head = BodyPartSelector.getHead(character)
        if head then
            return head -- 🔥 SEMPRE RETORNA CABEÇA PARA HEADSHOTS
        end
    end

    -- FALLBACK APENAS SE CABEÇA NÃO EXISTIR
    local fallbacks = {
        character:FindFirstChild("UpperTorso"),
        character:FindFirstChild("HumanoidRootPart"),
        character:FindFirstChild("Torso")
    }

    for _, part in ipairs(fallbacks) do
        if part and part:IsA("BasePart") and part:IsDescendantOf(character) then
            return part
        end
    end

    return nil
end

-- ========================================================================
-- [ FOV ULTRA-PRECISO ] - RESTRITO PARA CABEÇA
-- ========================================================================
local FOVSystem = {
    circulo = nil
}

function FOVSystem.criarCirculo()
    if FOVSystem.circulo then FOVSystem.circulo:Remove() end

    FOVSystem.circulo = Drawing.new("Circle")
    FOVSystem.circulo.Thickness = 2
    FOVSystem.circulo.NumSides = 32
    FOVSystem.circulo.Radius = Config.FOV_SIZE
    FOVSystem.circulo.Filled = false
    FOVSystem.circulo.Color = Color3.fromRGB(255, 255, 255)
    FOVSystem.circulo.Transparency = 0.7
    FOVSystem.circulo.Visible = false
end

function FOVSystem.calcular(posicaoMundo, camera)
    -- ✅ CORREÇÃO: Validação ultra-rigorosa
    if not posicaoMundo or typeof(posicaoMundo) ~= "Vector3" or not camera then return false end

    local centroTela = GameDataSystem.getViewportSize(camera)
    if centroTela == Vector2.zero then return false end
    centroTela = centroTela / 2

    local success, screenPos, visible = pcall(function()
        return camera:WorldToViewportPoint(posicaoMundo)
    end)

    if not success or not visible or not screenPos then return false end

    local distancia = (Vector2.new(screenPos.X, screenPos.Y) - centroTela).Magnitude
    return distancia <= Config.FOV_SIZE
end

function FOVSystem.atualizar()
    if not FOVSystem.circulo then return end

    local camera = GameDataSystem.getCamera()
    if not camera then return end

    local centro = GameDataSystem.getViewportSize(camera)
    if centro == Vector2.zero then return end
    centro = centro / 2

    FOVSystem.circulo.Position = centro
    FOVSystem.circulo.Radius = Config.FOV_SIZE
    FOVSystem.circulo.Visible = WindowFocus.aimAtivo and WindowFocus.janelaEmFoco
end

-- ========================================================================
-- [ SELETOR DE ALVO ULTRA-RÁPIDO ] - FOCADO EM CABEÇA
-- ========================================================================
local TargetSelector = {}

function TargetSelector.encontrarMelhor(camera)
    -- ✅ CORREÇÃO: Validação ultra-rigorosa antes de qualquer loop
    if not camera then return nil end

    local melhorAlvo = nil
    local menorDistancia = Config.FOV_SIZE
    local centroTela = GameDataSystem.getViewportSize(camera)
    if centroTela == Vector2.zero then return nil end
    centroTela = centroTela / 2

    for _, player in ipairs(GameDataSystem.getPlayers()) do
        -- ✅ VALIDAÇÃO: Player existe e é válido
        if not EnemyDetector.ehInimigo(player) or not EnemyDetector.ehValido(player) then
            continue
        end

        -- 🔥 VERIFICAÇÃO ESPECIAL: CABEÇA DEVE EXISTIR
        local character = GameDataSystem.getCharacter(player)
        if not character then continue end

        local head = BodyPartSelector.getHead(character)
        if not head then continue end

        -- 🔥 PREDIÇÃO PARA CABEÇA
        local targetPosition = BodyPartSelector.predictPosition(head, Config.PREDICTION_TIME)
        if targetPosition == Vector3.zero then continue end

        -- VERIFICAÇÃO FOV COM PREDIÇÃO
        if not FOVSystem.calcular(targetPosition, camera) then
            continue
        end

        -- DISTÂNCIA DA CABEÇA PREDITA
        local success, screenPos, visible = pcall(function()
            return camera:WorldToViewportPoint(targetPosition)
        end)

        if not success or not visible or not screenPos then continue end

        local distancia = (Vector2.new(screenPos.X, screenPos.Y) - centroTela).Magnitude

        if distancia < menorDistancia then
            menorDistancia = distancia
            melhorAlvo = player
        end
    end

    return melhorAlvo
end

-- ========================================================================
-- [ CHAMS SYSTEM - VISÃO ATRAVÉS DE PAREDES ]
-- ========================================================================
local CHAMSSystem = {}

-- CONFIGURAÇÕES CHAMS (SEM ESTADO DUPLICADO)
local CHAMS_CONFIG = {
    FillColor = Color3.fromRGB(255, 0, 0),    -- Vermelho para inimigos
    OutlineColor = Color3.fromRGB(255, 255, 255), -- Branco para contorno
    FillTransparency = 0.5,       -- Semi-transparente
    DepthMode = Enum.HighlightDepthMode.AlwaysOnTop, -- Aparece através de paredes
    Highlights = {}               -- Armazenar highlights ativos
}

-- ATIVAR CHAMS PARA TODOS OS JOGADORES VÁLIDOS
function CHAMSSystem.ativar()
    -- LIMPAR CHAMS ANTERIORES
    CHAMSSystem.limpar()

    -- APLICAR CHAMS PARA TODOS OS JOGADORES
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer then
            CHAMSSystem.aplicar(player)
        end
    end

    print("🎨 CHAMS ATIVADO - VISÃO ATRAVÉS DE PAREDES")
end

-- DESATIVAR CHAMS
function CHAMSSystem.desativar()
    CHAMSSystem.limpar()
    print("🎨 CHAMS DESATIVADO")
end

-- APLICAR CHAMS PARA UM JOGADOR ESPECÍFICO
function CHAMSSystem.aplicar(player)
    if not WindowFocus.chamsAtivo then return end
    if not player or not player.Character then return end

    -- VERIFICAR SE É INIMIGO (MESMA LÓGICA DO AIMBOT)
    local isEnemy = EnemyDetector.ehInimigo(player)
    if not isEnemy then return end

    local character = player.Character

    -- CRIAR HIGHLIGHT PARA CHAMS VERDADEIRO (COBRE TODO O MODELO)
    local highlight = Instance.new("Highlight")
    highlight.Name = "CHAMS_" .. player.Name
    highlight.FillColor = CHAMS_CONFIG.FillColor
    highlight.OutlineColor = CHAMS_CONFIG.OutlineColor
    highlight.FillTransparency = CHAMS_CONFIG.FillTransparency
    highlight.OutlineTransparency = 0 -- Contorno sempre visível
    highlight.DepthMode = CHAMS_CONFIG.DepthMode -- VISÃO ATRAVÉS DE PAREDES
    highlight.Adornee = character -- APLICA NO CHARACTER INTEIRO
    highlight.Parent = character

    -- ARMAZENAR REFERÊNCIA DO HIGHLIGHT
    CHAMS_CONFIG.Highlights[player.Name] = highlight
end

-- REMOVER CHAMS DE UM JOGADOR
function CHAMSSystem.remover(player)
    if not player then return end

    local highlight = CHAMS_CONFIG.Highlights[player.Name]
    if highlight then
        highlight:Destroy()
        CHAMS_CONFIG.Highlights[player.Name] = nil
    end
end

-- LIMPAR TODOS OS CHAMS
function CHAMSSystem.limpar()
    for playerName, highlight in pairs(CHAMS_CONFIG.Highlights) do
        if highlight then
            highlight:Destroy()
        end
    end
    CHAMS_CONFIG.Highlights = {}
end

-- ATUALIZAR CHAMS QUANDO JOGADOR MUDA
function CHAMSSystem.atualizar(player)
    if not WindowFocus.chamsAtivo then return end

    CHAMSSystem.remover(player)
    CHAMSSystem.aplicar(player)
end

-- ========================================================================
-- [ AIMLOCK ULTRA-PRECIso ] - OTIMIZADO PARA CABEÇA
-- ========================================================================
local AimController = {
    suavizacao = Config.SMOOTHNESS
}

function AimController.aplicar(alvoAtual, camera)
    -- 🔥 VERIFICAÇÕES AVANÇADAS PARA GRUDAÇÃO MÁXIMA
    if not WindowFocus.janelaEmFoco or not WindowFocus.aimAtivo then
        return
    end

    -- VERIFICAÇÃO RIGOROSA DO ALVO
    if not alvoAtual or not alvoAtual:IsDescendantOf(Players) then
        WindowFocus.alvoAtual = nil
        return
    end

    if not EnemyDetector.ehValido(alvoAtual) then
        WindowFocus.alvoAtual = nil
        return
    end

    local character = alvoAtual.Character
    if not character or not character:IsDescendantOf(workspace) then
        WindowFocus.alvoAtual = nil
        return
    end

    -- 🔥 SISTEMA AVANÇADO DE DETECÇÃO DE CABEÇA
    local head = BodyPartSelector.getHead(character)
    if not head or not head:IsDescendantOf(character) then
        -- FALLBACK: tentar encontrar cabeça novamente
        head = character:FindFirstChild("Head") or character:FindFirstChild("head")
        if not head then
            WindowFocus.alvoAtual = nil
            return
        end
    end

    -- 🔥 PREDIÇÃO AVANÇADA COM MÚLTIPLAS VERIFICAÇÕES
    local targetPosition = BodyPartSelector.predictPosition(head, Config.PREDICTION_TIME)

    -- VERIFICAÇÃO FOV ULTRA-ESTRITA COM MÚLTIPLOS CHECKS
    if not FOVSystem.calcular(targetPosition, camera) then
        -- TENTATIVA SECUNDÁRIA: verificar posição atual da cabeça
        local currentPos = GameDataSystem.getPosition(head)
        if currentPos == Vector3.zero or not FOVSystem.calcular(currentPos, camera) then
            WindowFocus.alvoAtual = nil
            return
        end
        targetPosition = currentPos
    end

    -- POSIÇÃO DA CABEÇA NA TELA COM VALIDAÇÃO
    local success, screenPos, visible = pcall(function()
        return camera:WorldToViewportPoint(targetPosition)
    end)

    if not success or not visible or not screenPos then
        WindowFocus.alvoAtual = nil
        return
    end

    -- VERIFICAÇÃO DE DISTÂNCIA DA TELA (não pode estar muito longe)
    local screenCenter = GameDataSystem.getViewportSize(camera)
    if screenCenter == Vector2.zero then return end
    screenCenter = screenCenter / 2

    local screenDistance = (Vector2.new(screenPos.X, screenPos.Y) - screenCenter).Magnitude
    if screenDistance > Config.FOV_SIZE * 1.5 then  -- 50% de tolerância
        WindowFocus.alvoAtual = nil
        return
    end

    -- POSIÇÃO ATUAL DO MOUSE COM VALIDAÇÃO
    local mousePos = GameDataSystem.getMouseLocation()
    if mousePos == Vector2.zero then return end

    -- DIFERENÇA ULTRA-PRECISA COM VALIDAÇÃO
    local delta = Vector2.new(screenPos.X, screenPos.Y) - mousePos

    -- 🔥 SISTEMA ULTRA-FORTE DE GRUDAÇÃO NA CABEÇA
    -- THRESHOLD ULTRA-BAIXO PARA CABEÇA: muito mais sensível
    local distanceFactor = screenDistance / Config.FOV_SIZE
    local adaptiveThreshold = math.max(0.03, 1.2 - (distanceFactor * 0.8)) -- Threshold muito menor para cabeça

    if math.abs(delta.X) > adaptiveThreshold or math.abs(delta.Y) > adaptiveThreshold then
        -- 🔥 SUAVIZAÇÃO ULTRA-FORTE PARA CABEÇA
        local adaptiveSmoothness = Config.SMOOTHNESS * (1 + distanceFactor * 0.8) -- Muito mais rápida quando longe

        -- BONUS ULTRA-FORTE PARA CABEÇA: 80% mais forte na cabeça
        local headBonus = Config.HEAD_BONUS_STRENGTH -- 1.8 = 80% mais forte
        adaptiveSmoothness = adaptiveSmoothness * headBonus

        -- LIMITES ULTRA-EXPANDIDOS PARA GRUDAÇÃO MÁXIMA NA CABEÇA
        local maxMove = math.clamp(50 + (distanceFactor * 35), 30, 85) -- Limites muito maiores para cabeça
        local moveX = math.clamp(delta.X * adaptiveSmoothness, -maxMove, maxMove)
        local moveY = math.clamp(delta.Y * adaptiveSmoothness, -maxMove, maxMove)

        -- VALIDAÇÃO FINAL ANTES DO MOVIMENTO
        if moveX == moveX and moveY == moveY and -- Verificar se não é NaN
           math.abs(moveX) > 0.1 and math.abs(moveY) > 0.1 then -- Movimento mínimo

            -- MOVIMENTO ULTRA-SEGURO COM LOG DETALHADO
            local moveSuccess = pcall(function()
                mousemoverel(moveX, moveY)
            end)

            if moveSuccess then
                -- VISUAL FEEDBACK AVANÇADO
                if FOVSystem.circulo then
                    -- COR BASEADA NA DISTÂNCIA: vermelho = longe, verde = perto
                    local colorIntensity = 1 - math.min(distanceFactor, 1)
                    FOVSystem.circulo.Color = Color3.new(1, colorIntensity, 0) -- Amarelo para longe, vermelho para perto
                end
            else
                print("❌ Falha ao mover mouse para", alvoAtual.Name)
            end
        end
    else
        -- VISUAL FEEDBACK QUANDO PRECISO (VERDE)
        if FOVSystem.circulo then
            FOVSystem.circulo.Color = Color3.fromRGB(0, 255, 0)
        end
    end
end

-- ========================================================================
-- [ UI HUB PREMIUM ANIMADO ] - DARK/CLEAN/TECH COM EFEITOS MODERNOS
-- ========================================================================
local UIController = {
    painel = nil,
    gui = nil,
    dragging = false,
    dragStart = nil,
    startPos = nil
}

-- SEM SISTEMA DE ANIMAÇÕES - BOTÕES SIMPLES E DIRETOS

function UIController.criar()
    local playerGui = LocalPlayer:WaitForChild("PlayerGui", 10)
    if not playerGui then return end

    UIController.gui = Instance.new("ScreenGui")
    UIController.gui.Name = "PremiumHub"
    UIController.gui.ResetOnSpawn = false
    UIController.gui.Enabled = true
    UIController.gui.Parent = playerGui

    -- PAINEL PRINCIPAL - SIMPLES E DIRETO
    UIController.painel = Instance.new("Frame")
    UIController.painel.Size = UDim2.new(0, 280, 0, 320)
    UIController.painel.Position = UDim2.new(0.8, -140, 0.1, 0)
    UIController.painel.AnchorPoint = Vector2.new(0.5, 0.5)
    UIController.painel.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
    UIController.painel.BackgroundTransparency = 0 -- SÓLIDO
    UIController.painel.BorderSizePixel = 2
    UIController.painel.BorderColor3 = Color3.fromRGB(60, 60, 60)
    UIController.painel.Parent = UIController.gui
    UIController.painel.Active = true
    UIController.painel.Visible = false

    -- CORNERS SIMPLES
    local corner = Instance.new("UICorner")
    corner.CornerRadius = UDim.new(0, 8)
    corner.Parent = UIController.painel

    -- CABEÇALHO
    local header = Instance.new("Frame")
    header.Size = UDim2.new(1, 0, 0, 45)
    header.BackgroundTransparency = 1
    header.Parent = UIController.painel

    local title = Instance.new("TextLabel")
    title.Size = UDim2.new(1, -20, 1, 0)
    title.Position = UDim2.new(0, 20, 0, 0)
    title.BackgroundTransparency = 1
    title.Text = "Universal Hub"
    title.Font = Enum.Font.GothamBold
    title.TextSize = 18
    title.TextColor3 = Color3.fromRGB(220, 220, 230)
    title.TextXAlignment = Enum.TextXAlignment.Left
    title.Parent = header

    -- CONTEÚDO PRINCIPAL
    local content = Instance.new("Frame")
    content.Size = UDim2.new(1, -40, 1, -65)
    content.Position = UDim2.new(0, 20, 0, 50)
    content.BackgroundTransparency = 1
    content.Parent = UIController.painel

    -- ESPAÇAMENTO ENTRE SEÇÕES
    local yOffset = 0

    -- SEÇÃO AIMBOT
    local aimSection = Instance.new("Frame")
    aimSection.Size = UDim2.new(1, 0, 0, 70)
    aimSection.Position = UDim2.new(0, 0, 0, yOffset)
    aimSection.BackgroundTransparency = 1
    aimSection.Parent = content

    -- TÍTULO AIMBOT
    local aimTitle = Instance.new("TextLabel")
    aimTitle.Size = UDim2.new(1, 0, 0, 20)
    aimTitle.BackgroundTransparency = 1
    aimTitle.Text = "AIMBOT"
    aimTitle.Font = Enum.Font.GothamMedium
    aimTitle.TextSize = 12
    aimTitle.TextColor3 = Color3.fromRGB(180, 180, 190)
    aimTitle.TextXAlignment = Enum.TextXAlignment.Left
    aimTitle.Parent = aimSection

    -- TOGGLE AIMBOT SIMPLES E SÓLIDO
    local aimToggle = Instance.new("TextButton")
    aimToggle.Size = UDim2.new(1, 0, 0, 32)
    aimToggle.Position = UDim2.new(0, 0, 0, 25)
    aimToggle.BackgroundColor3 = WindowFocus.aimAtivo and Color3.fromRGB(0, 150, 0) or Color3.fromRGB(150, 0, 0)
    aimToggle.BackgroundTransparency = 0 -- SÓLIDO, SEM TRANSPARÊNCIA
    aimToggle.Text = WindowFocus.aimAtivo and "ENABLED" or "DISABLED"
    aimToggle.Font = Enum.Font.GothamBold
    aimToggle.TextSize = 13
    aimToggle.TextColor3 = Color3.fromRGB(255, 255, 255)
    aimToggle.BorderSizePixel = 0
    aimToggle.Parent = aimSection

    local aimCorner = Instance.new("UICorner")
    aimCorner.CornerRadius = UDim.new(0, 6)
    aimCorner.Parent = aimToggle

    -- SEM GLOW, SEM EFEITOS EXTRAS

    yOffset = yOffset + 85

    -- SEÇÃO CHAMS
    local chamsSection = Instance.new("Frame")
    chamsSection.Size = UDim2.new(1, 0, 0, 70)
    chamsSection.Position = UDim2.new(0, 0, 0, yOffset)
    chamsSection.BackgroundTransparency = 1
    chamsSection.Parent = content

    -- TÍTULO CHAMS
    local chamsTitle = Instance.new("TextLabel")
    chamsTitle.Size = UDim2.new(1, 0, 0, 20)
    chamsTitle.BackgroundTransparency = 1
    chamsTitle.Text = "CHAMS"
    chamsTitle.Font = Enum.Font.GothamMedium
    chamsTitle.TextSize = 12
    chamsTitle.TextColor3 = Color3.fromRGB(180, 180, 190)
    chamsTitle.TextXAlignment = Enum.TextXAlignment.Left
    chamsTitle.Parent = chamsSection

    -- TOGGLE CHAMS SIMPLES E SÓLIDO
    local chamsToggle = Instance.new("TextButton")
    chamsToggle.Size = UDim2.new(1, 0, 0, 32)
    chamsToggle.Position = UDim2.new(0, 0, 0, 25)
    chamsToggle.BackgroundColor3 = WindowFocus.chamsAtivo and Color3.fromRGB(0, 150, 0) or Color3.fromRGB(150, 0, 0)
    chamsToggle.BackgroundTransparency = 0 -- SÓLIDO, SEM TRANSPARÊNCIA
    chamsToggle.Text = WindowFocus.chamsAtivo and "ENABLED" or "DISABLED"
    chamsToggle.Font = Enum.Font.GothamBold
    chamsToggle.TextSize = 13
    chamsToggle.TextColor3 = Color3.fromRGB(255, 255, 255)
    chamsToggle.BorderSizePixel = 0
    chamsToggle.Parent = chamsSection

    local chamsCorner = Instance.new("UICorner")
    chamsCorner.CornerRadius = UDim.new(0, 6)
    chamsCorner.Parent = chamsToggle

    yOffset = yOffset + 85

    -- SEÇÃO FOV
    local fovSection = Instance.new("Frame")
    fovSection.Size = UDim2.new(1, 0, 0, 70)
    fovSection.Position = UDim2.new(0, 0, 0, yOffset)
    fovSection.BackgroundTransparency = 1
    fovSection.Parent = content

    -- TÍTULO FOV
    local fovTitle = Instance.new("TextLabel")
    fovTitle.Size = UDim2.new(1, 0, 0, 20)
    fovTitle.BackgroundTransparency = 1
    fovTitle.Text = "FOV"
    fovTitle.Font = Enum.Font.GothamMedium
    fovTitle.TextSize = 12
    fovTitle.TextColor3 = Color3.fromRGB(180, 180, 190)
    fovTitle.TextXAlignment = Enum.TextXAlignment.Left
    fovTitle.Parent = fovSection

    -- VALOR FOV
    local fovValue = Instance.new("TextLabel")
    fovValue.Size = UDim2.new(0, 40, 0, 20)
    fovValue.Position = UDim2.new(1, -40, 0, 0)
    fovValue.BackgroundTransparency = 1
    fovValue.Text = tostring(Config.FOV_SIZE)
    fovValue.Font = Enum.Font.GothamMedium
    fovValue.TextSize = 12
    fovValue.TextColor3 = Color3.fromRGB(150, 150, 160)
    fovValue.TextXAlignment = Enum.TextXAlignment.Right
    fovValue.Parent = fovSection

    -- SLIDER FOV CLEAN E MODERNO
    local sliderBg = Instance.new("Frame")
    sliderBg.Size = UDim2.new(1, -50, 0, 4) -- MAIS FINO
    sliderBg.Position = UDim2.new(0, 0, 0, 35)
    sliderBg.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
    sliderBg.BackgroundTransparency = 0.3 -- LEVE TRANSPARÊNCIA
    sliderBg.BorderSizePixel = 0
    sliderBg.Parent = fovSection

    local sliderCorner = Instance.new("UICorner")
    sliderCorner.CornerRadius = UDim.new(0, 2) -- MENOS ARREDONDADO
    sliderCorner.Parent = sliderBg

    -- SLIDER FILL COM EFEITO
    local sliderFill = Instance.new("Frame")
    sliderFill.Size = UDim2.fromScale((Config.FOV_SIZE - 30) / 120, 1)
    sliderFill.BackgroundColor3 = Color3.fromRGB(100, 150, 200)
    sliderFill.BackgroundTransparency = 0.2 -- TRANSPARÊNCIA PARA EFEITO
    sliderFill.BorderSizePixel = 0
    sliderFill.Parent = sliderBg

    local fillCorner = Instance.new("UICorner")
    fillCorner.CornerRadius = UDim.new(0, 2)
    fillCorner.Parent = sliderFill

    -- SLIDER HANDLE MODERNO
    local sliderHandle = Instance.new("Frame")
    sliderHandle.Size = UDim2.new(0, 10, 0, 14) -- FORMA MAIS ALTA QUE LARGA
    sliderHandle.Position = UDim2.fromScale((Config.FOV_SIZE - 30) / 120 - 0.04, -0.5)
    sliderHandle.BackgroundColor3 = Color3.fromRGB(220, 220, 230)
    sliderHandle.BackgroundTransparency = 0.1
    sliderHandle.BorderSizePixel = 0
    sliderHandle.Parent = sliderBg

    local handleCorner = Instance.new("UICorner")
    handleCorner.CornerRadius = UDim.new(0, 5) -- ARREDONDADO
    handleCorner.Parent = sliderHandle

    -- SOMBRA LEVE NO HANDLE
    local handleShadow = Instance.new("Frame")
    handleShadow.Size = UDim2.new(1, 2, 1, 2)
    handleShadow.Position = UDim2.new(0, -1, 0, -1)
    handleShadow.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    handleShadow.BackgroundTransparency = 0.7
    handleShadow.BorderSizePixel = 0
    handleShadow.ZIndex = -1
    local shadowCorner = Instance.new("UICorner")
    shadowCorner.CornerRadius = UDim.new(0, 6)
    shadowCorner.Parent = handleShadow
    handleShadow.Parent = sliderHandle

    -- VARIÁVEIS DO SLIDER
    local minFOV = 30
    local maxFOV = 150
    local draggingSlider = false

    -- FUNÇÃO PARA ATUALIZAR SLIDER
    local function updateSlider()
        local percent = (Config.FOV_SIZE - minFOV) / (maxFOV - minFOV)
        sliderFill.Size = UDim2.fromScale(math.clamp(percent, 0, 1), 1)
        sliderHandle.Position = UDim2.fromScale(math.clamp(percent - 0.05, -0.05, 0.95), -0.25)
        fovValue.Text = tostring(Config.FOV_SIZE)
    end

    -- EVENTOS DO SLIDER
    sliderBg.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            draggingSlider = true
            local percent = math.clamp((input.Position.X - sliderBg.AbsolutePosition.X) / sliderBg.AbsoluteSize.X, 0, 1)
            Config.FOV_SIZE = math.floor(minFOV + (maxFOV - minFOV) * percent)
            updateSlider()
        end
    end)

    sliderBg.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            draggingSlider = false
        end
    end)

    sliderHandle.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            draggingSlider = true
        end
    end)

    sliderHandle.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            draggingSlider = false
        end
    end)

    -- ATUALIZAR SLIDER QUANDO MOUSE SE MOVE
    UIS.InputChanged:Connect(function(input)
        if draggingSlider and input.UserInputType == Enum.UserInputType.MouseMovement then
            local percent = math.clamp((input.Position.X - sliderBg.AbsolutePosition.X) / sliderBg.AbsoluteSize.X, 0, 1)
            Config.FOV_SIZE = math.floor(minFOV + (maxFOV - minFOV) * percent)
            updateSlider()
        end
    end)

    -- DRAG FUNCIONALITY
    header.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            UIController.dragging = true
            UIController.dragStart = input.Position
            UIController.startPos = UIController.painel.Position
        end
    end)

    header.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            UIController.dragging = false
        end
    end)

    UIS.InputChanged:Connect(function(input)
        if UIController.dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
            local camera = workspace.CurrentCamera
            if not camera then return end

            local delta = (input.Position - UIController.dragStart)
            local newPos = UDim2.new(
                UIController.startPos.X.Scale + (delta.X / camera.ViewportSize.X),
                0,
                UIController.startPos.Y.Scale + (delta.Y / camera.ViewportSize.Y),
                0
            )

            UIController.painel.Position = UDim2.fromScale(
                math.clamp(newPos.X.Scale, 0.1, 0.9),
                math.clamp(newPos.Y.Scale, 0.05, 0.9)
            )
        end
    end)

    -- FUNCIONALIDADES DOS BOTÕES COM ANIMAÇÕES (SEMPRE FUNCIONAM)
    -- FUNCIONALIDADE AIMBOT - LÓGICA SIMPLES E DIRETA
    aimToggle.MouseButton1Click:Connect(function()
        -- UMA ÚNICA VARIÁVEL CONTROLA TUDO
        WindowFocus.aimAtivo = not WindowFocus.aimAtivo

        -- VISUAL REFLETE DIRETAMENTE A VARIÁVEL (SEM DELAYS, SEM ANIMAÇÕES)
        aimToggle.BackgroundColor3 = WindowFocus.aimAtivo and Color3.fromRGB(0, 150, 0) or Color3.fromRGB(150, 0, 0)
        aimToggle.Text = WindowFocus.aimAtivo and "ENABLED" or "DISABLED"

        -- LIMPAR ALVO QUANDO DESATIVAR
        if not WindowFocus.aimAtivo then
            WindowFocus.alvoAtual = nil
        end

        print("🎯 AIMBOT:", WindowFocus.aimAtivo and "ENABLED" or "DISABLED")
    end)

    -- FUNCIONALIDADE CHAMS - APENAS ALTERA ESTADO
    chamsToggle.MouseButton1Click:Connect(function()
        -- UI APENAS ALTERA ESTADO (SEPARAÇÃO DE RESPONSABILIDADES)
        WindowFocus.chamsAtivo = not WindowFocus.chamsAtivo

        -- VISUAL REFLETE DIRETAMENTE A VARIÁVEL
        chamsToggle.BackgroundColor3 = WindowFocus.chamsAtivo and Color3.fromRGB(0, 150, 0) or Color3.fromRGB(150, 0, 0)
        chamsToggle.Text = WindowFocus.chamsAtivo and "ENABLED" or "DISABLED"

        -- SISTEMA CHAMS REAGE AUTOMATICAMENTE AO ESTADO
        if WindowFocus.chamsAtivo then
            CHAMSSystem.ativar()
        else
            CHAMSSystem.desativar()
        end

        print("🎨 CHAMS:", WindowFocus.chamsAtivo and "ENABLED - VISÃO ATRAVÉS DE PAREDES" or "DISABLED")
    end)

    -- SEM EFEITOS HOVER - BOTÕES SIMPLES E DIRETOS

    -- TOGGLE UI DIRETO
    UIS.InputBegan:Connect(function(input, gameProcessed)
        if gameProcessed then return end
        if input.KeyCode == Enum.KeyCode.Insert then
            UIController.painel.Visible = not UIController.painel.Visible
        end
    end)
end


-- ========================================================================
-- [ INICIALIZAÇÃO ULTRA-RÁPIDA ]
-- ========================================================================
print("🎯 INICIALIZANDO AIMBOT CABEÇA ULTRA-FORTE + CHAMS...")

-- INICIALIZAR COMPONENTES
WindowFocus.inicializar()
FOVSystem.criarCirculo()
UIController.criar()

-- CONFIGURAR EVENTOS PARA CHAMS (ARQUITETURA BASEADA EM EVENTOS)
Players.PlayerAdded:Connect(function(player)
    -- MONITORAR CHARACTER CHANGES
    player.CharacterAdded:Connect(function(character)
        if WindowFocus.chamsAtivo then
            CHAMSSystem.aplicar(player)
        end
    end)

    player.CharacterRemoving:Connect(function()
        CHAMSSystem.remover(player)
    end)
end)

Players.PlayerRemoving:Connect(function(player)
    CHAMSSystem.remover(player)
end)

print("✅ SISTEMA CABEÇA ULTRA-FORTE INICIALIZADO!")
print("🎯 AIMLOCK: GRUDAÇÃO ULTRA-FORTE NA CABEÇA")
print("⚡ FOV CABEÇA RESTRITO: " .. Config.FOV_SIZE)
print("🔥 SUAVIZAÇÃO ULTRA-RÁPIDA: " .. Config.SMOOTHNESS)
print("💪 BONUS CABEÇA: " .. math.floor(Config.HEAD_BONUS_STRENGTH * 100) .. "% MAIS FORTE")
print("🎨 CHAMS: VISÃO ATRAVÉS DE PAREDES")
print("🎮 INSERT PARA HUB SIMPLES")
print("🎛️ CONTROLE AIMBOT E CHAMS VIA BOTÕES")

-- ========================================================================
-- [ LOOP PRINCIPAL ULTRA-OTIMIZADO ] - SISTEMA DE ESTADOS
-- ========================================================================
RunService.RenderStepped:Connect(function()
    -- 🔥 VERIFICAÇÃO CRÍTICA DE FOCO - APENAS PARA AIMBOT

    -- VALIDAR CÂMERA ULTRA-RÁPIDA
    local camera = GameDataSystem.getCamera()
    if not camera then return end

    local viewportCenter = GameDataSystem.getViewportSize(camera)
    if viewportCenter == Vector2.zero then return end
    viewportCenter = viewportCenter / 2

    -- 🔥 AIMLOCK LÓGICA ULTRA-PRECIOSA - CABEÇA SEMPRE
    -- SISTEMA BASEADO EM ESTADO: só executa se WindowFocus.aimAtivo = true
    if WindowFocus.aimAtivo then
        -- VERIFICAR SE JANELA ESTÁ EM FOCO (segurança para aimbot)
        if not WindowFocus.janelaEmFoco then
            return -- AIMBOT só funciona com foco
        end

        -- VALIDAR ALVO ATUAL CONSTANTEMENTE
        if WindowFocus.alvoAtual and not EnemyDetector.ehValido(WindowFocus.alvoAtual) then
            WindowFocus.alvoAtual = nil
        end

        -- PROCURAR MELHOR CABEÇA CONSTANTEMENTE
        if not WindowFocus.alvoAtual then
            WindowFocus.alvoAtual = TargetSelector.encontrarMelhor(camera)
        end

        -- APLICAR AIMLOCK NA CABEÇA
        if WindowFocus.alvoAtual then
            AimController.aplicar(WindowFocus.alvoAtual, camera)
        end
    end

    -- FOV VISUAL ULTRA-PRECIso (sempre ativo, independente de estados)
    FOVSystem.atualizar()
end)

print("🎯 AIMBOT CABEÇA ULTRA-FORTE OPERACIONAL!")
print("🔥 SEMPRE TRAVA NA CABEÇA COM FORÇA MÁXIMA")
print("⚡ PREDIÇÃO DE MOVIMENTO ATIVA (0ms)")
print("🎚️ SLIDER FOV CABEÇA FUNCIONAL (30-150)")
print("💪 BONUS CABEÇA: " .. math.floor(Config.HEAD_BONUS_STRENGTH * 100) .. "% MAIS FORTE")
print("🎨 ESP CARREGADO SEPARADAMENTE (RIGHT SHIFT)")
print("🚫 CURSOR SEGURO FORA DO ROBLOX")
print("🎮 HUB PREMIUM ANIMADO: TRANSPARÊNCIAS + EFEITOS VISUAIS")
print("✨ ANIMAÇÕES: CLIQUE + HOVER + GLOW + FADE/SLIDE")
print("⚡ GRUDAÇÃO ULTRA-FORTE: threshold mínimo + movimento máximo para cabeça")

Features & Information

CHAMS + AIMLOCK V2

Community Comments (3)

AintPlayinAintPlayinJan 8, 2026

Ai skid xd

AintPlayinAintPlayinJan 8, 2026

Atleast make it more believable

orbit167orbit167Jan 8, 2026

chat gpt final boss

More Scripts for Universal Scripts