Upgraded Com4x Aimbot Script for
Key Required

Upgraded Com4x Aimbot Script for

RIVALSmcnotmcnot 1K views 343 executesUpdated Mar 14, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•396 lines (17747 chars)
--[=[
    Com4x MODULAR QA DEBUGGING SUITE v9.0
    Project: Rivals Internal Validation (Elite Build)
    
    [NEW IN v9.0]:
    - TP Behind: Permanent CFrame offset behind the primary target.
    - Device Spoofer: Remote-based emulation (Keyboard/Gamepad/Touch/VR).
    - Logic Patch: Optimized RenderPriority for TP-stability.
--]=]

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local CoreGui = game:GetService("CoreGui")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera

--------------------------------------------------------------------------------
-- // MEMORY MANAGEMENT //
--------------------------------------------------------------------------------
local Maid = {}
Maid.__index = Maid
function Maid.new() return setmetatable({_tasks = {}}, Maid) end
function Maid:GiveTask(task) table.insert(self._tasks, task) return task end
function Maid:DoCleaning()
    for _, task in ipairs(self._tasks) do
        if typeof(task) == "Instance" then task:Destroy()
        elseif typeof(task) == "function" then task()
        elseif task.Disconnect then task:Disconnect()
        elseif task.Destroy then task:Destroy() end
    end
    table.clear(self._tasks)
end

if _G.Com4xRunning then _G.Com4xMaid:DoCleaning() end
_G.Com4xMaid = Maid.new()
local GlobalMaid = _G.Com4xMaid
_G.Com4xRunning = true

--------------------------------------------------------------------------------
-- // SETTINGS & STATE //
--------------------------------------------------------------------------------
local Settings = {
    UI_Visible = true,
    CurrentTab = "Combat",
    
    -- Combat & TP
    Aimbot = false,
    Triggerbot = false,
    TPBehind = false, -- [NEW]
    WallCheck = true,
    DeathCheck = true,
    TargetFOV = 150,
    Smoothness = 0.05,
    TargetPart = "Head",
    
    -- Visuals
    ESP = true,
    Vitals = true,
    ShowFOV = true,
    CameraFOV = 70,
    
    -- Movement
    SpeedBoost = false,
    Fly = false,
    Noclip = false,
    FlySpeed = 50,
    
    -- Aesthetic
    Accent = Color3.fromRGB(0, 210, 255),
    BG = Color3.fromRGB(20, 20, 25),
    SidebarBG = Color3.fromRGB(30, 30, 35)
}

-- Remote References
local SetControlsRemote = ReplicatedStorage:FindFirstChild("Remotes") 
    and ReplicatedStorage.Remotes:FindFirstChild("Replication") 
    and ReplicatedStorage.Remotes.Replication:FindFirstChild("Fighter") 
    and ReplicatedStorage.Remotes.Replication.Fighter:FindFirstChild("SetControls")

--------------------------------------------------------------------------------
-- // UTILITIES //
--------------------------------------------------------------------------------
local Utils = {}
function Utils:Create(class, props)
    local inst = Instance.new(class)
    for k, v in pairs(props) do inst[k] = v end
    return inst
end

function Utils:IsVisible(targetPart)
    if not Settings.WallCheck then return true end
    local rayParams = RaycastParams.new()
    rayParams.FilterType = Enum.RaycastFilterType.Exclude
    rayParams.FilterDescendantsInstances = {LocalPlayer.Character, targetPart.Parent, Camera}
    local result = workspace:Raycast(Camera.CFrame.Position, (targetPart.Position - Camera.CFrame.Position), rayParams)
    return result == nil
end

