-- Dotbhai NPC Aim Assist -- Place in StarterPlayerScripts local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera local enabled = false local range = 150 local smoothness = 0.15 local function getNearestNPC() local nearest = nil local shortest = range for _, npc in ipairs(workspace:GetChildren()) do if npc:IsA("Model") and npc:FindFirstChild("Humanoid") and npc:FindFirstChild("Head") and not Players:GetPlayerFromCharacter(npc) then local humanoid = npc.Humanoid if humanoid.Health > 0 then local position, visible = camera:WorldToViewportPoint(npc.Head.Position) if visible then local center = camera.ViewportSize / 2 local distance = (Vector2.new(position.X, position.Y) - center).Magnitude if distance < shortest then shortest = distance nearest = npc.Head end end end end end return nearest end UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == Enum.KeyCode.E then enabled = not enabled print("Aim Assist:", enabled and "ON" or "OFF") end end) RunService.RenderStepped:Connect(function() if not enabled then return end local target = getNearestNPC() if target then local goal = CFrame.lookAt( camera.CFrame.Position, target.Position ) camera.CFrame = camera.CFrame:Lerp(goal, smoothness) end end)