0% found this document useful (0 votes)
520 views3 pages

Auto Aim Script for Roblox Players

Uploaded by

johnnybravoo1127
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
520 views3 pages

Auto Aim Script for Roblox Players

Uploaded by

johnnybravoo1127
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

-- Services

local Players = game:GetService("Players")


local RunService = game:GetService("RunService")
local LocalPlayer = [Link]
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

-- GUI Setup
local screenGui = [Link]("ScreenGui")
[Link] = "AutoAimUI"
[Link] = false
[Link] = PlayerGui

local toggleButton = [Link]("TextButton")


[Link] = [Link](0, 120, 0, 30)
[Link] = [Link](0, 20, 0, 100)
toggleButton.BackgroundColor3 = [Link](35, 35, 35)
toggleButton.TextColor3 = [Link](1, 1, 1)
[Link] = "Auto Aim: OFF"
[Link] = screenGui

local predictionBox = [Link]("TextBox")


[Link] = [Link](0, 120, 0, 30)
[Link] = [Link](0, 20, 0, 140)
predictionBox.BackgroundColor3 = [Link](50, 50, 50)
predictionBox.TextColor3 = [Link](1, 1, 1)
[Link] = "4"
[Link] = "Prediction (Put a number)"
[Link] = false
[Link] = screenGui

-- Config
local active = false
local aimDuration = 1.7
local aimTargets = { "Jason", "c00lkidd", "JohnDoe", "1x1x1x1", "Noli" }
local trackedAnimations = {
["103601716322988"] = true,
["133491532453922"] = true,
["86371356500204"] = true,
["76649505662612"] = true,
["81698196845041"] = true
}

-- State
local Humanoid, HRP = nil, nil
local lastTriggerTime = 0
local aiming = false
local originalWS, originalJP, originalAutoRotate = nil, nil, nil

toggleButton.MouseButton1Click:Connect(function()
active = not active
[Link] = active and "Auto Aim: ON" or "Auto Aim: OFF"
end)

local function getValidTarget()


local killersFolder = workspace:FindFirstChild("Players") and
[Link]:FindFirstChild("Killers")
if killersFolder then
for _, name in ipairs(aimTargets) do
local target = killersFolder:FindFirstChild(name)
if target and target:FindFirstChild("HumanoidRootPart") then
return [Link]
end
end
end
return nil
end

local function getPlayingAnimationIds()


local ids = {}
if Humanoid then
for _, track in ipairs(Humanoid:GetPlayingAnimationTracks()) do
if [Link] and [Link] then
local id = [Link]:match("%d+")
if id then
ids[id] = true
end
end
end
end
return ids
end

local function setupCharacter(char)


Humanoid = char:WaitForChild("Humanoid")
HRP = char:WaitForChild("HumanoidRootPart")
end

if [Link] then
setupCharacter([Link])
end
[Link]:Connect(setupCharacter)

[Link]:Connect(function()
if not active or not Humanoid or not HRP then return end

local playing = getPlayingAnimationIds()


local triggered = false
for id in pairs(trackedAnimations) do
if playing[id] then
triggered = true
break
end
end

if triggered then
lastTriggerTime = tick()
aiming = true
end

if aiming and tick() - lastTriggerTime <= aimDuration then


if not originalWS then
originalWS = [Link]
originalJP = [Link]
originalAutoRotate = [Link]
end

-- Freeze but keep upright


[Link] = false
[Link] = [Link]

local targetHRP = getValidTarget()


if targetHRP then
local prediction = tonumber([Link]) or 0
local predictedPos = [Link] + ([Link]
* prediction)
local direction = (predictedPos - [Link]).Unit
local yRot = math.atan2(-direction.X, -direction.Z)
[Link] = [Link]([Link]) * [Link](0, yRot, 0)
end
elseif aiming then
aiming = false
if originalWS and originalJP and originalAutoRotate ~= nil then
[Link] = originalWS
[Link] = originalJP
[Link] = originalAutoRotate
originalWS, originalJP, originalAutoRotate = nil, nil, nil
end
end
end)

You might also like