function Utils:GetTarget()
    local target, dist = nil, Settings.TargetFOV
    local mouse = UserInputService:GetMouseLocation()
    for _, p in ipairs(Players:GetPlayers()) do
        if p ~= LocalPlayer and p.Character then
            local hum = p.Character:FindFirstChildOfClass("Humanoid")
            local part = p.Character:FindFirstChild(Settings.TargetPart)
            if part and hum and (not Settings.DeathCheck or hum.Health > 0) then
                local pos, onScreen = Camera:WorldToViewportPoint(part.Position)
                if onScreen then
                    local mag = (Vector2.new(pos.X, pos.Y) - mouse).Magnitude
                    if mag < dist and self:IsVisible(part) then
                        target = part
                        dist = mag
                    end
                end
            end
        end
    end
    return target
end

function Utils:Spoof(wantedDevice)
    if SetControlsRemote then
        SetControlsRemote:FireServer("MouseKeyboard")
        task.wait(0.2)
        SetControlsRemote:FireServer(wantedDevice)
        warn("[Com4x] Device Spoofed to: " .. wantedDevice)
    else
        warn("[Com4x] SetControls Remote Not Found!")
    end
end

--------------------------------------------------------------------------------
-- // Com4x UI ENGINE //
--------------------------------------------------------------------------------
local UI = {}
function UI:Init()
    self.Gui = Utils:Create("ScreenGui", {Name = "Com4x_Elite", Parent = CoreGui})
    GlobalMaid:GiveTask(self.Gui)

    self.Main = Utils:Create("Frame", {
        Size = UDim2.new(0, 580, 0, 420), Position = UDim2.new(0.5, -290, 0.5, -210),
        BackgroundColor3 = Settings.BG, Parent = self.Gui, Visible = Settings.UI_Visible
    })
    Utils:Create("UICorner", {CornerRadius = UDim.new(0, 8), Parent = self.Main})
    Utils:Create("UIStroke", {Color = Settings.Accent, Thickness = 2, Parent = self.Main})

    -- Sidebar
    self.Sidebar = Utils:Create("Frame", {
        Size = UDim2.new(0, 150, 1, 0), BackgroundColor3 = Settings.SidebarBG, Parent = self.Main
    })
    Utils:Create("UICorner", {CornerRadius = UDim.new(0, 8), Parent = self.Sidebar})
    
    Utils:Create("TextLabel", {
        Text = "Com4x v9.0", Size = UDim2.new(1, 0, 0, 50),
        Font = Enum.Font.GothamBold, TextColor3 = Settings.Accent,
        TextSize = 20, BackgroundTransparency = 1, Parent = self.Sidebar
    })

    self.TabHolder = Utils:Create("Frame", {
        Size = UDim2.new(1, 0, 1, -60), Position = UDim2.new(0, 0, 0, 60),
        BackgroundTransparency = 1, Parent = self.Sidebar
    })
    Utils:Create("UIListLayout", {Parent = self.TabHolder, Padding = UDim.new(0, 4), HorizontalAlignment = "Center"})

    self.Content = Utils:Create("ScrollingFrame", {
        Size = UDim2.new(1, -170, 1, -20), Position = UDim2.new(0, 160, 0, 10),
        BackgroundTransparency = 1, Parent = self.Main, CanvasSize = UDim2.new(0,0,2.2,0),
        ScrollBarThickness = 2
    })
    Utils:Create("UIListLayout", {Parent = self.Content, Padding = UDim.new(0, 8)})

    for _, tab in ipairs({"Combat", "Visuals", "Movement", "Spoofer"}) do self:CreateTabBtn(tab) end
    
    self:LoadTab("Combat")
    self:MakeDraggable()
end

function UI:CreateTabBtn(name)
    local btn = Utils:Create("TextButton", {
        Text = name, Size = UDim2.new(0.85, 0, 0, 35),
        BackgroundColor3 = Color3.fromRGB(45, 45, 50),
        TextColor3 = Color3.new(1,1,1), Font = Enum.Font.GothamMedium,
        Parent = self.TabHolder, AutoButtonColor = true
    })
    Utils:Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = btn})
    btn.MouseButton1Click:Connect(function() self:LoadTab(name) end)
