Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local UserInputService = game:GetService("UserInputService")
- local LocalPlayer = Players.LocalPlayer
- local Camera = workspace.CurrentCamera
- -- Configuration
- local aimbotEnabled = false
- local silentAimEnabled = false
- local currentTarget = nil
- local fovRadius = 120
- local fovVisible = true
- local lockToPivot = true
- local smoothness = 0.25 -- Lower values = smoother aim
- local maxDistance = 500 -- Max targeting distance
- -- Create GUI
- local gui = Instance.new("ScreenGui", LocalPlayer:WaitForChild("PlayerGui"))
- gui.Name = "Aimbot by Polleser"
- gui.ResetOnSpawn = false
- -- Main Frame
- local mainFrame = Instance.new("Frame")
- mainFrame.Name = "MainFrame"
- mainFrame.Size = UDim2.new(0, 220, 0, 250)
- mainFrame.Position = UDim2.new(0.02, 0, 0.3, 0)
- mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- mainFrame.BackgroundTransparency = 0.3
- mainFrame.Parent = gui
- local mainCorner = Instance.new("UICorner")
- mainCorner.CornerRadius = UDim.new(0, 8)
- mainCorner.Parent = mainFrame
- -- Title and Draggable Area
- local title = Instance.new("TextLabel")
- title.Name = "Title"
- title.Text = "SILENT BIRD AIMBOT (OP)"
- title.Size = UDim2.new(1, -40, 0, 30)
- title.Position = UDim2.new(0, 10, 0, 5)
- title.BackgroundTransparency = 1
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- title.Font = Enum.Font.GothamBold
- title.TextSize = 18
- title.TextXAlignment = Enum.TextXAlignment.Left
- title.Parent = mainFrame
- -- Close Button
- local closeButton = Instance.new("TextButton")
- closeButton.Name = "CloseButton"
- closeButton.Text = "X"
- closeButton.Size = UDim2.new(0, 30, 0, 30)
- closeButton.Position = UDim2.new(1, -35, 0, 5)
- closeButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.Font = Enum.Font.GothamBold
- closeButton.Parent = mainFrame
- local closeCorner = Instance.new("UICorner")
- closeCorner.CornerRadius = UDim.new(0, 6)
- closeCorner.Parent = closeButton
- -- Toggle Buttons
- local function createToggle(name, text, yPos, default)
- local toggle = Instance.new("TextButton")
- toggle.Name = name
- toggle.Text = text
- toggle.Size = UDim2.new(0.9, 0, 0, 30)
- toggle.Position = UDim2.new(0.05, 0, yPos, 0)
- toggle.BackgroundColor3 = default and Color3.fromRGB(50, 255, 50) or Color3.fromRGB(255, 50, 50)
- toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggle.Font = Enum.Font.Gotham
- toggle.TextScaled = true
- toggle.Parent = mainFrame
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 6)
- corner.Parent = toggle
- return toggle
- end
- local aimbotToggle = createToggle("AimbotToggle", "AIMBOT: OFF", 0.18, false)
- local silentToggle = createToggle("SilentToggle", "SILENT AIM: OFF", 0.31, false)
- local pivotToggle = createToggle("PivotToggle", "PIVOT LOCK: ON", 0.44, true)
- pivotToggle.BackgroundColor3 = Color3.fromRGB(50, 150, 255)
- local fovToggle = createToggle("FOVToggle", "SHOW FOV: ON", 0.57, true)
- fovToggle.BackgroundColor3 = Color3.fromRGB(50, 255, 150)
- -- FOV Slider
- local fovSlider = Instance.new("TextLabel")
- fovSlider.Name = "FOVSliderLabel"
- fovSlider.Text = "FOV SIZE: "..fovRadius
- fovSlider.Size = UDim2.new(0.9, 0, 0, 20)
- fovSlider.Position = UDim2.new(0.05, 0, 0.7, 0)
- fovSlider.BackgroundTransparency = 1
- fovSlider.TextColor3 = Color3.fromRGB(255, 255, 255)
- fovSlider.Font = Enum.Font.Gotham
- fovSlider.TextScaled = true
- fovSlider.Parent = mainFrame
- local sliderFrame = Instance.new("Frame")
- sliderFrame.Name = "SliderFrame"
- sliderFrame.Size = UDim2.new(0.9, 0, 0, 10)
- sliderFrame.Position = UDim2.new(0.05, 0, 0.78, 0)
- sliderFrame.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- sliderFrame.Parent = mainFrame
- local sliderCorner = Instance.new("UICorner")
- sliderCorner.CornerRadius = UDim.new(0, 4)
- sliderCorner.Parent = sliderFrame
- local sliderFill = Instance.new("Frame")
- sliderFill.Name = "SliderFill"
- sliderFill.Size = UDim2.new((fovRadius-20)/280, 0, 1, 0)
- sliderFill.Position = UDim2.new(0, 0, 0, 0)
- sliderFill.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
- sliderFill.Parent = sliderFrame
- local sliderCorner2 = Instance.new("UICorner")
- sliderCorner2.CornerRadius = UDim.new(0, 4)
- sliderCorner2.Parent = sliderFill
- local sliderButton = Instance.new("TextButton")
- sliderButton.Name = "SliderButton"
- sliderButton.Text = ""
- sliderButton.Size = UDim2.new(0, 20, 2, 0)
- sliderButton.Position = UDim2.new((fovRadius-20)/280, -10, 0.5, 0)
- sliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- sliderButton.Parent = sliderFrame
- local sliderBtnCorner = Instance.new("UICorner")
- sliderBtnCorner.CornerRadius = UDim.new(0, 4)
- sliderBtnCorner.Parent = sliderButton
- -- FOV Circle
- local fovCircle = Instance.new("Frame")
- fovCircle.Name = "FOVCircle"
- fovCircle.Size = UDim2.new(0, fovRadius*2, 0, fovRadius*2)
- fovCircle.Position = UDim2.new(0.5, -fovRadius, 0.5, -fovRadius)
- fovCircle.BackgroundTransparency = 0.9
- fovCircle.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
- fovCircle.BorderSizePixel = 0
- fovCircle.Visible = fovVisible
- fovCircle.Parent = gui
- local circleCorner = Instance.new("UICorner")
- circleCorner.CornerRadius = UDim.new(1, 0)
- circleCorner.Parent = fovCircle
- -- GUI Interactions
- local dragging = false
- local dragStartPos = Vector2.new(0, 0)
- local frameStartPos = Vector2.new(0, 0)
- mainFrame.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStartPos = Vector2.new(input.Position.X, input.Position.Y)
- frameStartPos = Vector2.new(mainFrame.AbsolutePosition.X, mainFrame.AbsolutePosition.Y)
- end
- end)
- mainFrame.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = false
- end
- end)
- UserInputService.InputChanged:Connect(function(input)
- if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
- local delta = Vector2.new(input.Position.X, input.Position.Y) - dragStartPos
- mainFrame.Position = UDim2.new(0, frameStartPos.X + delta.X, 0, frameStartPos.Y + delta.Y)
- end
- end)
- -- Slider functionality
- sliderButton.MouseButton1Down:Connect(function()
- local connection
- connection = UserInputService.InputChanged:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseMovement then
- local xPos = math.clamp(input.Position.X - sliderFrame.AbsolutePosition.X, 0, sliderFrame.AbsoluteSize.X)
- local ratio = xPos / sliderFrame.AbsoluteSize.X
- fovRadius = math.floor(20 + ratio * 280)
- fovSlider.Text = "FOV SIZE: "..fovRadius
- sliderFill.Size = UDim2.new(ratio, 0, 1, 0)
- sliderButton.Position = UDim2.new(ratio, -10, 0.5, 0)
- fovCircle.Size = UDim2.new(0, fovRadius*2, 0, fovRadius*2)
- fovCircle.Position = UDim2.new(0.5, -fovRadius, 0.5, -fovRadius)
- end
- end)
- UserInputService.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- connection:Disconnect()
- end
- end)
- end)
- -- Toggle buttons
- aimbotToggle.MouseButton1Click:Connect(function()
- aimbotEnabled = not aimbotEnabled
- aimbotToggle.Text = "AIMBOT: "..(aimbotEnabled and "ON" or "OFF")
- aimbotToggle.BackgroundColor3 = aimbotEnabled and Color3.fromRGB(50, 255, 50) or Color3.fromRGB(255, 50, 50)
- if not aimbotEnabled then currentTarget = nil end
- end)
- silentToggle.MouseButton1Click:Connect(function()
- silentAimEnabled = not silentAimEnabled
- silentToggle.Text = "SILENT AIM: "..(silentAimEnabled and "ON" or "OFF")
- silentToggle.BackgroundColor3 = silentAimEnabled and Color3.fromRGB(50, 255, 50) or Color3.fromRGB(255, 50, 50)
- end)
- pivotToggle.MouseButton1Click:Connect(function()
- lockToPivot = not lockToPivot
- pivotToggle.Text = "PIVOT LOCK: "..(lockToPivot and "ON" or "OFF")
- pivotToggle.BackgroundColor3 = lockToPivot and Color3.fromRGB(50, 150, 255) or Color3.fromRGB(150, 150, 150)
- end)
- fovToggle.MouseButton1Click:Connect(function()
- fovVisible = not fovVisible
- fovToggle.Text = "SHOW FOV: "..(fovVisible and "ON" or "OFF")
- fovToggle.BackgroundColor3 = fovVisible and Color3.fromRGB(50, 255, 150) or Color3.fromRGB(150, 150, 150)
- fovCircle.Visible = fovVisible
- end)
- closeButton.MouseButton1Click:Connect(function()
- gui:Destroy()
- end)
- -- Get the actual pivot point of a model
- local function getModelPivot(model)
- if model:IsA("BasePart") then
- return model.CFrame
- elseif model:IsA("Model") then
- local primaryPart = model.PrimaryPart or model:FindFirstChild("HumanoidRootPart") or model:FindFirstChildWhichIsA("BasePart")
- if primaryPart then
- return primaryPart.CFrame
- end
- end
- return nil
- end
- -- Check if target is valid
- local function isValidTarget(target)
- if not target or not target:IsDescendantOf(workspace) then return false end
- -- For silent aim, we can be more lenient with target validation
- if silentAimEnabled then
- return true
- else
- local pivot = getModelPivot(target)
- if not pivot then return false end
- -- Check distance
- local dist = (Camera.CFrame.Position - pivot.Position).Magnitude
- if dist > maxDistance then return false end
- -- Check if in FOV
- local screenPoint, onScreen = Camera:WorldToViewportPoint(pivot.Position)
- if onScreen then
- local center = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)
- local point = Vector2.new(screenPoint.X, screenPoint.Y)
- return (point - center).Magnitude <= fovRadius
- end
- return false
- end
- end
- -- Find the best target
- local function findBestTarget()
- local closestDist = math.huge
- local bestTarget = nil
- local beakwoods = workspace:FindFirstChild("Regions")
- if beakwoods then
- beakwoods = beakwoods:FindFirstChild("Beakwoods")
- if beakwoods then
- local clientBirds = beakwoods:FindFirstChild("ClientBirds")
- if clientBirds then
- for _, bird in ipairs(clientBirds:GetChildren()) do
- if bird:IsA("Model") then
- local pivot = getModelPivot(bird)
- if pivot then
- local dist = (Camera.CFrame.Position - pivot.Position).Magnitude
- if dist < maxDistance then
- if silentAimEnabled or (Camera:WorldToViewportPoint(pivot.Position)) then
- if dist < closestDist then
- closestDist = dist
- bestTarget = lockToPivot and bird or (bird:FindFirstChild("Head") or bird)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- return bestTarget
- end
- -- Silent aim hook
- local oldNamecall
- oldNamecall = hookmetamethod(game, "__namecall", newcclosure(function(self, ...)
- local args = {...}
- local method = getnamecallmethod()
- if silentAimEnabled and aimbotEnabled and currentTarget and (method == "FindPartOnRay" or method == "FindPartOnRayWithIgnoreList") then
- local pivot = getModelPivot(currentTarget)
- if pivot then
- -- Modify ray to hit our target
- local origin = args[1].Origin
- local dir = (pivot.Position - origin).Unit
- args[1] = Ray.new(origin, dir * maxDistance)
- return oldNamecall(self, unpack(args))
- end
- end
- return oldNamecall(self, ...)
- end))
- -- Smooth aim function
- local function smoothAim(targetPos)
- local currentPos = Camera.CFrame.Position
- local targetDir = (targetPos - currentPos).Unit
- local currentDir = Camera.CFrame.LookVector
- local smoothStep = math.min(smoothness * 60 * RunService.RenderStepped:Wait(), 1)
- local newDir = currentDir:Lerp(targetDir, smoothStep)
- return CFrame.new(currentPos, currentPos + newDir)
- end
- -- Main aimbot loop
- RunService.RenderStepped:Connect(function()
- fovCircle.Visible = fovVisible and aimbotEnabled
- if not aimbotEnabled then
- currentTarget = nil
- return
- end
- -- Validate current target
- if not isValidTarget(currentTarget) then
- currentTarget = findBestTarget()
- end
- -- Silent aim doesn't need camera movement
- if silentAimEnabled then return end
- -- Regular aimbot with smooth aiming
- if currentTarget then
- local targetPosition
- if lockToPivot then
- local pivot = getModelPivot(currentTarget)
- targetPosition = pivot and pivot.Position or currentTarget.Position
- else
- targetPosition = currentTarget:IsA("BasePart") and currentTarget.Position or
- (currentTarget:FindFirstChild("Head") and currentTarget.Head.Position or currentTarget:GetPivot().Position)
- end
- if targetPosition then
- Camera.CFrame = smoothAim(targetPosition)
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement