local fov = 150 local smoothing = 1 local ignoredTeam = "Zombies" -- change this to your team name, EX: "Noobs", "Zombies", "Militant", "Rebel" local RunService = game:GetService("RunService") local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local UserInputService = game:GetService("UserInputService") local Camera = workspace.CurrentCamera local FOVring = Drawing.new("Circle") FOVring.Visible = true FOVring.Thickness = 2 FOVring.Radius = fov FOVring.Transparency = 1 FOVring.Color = Color3.fromRGB(255, 255, 255) FOVring.Position = Camera.ViewportSize / 2 local function getClosest(cframe) local ray = Ray.new(cframe.Position, cframe.LookVector).Unit local target = nil local mag = math.huge for _, npc in pairs(workspace.NPCs:GetChildren()) do local humanoid = npc:FindFirstChild("Humanoid") local head = npc:FindFirstChild("Head") local root = npc:FindFirstChild("HumanoidRootPart") local teamValue = npc:FindFirstChild("TEAM") -- TEAM is expected to be a StringValue if humanoid and humanoid.Health > 0 and head and root then if not teamValue or teamValue.Value ~= ignoredTeam then local magBuf = (head.Position - ray:ClosestPoint(head.Position)).Magnitude if magBuf < mag then mag = magBuf target = npc end end end end return target end loop = RunService.RenderStepped:Connect(function() local pressed = UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) local cam = Camera local center = cam.ViewportSize / 2 if pressed then local curTarget = getClosest(cam.CFrame) if curTarget and curTarget:FindFirstChild("Head") then local screenPoint, onScreen = cam:WorldToScreenPoint(curTarget.Head.Position) local ssHeadPoint = Vector2.new(screenPoint.X, screenPoint.Y) if onScreen and (ssHeadPoint - center).Magnitude < fov then cam.CFrame = cam.CFrame:Lerp(CFrame.new(cam.CFrame.Position, curTarget.Head.Position), smoothing) end end end if UserInputService:IsKeyDown(Enum.KeyCode.Minus) then loop:Disconnect() FOVring:Remove() end end)