local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local LocalPlayer = [Link]
local Mouse = LocalPlayer:GetMouse()
local Camera = [Link]
-- Aim Assist Settings
local Aim = {
Enabled = true, -- Toggle Aim Assist (Press "E" to toggle)
NoSleep = true, -- If true, aim assist runs every frame (NoSleep
Mode)
Smoothness = 0.15, -- Aim Smoothness (Lower = Faster Aim)
AimType = "Camera", -- Options: "Camera", "MouseMove", "MousePosition"
Range = 1000, -- Max Aim Distance
ToggleKey = [Link].Q, -- Key to toggle Aim Assist
Easing = [Link], -- Smooth movement style
Direction = [Link],
-- Normal Target Prediction (Ground)
Prediction = {
Value = 0.5, -- Prediction value for target movement on the
ground (0.0 to 1.0)
Target = {"Head", "Torso"} -- Target parts on ground
},
-- Air Prediction (Only works if enabled)
Air = {
Enabled = true, -- Set false to disable air prediction
Value = 0.75, -- More prediction for air targets (0.0 to
1.0)
Target = {"Head"} -- Prioritize headshots in air
}
}
-- Sticky Aim Variables
local stickyTarget = nil -- The player we're currently locked onto
local stickyTargetPart = nil -- The part we're aiming at on that player
-- Check if Target is Airborne
local function IsAirborne(character)
local humanoid = character:FindFirstChildOfClass("Humanoid")
return humanoid and humanoid:GetState() == [Link]
end
-- Find Closest Target
local function GetTarget()
local closest = nil
local distance = [Link]
local isAir = false
-- If sticky aim is enabled and we have a locked target, return that target
if stickyTarget then
-- Sticky aim: Only track the locked target
return stickyTargetPart, IsAirborne([Link])
end
-- Otherwise, find the closest target
for _, player in ipairs(Players:GetPlayers()) do
if player ~= LocalPlayer and [Link] then
local inAir = IsAirborne([Link])
local config = [Link]
-- Use air settings if enabled
if inAir and [Link] then
config = [Link]
end
for _, bodyPart in ipairs([Link]) do
local part = [Link]:FindFirstChild(bodyPart)
if part then
local screenPos, onScreen =
Camera:WorldToViewportPoint([Link])
if onScreen then
local mousePos = [Link](Mouse.X, Mouse.Y)
local targetPos = [Link](screenPos.X, screenPos.Y)
local dist = (mousePos - targetPos).Magnitude
if dist < distance then
closest = part
distance = dist
isAir = inAir
end
end
end
end
end
end
return closest, isAir
end
-- Aim at Target Smoothly
local function AimAt(target, inAir)
if not target then return end
-- Choose prediction settings based on air or ground
local config = [Link]
if inAir and [Link] then
config = [Link]
end
-- Prediction based on value (0.0 to 1.0)
local predictionAmount = [Link] -- This will be from 0.0 to 1.0
local predictedPos = [Link] + ([Link] * predictionAmount)
local screenPos = Camera:WorldToViewportPoint(predictedPos)
-- Calculate the required offset to the target
local offsetX = (screenPos.X - Mouse.X) * [Link]
local offsetY = (screenPos.Y - Mouse.Y) * [Link]
-- Fixing camera offset issue: We use the mouse position to adjust the camera
smoothly without causing vertical displacement issues.
if [Link] == "Camera" then
-- Smooth camera movement
local targetCFrame = [Link]:PointToWorldSpace([Link](offsetX,
offsetY, 0)) -- Adjust the CFrame based on the offset.
local tweenInfo = [Link]([Link], [Link], [Link])
local tween = TweenService:Create(Camera, tweenInfo, {CFrame =
targetCFrame})
tween:Play()
elseif [Link] == "MouseMove" then
-- Smooth mouse movement
local moveX = offsetX
local moveY = offsetY
mousemoverel(moveX, moveY)
elseif [Link] == "MousePosition" then
-- Instant mouse snap
mousemoverel(screenPos.X - Mouse.X, screenPos.Y - Mouse.Y)
end
end
-- Aim Assist Logic (NoSleep Mode)
local function RunAimAssist()
if [Link] then
local target, inAir = GetTarget()
if target then
AimAt(target, inAir)
end
end
end
-- Handle NoSleep Mode
if [Link] then
[Link]:Connect(RunAimAssist)
else
[Link]:Connect(function()
if [Link] then
RunAimAssist()
end
end)
end
-- Toggle Aim Assist and Lock Sticky Aim
[Link]:Connect(function(input, processed)
if processed then return end
if [Link] == [Link] then
[Link] = not [Link]
end
-- Lock the aim on the target (Sticky Aim)
if [Link] == [Link].F then -- You can change this to any key you
prefer
-- Only lock to the target if no target is already locked
if not stickyTarget then
local target, inAir = GetTarget()
if target then
stickyTarget = [Link] -- Lock the entire player, not just
the part
stickyTargetPart = target -- Lock the part being aimed at
end
end
end
-- Unlock Sticky Aim
if [Link] == [Link].G then -- Change this to any key for
unlocking
stickyTarget = nil
stickyTargetPart = nil
end
end)