Script For Aimlock Roblox
Script For Aimlock Roblox
Script For Aimlock Roblox
dnss = {
SilentAim = {
["Enabled"] = true, -- // Auto closest point and Auto resolver
["ToggleKey"] = "C",
["Prediction"] = 0.133
},
AntiGroundShots = {
["Enabled"] = true,
["TakeOff"] = 0.5
},
Checks = {
["wallCheck"] = true,
["KOCheck"] = true,
["GrabbedCheck"] = true,
["CrewCheck"] = false
},
MemSpoofer = {
["Enabled"] = false,
["Start"] = 800,
["End"] = 900
},
Misc = {
["AntiCurve"] = false,
["AutoPrediction"] = false -- // Based off your normal Prediction
},
Macro = {
["Enabled"] = false,
["Type"] = "Mouse", -- // Mouse or Keyboard
["Key"] = "Z",
["Speed"] = 1,
},
FOV = {
["Enabled"] = true,
["Filled"] = false,
["Size"] = 50,
["Color"] = Color3.fromRGB(255, 255, 255),
["Transparency"] = 1,
["Thickness"] = 1
}
}
-- // cache
local Circle = Drawing.new("Circle")
local rPoint
local localPlayer = game.Players.LocalPlayer
local mouse = localPlayer:GetMouse()
local mousePos = mouse.hit.p
local playersService = game:GetService("Players")
local workspaceCam = workspace.CurrentCamera;
local CFramelookat = CFrame.lookAt
local v3 = Vector3.new
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local SpeedGlitch = false
Circle.Transparency = dnss.FOV.Transparency
Circle.Radius = dnss.FOV.Size * 3
Circle.Visible = dnss.FOV.Enabled
Circle.Color = dnss.FOV.Color
Circle.Thickness = dnss.FOV.Thickness
Circle.Filled = dnss.FOV.Filled
local positionData = {}
local velocityCache = {}
local smoothingFactor = 30
local smoothingFactorMax = 100
local prevVelocity = Vector3.new()
pcall(function()
local spoofer, updating = false
local performanceStats =
game:GetService('CoreGui').RobloxGui.PerformanceStats
local function updateChildNames()
for i, v in ipairs(performanceStats:GetChildren()) do
v.Name = i
end
end
local function updateValueLabelText()
if dnss.MemSpoofer.Enabled and not updating then
updating = true
spoofer = string.format('%d.%dMB', math.random(MemSpoofer.Start,
MemSpoofer.End), math.random(10, 99))
performanceStats['1'].StatsMiniTextPanelClass.ValueLabel.Text =
spoofer
updating = false
end
end
local function onDataChange()
updateChildNames()
updateValueLabelText()
end
updateChildNames()
performanceStats['1'].StatsMiniTextPanelClass.ValueLabel:GetPropertyChangedSignal('
Text'):Connect(onDataChange)
end)
function KnockedCheck(_)
if _.Character.BodyEffects["K.O"] and dnss.Checks.KOCheck then
return _.Character.BodyEffects["K.O"].Value ~= true
end
end
function GrabbedCheck(_)
if dnss.Checks.GrabbedCheck then
return not _.Character:FindFirstChild("GRABBING_CONSTRAINT")
end
end
function getClosestPart(Target)
if Target and Target:GetChildren() then
local closestpart, closdist = nil, math.huge
local camera = workspace.CurrentCamera
local mousepos = game.Players.LocalPlayer:GetMouse()
local circleRadius = Circle.Radius
local children = Target:GetChildren()
local i = 1
while i <= #children do
local child = children[i]
if child:IsA("BasePart") then
local them, vis = camera:WorldToScreenPoint(child.Position)
local magnitude = (Vector2.new(them.X, them.Y) -
Vector2.new(mousepos.X, mousepos.Y)).magnitude
if vis and circleRadius > magnitude and magnitude <
closdist then
closestpart, closdist = child, magnitude
end
end
i = i + 1
end
return closestpart
end
end
function cls(target)
local SelectedPart = getClosestPart(self.Character)
if SelectedPart then
local MouseHit = game.Players.LocalPlayer:GetMouse().hit
return closestPointOnPart(SelectedPart, MouseHit.p)
end
end
function getClosestPlayer()
local closestPlayer, closestDistance = nil, 1 / 0
local camera = workspace.CurrentCamera
local localPlayer = game.Players.LocalPlayer
local mouse = localPlayer:GetMouse()
local mousePos = mouse.hit.p
local players = game:GetService("Players"):GetPlayers()
-- Define or pass variables for the following functions
local knockedCheck = KnockedCheck
local grabbedCheck = GrabbedCheck
local wallCheck = wallCheck
local isSameCrew = isSameCrew
local i = 1
while i <= #players do
local player = players[i]
if player ~= localPlayer and player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
local rootPart = player.Character.HumanoidRootPart
local OnScreen = camera:WorldToViewportPoint(rootPart.Position)
local distance = (rootPart.Position - mousePos).magnitude
if distance < closestDistance
and knockedCheck(player)
and grabbedCheck(player)
and OnScreen
and wallCheck(rootPart.Position, { localPlayer,
player.Character })
and not isSameCrew(localPlayer, player) then
closestPlayer = player
closestDistance = distance
end
end
i = i + 1
end
return closestPlayer
end
function isAnti()
local calculateVelocityAverage = smoothVelocity(self.Character)
return self.Character.HumanoidRootPart.Velocity.Magnitude > 50 and
calculateVelocityAverage * dnss.SilentAim.Prediction or
self.Character.HumanoidRootPart.Velocity * dnss.SilentAim.Prediction
end
function AntiCurve()
local character = game.Players.LocalPlayer.Character
if dnss.Misc.AntiCurve and character and character.PrimaryPart then
local characterCf = character.PrimaryPart.CFrame
local target = self.Character.HumanoidRootPart
local targetPos = target.Position
local charPos = character.PrimaryPart.Position
character:SetPrimaryPartCFrame(CFrame.lookAt(charPos, v3(targetPos.X,
charPos.Y, targetPos.Z)))
wait()
character:SetPrimaryPartCFrame(characterCf)
end
end
game.RunService.Heartbeat:Connect(function()
local vector2Pos = game:GetService("UserInputService"):GetMouseLocation()
Circle.Position = Vector2.new(vector2Pos.X, vector2Pos.Y)
AntiCurve()
AntiGroundShots()
getPingBasedPrediction()
if dnss.SilentAim.Enabled then
self = getClosestPlayer()
if self then
rPoint = cls(self.Character)
getgenv().Result = getClosestPart(self.Character)
else
rPoint = nil
getgenv().Result = nil
end
else
rPoint = nil
end
end)
Mouse.KeyDown:Connect(processInput)
local __index
__index = hookmetamethod(game, "__index", function(t, k)
if t:IsA("Mouse") and k == "Hit" or k == "Target" then
if self ~= nil and Result ~= nil and rPoint then
local Hit = CFrame.new(rPoint) + isAnti()
return (k == "Hit" and Hit)
end
end
return __index(t, k)
end)