Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
ContextActionService = :()
UserInputService = :()
Workspace = :()
LocalPlayer = Players.LocalPlayer
Camera = Workspace.CurrentCamera
Config = {
TargetLock = ,
WallCheck = ,
FOV = ,
TrackingSpeed = ,
AimKeybind = .KeyCode.E,
SwitchKeybind = .KeyCode.Q,
UIToggleKeybind = .KeyCode.RightShift
}
isAiming =
currentTarget =
ScreenGui = .()
ScreenGui.Name =
ScreenGui.ResetOnSpawn =
ScreenGui.Parent = LocalPlayer:()
FOVCircle = .()
FOVCircle.Name =
FOVCircle.AnchorPoint = .(, )
FOVCircle.Position = .(, , , )
FOVCircle.Size = .(, Config.FOV * , , Config.FOV * )
FOVCircle.BackgroundTransparency =
FOVCircle.Parent = ScreenGui
FOVCorner = .()
FOVCorner.CornerRadius = .(, )
FOVCorner.Parent = FOVCircle
FOVStroke = .()
FOVStroke.Color = .(, , )
FOVStroke.Thickness =
FOVStroke.Transparency =
FOVStroke.Parent = FOVCircle
OpenCloseBtn = .()
OpenCloseBtn.Size = .(, , , )
OpenCloseBtn.Position = .(, , , )
OpenCloseBtn.BackgroundColor3 = .(, , )
OpenCloseBtn.Text =
OpenCloseBtn.TextColor3 = .(, , )
OpenCloseBtn.Font = .Font.GothamBold
OpenCloseBtn.TextSize =
.(, OpenCloseBtn).CornerRadius = .(, )
OpenCloseBtn.Parent = ScreenGui
MainFrame = .()
MainFrame.Size = .(, , , )
MainFrame.Position = .(, , , )
MainFrame.BackgroundColor3 = .(, , )
MainFrame.BorderSizePixel =
MainFrame.Active =
MainFrame.Parent = ScreenGui
UICorner = .()
UICorner.CornerRadius = .(, )
UICorner.Parent = MainFrame
Title = .()
Title.Size = .(, , , )
Title.BackgroundTransparency =
Title.Text =
Title.TextColor3 = .(, , )
Title.Font = .Font.GothamBold
Title.TextSize =
Title.Parent = MainFrame
UIListLayout = .()
UIListLayout.Parent = MainFrame
UIListLayout.SortOrder = .SortOrder.LayoutOrder
UIListLayout.Padding = .(, )
UIListLayout.HorizontalAlignment = .HorizontalAlignment.Center
OpenCloseBtn.MouseButton1Click:(()
MainFrame.Visible = MainFrame.Visible
)
dragging, dragInput, dragStart, startPos
MainFrame.InputBegan:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
dragging =
dragStart = input.Position
startPos = MainFrame.Position
input.Changed:(()
input.UserInputState == .UserInputState.End dragging =
)
)
MainFrame.InputChanged:((input)
input.UserInputType == .UserInputType.MouseMovement input.UserInputType == .UserInputType.Touch dragInput = input
)
UserInputService.InputChanged:((input)
input == dragInput dragging
delta = input.Position - dragStart
MainFrame.Position = .(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
)
(name, defaultState, callback)
Btn = .()
Btn.Size = .(, , , )
Btn.BackgroundColor3 = defaultState .(, , ) .(, , )
Btn.Text = name .. .. (defaultState )
Btn.TextColor3 = .(, , )
Btn.Font = .Font.GothamSemibold
Btn.TextSize =
.(, Btn).CornerRadius = .(, )
Btn.Parent = MainFrame
state = defaultState
Btn.MouseButton1Click:(()
state = state
Btn.BackgroundColor3 = state .(, , ) .(, , )
Btn.Text = name .. .. (state )
(state)
)
(name, defaultVal, callback)
Frame = .()
Frame.Size = .(, , , )
Frame.BackgroundTransparency =
Frame.Parent = MainFrame
Label = .()
Label.Size = .(, , , )
Label.BackgroundTransparency =
Label.Text = name
Label.TextColor3 = .(, , )
Label.Font = .Font.Gotham
Label.TextSize =
Label.TextXAlignment = .TextXAlignment.Left
Label.Parent = Frame
TextBox = .()
TextBox.Size = .(, , , )
TextBox.Position = .(, , , )
TextBox.BackgroundColor3 = .(, , )
TextBox.TextColor3 = .(, , )
TextBox.Text = (defaultVal)
TextBox.Font = .Font.Gotham
TextBox.TextSize =
.(, TextBox).CornerRadius = .(, )
TextBox.Parent = Frame
TextBox.FocusLost:(()
(TextBox.Text)
)
TitlePadding = .()
TitlePadding.Size = .(,,,)
TitlePadding.BackgroundTransparency =
TitlePadding.Parent = MainFrame
(, Config.TargetLock, (val) Config.TargetLock = val )
(, Config.WallCheck, (val) Config.WallCheck = val )
(, Config.FOV, (val)
newFOV = (val) Config.FOV
Config.FOV = newFOV
FOVCircle.Size = .(, newFOV * , , newFOV * )
)
(, Config.TrackingSpeed, (val)
Config.TrackingSpeed = .((val) Config.TrackingSpeed, , )
)
(origin, direction, targetChar, ignoreList, depth)
depth >
rayParams = RaycastParams.()
rayParams.FilterDescendantsInstances = ignoreList
rayParams.FilterType = .RaycastFilterType.Exclude
rayParams.IgnoreWater =
result = Workspace:(origin, direction, rayParams)
result
result.Instance:(targetChar)
result.Instance.Transparency >= result.Instance.CanCollide result.Instance.Name ==
.(ignoreList, result.Instance)
(origin, direction, targetChar, ignoreList, depth + )
(targetChar)
Config.WallCheck
targetPart = targetChar:() targetChar:()
targetPart
origin = Camera.CFrame.Position
direction = targetPart.Position - origin
ignoreList = {}
LocalPlayer.Character
.(ignoreList, LocalPlayer.Character)
(origin, direction, targetChar, ignoreList, )
(excludeTarget)
closestPlayer =
shortestDistance = Config.FOV
screenCenter = .(Camera.ViewportSize.X / , Camera.ViewportSize.Y / )
_, player (Players:())
player ~= LocalPlayer player.Character
targetPart = player.Character:() player.Character:()
humanoid = player.Character:()
targetPart humanoid humanoid.Health > player.Character ~= excludeTarget
screenPoint, onScreen = Camera:(targetPart.Position)
onScreen
distance = (.(screenPoint.X, screenPoint.Y) - screenCenter).Magnitude
distance <= shortestDistance
(player.Character)
shortestDistance = distance
closestPlayer = player.Character
closestPlayer
ContextActionService:(, (actionName, inputState)
inputState == .UserInputState.Begin
isAiming = isAiming
isAiming
FOVStroke.Color = .(, , )
currentTarget =
FOVStroke.Color = .(, , )
, , Config.AimKeybind)
ContextActionService:(, )
ContextActionService:(, .(, , , ))
ContextActionService:(, (actionName, inputState)
inputState == .UserInputState.Begin isAiming
newTarget = (currentTarget)
newTarget currentTarget = newTarget
, , Config.SwitchKeybind)
ContextActionService:(, )
ContextActionService:(, .(, , , ))
ContextActionService:(, (actionName, inputState)
inputState == .UserInputState.Begin
MainFrame.Visible = MainFrame.Visible
, , Config.UIToggleKeybind)
RunService:(, .RenderPriority.Camera.Value + , ()
Config.TargetLock isAiming
currentTarget
targetPart = currentTarget:() currentTarget:()
humanoid = currentTarget:()
targetPart humanoid humanoid.Health <=
currentTarget =
Config.WallCheck (currentTarget)
currentTarget =
screenPoint, onScreen = Camera:(targetPart.Position)
screenCenter = .(Camera.ViewportSize.X / , Camera.ViewportSize.Y / )
distance = (.(screenPoint.X, screenPoint.Y) - screenCenter).Magnitude
onScreen distance > Config.FOV
currentTarget =
currentTarget
currentTarget = ()
currentTarget
targetPart = currentTarget:() currentTarget:()
targetCFrame = .(Camera.CFrame.Position, targetPart.Position)
Camera.CFrame = Camera.CFrame:(targetCFrame, Config.TrackingSpeed)
)
Description: This is an optimized, cross-platform aim-lock script for Roblox. It features a draggable GUI, a dynamic FOV visualizer, and an advanced wall-check that ignores invisible barriers and glass to keep your lock perfectly secure. Key Features: * PC & Mobile Support: Automatically adds on-screen buttons for touch devices. * Smart Wall Check: Pierces through invisible/non-solid walls, only breaking the lock on true solid objects. * Dynamic FOV Circle: Visual indicator that turns from Red (Idle) to Green (Locked). * Auto-Retargeting: Automatically drops dead or hidden targets and snaps to the next closest enemy. * Smooth Camera Tracking: Fully adjustable aim speed (from smooth human-like assist to instant snap). * Draggable Menu: Clean dark-mode UI that can be moved around the screen. Settings update in real-time. Controls: * Aim Lock: Press E (PC) or the "Aim" screen button (Mobile). * Switch Target: Press Q (PC) or the "Switch" screen button (Mobile). * Toggle Menu: Press Right Shift (PC) or the "Menu" screen button (Mobile). Menu Settings: * Target Lock: Toggle the main aiming system ON or OFF. * Wall Check: Toggle whether the aim breaks when enemies go behind walls. *

Universal