end

function UI:LoadTab(name)
    for _, v in pairs(self.Content:GetChildren()) do if not v:IsA("UIListLayout") then v:Destroy() end end
    
    if name == "Combat" then
        self:AddToggle("Aimbot Master", "Aimbot")
        self:AddToggle("Teleport Behind Target", "TPBehind")
        self:AddToggle("Triggerbot Logic", "Triggerbot")
        self:AddToggle("Wall Detection", "WallCheck")
        self:AddSlider("Smoothing", 0, 100, Settings.Smoothness * 100, function(v) Settings.Smoothness = v/100 end)
        self:AddSlider("Aimbot FOV", 50, 800, Settings.TargetFOV, function(v) Settings.TargetFOV = v end)
    elseif name == "Visuals" then
        self:AddToggle("ESP Outlines", "ESP")
        self:AddToggle("Billboard Vitals", "Vitals")
        self:AddToggle("Render FOV Ring", "ShowFOV")
        self:AddSlider("Game FOV Changer", 30, 120, Settings.CameraFOV, function(v) Settings.CameraFOV = v end)
    elseif name == "Movement" then
        self:AddToggle("Speed Boost (x2)", "SpeedBoost")
        self:AddToggle("Fly Mode", "Fly")
        self:AddToggle("No-clip Mode", "Noclip")
        self:AddSlider("Fly Speed", 20, 300, Settings.FlySpeed, function(v) Settings.FlySpeed = v end)
    elseif name == "Spoofer" then
        self:AddSpoofBtn("Mouse & Keyboard", "MouseKeyboard")
        self:AddSpoofBtn("Gamepad (Console)", "Gamepad")
        self:AddSpoofBtn("Touch (Mobile)", "Touch")
        self:AddSpoofBtn("VR Mode", "VR")
    end
end

function UI:AddToggle(text, key)
    local btn = Utils:Create("TextButton", {
        Text = text .. ": " .. (Settings[key] and "ON" or "OFF"),
        Size = UDim2.new(1, -5, 0, 40),
        BackgroundColor3 = Settings[key] and Settings.Accent or Color3.fromRGB(40, 40, 45),
        TextColor3 = Settings[key] and Color3.new(0,0,0) or Color3.new(1,1,1),
        Font = Enum.Font.GothamBold, Parent = self.Content
    })
    Utils:Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = btn})
    btn.MouseButton1Click:Connect(function()
        Settings[key] = not Settings[key]
        btn.Text = text .. ": " .. (Settings[key] and "ON" or "OFF")
        btn.BackgroundColor3 = Settings[key] and Settings.Accent or Color3.fromRGB(40, 40, 45)
        btn.TextColor3 = Settings[key] and Color3.new(0,0,0) or Color3.new(1,1,1)
    end)
end

function UI:AddSlider(name, min, max, start, callback)
    local frame = Utils:Create("Frame", {Size = UDim2.new(1, -5, 0, 55), BackgroundColor3 = Color3.fromRGB(35, 35, 40), Parent = self.Content})
    Utils:Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = frame})
    local label = Utils:Create("TextLabel", {Text = name .. ": " .. math.floor(start), Size = UDim2.new(1,0,0,25), BackgroundTransparency = 1, TextColor3 = Color3.new(1,1,1), Parent = frame})
    local bar = Utils:Create("Frame", {Size = UDim2.new(0.9, 0, 0, 4), Position = UDim2.new(0.05, 0, 0.7, 0), BackgroundColor3 = Color3.new(0.1,0.1,0.1), Parent = frame})
    local fill = Utils:Create("Frame", {Size = UDim2.new((start-min)/(max-min), 0, 1, 0), BackgroundColor3 = Settings.Accent, Parent = bar})
    bar.InputBegan:Connect(function(i)
        if i.UserInputType == Enum.UserInputType.MouseButton1 then
            local conn; conn = RunService.RenderStepped:Connect(function()
                local rel = math.clamp((UserInputService:GetMouseLocation().X - bar.AbsolutePosition.X) / bar.AbsoluteSize.X, 0, 1)
                local val = math.floor(min + (max - min) * rel)
                fill.Size = UDim2.new(rel, 0, 1, 0)
                label.Text = name .. ": " .. val
                callback(val)
                if not UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then conn:Disconnect() end
            end)
        end
    end)
