local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera ------------------------------------------------ -- SETTINGS (PRO TUNED) ------------------------------------------------ local AIM_FOV = 150 local BASE_SMOOTHNESS = 0.16 local STICKINESS = 0.85 -- how long it holds target local PREDICTION = 0.12 -- movement prediction strength ------------------------------------------------ -- STATE ------------------------------------------------ local CURRENT_TARGET = nil local LAST_TARGET_TIME = 0 ------------------------------------------------ -- CHECKS ------------------------------------------------ local function isAlive(char) local hum = char and char:FindFirstChild("Humanoid") return hum and hum.Health > 0 end local function isVisible(part) local origin = camera.CFrame.Position local direction = part.Position - origin local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Blacklist params.FilterDescendantsInstances = {player.Character} local result = workspace:Raycast(origin, direction, params) return not result or result.Instance:IsDescendantOf(part.Parent) end local function isValidTarget(target) return target and target.Parent and isAlive(target.Parent) and isVisible(target) end ------------------------------------------------ -- TARGET FINDER ------------------------------------------------ local function getTarget() local closest = nil local shortest = AIM_FOV for _, plr in ipairs(Players:GetPlayers()) do if plr ~= player and plr.Character then -- team check if player.Team and plr.Team == player.Team then continue end local head = plr.Character:FindFirstChild("Head") local hum = plr.Character:FindFirstChild("Humanoid") if head and hum and hum.Health > 0 then local screenPos, onScreen = camera:WorldToViewportPoint(head.Position) if onScreen then local mousePos = UserInputService:GetMouseLocation() local dist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude if dist < shortest and isVisible(head) then shortest = dist closest = head end end end end end return closest end ------------------------------------------------ -- AIM CURVE (CORE FEEL) ------------------------------------------------ local function getStrength(distance) local t = math.clamp(distance / 350, 0, 1) -- smoother curve (no snapping) local curve = 1 - (t * t * t) -- slight close boost if distance < 80 then curve = curve + 0.1 end return math.clamp(curve, 0.2, 0.95) end ------------------------------------------------ -- PREDICTION (MOVING TARGET FIX) ------------------------------------------------ local function getPredictedPosition(target) local root = target.Parent:FindFirstChild("HumanoidRootPart") if not root then return target.Position end local velocity = root.Velocity return target.Position + (velocity * PREDICTION) end ------------------------------------------------ -- MAIN LOOP ------------------------------------------------ RunService.RenderStepped:Connect(function() -- maintain target (sticky system) if isValidTarget(CURRENT_TARGET) then -- keep target for a bit even if slightly off LAST_TARGET_TIME = tick() else -- only switch if fully lost if tick() - LAST_TARGET_TIME > (1 - STICKINESS) then CURRENT_TARGET = getTarget() end end local target = CURRENT_TARGET if not target then return end local camPos = camera.CFrame.Position local predicted = getPredictedPosition(target) local distance = (camPos - predicted).Magnitude local strength = getStrength(distance) ------------------------------------------------ -- SOFT SLOWDOWN (PRO FEATURE) ------------------------------------------------ local screenPos = camera:WorldToViewportPoint(predicted) local mousePos = UserInputService:GetMouseLocation() local screenDist = (Vector2.new(screenPos.X, screenPos.Y) - mousePos).Magnitude -- closer to crosshair = slower (more control) local slowdown = math.clamp(screenDist / 200, 0.3, 1) ------------------------------------------------ -- FINAL BLEND ------------------------------------------------ local final = strength * BASE_SMOOTHNESS * slowdown -- clamp prevents snapping final = math.clamp(final, 0.03, 0.22) local goal = CFrame.new(camPos, predicted) camera.CFrame = camera.CFrame:Lerp(goal, final) end)