Trench War Cheats script (No Keys)
Trench War Keyless
Trench War Cheats script (No Keys)
👤 alexriderr 👁 44 views ❤️ 0 likes ⏱ Aug 3, 2026
This script is a exploit for the Roblox game Trench War because of its lack of updates this game was relatively easier to script and I hope you guys will use this script and enjoy! * Moderator can u please take a screenshot of the script, i cant idk why*
📋 Script Code
-- Create the main GUI
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local guiService = game:GetService("GuiService")
local runService = game:GetService("RunService")
local userInputService = game:GetService("UserInputService")
local players = game:GetService("Players")

-- Main GUI Frame
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "CheatScriptGUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")

local mainFrame = Instance.new("Frame")
mainFrame.Name = "MainFrame"
mainFrame.Size = UDim2.new(0, 250, 0, 480) -- Increased height for fly toggle
mainFrame.Position = UDim2.new(0.5, -125, 0.5, -190)
mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
mainFrame.BackgroundTransparency = 0.15
mainFrame.BorderSizePixel = 0
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Parent = screenGui

-- Shadow effect
local shadow = Instance.new("Frame")
shadow.Size = UDim2.new(1, 10, 1, 10)
shadow.Position = UDim2.new(0, -5, 0, -5)
shadow.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
shadow.BackgroundTransparency = 0.5
shadow.BorderSizePixel = 0
shadow.Parent = mainFrame

-- Title Bar
local titleBar = Instance.new("Frame")
titleBar.Size = UDim2.new(1, 0, 0, 30)
titleBar.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
titleBar.BorderSizePixel = 0
titleBar.Parent = mainFrame

local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 1, 0)
title.BackgroundTransparency = 1
title.Text = "Cheat Script"
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextSize = 18
title.Font = Enum.Font.GothamBold
title.TextXAlignment = Enum.TextXAlignment.Center
title.Parent = titleBar

-- Close Button
local closeButton = Instance.new("TextButton")
closeButton.Size = UDim2.new(0, 30, 1, 0)
closeButton.Position = UDim2.new(1, -30, 0, 0)
closeButton.BackgroundTransparency = 1
closeButton.Text = "✕"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.TextSize = 18
closeButton.Font = Enum.Font.GothamBold
closeButton.Parent = titleBar

closeButton.MouseButton1Click:Connect(function()
    screenGui:Destroy()
end)

-- Content Frame
local contentFrame = Instance.new("Frame")
contentFrame.Size = UDim2.new(1, -20, 1, -50)
contentFrame.Position = UDim2.new(0, 10, 0, 40)
contentFrame.BackgroundTransparency = 1
contentFrame.Parent = mainFrame

-- Scroll Frame for content
local scrollFrame = Instance.new("ScrollingFrame")
scrollFrame.Size = UDim2.new(1, 0, 1, 0)
scrollFrame.BackgroundTransparency = 1
scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 420) -- Increased for fly toggle
scrollFrame.ScrollBarThickness = 8
scrollFrame.ScrollBarImageColor3 = Color3.fromRGB(80, 80, 100)
scrollFrame.Parent = contentFrame

local uiList = Instance.new("UIListLayout")
uiList.SortOrder = Enum.SortOrder.LayoutOrder
uiList.Padding = UDim.new(0, 8)
uiList.Parent = scrollFrame