end

function UI:AddSpoofBtn(name, device)
    local btn = Utils:Create("TextButton", {
        Text = "Spoof: " .. name, Size = UDim2.new(1, -5, 0, 40),
        BackgroundColor3 = Color3.fromRGB(45, 45, 50),
        TextColor3 = Color3.new(1,1,1), Font = Enum.Font.GothamMedium, Parent = self.Content
    })
    Utils:Create("UICorner", {CornerRadius = UDim.new(0, 6), Parent = btn})
    btn.MouseButton1Click:Connect(function()
        Utils:Spoof(device)
        btn.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
        task.wait(0.2)
        btn.BackgroundColor3 = Color3.fromRGB(45, 45, 50)
    end)
end

function UI:MakeDraggable()
    local dStart, sPos, dragging
    self.Main.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dStart = i.Position sPos = self.Main.Position end end)
    UserInputService.InputChanged:Connect(function(i) if dragging and i.UserInputType == Enum.UserInputType.MouseMovement then
        local delta = i.Position - dStart
        self.Main.Position = UDim2.new(sPos.X.Scale, sPos.X.Offset + delta.X, sPos.Y.Scale, sPos.Y.Offset + delta.Y)
    end end)
    UserInputService.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end)
end

--------------------------------------------------------------------------------
-- // CORE PROCESSING //
--------------------------------------------------------------------------------

-- Character Physics / Noclip / Speed
GlobalMaid:GiveTask(RunService.Stepped:Connect(function()
    local char = LocalPlayer.Character
    if char then
        if char:FindFirstChildOfClass("Humanoid") then char.Humanoid.WalkSpeed = Settings.SpeedBoost and 32 or 16 end
        if Settings.Noclip then
            for _, p in pairs(char:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide = false end end
        end
    end
end))

-- Combat / Fly / TP Loop
RunService:BindToRenderStep("Com4x_Elite_Core", Enum.RenderPriority.Camera.Value + 1, function()
    Camera.FieldOfView = Settings.CameraFOV
    local char = LocalPlayer.Character
    local hrp = char and char:FindFirstChild("HumanoidRootPart")

    local target = Utils:GetTarget()

    -- TP Behind Target [NEW]
    if Settings.TPBehind and target and hrp then
        local targetRoot = target.Parent:FindFirstChild("HumanoidRootPart")
        if targetRoot then
            -- Position 4 studs behind target, matching target orientation
            hrp.CFrame = targetRoot.CFrame * CFrame.new(0, 0, 4)
        end
    end

    -- Flight
    if Settings.Fly and hrp then
        local moveDir = Vector3.new(0,0,0)
        if UserInputService:IsKeyDown(Enum.KeyCode.W) then moveDir += Camera.CFrame.LookVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.S) then moveDir -= Camera.CFrame.LookVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.D) then moveDir += Camera.CFrame.RightVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.A) then moveDir -= Camera.CFrame.RightVector end
        if UserInputService:IsKeyDown(Enum.KeyCode.Space) then moveDir += Vector3.new(0, 1, 0) end
        if UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) then moveDir -= Vector3.new(0, 1, 0) end
        hrp.Velocity = moveDir * Settings.FlySpeed
        hrp.CFrame = CFrame.new(hrp.Position, hrp.Position + Camera.CFrame.LookVector)
    end

    -- Aimbot
    if Settings.Aimbot and target then
        Camera.CFrame = Camera.CFrame:Lerp(CFrame.new(Camera.CFrame.Position, target.Position), 1 - Settings.Smoothness)
    end

    -- Trigger Logic
    if Settings.Triggerbot then
        local res = workspace:Raycast(Camera.CFrame.Position, Camera.CFrame.LookVector * 1000)
        if res and res.Instance then
            local m = res.Instance:FindFirstAncestorOfClass("Model")
            if m and m:FindFirstChildOfClass("Humanoid") and (not Settings.DeathCheck or m.Humanoid.Health > 0) then
                local flash = Utils:Create("Frame", {Size = UDim2.new(1,0,1,0), BackgroundColor3 = Color3.new(1,0,0), BackgroundTransparency = 0.9, Parent = UI.Gui})
                task.delay(0.05, function() flash:Destroy() end)
            end
        end
    end
