local Camera = workspace.
CurrentCamera
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")
local LocalPlayer = [Link]
local Holding = false
_G.AimbotEnabled = true
_G.TeamCheck = false -- If set to true then the script would only lock your aim at
enemy team members.
_G.AimPart = "Head" -- Where the aimbot script would lock at.
_G.Sensitivity = 0 -- How many seconds it takes for the aimbot script to officially
lock onto the target's aimpart.
local function GetClosestPlayer()
local MaximumDistance = [Link]
local Target = nil
[Link](function()
wait(20); MaximumDistance = [Link] -- Reset the MaximumDistance so
that the Aimbot doesn't remember it as a very small variable and stop capturing
players...
end)()
for _, v in next, Players:GetPlayers() do
if [Link] ~= [Link] then
if _G.TeamCheck == true then
if [Link] ~= [Link] then
if [Link] ~= nil then
if
[Link]:FindFirstChild("HumanoidRootPart") ~= nil then
if [Link]:FindFirstChild("Humanoid")
~= nil and [Link]:FindFirstChild("Humanoid").Health ~= 0 then
local ScreenPoint =
Camera:WorldToScreenPoint([Link]:WaitForChild("HumanoidRootPart",
[Link]).Position)
local VectorDistance =
([Link](UserInputService:GetMouseLocation().X,
UserInputService:GetMouseLocation().Y) - [Link](ScreenPoint.X,
ScreenPoint.Y)).Magnitude
if VectorDistance < MaximumDistance
then
Target = v
MaximumDistance =
VectorDistance
end
end
end
end
end
else
if [Link] ~= nil then
if [Link]:FindFirstChild("HumanoidRootPart") ~=
nil then
if [Link]:FindFirstChild("Humanoid") ~=
nil and [Link]:FindFirstChild("Humanoid").Health ~= 0 then
local ScreenPoint =
Camera:WorldToScreenPoint([Link]:WaitForChild("HumanoidRootPart",
[Link]).Position)
local VectorDistance =
([Link](UserInputService:GetMouseLocation().X,
UserInputService:GetMouseLocation().Y) - [Link](ScreenPoint.X,
ScreenPoint.Y)).Magnitude
if VectorDistance < MaximumDistance then
Target = v
MaximumDistance =
VectorDistance
end
end
end
end
end
end
end
return Target
end
[Link]:Connect(function(Input)
if [Link] == [Link].MouseButton2 then
Holding = true
end
end)
[Link]:Connect(function(Input)
if [Link] == [Link].MouseButton2 then
Holding = false
end
end)
[Link]:Connect(function()
if Holding == true and _G.AimbotEnabled == true then
TweenService:Create(Camera, [Link](_G.Sensitivity,
[Link], [Link]), {CFrame =
[Link]([Link],
GetClosestPlayer().Character[_G.AimPart].Position)}):Play()
end
end)