-- Helper function to create toggle buttons
local function createToggle(labelText, defaultValue, callback)
    local container = Instance.new("Frame")
    container.Size = UDim2.new(1, 0, 0, 35)
    container.BackgroundTransparency = 1
    container.Parent = scrollFrame
    
    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(0.6, 0, 1, 0)
    label.BackgroundTransparency = 1
    label.Text = labelText
    label.TextColor3 = Color3.fromRGB(220, 220, 220)
    label.TextSize = 16
    label.Font = Enum.Font.Gotham
    label.TextXAlignment = Enum.TextXAlignment.Left
    label.Parent = container
    
    local toggleButton = Instance.new("TextButton")
    toggleButton.Size = UDim2.new(0, 50, 0, 25)
    toggleButton.Position = UDim2.new(1, -50, 0.5, -12.5)
    toggleButton.BackgroundColor3 = defaultValue and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
    toggleButton.Text = defaultValue and "ON" or "OFF"
    toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
    toggleButton.TextSize = 14
    toggleButton.Font = Enum.Font.GothamBold
    toggleButton.BorderSizePixel = 0
    toggleButton.Parent = container
    
    local state = defaultValue
    
    toggleButton.MouseButton1Click:Connect(function()
        state = not state
        toggleButton.BackgroundColor3 = state and Color3.fromRGB(0, 200, 0) or Color3.fromRGB(200, 0, 0)
        toggleButton.Text = state and "ON" or "OFF"
        callback(state)
    end)
    
    return toggleButton, function()
        return state
    end
end

-- Helper function to create text input
local function createTextInput(labelText, defaultValue, callback)
    local container = Instance.new("Frame")
    container.Size = UDim2.new(1, 0, 0, 35)
    container.BackgroundTransparency = 1
    container.Parent = scrollFrame
    
    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(0.5, 0, 1, 0)
    label.BackgroundTransparency = 1
    label.Text = labelText
    label.TextColor3 = Color3.fromRGB(220, 220, 220)
    label.TextSize = 16
    label.Font = Enum.Font.Gotham
    label.TextXAlignment = Enum.TextXAlignment.Left
    label.Parent = container
    
    local textBox = Instance.new("TextBox")
    textBox.Size = UDim2.new(0, 80, 0, 25)
    textBox.Position = UDim2.new(1, -80, 0.5, -12.5)
    textBox.BackgroundColor3 = Color3.fromRGB(50, 50, 60)
    textBox.Text = tostring(defaultValue)
    textBox.TextColor3 = Color3.fromRGB(255, 255, 255)
    textBox.TextSize = 14
    textBox.Font = Enum.Font.Gotham
    textBox.BorderSizePixel = 0
    textBox.ClearTextOnFocus = false
    textBox.Parent = container
    
    textBox.FocusLost:Connect(function(enterPressed)
        if enterPressed then
            local value = tonumber(textBox.Text)
            if value then
                callback(value)
            else
                textBox.Text = tostring(defaultValue)
            end
        end
    end)
    
    return textBox
end

-- Variables
local noclipEnabled = false
local espEnabled = false
local infJumpEnabled = false
local aimbotEnabled = false
local walkspeedValue = 16

-- FOV Circle Variables
local fovCircle = nil
local fovRadius = 250

-- Aimbot variables
local aimbotTarget = nil
local aimbotConnection = nil
local currentTarget = nil

-- ESP Variables
local espHighlights = {}

-- Create FOV Circle
local function createFOVCircle()
    if fovCircle then return end
    
    fovCircle = Instance.new("Frame")
    fovCircle.Name = "FOVCircle"
    fovCircle.Size = UDim2.new(0, fovRadius * 2, 0, fovRadius * 2)
    fovCircle.Position = UDim2.new(0.5, -fovRadius, 0.5, -fovRadius)
    fovCircle.BackgroundTransparency = 1
    fovCircle.BorderSizePixel = 0
    fovCircle.ZIndex = 999
    fovCircle.Parent = screenGui
    
    -- Circle outline
    local circle = Instance.new("ImageLabel")
    circle.Name = "Circle"
    circle.Size = UDim2.new(1, 0, 1, 0)
    circle.BackgroundTransparency = 1
    circle.Image = "rbxassetid://1136261580" -- Circle texture
    circle.ImageColor3 = Color3.fromRGB(255, 255, 255)
    circle.ImageTransparency = 0.3
    circle.ZIndex = 999
    circle.Parent = fovCircle
    
    -- Crosshair dot in center
    local dot = Instance.new("Frame")
    dot.Size = UDim2.new(0, 4, 0, 4)
    dot.Position = UDim2.new(0.5, -2, 0.5, -2)
    dot.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
    dot.BorderSizePixel = 0
    dot.ZIndex = 1000
    dot.Parent = fovCircle
    
    -- FOV indicator
    local fovText = Instance.new("TextLabel")
    fovText.Size = UDim2.new(1, 0, 0, 20)
    fovText.Position = UDim2.new(0, 0, 1, 10)
    fovText.BackgroundTransparency = 1
    fovText.Text = "FOV: " .. fovRadius
    fovText.TextColor3 = Color3.fromRGB(255, 255, 255)
    fovText.TextSize = 14
    fovText.Font = Enum.Font.Gotham
    fovText.ZIndex = 1000
    fovText.Parent = fovCircle
