Thanks to visit codestin.com
Credit goes to www.scribd.com

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

Script

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)
47 views3 pages

Script

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
You are on page 1/ 3

-- Services

local Players = game:GetService("Players")


local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

-- GUI Setup
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "AutoAimUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = PlayerGui

local toggleButton = Instance.new("TextButton")


toggleButton.Size = UDim2.new(0, 120, 0, 30)
toggleButton.Position = UDim2.new(0, 20, 0, 100)
toggleButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
toggleButton.TextColor3 = Color3.new(1, 1, 1)
toggleButton.Text = "Auto Aim: OFF"
toggleButton.Parent = screenGui

local predictionBox = Instance.new("TextBox")


predictionBox.Size = UDim2.new(0, 120, 0, 30)
predictionBox.Position = UDim2.new(0, 20, 0, 140)
predictionBox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
predictionBox.TextColor3 = Color3.new(1, 1, 1)
predictionBox.Text = "4"
predictionBox.PlaceholderText = "Prediction (Put a number)"
predictionBox.ClearTextOnFocus = false
predictionBox.Parent = 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
toggleButton.Text = active and "Auto Aim: ON" or "Auto Aim: OFF"
end)

local function getValidTarget()


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

local function getPlayingAnimationIds()


local ids = {}
if Humanoid then
for _, track in ipairs(Humanoid:GetPlayingAnimationTracks()) do
if track.Animation and track.Animation.AnimationId then
local id = track.Animation.AnimationId: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 LocalPlayer.Character then
setupCharacter(LocalPlayer.Character)
end
LocalPlayer.CharacterAdded:Connect(setupCharacter)

RunService.RenderStepped: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 = Humanoid.WalkSpeed
originalJP = Humanoid.JumpPower
originalAutoRotate = Humanoid.AutoRotate
end

-- Freeze but keep upright


Humanoid.AutoRotate = false
HRP.AssemblyAngularVelocity = Vector3.zero

local targetHRP = getValidTarget()


if targetHRP then
local prediction = tonumber(predictionBox.Text) or 0
local predictedPos = targetHRP.Position + (targetHRP.CFrame.LookVector
* prediction)
local direction = (predictedPos - HRP.Position).Unit
local yRot = math.atan2(-direction.X, -direction.Z)
HRP.CFrame = CFrame.new(HRP.Position) * CFrame.Angles(0, yRot, 0)
end
elseif aiming then
aiming = false
if originalWS and originalJP and originalAutoRotate ~= nil then
Humanoid.WalkSpeed = originalWS
Humanoid.JumpPower = originalJP
Humanoid.AutoRotate = originalAutoRotate
originalWS, originalJP, originalAutoRotate = nil, nil, nil
end
end
end)

You might also like