message 2
message 2
message 2
AimLock = {
Enabled = false,
Aimlockkey = "q",
Prediction = 0.132534124,
Aimpart = 'HumanoidRootPart',
Notifications = true
},
Settings = {
Thickness = 2.85,
Transparency = 1,
Color = Color3.fromRGB(0, 2, 185),
FOV = false
}
local Plr
Mouse.KeyDown:Connect(function(KeyPressed)
if KeyPressed == (Settings.AimLock.Aimlockkey) then
if Settings.AimLock.Enabled == true then
Settings.AimLock.Enabled = false
if Settings.AimLock.Notifications == true then
Plr = FindClosestPlayer()
game.StarterGui:SetCore("SendNotification", {
Title = "Slammy's Private",
Text = "Unlocked"
})
end
else
Plr = FindClosestPlayer()
Settings.AimLock.Enabled = true
if Settings.AimLock.Notifications == true then
game.StarterGui:SetCore("SendNotification", {
Title = "Slammy's Private",
Text = "Locked On : " ..
tostring(Plr.Character.Humanoid.DisplayName)
})
end
end
end
end)
function FindClosestPlayer()
local ClosestDistance, ClosestPlayer = math.huge, nil;
for _, Player in next, game:GetService("Players"):GetPlayers() do
local ISNTKNOCKED = Player.Character:WaitForChild("BodyEffects")
["K.O"].Value ~= true
local ISNTGRABBED = Player.Character:FindFirstChild("GRABBING_COINSTRAINT")
== nil
.Position)
if IsVisibleOnViewPort then
local Distance = (Vector2.new(Mouse.X, Mouse.Y) -
Vector2.new(Position.X, Position.Y)).Magnitude
if Distance < ClosestDistance then
ClosestPlayer = Player
ClosestDistance = Distance
end
end
end
end
end
return ClosestPlayer, ClosestDistance
end
RunService.Heartbeat:connect(function()
if Settings.AimLock.Enabled == true then
local Vector =
CurrentCamera:WorldToViewportPoint(Plr.Character[Settings.AimLock.Aimpart].Position
+
(Plr.Character[Settings.AimLock.Aimpart].Velocity *
Settings.AimLock.Prediction))
Line.Color = Settings.Settings.Color
Line.Transparency = Settings.Settings .Transparency
Line.Thickness = Settings.Settings .Thickness
Line.From = Vector2.new(Mouse.X, Mouse.Y + Inset)
Line.To = Vector2.new(Vector.X, Vector.Y)
Line.Visible = true
Circle.Position = Vector2.new(Mouse.X, Mouse.Y + Inset)
Circle.Visible = Settings.Settings.FOV
Circle.Thickness = 1.5
Circle.Thickness = 2
Circle.Radius = 20
Circle.Color = Settings.Settings.Color
elseif Settings.AimLock.FOV == true then
Circle.Visible = true
else
Circle.Visible = false
Line.Visible = false
end
end)
local mt = getrawmetatable(game)
local old = mt.__namecall
setreadonly(mt, false)
mt.__namecall = newcclosure(function(...)
local args = {...}
if Settings.AimLock.Enabled and getnamecallmethod() == "FireServer" and args[2]
== "UpdateMousePos" then
args[3] = Plr.Character[Settings.AimLock.Aimpart].Position +
(Plr.Character[Settings.AimLock.Aimpart].Velocity *
Settings.AimLock.Prediction)
return old(unpack(args))
end
return old(...)
end)