end

local function removeFOVCircle()
    if fovCircle then
        fovCircle:Destroy()
        fovCircle = nil
    end
end

-- ESP Function with Health Bars
local function createESPForPlayer(plr)
    if plr == player then return end
    if not plr.Character then return end
    
    -- Create highlight
    local highlight = Instance.new("Highlight")
    highlight.Name = "ESP_Highlight"
    
    -- Determine team color
    local isTeammate = false
    if player.Team and plr.Team and player.Team == plr.Team then
        isTeammate = true
        highlight.FillColor = Color3.fromRGB(0, 255, 0) -- Green for teammates
        highlight.OutlineColor = Color3.fromRGB(0, 200, 0)
    else
        highlight.FillColor = Color3.fromRGB(255, 0, 0) -- Red for enemies
        highlight.OutlineColor = Color3.fromRGB(255, 100, 100)
    end
    
    highlight.FillTransparency = 0.3
    highlight.OutlineTransparency = 0.2
    highlight.Adornee = plr.Character
    highlight.Parent = plr.Character
    
    -- Create health bar
    local healthBar = Instance.new("Frame")
    healthBar.Name = "ESP_HealthBar"
    healthBar.Size = UDim2.new(0, 60, 0, 8)
    healthBar.Position = UDim2.new(0.5, -30, 1, 5)
    healthBar.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    healthBar.BackgroundTransparency = 0.5
    healthBar.BorderSizePixel = 0
    healthBar.Parent = plr.Character
    
    local healthFill = Instance.new("Frame")
    healthFill.Name = "HealthFill"
    healthFill.Size = UDim2.new(1, 0, 1, 0)
    healthFill.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
    healthFill.BorderSizePixel = 0
    healthFill.Parent = healthBar
    
    -- Health text
    local healthText = Instance.new("TextLabel")
    healthText.Name = "HealthText"
    healthText.Size = UDim2.new(1, 0, 1, 0)
    healthText.BackgroundTransparency = 1
    healthText.Text = "100"
    healthText.TextColor3 = Color3.fromRGB(255, 255, 255)
    healthText.TextSize = 10
    healthText.Font = Enum.Font.GothamBold
    healthText.TextScaled = true
    healthText.Parent = healthBar
    
    -- Update health bar
    local humanoid = plr.Character:FindFirstChildOfClass("Humanoid")
    if humanoid then
        local function updateHealth()
            if not humanoid or not humanoid.Parent then return end
            local health = humanoid.Health
            local maxHealth = humanoid.MaxHealth
            local healthPercent = math.clamp(health / maxHealth, 0, 1)
            
            healthFill.Size = UDim2.new(healthPercent, 0, 1, 0)
            healthText.Text = math.floor(health) .. "/" .. math.floor(maxHealth)
            
            -- Change color based on health
            if healthPercent > 0.5 then
                healthFill.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
            elseif healthPercent > 0.25 then
                healthFill.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
            else
                healthFill.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
            end
        end
        
        updateHealth()
        humanoid.HealthChanged:Connect(updateHealth)
    end
    
    -- Store for cleanup
    if not espHighlights[plr] then
        espHighlights[plr] = {}
    end
    table.insert(espHighlights[plr], highlight)
    table.insert(espHighlights[plr], healthBar)
