Auto Kill
Key Required

Auto Kill

[FACTIONS] Survive Zombie ArenaNOOBNOOB 2.4K views 226 executesUpdated May 12, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•126 lines (2769 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local LocalPlayer = Players.LocalPlayer

local ZombiesFolder = workspace:WaitForChild("Zombies_Local")
local GunRemote = ReplicatedStorage.GunRemotes:WaitForChild("GunHit")

local MAX_TARGETS = 8
local FIRE_DELAY = 0.03

local lastFire = 0
local CurrentWeapon = nil

local function UpdateWeapon()
    local character = LocalPlayer.Character
    if not character then
        CurrentWeapon = nil
        return
    end

    CurrentWeapon = nil

    for _, v in ipairs(character:GetChildren()) do
        if v:IsA("Tool") then
            CurrentWeapon = v.Name
            break
        end
    end
end

local function SetupCharacter(character)
    UpdateWeapon()

    character.ChildAdded:Connect(function(child)
        if child:IsA("Tool") then
            CurrentWeapon = child.Name
        end
    end)

    character.ChildRemoved:Connect(function(child)
        if child:IsA("Tool") and CurrentWeapon == child.Name then
            task.wait()
            UpdateWeapon()
        end
    end)
end

if LocalPlayer.Character then
    SetupCharacter(LocalPlayer.Character)
end

LocalPlayer.CharacterAdded:Connect(SetupCharacter)

local function GetClosestZombies()
    local character = LocalPlayer.Character
    if not character then
        return {}
    end

    local hrp = character:FindFirstChild("HumanoidRootPart")
    if not hrp then
        return {}
    end

    local zombieList = {}

    for _, zombie in ipairs(ZombiesFolder:GetChildren()) do
        if zombie:IsA("Model") then
            local pos = zombie:GetPivot().Position
            local distance = (hrp.Position - pos).Magnitude

            table.insert(zombieList, {
                Model = zombie,
                Distance = distance,
                Position = pos
            })
        end
    end

    table.sort(zombieList, function(a, b)
        return a.Distance < b.Distance
    end)

    return zombieList
end

RunService.Heartbeat:Connect(function()
    if tick() - lastFire < FIRE_DELAY then
        return
    end

    lastFire = tick()

    if not CurrentWeapon then
        UpdateWeapon()
    end

    if not CurrentWeapon then
        return
    end

    local targets = GetClosestZombies()

    local sent = 0

    for _, data in ipairs(targets) do
        if sent >= MAX_TARGETS then
            break
        end

        local zombie = data.Model
        local zombieId = tonumber(zombie.Name:match("%d+"))

        if zombieId then
            GunRemote:FireServer(
                CurrentWeapon,
                zombieId,
                data.Position
            )

            sent += 1
        end
    end
end)

Features & Information

Auto Kill (Source Code)
#Kill Aura#Auto Kill#Auto Farm#Zombie

Community Comments (0)

No comments yet for this script.

More Scripts for [FACTIONS] Survive Zombie Arena