Description

This is my beta version and i will update soon.

Features

  • + Aimbot

Script

Add Xeno Scripts as a preferred source
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera
local Workspace = game:GetService("Workspace")

local isAimbotEnabled = false
local circle = Drawing.new("Circle")
circle.Transparency = 1
circle.Color = Color3.fromRGB(255, 0, 0)  -- Màu đỏ
circle.Thickness = 2
circle.Radius = 100  -- Bán kính, chỉnh nếu cần
circle.Visible = false

local messageText = Drawing.new("Text")
messageText.Text = "Aimbot Enabled"
messageText.Color = Color3.fromRGB(255, 255, 255)
messageText.Size = 20
messageText.Visible = false

local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {LocalPlayer.Character}  -- Bỏ qua nhân vật của bạn
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if input.KeyCode == Enum.KeyCode.N and not gameProcessed then
        isAimbotEnabled = not isAimbotEnabled
        if isAimbotEnabled then
            messageText.Position = Vector2.new(Camera.ViewportSize.X / 2 - (messageText.TextBounds.X / 2), Camera.ViewportSize.Y / 2 - 50)
            messageText.Visible = true
            circle.Visible = true
            wait(2)
            messageText.Visible = false
        else
            circle.Visible = false
        end
    end
end)

RunService.RenderStepped:Connect(function()
    if Camera then
        local screenCenter = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
        circle.Position = screenCenter
        circle.Visible = isAimbotEnabled
        
        if isAimbotEnabled and LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
            local nearestTarget = nil
            local minDistance = math.huge  -- Khởi tạo khoảng cách lớn nhất
            
            for _, player in pairs(Players:GetPlayers()) do
                if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") and player.Team ~= LocalPlayer.Team then
                    local headPart = player.Character.Head
                    local viewportPoint, onScreen = Camera:WorldToViewportPoint(headPart.Position)
                    
                    if onScreen then
                        -- Thêm raycasting ở đây
                        local origin = LocalPlayer.Character.HumanoidRootPart.Position
                        local direction = headPart.Position - origin
                        local result = Workspace:Raycast(origin, direction, raycastParams)
                        
                        if not result or (result and result.Instance:IsDescendantOf(player.Character)) then  -- Không có vật cản hoặc chỉ chạm mục tiêu
                            local distanceFromCenter = (Vector2.new(viewportPoint.X, viewportPoint.Y) - screenCenter).Magnitude
                            if distanceFromCenter <= circle.Radius then
                                local distanceToPlayer = (headPart.Position - LocalPlayer.Character.HumanoidRootPart.Position).Magnitude
                                if distanceToPlayer < minDistance then
                                    minDistance = distanceToPlayer
                                    nearestTarget = headPart  -- Lưu head của player gần nhất
                                    print("Aimbot: Player " .. player.Name .. " is the nearest in circle, no wall obstruction! Distance: " .. tostring(distanceToPlayer))
                                end
                            end
                        else
                            print("Aimbot: Player " .. player.Name .. " is obstructed by a wall.")  -- Debug log
                        end
                    end
                end
            end
            
            if nearestTarget then
                print("Aimbot: Locking onto nearest target's head...")  -- Debug log
                local currentCFrame = Camera.CFrame
                local targetCFrame = CFrame.new(currentCFrame.Position, nearestTarget.Position)
                Camera.CFrame = currentCFrame:Lerp(targetCFrame, 0.2)  -- Lerp để mượt mà
            else
                print("Aimbot: No nearest target in circle, all obstructed or on your team.")  -- Debug log
            end
        end
    else
        print("Error: Camera not found.")  -- Debug nếu Camera không tồn tại
    end
end)
Script worked? 🚀 Boost it to #1 so others find it too.

Comments (0)

Log in to add a comment.