AI War Script OP
Key Required

AI War Script OP

AI War- Red vs. BlueMysteriousSkidMysteriousSkid 3.9K views 276 executesUpdated Jul 29, 2025
Unrated
00
Lua Script•120 lines (3500 chars)
local player = game:GetService("Players").LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Name = "TabbedGUI"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")

local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 280, 0, 160)
mainFrame.Position = UDim2.new(0, 25, 0, 100)
mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
mainFrame.BorderSizePixel = 0
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Parent = gui

Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 12)

local gradient = Instance.new("UIGradient", mainFrame)
gradient.Color = ColorSequence.new{
    ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 80, 80)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(80, 80, 255))
}
gradient.Rotation = 0

spawn(function()
    while wait(0.03) do
        gradient.Rotation = (gradient.Rotation + 1) % 360
    end
end)

local function createTabButton(name, pos, parent)
    local btn = Instance.new("TextButton")
    btn.Size = UDim2.new(0.333, 0, 0, 30)
    btn.Position = UDim2.new(pos, 0, 0, 0)
    btn.Text = name
    btn.Font = Enum.Font.GothamBold
    btn.TextSize = 20
    btn.TextColor3 = Color3.new(1, 1, 1)
    btn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
    btn.Parent = parent
    return btn
end

local tabFlame = createTabButton("🔥 Flame", 0, mainFrame)
local tabSwordmen = createTabButton("🗡️ Swordmen", 0.333, mainFrame)
local tabPhalanx = createTabButton("🛡️ Phalanx", 0.666, mainFrame)

local function createTabFrame(parent)
    local frame = Instance.new("Frame")
    frame.Size = UDim2.new(1, -10, 1, -40)
    frame.Position = UDim2.new(0, 5, 0, 35)
    frame.BackgroundTransparency = 1
    frame.Visible = false
    frame.Parent = parent
    return frame
end

local flameFrame = createTabFrame(mainFrame)
local swordmenFrame = createTabFrame(mainFrame)
local phalanxFrame = createTabFrame(mainFrame)
flameFrame.Visible = true

local function createToggleButton(tab, text, argsTable)
    local button = Instance.new("TextButton")
    button.Size = UDim2.new(0, 200, 0, 40)
    button.Position = UDim2.new(0.5, -100, 0, 10)
    button.Text = "Enable " .. text
    button.Font = Enum.Font.GothamBold
    button.TextSize = 20
    button.TextColor3 = Color3.new(1, 1, 1)
    button.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
    button.Parent = tab
    Instance.new("UICorner", button).CornerRadius = UDim.new(0, 10)

    local enabled = false

    button.MouseButton1Click:Connect(function()
        enabled = not enabled
        button.Text = enabled and ("Disable " .. text) or ("Enable " .. text)
    end)

    spawn(function()
        while true do
            if enabled then
                pcall(function()
                    workspace:WaitForChild("SquadEvent", 9e9):FireServer(unpack(argsTable))
                end)
            end
            wait(0.1)
        end
    end)
end

createToggleButton(swordmenFrame, "Swordmen", {
    [1] = 1,
    [2] = 1
})

createToggleButton(phalanxFrame, "Phalanx", {
    [1] = 3,
    [2] = 1
})

tabFlame.MouseButton1Click:Connect(function()
    flameFrame.Visible = true
    swordmenFrame.Visible = false
    phalanxFrame.Visible = false
end)

tabSwordmen.MouseButton1Click:Connect(function()
    flameFrame.Visible = false
    swordmenFrame.Visible = true
    phalanxFrame.Visible = false
end)

tabPhalanx.MouseButton1Click:Connect(function()
    flameFrame.Visible = false
    swordmenFrame.Visible = false
    phalanxFrame.Visible = true
end)

Features & Information

So op

Community Comments (3)

hdhdbdbddjthhdhdbdbddjthJul 29, 2025

How is this op I don’t get how it works

AriOTR1868AriOTR1868Jul 29, 2025

wth does ts do

MysteriousSkidMysteriousSkidJul 29, 2025

@hdhdbdbddjith 1 it spams alots of units using fire or invoke remotes 2 need an good exuetor that doesn't lag alot

More Scripts for AI War- Red vs. Blue