end)

--------------------------------------------------------------------------------
-- // VISUALS //
--------------------------------------------------------------------------------

local FOVGui = Utils:Create("Frame", {
    Parent = GlobalMaid:GiveTask(Instance.new("ScreenGui", CoreGui)),
    BackgroundColor3 = Color3.new(1,1,1), BackgroundTransparency = 0.95,
    AnchorPoint = Vector2.new(0.5, 0.5), Visible = false
})
Utils:Create("UICorner", {CornerRadius = UDim.new(1,0), Parent = FOVGui})
Utils:Create("UIStroke", {Color = Settings.Accent, Thickness = 1, Parent = FOVGui})

task.spawn(function()
    while _G.Com4xRunning do
        local mouse = UserInputService:GetMouseLocation()
        FOVGui.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
        FOVGui.Size = UDim2.new(0, Settings.TargetFOV * 2, 0, Settings.TargetFOV * 2)
        FOVGui.Visible = Settings.ShowFOV

        for _, p in ipairs(Players:GetPlayers()) do
            if p ~= LocalPlayer and p.Character then
                local char = p.Character
                local h = char:FindFirstChild("Com4x_H")
                if Settings.ESP then
                    if not h then Utils:Create("Highlight", {Name = "Com4x_H", Parent = char, FillColor = Settings.Accent}) end
                elseif h then h:Destroy() end
                
                local v = char:FindFirstChild("Com4x_V")
                if Settings.Vitals then
                    if not v then
                        v = Utils:Create("BillboardGui", {Name = "Com4x_V", Parent = char, Adornee = char:FindFirstChild("Head"), Size = UDim2.new(0, 60, 0, 8), AlwaysOnTop = true, ExtentsOffset = Vector3.new(0, 2.5, 0)})
                        local bg = Utils:Create("Frame", {Size = UDim2.new(1,0,1,0), BackgroundColor3 = Color3.new(0,0,0), Parent = v})
                        Utils:Create("Frame", {Name = "Bar", Size = UDim2.new(1,0,1,0), BackgroundColor3 = Settings.Accent, Parent = bg})
                    end
                    local hum = char:FindFirstChildOfClass("Humanoid")
                    if hum and v:FindFirstChild("Bar", true) then v:FindFirstChild("Bar", true).Size = UDim2.new(math.clamp(hum.Health / hum.MaxHealth, 0, 1), 0, 1, 0) end
                elseif v then v:Destroy() end
            end
        end
        task.wait(0.5)
    end
end)

GlobalMaid:GiveTask(UserInputService.InputBegan:Connect(function(i, g)
    if not g and i.KeyCode == Enum.KeyCode.RightShift then
        Settings.UI_Visible = not Settings.UI_Visible
        UI.Main.Visible = Settings.UI_Visible
    end
end))

UI:Init()
warn("[Com4x] Elite Suite v9.0 Loaded. Sidebar & Spoofer Ready.")

Features & Information

Comb4x Rivals Script: ESP Aimbot Flying No-Clip -Simple, Open Code-
#rivals#*an#free#aimbot

Community Comments (0)

No comments yet for this script.

More Scripts for RIVALS