-- Pat's Aimbot and ESP for Counter Blox -- Insert = Toggle GUI -- Right Mouse Button = Aimbot (snap) local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local LocalPlayer = Players.LocalPlayer local Camera = workspace.CurrentCamera local Mouse = LocalPlayer:GetMouse() -- Toggles local espBoxes = false local espChams = false local aimbot = false local aiming = false -- GUI local gui = Instance.new("ScreenGui") gui.Name = "PatsAimbotAndESP" gui.ResetOnSpawn = false gui.Parent = game.CoreGui local frame = Instance.new("Frame", gui) frame.Size = UDim2.new(0, 280, 0, 260) frame.Position = UDim2.new(0.5, -140, 0.5, -130) frame.BackgroundColor3 = Color3.fromRGB(25,25,25) frame.BorderSizePixel = 0 frame.Active = true frame.Draggable = true local title = Instance.new("TextLabel", frame) title.Size = UDim2.new(1,0,0,40) title.BackgroundTransparency = 1 title.Text = "Pat's Aimbot & ESP\n(Counter Blox)" title.TextColor3 = Color3.new(1,1,1) title.Font = Enum.Font.GothamBold title.TextSize = 18 -- Button creator local function button(text, y) local b = Instance.new("TextButton", frame) b.Size = UDim2.new(0.9,0,0,40) b.Position = UDim2.new(0.05,0,0,y) b.BackgroundColor3 = Color3.fromRGB(40,40,40) b.TextColor3 = Color3.new(1,1,1) b.Font = Enum.Font.Gotham b.TextSize = 16 b.Text = text return b end local boxBtn = button("ESP Boxes: OFF", 60) local chamBtn = button("ESP Chams: OFF", 110) local aimBtn = button("Aimbot: OFF", 160) -- ESP Functions local function clearESP(player) if player.Character then for _, v in pairs(player.Character:GetChildren()) do if v:IsA("BoxHandleAdornment") or v:IsA("Highlight") then v:Destroy() end end end end local function applyESP(player) if player == LocalPlayer then return end if not player.Character then return end local char = player.Character local hrp = char:FindFirstChild("HumanoidRootPart") if not hrp then return end if espBoxes then local box = Instance.new("BoxHandleAdornment") box.Adornee = char box.Size = char:GetExtentsSize() box.AlwaysOnTop = true box.ZIndex = 5 box.Transparency = 0.6 box.Color3 = Color3.fromRGB(255,0,0) box.Parent = char end if espChams then local hl = Instance.new("Highlight") hl.FillColor = Color3.fromRGB(0,255,0) hl.FillTransparency = 0.5 hl.OutlineColor = Color3.new(1,1,1) hl.Parent = char end end local function refreshESP() for _, p in pairs(Players:GetPlayers()) do clearESP(p) if espBoxes or espChams then applyESP(p) end end end -- Buttons boxBtn.MouseButton1Click:Connect(function() espBoxes = not espBoxes boxBtn.Text = "ESP Boxes: " .. (espBoxes and "ON" or "OFF") refreshESP() end) chamBtn.MouseButton1Click:Connect(function() espChams = not espChams chamBtn.Text = "ESP Chams: " .. (espChams and "ON" or "OFF") refreshESP() end) aimBtn.MouseButton1Click:Connect(function() aimbot = not aimbot aimBtn.Text = "Aimbot: " .. (aimbot and "ON" or "OFF") end) -- Closest player to mouse local function getClosestPlayer() local closest local shortest = math.huge for _, p in pairs(Players:GetPlayers()) do if p ~= LocalPlayer and p.Character and p.Character:FindFirstChild("Head") then local pos, visible = Camera:WorldToViewportPoint(p.Character.Head.Position) if visible then local dist = (Vector2.new(pos.X, pos.Y) - Vector2.new(Mouse.X, Mouse.Y)).Magnitude if dist < shortest then shortest = dist closest = p end end end end return closest end -- Aimbot (instant snap) RunService.RenderStepped:Connect(function() if aimbot and aiming then local target = getClosestPlayer() if target and target.Character and target.Character:FindFirstChild("Head") then Camera.CFrame = CFrame.new( Camera.CFrame.Position, target.Character.Head.Position ) end end end) -- Mouse controls Mouse.Button2Down:Connect(function() aiming = true end) Mouse.Button2Up:Connect(function() aiming = false end) -- Insert key toggle UserInputService.InputBegan:Connect(function(input, gp) if gp then return end if input.KeyCode == Enum.KeyCode.Insert then frame.Visible = not frame.Visible end end) -- Refresh ESP on respawn Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function() task.wait(1) refreshESP() end) end)