Auto Unit, Upgrade and Surrender
Key Required

Auto Unit, Upgrade and Surrender

The Battle BricksHeiwaijigunHeiwaijigun 28.4K views 136 executesUpdated Apr 18, 2024
5.0/ 5(2 votes)
20100% Positive
Lua Scriptβ€’73 lines (2279 chars)
-- Services
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local screenGui = Instance.new("ScreenGui", player.PlayerGui)

-- Unit Toggle
local unitButton = Instance.new("TextButton", screenGui)
unitButton.Size = UDim2.new(0, 100, 0, 50)
unitButton.Position = UDim2.new(1, -110, 0, 50)
unitButton.Text = "Unit"
unitButton.BackgroundColor3 = Color3.fromRGB(255, 255, 0)

local unitRunning = false

unitButton.MouseButton1Click:Connect(function()
    unitRunning = not unitRunning
    if unitRunning then
        unitButton.Text = "Unit (On)"
    else
        unitButton.Text = "Unit (Off)"
    end
end)

-- Bank Toggle
local bankButton = Instance.new("TextButton", screenGui)
bankButton.Size = UDim2.new(0, 100, 0, 50)
bankButton.Position = UDim2.new(1, -110, 0, 110)
bankButton.Text = "Bank"
bankButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)

local bankRunning = false

bankButton.MouseButton1Click:Connect(function()
    bankRunning = not bankRunning
    if bankRunning then
        bankButton.Text = "Bank (On)"
    else
        bankButton.Text = "Bank (Off)"
    end
end)

-- GiveUp Button
local giveUpButton = Instance.new("TextButton", screenGui)
giveUpButton.Size = UDim2.new(0, 100, 0, 50)
giveUpButton.Position = UDim2.new(1, -110, 0, 170) -- Position below the Bank button
giveUpButton.Text = "GiveUp"
giveUpButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)

giveUpButton.MouseButton1Click:Connect(function()
    game:GetService("ReplicatedStorage").Events.RemoteEvents.GiveUp:FireServer()
end)

-- Main Loop
spawn(function()
    while wait(0.1) do
        if unitRunning then
            for i = 1, 8 do
                local args = {
                    [1] = "Slot" .. i
                }
                game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("RemoteFunction"):WaitForChild("PlayerSpawn"):InvokeServer(unpack(args))
            end
        end
        
        if bankRunning then
            local args = {
                [1] = "Bank"
            }
            game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("RemoteFunction"):WaitForChild("PlayerSpawn"):InvokeServer(unpack(args))
        end
    end
end)

Features & Information

Toggleable auto upgrade and deploy unit one tap give up button

Community Comments (11)

HeiwaijigunHeiwaijigunApr 18, 2024(edited)

auto deploy units will come soon

Gamer_bloxGamer_bloxJun 1, 2024(edited)

Script respect πŸ‘ Game now is very easy for me ❀️

Nashirjamaludin14Nashirjamaludin14Sep 3, 2024(edited)

Wait does it immediately upgrade the bank without you losing money or is it just auto upgrade your bank with you losing money?

Nashirjamaludin14Nashirjamaludin14Sep 3, 2024(edited)

Either way DO NOT EXECUTE THIS SCRIPT IF YOU USE IGNITION/DETONATOR

HeiwaijigunHeiwaijigunOct 5, 2024(edited)

Updated the Script, Enjoy

HIIEXISTHIIEXISTOct 16, 2024(edited)

Works and also you lose money when it auto upgrades bank if that's a bug can you fix it

Nashirjamaludin14Nashirjamaludin14Oct 17, 2024(edited)

Probably intentional

bariqzacharybariqzacharyJan 11, 2025(edited)

Do i just press direct script and then play?

margaritatelan70margaritatelan70Jan 19, 2025(edited)

where do i find autoexec

jack09nolanjack09nolanFeb 16, 2025(edited)

you should add an option to auto replay levels and to use the cannon aside from that this script is goated

C00lkidaltC00lkidaltJun 17, 2025

Isn’t working because it stops auto deploying units

More Scripts for The Battle Bricks