local uis = game:GetService('UserInputService') local mouse = game:GetService('Players').LocalPlayer:GetMouse() local enabled = false local target local cam = workspace.CurrentCamera uis.InputBegan:Connect(function(input, gameProcessed) if not gameProcessed and input.UserInputType == Enum.UserInputType.MouseButton2 then enabled = true end end) uis.InputEnded:Connect(function(input, gameProcessed) if not gameProcessed and input.UserInputType == Enum.UserInputType.MouseButton2 then enabled = false target = nil end end) while task.wait() do if enabled then if target and target.Name == 'Head' and target.Parent and target.Parent:IsA('Model') and target.Parent:FindFirstChild('Zombie') and target.Parent.Zombie.Health > 0 then cam.CFrame = CFrame.lookAt(cam.CFrame.Position, target.Position) else target = mouse.Target if target and target.Parent and target.Parent:IsA('Model') and target.Parent:FindFirstChild('Zombie') and target.Parent.Zombie.Health > 0 and target.Parent:FindFirstChild('Head') then target = target.Parent.Head end end end end