end

local function toggleESP(state)
    espEnabled = state
    
    if state then
        -- Create ESP for all players
        for _, plr in ipairs(players:GetPlayers()) do
            if plr ~= player then
                createESPForPlayer(plr)
            end
        end
        
        -- Connect to player added
        if not espHighlights._connection then
            espHighlights._connection = players.PlayerAdded:Connect(function(plr)
                if espEnabled and plr ~= player then
                    plr.CharacterAdded:Connect(function()
                        if espEnabled then
                            createESPForPlayer(plr)
                        end
                    end)
                end
            end)
        end
    else
        -- Remove all ESP
        for plr, items in pairs(espHighlights) do
            if plr ~= "_connection" then
                for _, item in ipairs(items) do
                    if item and item.Parent then
                        item:Destroy()
                    end
                end
            end
        end
        espHighlights = {}
        if espHighlights._connection then
            espHighlights._connection:Disconnect()
            espHighlights._connection = nil
        end
    end
end

-- Noclip Function
local noclipConnection = nil

local function toggleNoclip(state)
    noclipEnabled = state
    local char = player.Character
    if not char then return end
    
    if state then
        for _, part in ipairs(char:GetChildren()) do
            if part:IsA("BasePart") then
                part.CanCollide = false
            end
        end
        
        -- Connection to handle new parts
        if noclipConnection then noclipConnection:Disconnect() end
        noclipConnection = runService.Stepped:Connect(function()
            if not noclipEnabled or not char or not char.Parent then
                return
            end
            for _, part in ipairs(char:GetChildren()) do
                if part:IsA("BasePart") then
                    part.CanCollide = false
                end
            end
        end)
    else
        if noclipConnection then
            noclipConnection:Disconnect()
            noclipConnection = nil
        end
        for _, part in ipairs(char:GetChildren()) do
            if part:IsA("BasePart") then
                part.CanCollide = true
            end
        end
    end
end

-- Infinite Jump Function
local jumpConnection = nil

local function toggleInfJump(state)
    infJumpEnabled = state
    local char = player.Character
    if not char then return end
    
    local humanoid = char:FindFirstChildOfClass("Humanoid")
    if not humanoid then return end
    
    if state then
        if jumpConnection then jumpConnection:Disconnect() end
        jumpConnection = userInputService.JumpRequest:Connect(function()
            if infJumpEnabled and humanoid and humanoid.Parent then
                humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
            end
        end)
    else
        if jumpConnection then
            jumpConnection:Disconnect()
            jumpConnection = nil
        end
    end
end

-- Walkspeed Function
local function setWalkspeed(value)
    walkspeedValue = value
    local char = player.Character
    if not char then return end
    
    local humanoid = char:FindFirstChildOfClass("Humanoid")
    if humanoid then
        humanoid.WalkSpeed = value
    end
end

-- Aimbot Function with FOV
local function isInFOV(targetPosition)
    local cam = workspace.CurrentCamera
    local screenPoint, onScreen = cam:WorldToViewportPoint(targetPosition)
    
    if not onScreen then return false end
    
    local screenCenter = Vector2.new(cam.ViewportSize.X / 2, cam.ViewportSize.Y / 2)
    local distance = (Vector2.new(screenPoint.X, screenPoint.Y) - screenCenter).Magnitude
    
    return distance  0 then
                    -- Check if in FOV
                    if isInFOV(targetHead.Position) then
                        local distance = (rootPart.Position - targetHead.Position).Magnitude
                        if distance < shortestDistance then
                            shortestDistance = distance
                            nearest = plr
                        end
                    end
                end
            end
        end
    end
    
    return nearest
end

