local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Cam = workspace.CurrentCamera local LP = Players.LocalPlayer local S = { FOV = 100, MaxDist = 1000, BaseSmooth = 18, Sticky = 26, HeadOff = Vector3.new(0,0.6,0), TeamCheck = true } -- TOGGLE local Enabled = false UserInputService.InputBegan:Connect(function(input, gp) if gp then return end if input.KeyCode == Enum.KeyCode.X then Enabled = not Enabled warn("Aim:", Enabled and "ON" or "OFF") end end) -- WALLCHECK local function isVisible(char, part) local origin = Cam.CFrame.Position local direction = part.Position - origin local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Blacklist params.FilterDescendantsInstances = {LP.Character} params.IgnoreWater = true local result = workspace:Raycast(origin, direction, params) if result then return result.Instance:IsDescendantOf(char) end return false end -- TARGET local function getTgt() local lc = LP.Character if not lc then return end local lhrp = lc:FindFirstChild("HumanoidRootPart") if not lhrp then return end local sc = Vector2.new(Cam.ViewportSize.X/2, Cam.ViewportSize.Y/2) local best = nil local md = math.huge for _, p in ipairs(Players:GetPlayers()) do if p ~= LP and (not S.TeamCheck or p.Team ~= LP.Team) then local char = p.Character if char then local hum = char:FindFirstChildOfClass("Humanoid") local hrp = char:FindFirstChild("HumanoidRootPart") local head = char:FindFirstChild("Head") if hum and hum.Health > 0 and hrp and head then local pos, vis = Cam:WorldToScreenPoint(hrp.Position) if vis then local d_screen = (Vector2.new(pos.X,pos.Y) - sc).Magnitude local d_world = (hrp.Position - lhrp.Position).Magnitude if d_screen < S.FOV and d_world < S.MaxDist and d_screen < md then if isVisible(char, head) then md = d_screen best = char end end end end end end end return best end -- AIM local function stick(tgt) if not tgt then return end local head = tgt:FindFirstChild("Head") if not head then return end local cf = Cam.CFrame local pos = head.Position + S.HeadOff local sp, vis = Cam:WorldToScreenPoint(pos) if not vis then return end local sc = Vector2.new(Cam.ViewportSize.X/2, Cam.ViewportSize.Y/2) local dist = (Vector2.new(sp.X,sp.Y) - sc).Magnitude local smooth = S.BaseSmooth if dist < S.Sticky and dist > 5 then smooth = smooth + (S.Sticky - dist) * 0.2 end local targetCF = CFrame.new(cf.Position, pos) Cam.CFrame = cf:Lerp(targetCF, 1 / smooth) end -- LOOP RunService.RenderStepped:Connect(function() if Enabled then local tgt = getTgt() stick(tgt) end end)