getgenv().
AimPart = "HumanoidRootPart" -- For R15 Games: {UpperTorso, LowerTorso,
HumanoidRootPart, Head} | For R6 Games: {Head, Torso, HumanoidRootPart}
getgenv().AimlockKey = "q"
getgenv().AimRadius = 30
getgenv().ThirdPerson = true
getgenv().FirstPerson = true
getgenv().TeamCheck = false -- Check if Target is on your Team (True means it wont
lock onto your teamates, false is vice versa) (Set it to false if there are no
teams)
getgenv().PredictMovement = true -- Predicts if they are moving in fast velocity
(like jumping) so the aimbot will go a bit faster to match their speed
getgenv().PredictionVelocity = 8.8
local Players, Uis, RService, SGui = game:GetService"Players",
game:GetService"UserInputService", game:GetService"RunService",
game:GetService"StarterGui";
local Client, Mouse, Camera, CF, RNew, Vec3, Vec2 = [Link],
[Link]:GetMouse(), [Link], [Link], [Link],
[Link], [Link];
local Aimlock, MousePressed, CanNotify = true, false, false;
local AimlockTarget;
getgenv().CiazwareUniversalAimbotLoaded = true
getgenv().WorldToViewportPoint = function(P)
return Camera:WorldToViewportPoint(P)
end
getgenv().WorldToScreenPoint = function(P)
return [Link](Camera, P)
end
getgenv().GetObscuringObjects = function(T)
if T and T:FindFirstChild(getgenv().AimPart) and Client and
[Link]:FindFirstChild("Head") then
local RayPos = workspace:FindPartOnRay(RNew(
T[getgenv().AimPart].Position, [Link])
)
if RayPos then return RayPos:IsDescendantOf(T) end
end
end
getgenv().GetNearestTarget = function()
-- Credits to whoever made this, i didnt make it, and my own mouse2plr function
kinda sucks
local players = {}
local PLAYER_HOLD = {}
local DISTANCES = {}
for i, v in pairs(Players:GetPlayers()) do
if v ~= Client then
[Link](players, v)
end
end
for i, v in pairs(players) do
if [Link] ~= nil then
local AIM = [Link]:FindFirstChild("Head")
if getgenv().TeamCheck == true and [Link] ~= [Link] then
local DISTANCE = ([Link]:FindFirstChild("Head").Position -
[Link].p).magnitude
local RAY = [Link]([Link].p,
([Link].p - [Link].p).unit * DISTANCE)
local HIT,POS = [Link]:FindPartOnRay(RAY, [Link])
local DIFF = [Link]((POS - [Link]).magnitude)
PLAYER_HOLD[[Link] .. i] = {}
PLAYER_HOLD[[Link] .. i].dist= DISTANCE
PLAYER_HOLD[[Link] .. i].plr = v
PLAYER_HOLD[[Link] .. i].diff = DIFF
[Link](DISTANCES, DIFF)
elseif getgenv().TeamCheck == false and [Link] == [Link] then
local DISTANCE = ([Link]:FindFirstChild("Head").Position -
[Link].p).magnitude
local RAY = [Link]([Link].p,
([Link].p - [Link].p).unit * DISTANCE)
local HIT,POS = [Link]:FindPartOnRay(RAY, [Link])
local DIFF = [Link]((POS - [Link]).magnitude)
PLAYER_HOLD[[Link] .. i] = {}
PLAYER_HOLD[[Link] .. i].dist= DISTANCE
PLAYER_HOLD[[Link] .. i].plr = v
PLAYER_HOLD[[Link] .. i].diff = DIFF
[Link](DISTANCES, DIFF)
end
end
end
if unpack(DISTANCES) == nil then
return nil
end
local L_DISTANCE = [Link]([Link](unpack(DISTANCES)))
if L_DISTANCE > getgenv().AimRadius then
return nil
end
for i, v in pairs(PLAYER_HOLD) do
if [Link] == L_DISTANCE then
return [Link]
end
end
return nil
end
[Link]:Connect(function(a)
if a == AimlockKey and AimlockTarget == nil then
pcall(function()
if MousePressed ~= true then MousePressed = true end
local Target;Target = GetNearestTarget()
if Target ~= nil then
AimlockTarget = Target
end
end)
elseif a == AimlockKey and AimlockTarget ~= nil then
if AimlockTarget ~= nil then AimlockTarget = nil end
if MousePressed ~= false then
MousePressed = false
end
end
end)
--[[
[Link]:Connect(function(a)
if a == AimlockToggleKey then
Aimlock = not Aimlock
end
end)
]]
[Link]:Connect(function()
if getgenv().ThirdPerson == true and getgenv().FirstPerson == true then
if ([Link].p - [Link].p).Magnitude > 1 or
([Link].p - [Link].p).Magnitude <= 1 then
CanNotify = true
else
CanNotify = false
end
elseif getgenv().ThirdPerson == true and getgenv().FirstPerson == false then
if ([Link].p - [Link].p).Magnitude > 1 then
CanNotify = true
else
CanNotify = false
end
elseif getgenv().ThirdPerson == false and getgenv().FirstPerson == true then
if ([Link].p - [Link].p).Magnitude <= 1 then
CanNotify = true
else
CanNotify = false
end
end
if Aimlock == true and MousePressed == true then
if AimlockTarget and [Link] and
[Link]:FindFirstChild(getgenv().AimPart) then
if getgenv().FirstPerson == true then
if CanNotify == true then
if getgenv().PredictMovement == true then
[Link] = CF([Link].p,
[Link][getgenv().AimPart].Position +
[Link][getgenv().AimPart].Velocity/PredictionVelocity)
elseif getgenv().PredictMovement == false then
[Link] = CF([Link].p,
[Link][getgenv().AimPart].Position)
end
end
elseif getgenv().ThirdPerson == true then
if CanNotify == true then
if getgenv().PredictMovement == true then
[Link] = CF([Link].p,
[Link][getgenv().AimPart].Position +
[Link][getgenv().AimPart].Velocity/PredictionVelocity)
elseif getgenv().PredictMovement == false then
[Link] = CF([Link].p,
[Link][getgenv().AimPart].Position)
end
end
end
end
end
end)