local plr = game:GetService("Players") local rs = game:GetService("RunService") local ws = game:GetService("Workspace") local player = plr.LocalPlayer local cam = ws.CurrentCamera local main = Instance.new("ScreenGui") main.Name = "AimbotSWZ" main.Parent = game.CoreGui local btn = Instance.new("TextButton") btn.Parent = main btn.Size = UDim2.new(0, 150, 0, 50) btn.Position = UDim2.new(0, 10, 0.5, -60) btn.BackgroundColor3 = Color3.fromRGB(255, 0, 0) btn.Text = "AIMBOT: OFF" btn.TextColor3 = Color3.new(1, 1, 1) local closebtn = Instance.new("TextButton") closebtn.Parent = main closebtn.Size = UDim2.new(0, 30, 0, 30) closebtn.Position = UDim2.new(0, 165, 0.5, -60) closebtn.BackgroundColor3 = Color3.fromRGB(180, 0, 0) closebtn.Text = "X" closebtn.TextColor3 = Color3.new(1, 1, 1) local enabled = false closebtn.MouseButton1Click:Connect(function() enabled = false main:Destroy() end) btn.MouseButton1Click:Connect(function() enabled = not enabled if enabled then btn.Text = "AIMBOT: ON" btn.BackgroundColor3 = Color3.fromRGB(0, 255, 0) else btn.Text = "AIMBOT: OFF" btn.BackgroundColor3 = Color3.fromRGB(255, 0, 0) end end) function findtarget() local closest = math.huge local target = nil local zombies = ws:FindFirstChild("Zombies") local char = player.Character local root = char and char:FindFirstChild("HumanoidRootPart") if not zombies or not root then return end for i, v in pairs(zombies:GetChildren()) do if tonumber(v.Name) then local head = v:FindFirstChild("Head") if head then local dist = (head.Position - root.Position).Magnitude if dist < closest then closest = dist target = head end end end end return target end rs.RenderStepped:Connect(function() if enabled then local t = findtarget() if t then cam.CFrame = CFrame.new(cam.CFrame.Position, t.Position) end end end)