-- LocalScript: Aimbot Panel (Head Precise Lock) + Directional Offset Controls (holdable) -- Client-only. Update: directional offset (up/down/left/right) with smooth hold. local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera -- GUI SETUP (reuse layout from provided script) local playerGui = LocalPlayer:WaitForChild("PlayerGui") local screenGui = Instance.new("ScreenGui") screenGui.Name = "AimbotPanelGui" screenGui.IgnoreGuiInset = true screenGui.ResetOnSpawn = false screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling screenGui.Parent = playerGui local main = Instance.new("Frame") main.Size = UDim2.new(0, 300, 0, 260) -- slightly taller to fit direction buttons main.Position = UDim2.new(0.05, 0, 0.3, 0) main.BackgroundColor3 = Color3.fromRGB(20, 20, 20) main.BorderSizePixel = 0 main.Active = true main.Draggable = true main.Parent = screenGui Instance.new("UICorner", main).CornerRadius = UDim.new(0, 10) local header = Instance.new("Frame", main) header.Size = UDim2.new(1, 0, 0, 34) header.BackgroundTransparency = 1 local title = Instance.new("TextLabel", header) title.Size = UDim2.new(1, -40, 1, 0) title.Position = UDim2.new(0, 8, 0, 0) title.Text = "Aimbot Panel" title.TextColor3 = Color3.new(1, 1, 1) title.Font = Enum.Font.GothamBold title.TextSize = 16 title.BackgroundTransparency = 1 title.TextXAlignment = Enum.TextXAlignment.Left local btnMin = Instance.new("TextButton", header) btnMin.Size = UDim2.new(0, 28, 0, 28) btnMin.Position = UDim2.new(1, -36, 0, 3) btnMin.Text = "-" btnMin.Font = Enum.Font.GothamBold btnMin.TextSize = 18 btnMin.TextColor3 = Color3.new(1, 1, 1) btnMin.BackgroundColor3 = Color3.fromRGB(120, 0, 0) btnMin.BorderSizePixel = 0 local body = Instance.new("Frame", main) body.Size = UDim2.new(1, -16, 1, -46) body.Position = UDim2.new(0, 8, 0, 36) body.BackgroundTransparency = 1 -- SEARCH BAR (same as before) local searchBox = Instance.new("TextBox", body) searchBox.Size = UDim2.new(0.75, -6, 0, 26) searchBox.PlaceholderText = "Search player..." searchBox.Font = Enum.Font.Gotham searchBox.TextSize = 14 searchBox.TextColor3 = Color3.new(1, 1, 1) searchBox.BackgroundColor3 = Color3.fromRGB(35, 35, 35) searchBox.BorderSizePixel = 0 Instance.new("UICorner", searchBox).CornerRadius = UDim.new(0, 6) local clearBtn = Instance.new("TextButton", body) clearBtn.Size = UDim2.new(0.25, -6, 0, 26) clearBtn.Position = UDim2.new(0.75, 6, 0, 0) clearBtn.Text = "X" clearBtn.Font = Enum.Font.GothamBold clearBtn.TextSize = 16 clearBtn.TextColor3 = Color3.new(1, 1, 1) clearBtn.BackgroundColor3 = Color3.fromRGB(150, 0, 0) clearBtn.BorderSizePixel = 0 Instance.new("UICorner", clearBtn).CornerRadius = UDim.new(0, 6) -- PLAYER LIST local scroll = Instance.new("ScrollingFrame", body) scroll.Size = UDim2.new(1, 0, 0, 96) scroll.Position = UDim2.new(0, 0, 0, 34) scroll.BackgroundColor3 = Color3.fromRGB(30, 30, 30) scroll.ScrollBarThickness = 6 scroll.BorderSizePixel = 0 scroll.CanvasSize = UDim2.new(0, 0, 0, 0) local listLayout = Instance.new("UIListLayout", scroll) listLayout.Padding = UDim.new(0, 6) listLayout.SortOrder = Enum.SortOrder.LayoutOrder Instance.new("UIPadding", scroll).PaddingTop = UDim.new(0, 6) -- LABEL + TOGGLE local targetLabel = Instance.new("TextLabel", body) targetLabel.Size = UDim2.new(1, 0, 0, 20) targetLabel.Position = UDim2.new(0, 0, 0, 138) targetLabel.Text = "Target: None" targetLabel.Font = Enum.Font.Gotham targetLabel.TextSize = 14 targetLabel.TextColor3 = Color3.fromRGB(200, 200, 200) targetLabel.BackgroundTransparency = 1 targetLabel.TextXAlignment = Enum.TextXAlignment.Left local aimbotBtn = Instance.new("TextButton", body) aimbotBtn.Size = UDim2.new(1, 0, 0, 28) aimbotBtn.Position = UDim2.new(0, 0, 0, 164) aimbotBtn.Text = "Aimbot: OFF" aimbotBtn.Font = Enum.Font.GothamBold aimbotBtn.TextSize = 14 aimbotBtn.TextColor3 = Color3.new(1, 1, 1) aimbotBtn.BackgroundColor3 = Color3.fromRGB(90, 0, 0) aimbotBtn.BorderSizePixel = 0 -- DIRECTIONAL BUTTONS (Up, Down, Left, Right) local dirFrame = Instance.new("Frame", body) dirFrame.Size = UDim2.new(1, 0, 0, 50) dirFrame.Position = UDim2.new(0, 0, 0, 196) dirFrame.BackgroundTransparency = 1 local btnUp = Instance.new("TextButton", dirFrame) btnUp.Size = UDim2.new(0, 60, 0, 28) btnUp.Position = UDim2.new(0.5, -30, 0, 0) btnUp.Text = "Up" btnUp.Font = Enum.Font.Gotham btnUp.TextSize = 14 btnUp.BackgroundColor3 = Color3.fromRGB(70,70,70) Instance.new("UICorner", btnUp).CornerRadius = UDim.new(0,6) local btnDown = Instance.new("TextButton", dirFrame) btnDown.Size = UDim2.new(0, 60, 0, 28) btnDown.Position = UDim2.new(0.5, -30, 0, 22) btnDown.Text = "Down" btnDown.Font = Enum.Font.Gotham btnDown.TextSize = 14 btnDown.BackgroundColor3 = Color3.fromRGB(70,70,70) Instance.new("UICorner", btnDown).CornerRadius = UDim.new(0,6) local btnLeft = Instance.new("TextButton", dirFrame) btnLeft.Size = UDim2.new(0, 60, 0, 28) btnLeft.Position = UDim2.new(0.25, -30, 0, 11) btnLeft.Text = "Left" btnLeft.Font = Enum.Font.Gotham btnLeft.TextSize = 14 btnLeft.BackgroundColor3 = Color3.fromRGB(70,70,70) Instance.new("UICorner", btnLeft).CornerRadius = UDim.new(0,6) local btnRight = Instance.new("TextButton", dirFrame) btnRight.Size = UDim2.new(0, 60, 0, 28) btnRight.Position = UDim2.new(0.75, -30, 0, 11) btnRight.Text = "Right" btnRight.Font = Enum.Font.Gotham btnRight.TextSize = 14 btnRight.BackgroundColor3 = Color3.fromRGB(70,70,70) Instance.new("UICorner", btnRight).CornerRadius = UDim.new(0,6) -- LOGIC VARS local selectedPlayer = nil local aimbotEnabled = false local minimized = false -- Offset system local offsetTarget = Vector2.new(0,0) -- x = right(+)/left(-), y = up(+)/down(-) local offsetCurrent = Vector2.new(0,0) local OFFSET_STEP_PER_SEC = 6 -- studs per second when holding local OFFSET_MAX = 8 -- max studs offset local SMOOTH_ALPHA = 0.16 -- lerp speed for smoothing (0-1) -- hold state for buttons local holding = { up = false, down = false, left = false, right = false } -- refresh list helpers (same behavior) local function updateCanvas() scroll.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 12) end listLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(updateCanvas) local function refreshPlayers(filter) for _, c in ipairs(scroll:GetChildren()) do if c:IsA("TextButton") then c:Destroy() end end local all = {} for _, pl in ipairs(Players:GetPlayers()) do if pl ~= LocalPlayer then table.insert(all, pl.Name) end end table.sort(all, function(a, b) return a:lower() < b:lower() end) for _, name in ipairs(all) do if not filter or name:lower():find(filter:lower()) then local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, -12, 0, 28) btn.BackgroundColor3 = Color3.fromRGB(50, 50, 50) btn.TextColor3 = Color3.fromRGB(230, 230, 230) btn.Font = Enum.Font.Gotham btn.TextSize = 14 btn.Text = name btn.Parent = scroll btn.MouseButton1Click:Connect(function() selectedPlayer = Players:FindFirstChild(name) targetLabel.Text = "Target: " .. name end) end end task.wait(0.05) updateCanvas() end refreshPlayers() searchBox:GetPropertyChangedSignal("Text"):Connect(function() refreshPlayers(searchBox.Text) end) clearBtn.MouseButton1Click:Connect(function() searchBox.Text = ""; refreshPlayers() end) Players.PlayerAdded:Connect(function() refreshPlayers(searchBox.Text) end) Players.PlayerRemoving:Connect(function() refreshPlayers(searchBox.Text) end) -- minimize btnMin.MouseButton1Click:Connect(function() minimized = not minimized for _, v in ipairs(body:GetChildren()) do v.Visible = not minimized end main.Size = minimized and UDim2.new(0, 300, 0, 34) or UDim2.new(0, 300, 0, 260) btnMin.Text = minimized and "+" or "-" end) -- aimbot toggle aimbotBtn.MouseButton1Click:Connect(function() aimbotEnabled = not aimbotEnabled aimbotBtn.Text = "Aimbot: " .. (aimbotEnabled and "ON" or "OFF") aimbotBtn.BackgroundColor3 = aimbotEnabled and Color3.fromRGB(0, 120, 0) or Color3.fromRGB(90, 0, 0) if not aimbotEnabled then -- reset offsets and restore camera offsetTarget = Vector2.new(0,0) offsetCurrent = Vector2.new(0,0) pcall(function() LocalPlayer.CameraMode = Enum.CameraMode.Classic Camera.CameraType = Enum.CameraType.Custom Camera.CameraSubject = LocalPlayer.Character and LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid") local hum = LocalPlayer.Character and LocalPlayer.Character:FindFirstChildOfClass("Humanoid") if hum then hum.AutoRotate = true end end) end end) -- directional button hold handlers (works with mouse/touch hold) local function setHoldState(dir, state) holding[dir] = state end btnUp.MouseButton1Down:Connect(function() setHoldState("up", true) end) btnUp.MouseButton1Up:Connect(function() setHoldState("up", false) end) btnUp.MouseLeave:Connect(function() setHoldState("up", false) end) btnDown.MouseButton1Down:Connect(function() setHoldState("down", true) end) btnDown.MouseButton1Up:Connect(function() setHoldState("down", false) end) btnDown.MouseLeave:Connect(function() setHoldState("down", false) end) btnLeft.MouseButton1Down:Connect(function() setHoldState("left", true) end) btnLeft.MouseButton1Up:Connect(function() setHoldState("left", false) end) btnLeft.MouseLeave:Connect(function() setHoldState("left", false) end) btnRight.MouseButton1Down:Connect(function() setHoldState("right", true) end) btnRight.MouseButton1Up:Connect(function() setHoldState("right", false) end) btnRight.MouseLeave:Connect(function() setHoldState("right", false) end) -- also support keyboard arrows and WASD hold UserInputService.InputBegan:Connect(function(inp, gameProcessed) if gameProcessed then return end if inp.KeyCode == Enum.KeyCode.Up or inp.KeyCode == Enum.KeyCode.W then setHoldState("up", true) end if inp.KeyCode == Enum.KeyCode.Down or inp.KeyCode == Enum.KeyCode.S then setHoldState("down", true) end if inp.KeyCode == Enum.KeyCode.Left or inp.KeyCode == Enum.KeyCode.A then setHoldState("left", true) end if inp.KeyCode == Enum.KeyCode.Right or inp.KeyCode == Enum.KeyCode.D then setHoldState("right", true) end end) UserInputService.InputEnded:Connect(function(inp, gameProcessed) if inp.KeyCode == Enum.KeyCode.Up or inp.KeyCode == Enum.KeyCode.W then setHoldState("up", false) end if inp.KeyCode == Enum.KeyCode.Down or inp.KeyCode == Enum.KeyCode.S then setHoldState("down", false) end if inp.KeyCode == Enum.KeyCode.Left or inp.KeyCode == Enum.KeyCode.A then setHoldState("left", false) end if inp.KeyCode == Enum.KeyCode.Right or inp.KeyCode == Enum.KeyCode.D then setHoldState("right", false) end end) -- main aimbot loop with offset smoothing and application RunService.RenderStepped:Connect(function(dt) -- update offsetTarget according to hold if aimbotEnabled then local dx, dy = 0, 0 if holding.right then dx = dx + OFFSET_STEP_PER_SEC * dt end if holding.left then dx = dx - OFFSET_STEP_PER_SEC * dt end if holding.up then dy = dy + OFFSET_STEP_PER_SEC * dt end if holding.down then dy = dy - OFFSET_STEP_PER_SEC * dt end if dx ~= 0 or dy ~= 0 then offsetTarget = Vector2.new( math.clamp(offsetTarget.X + dx, -OFFSET_MAX, OFFSET_MAX), math.clamp(offsetTarget.Y + dy, -OFFSET_MAX, OFFSET_MAX) ) end else -- if not enabled, ensure offsets move back to zero smoothly offsetTarget = offsetTarget:Lerp(Vector2.new(0,0), math.min(1, dt * 6)) end -- smooth current offset toward target offsetCurrent = offsetCurrent:Lerp(offsetTarget, SMOOTH_ALPHA) -- aimbot behavior if aimbotEnabled and selectedPlayer then local targetChar = selectedPlayer.Character local localChar = LocalPlayer.Character if targetChar and localChar then local targetHead = targetChar:FindFirstChild("Head") local hrpLocal = localChar:FindFirstChild("HumanoidRootPart") local humanoid = localChar:FindFirstChildOfClass("Humanoid") if targetHead and hrpLocal and humanoid then -- lock first person and disable autorotate LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson humanoid.AutoRotate = false -- compute aim position = head + camera-right * offsetX + camera-up * offsetY local camPos = Camera.CFrame.Position local camRight = Camera.CFrame.RightVector local camUp = Camera.CFrame.UpVector local aimPos = targetHead.Position + (camRight * offsetCurrent.X) + (camUp * offsetCurrent.Y) -- set camera toward aimPos precisely local camDir = (aimPos - camPos).Unit Camera.CFrame = CFrame.new(camPos, camPos + camDir) -- rotate body to face horizontal component of aimPos local horizontalDir = Vector3.new((aimPos - hrpLocal.Position).X, 0, (aimPos - hrpLocal.Position).Z) if horizontalDir.Magnitude > 0.001 then hrpLocal.CFrame = CFrame.new(hrpLocal.Position, hrpLocal.Position + horizontalDir.Unit) end end end end end) -- cleanup on disable/respawn LocalPlayer.CharacterAdded:Connect(function(char) task.delay(0.5, function() pcall(function() local hum = char:FindFirstChildOfClass("Humanoid") if hum then hum.AutoRotate = true end LocalPlayer.CameraMode = Enum.CameraMode.Classic Camera.CameraType = Enum.CameraType.Custom Camera.CameraSubject = char:FindFirstChildWhichIsA("Humanoid") or Camera.CameraSubject end) end) end)