
Key Required

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local aimAssistEnabled = true
local aimStrength = 0.1 -- lower = smoother
-- GET CLOSEST TARGET
function getClosestTarget()
local closest = nil
local shortestDist = math.huge
for _, plr in pairs(game.Players:GetPlayers()) do
if plr ~= player and plr.Character and plr.Character:FindFirstChild("Head") then
local pos, onScreen = camera:WorldToViewportPoint(plr.Character.Head.Position)
if onScreen then
local dist = (Vector2.new(pos.X, pos.Y) - Vector2.new(camera.ViewportSize.X/2, camera.ViewportSize.Y/2)).Magnitude
if dist < shortestDist then
shortestDist = dist
closest = plr
end
end
end
end
return closest
end
-- AIM ASSIST LOOP
game:GetService("RunService").RenderStepped:Connect(function()
if not aimAssistEnabled then return end
local target = getClosestTarget()
if target and target.Character and target.Character:FindFirstChild("Head") then
local targetPos = target.Character.Head.Position
local camCF = camera.CFrame
local newCF = CFrame.new(camCF.Position, targetPos)
camera.CFrame = camCF:Lerp(newCF, aimStrength)
end
end)No comments yet for this script.



