Run it
Copy the script and paste it into your executor.
aimlockEnabled =
maxDistance =
buttonSize = .(, , , )
buttonPosition = .(, , , )
screenGui = .()
screenGui.Name =
screenGui.Parent = :()
aimButton = .()
aimButton.Name =
aimButton.Size = buttonSize
aimButton.Position = buttonPosition
aimButton.BackgroundColor3 = .(, , )
aimButton.TextColor3 = .(, , )
aimButton.Text =
aimButton.Font = .Font.SourceSansBold
aimButton.TextSize =
aimButton.BorderSizePixel =
aimButton.BorderColor3 = .(, , )
aimButton.Active =
aimButton.Draggable =
aimButton.Parent = screenGui
dragging =
dragInput, dragStart, startPos
()
closestPlayer =
closestDistance = maxDistance
_, player (:():())
player ~= :().LocalPlayer player.Character
humanoidRootPart = player.Character:()
head = player.Character:()
humanoidRootPart head
distance = (:().LocalPlayer.Character.HumanoidRootPart.Position - humanoidRootPart.Position).Magnitude
distance <= closestDistance
closestDistance = distance
closestPlayer = player
closestPlayer
()
aimlockEnabled
nearestPlayer = ()
nearestPlayer nearestPlayer.Character
head = nearestPlayer.Character:()
head
camera = .CurrentCamera
camera
camera.CFrame = .(camera.CFrame.Position, head.Position)
aimButton.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
dragStart = input.Position
startPos = aimButton.Position
input.Changed:(()
input.UserInputState == .UserInputState.End
dragging =
)
)
aimButton.InputChanged:((input)
input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch
dragInput = input
)
aimButton.InputEnded:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
)
:().InputChanged:((input)
dragging (input == dragInput)
delta = input.Position - dragStart
aimButton.Position = .(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y
)
)
aimButton.MouseButton1Click:(()
aimlockEnabled = aimlockEnabled
aimlockEnabled
aimButton.BackgroundColor3 = .(, , )
aimButton.Text =
aimButton.BackgroundColor3 = .(, , )
aimButton.Text =
)
aimlockEnabled
(aimlock)
()
AIMLOCK

Universal