loop kill all zombies script
Key Required

loop kill all zombies script

Zombie lab [Equal Avatar Scale📏]ZlyzoxXZlyzoxX 1.2K views 1.4K executesUpdated Dec 18, 2025
5.0/ 5(3 votes)
30100% Positive
Lua Script•151 lines (5039 chars)
-- Simple Flat GUI Zombie Killer (workspace.Zombies folder) + Auto-Equip

local Players = game:GetService("Players")
local Workspace = game:GetService("Workspace")
local LocalPlayer = Players.LocalPlayer

local ZombiesFolder = Workspace:WaitForChild("Zombies")

-- Damage settings
local damage = 10
local direction = Vector3.new(0.90315043926239, -0.055108457803726, 0.42577287554741)

-- Auto-equip Pistol
local function equipPistol()
    local tool = LocalPlayer.Backpack:FindFirstChild("Pistol") or LocalPlayer.Character:FindFirstChild("Pistol")
    if tool and tool.Parent ~= LocalPlayer.Character then
        tool.Parent = LocalPlayer.Character
    end
end

-- Get remote
local function getRemote()
    local pistol = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("Pistol")
    if pistol then
        local serverScript = pistol:FindFirstChild("GunScript_Server")
        if serverScript then
            return serverScript:FindFirstChild("InflictTarget")
        end
    end
    return nil
end

local Event = getRemote()

-- Destroy old GUI
if LocalPlayer.PlayerGui:FindFirstChild("ZombieKillerGui") then
    LocalPlayer.PlayerGui.ZombieKillerGui:Destroy()
end

-- Simple flat GUI
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "ZombieKillerGui"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = LocalPlayer.PlayerGui

local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 220, 0, 100)
MainFrame.Position = UDim2.new(0, 10, 0, 10)
MainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
MainFrame.BorderSizePixel = 2
MainFrame.BorderColor3 = Color3.fromRGB(100, 100, 100)
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Parent = ScreenGui

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 30)
Title.BackgroundTransparency = 1
Title.Text = "Zombie Killer"
Title.TextColor3 = Color3.new(1, 1, 1)
Title.TextSize = 20
Title.Font = Enum.Font.SourceSansBold
Title.Parent = MainFrame

local StatusLabel = Instance.new("TextLabel")
StatusLabel.Size = UDim2.new(1, -10, 0, 30)
StatusLabel.Position = UDim2.new(0, 5, 0, 30)
StatusLabel.BackgroundTransparency = 1
StatusLabel.Text = "Status: OFF"
StatusLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
StatusLabel.TextSize = 18
StatusLabel.Font = Enum.Font.SourceSans
StatusLabel.TextXAlignment = Enum.TextXAlignment.Left
StatusLabel.Parent = MainFrame

local ToggleButton = Instance.new("TextButton")
ToggleButton.Size = UDim2.new(0, 80, 0, 30)
ToggleButton.Position = UDim2.new(1, -90, 1, -40)
ToggleButton.BackgroundColor3 = Color3.fromRGB(180, 0, 0)
ToggleButton.BorderSizePixel = 2
ToggleButton.BorderColor3 = Color3.fromRGB(100, 100, 100)
ToggleButton.Text = "OFF"
ToggleButton.TextColor3 = Color3.new(1, 1, 1)
ToggleButton.TextSize = 18
ToggleButton.Font = Enum.Font.SourceSansBold
ToggleButton.Parent = MainFrame

local enabled = false

local function updateGUI()
    if enabled then
        StatusLabel.Text = "Status: ON"
        StatusLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
        ToggleButton.Text = "ON"
        ToggleButton.BackgroundColor3 = Color3.fromRGB(0, 180, 0)
    else
        StatusLabel.Text = "Status: OFF"
        StatusLabel.TextColor3 = Color3.fromRGB(255, 80, 80)
        ToggleButton.Text = "OFF"
        ToggleButton.BackgroundColor3 = Color3.fromRGB(180, 0, 0)
    end
end

ToggleButton.MouseButton1Click:Connect(function()
    enabled = not enabled
    updateGUI()
end)

-- Main loop
spawn(function()
    while task.wait(0.12) do
        if enabled then
            equipPistol()
            Event = getRemote() or Event
            if not Event then continue end

            for _, zombie in ipairs(ZombiesFolder:GetChildren()) do
                if zombie:IsA("Model") then
                    local humanoid = zombie:FindFirstChild("Humanoid")
                    local torso = zombie:FindFirstChild("UpperTorso") or zombie:FindFirstChild("Torso")
                    if humanoid and torso and humanoid.Health > 0 then
                        pcall(function()
                            Event:FireServer(humanoid, torso, damage, direction, 0, 0, false)
                        end)
                    end
                end
            end

            -- Optional: Zombie team players
            for _, player in ipairs(Players:GetPlayers()) do
                if player ~= LocalPlayer and player.Team and player.Team.Name == "Zombie" and player.Character then
                    local hum = player.Character:FindFirstChildOfClass("Humanoid")
                    local part = player.Character:FindFirstChild("UpperTorso") or player.Character:FindFirstChild("Torso")
                    if hum and part then
                        pcall(function()
                            Event:FireServer(hum, part, damage, direction, 0, 0, false)
                        end)
                    end
                end
            end
        end
    end
end)

-- Respawn
LocalPlayer.CharacterAdded:Connect(function()
    task.wait(2)
    equipPistol()
end)

updateGUI()

Features & Information

+loopkill every zombies Xeno/solara unsupported

Community Comments (3)

thesenutsthesenutsDec 18, 2025

works well

ZlyzoxXZlyzoxXDec 18, 2025

@slapps37 im just doing them for fun

ufhfv748ufhfv748Dec 27, 2025

这样会不会很不好?

More Scripts for Zombie lab [Equal Avatar Scale📏]