local function toggleAimbot(state)
    aimbotEnabled = state
    
    if state then
        createFOVCircle()
        
        if aimbotConnection then aimbotConnection:Disconnect() end
        
        -- Lock onto nearest player in FOV
        aimbotConnection = runService.RenderStepped:Connect(function()
            if not aimbotEnabled then return end
            
            local char = player.Character
            if not char then return end
            
            local humanoid = char:FindFirstChildOfClass("Humanoid")
            if not humanoid or humanoid.Health  0 then
            moveDirection = moveVector * flySpeed
        end
        
        -- Vertical movement (Space to go up, Shift to go down)
        if userInputService:IsKeyDown(Enum.KeyCode.Space) then
            moveDirection = moveDirection + Vector3.new(0, flySpeed, 0)
        end
        if userInputService:IsKeyDown(Enum.KeyCode.LeftShift) then
            moveDirection = moveDirection - Vector3.new(0, flySpeed, 0)
        end
        
        -- Apply velocity
        bodyVelocity.Velocity = moveDirection
        
        -- Update rotation to match camera
        local camera = workspace.CurrentCamera
        if camera then
            bodyGyro.CFrame = camera.CFrame
        end
    end)
end

-- Keyboard shortcut (F to toggle fly)
userInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end
    
    if input.KeyCode == Enum.KeyCode.F and input.UserInputType == Enum.UserInputType.Keyboard then
        if flyToggleButton then
            flyToggleButton.MouseButton1Click:Fire()
        end
    end
end)

-- Cleanup on character death
player.CharacterAdded:Connect(function()
    if flying then
        stopFly()
    end
    wait(0.5)
    setupFlyMovement()
end)

-- Initialize fly system
setupFlyMovement()

-- Create Fly Toggle in UI
createFlyToggle()

-- ============================================
-- Create UI Elements
-- ============================================
createToggle("Noclip", false, toggleNoclip)
createToggle("ESP (Team Colors)", false, toggleESP)
createToggle("Infinite Jump", false, toggleInfJump)
createToggle("Aimbot (FOV)", false, toggleAimbot)
createTextInput("WalkSpeed", 16, setWalkspeed)

-- Additional padding at bottom
local bottomPadding = Instance.new("Frame")
bottomPadding.Size = UDim2.new(1, 0, 0, 10)
bottomPadding.BackgroundTransparency = 1
bottomPadding.Parent = scrollFrame

-- Auto-update walkspeed when character changes
player.CharacterAdded:Connect(function(char)
    wait(0.5)
    local humanoid = char:FindFirstChildOfClass("Humanoid")
    if humanoid then
        humanoid.WalkSpeed = walkspeedValue
    end
end)

-- Cleanup on player death
player.CharacterAdded:Connect(function()
    -- Reapply ESP if enabled
    if espEnabled then
        wait(1)
        toggleESP(false)
        wait(0.1)
        toggleESP(true)
    end
end)

print("Cheat Script Loaded! Press F to toggle fly.")
🎮 Similar Scripts
💬 Comments (0)
Login to post a comment
No comments yet. Be the first!
Script Info
Game Trench War
TypeKeyless
Authoralexriderr
Views44
Likes0
PublishedAug 3, 2026
🎮 Play Game on Roblox
🕐 Recent Scripts
Moonlight Hub | AUTOFARM, ESP, AUTOGRAB ETC.
Moonlight Hub | AUTOFARM, ESP, AUTOGRAB ETC.
Murder Mystery 2 • 👁 8
Keyless
Rivals Silent aim and Trigger Bot script by Shrak
Rivals Silent aim and Trigger Bot script by Shrak
RIVALS • 👁 8
Keyless
2 PLAYER Evolution Tycoon script keyless – Auto collect cash
2 PLAYER Evolution Tycoon script keyless – Auto collect cash
2 PLAYER Evolution Tycoon • 👁 6
Keyless
8 ball pool 1v1 Aim line script keyless
8 ball pool 1v1 Aim line script keyless
8-Ball Pool: 1v1 • 👁 8
Keyless
RE:Heads, Please Script By Ouroboros Hub | Gacha, Station & Player
RE:Heads, Please Script By Ouroboros Hub | Gacha, Station & Player
RE:Heads, Please! • 👁 9
Keyless