Focus v2 (READ DESC)
Keyless

Focus v2 (READ DESC)

Forsaken Combat Fightingnicwilckemartinsnicwilckemartins 729 views 1.8K executesUpdated Oct 9, 2026
Unrated
00
Lua Script•352 lines (10719 chars)
-- =============================================
-- FOCUS SCRIPT com Rayfield + Aimbot + Botão M1 Flutuante
-- =============================================
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local VirtualInputManager = game:GetService("VirtualInputManager")
local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera

-- ========== CONFIGURAÇÕES ==========
local FocusEnabled = false
local AimbotEnabled = false
local TargetPlayer = nil
local FocusDistance = 15
local M1Duration = 0.6
local AimbotSmoothness = 0.25

-- Controle do M1
local m1Active = false

-- ========== JANELA ==========
local Window = Rayfield:CreateWindow({
    Name = "Focus Script",
    LoadingTitle = "Focus",
    LoadingSubtitle = "by Assistente",
    ConfigurationSaving = {
        Enabled = true,
        FolderName = "FocusScript",
        FileName = "FocusConfig"
    },
    KeySystem = false
})

-- ========== ABA MAIN ==========
local MainTab = Window:CreateTab("Main", 4483362458)
MainTab:CreateSection("Focus")

local FocusToggle = MainTab:CreateToggle({
    Name = "Ativar Focus",
    CurrentValue = false,
    Flag = "FocusToggle",
    Callback = function(value)
        FocusEnabled = value
        if FocusEnabled then
            TargetPlayer = getRandomTarget()
            if not TargetPlayer then
                Rayfield:Notify({Title = "Focus", Content = "Nenhum jogador disponível!", Duration = 3})
                FocusEnabled = false
                FocusToggle:Set(false)
            end
        else
            TargetPlayer = nil
        end
    end
})

MainTab:CreateSection("Aimbot")

local AimbotToggle = MainTab:CreateToggle({
    Name = "Ativar Aimbot (mira na cabeça)",
    CurrentValue = false,
    Flag = "AimbotToggle",
    Callback = function(value) AimbotEnabled = value end
})

-- ========== ABA SETTINGS ==========
local SettingsTab = Window:CreateTab("Configurações", 4483362458)
SettingsTab:CreateSection("Focus")

SettingsTab:CreateSlider({
    Name = "Distância acima do alvo",
    Range = {1, 100},
    Increment = 1,
    Suffix = "studs",
    CurrentValue = 15,
    Flag = "FocusDistanceSlider",
    Callback = function(value) FocusDistance = value end
})

SettingsTab:CreateSection("Aimbot")

SettingsTab:CreateSlider({
    Name = "Suavidade do Aimbot",
    Range = {0, 100},
    Increment = 1,
    Suffix = "%",
    CurrentValue = 25,
    Flag = "AimbotSmoothSlider",
    Callback = function(value) AimbotSmoothness = value / 100 end
})

SettingsTab:CreateSection("M1")

SettingsTab:CreateSlider({
    Name = "Duração do M1 (tempo colado no alvo)",
    Range = {1, 20},
    Increment = 1,
    Suffix = "x0.1s",
    CurrentValue = 6, -- 0.6s
    Flag = "M1DurationSlider",
    Callback = function(value) M1Duration = value / 10 end
})

-- ========== FUNÇÕES ==========

function getRandomTarget()
    local validTargets = {}
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= LocalPlayer then
            local char = player.Character
            if char and char:FindFirstChild("Humanoid") and char.Humanoid.Health > 0 then
                table.insert(validTargets, player)
            end
        end
    end
    if #validTargets > 0 then
        return validTargets[math.random(1, #validTargets)]
    end
    return nil
end

function getLocalHRP()
    local char = LocalPlayer.Character
    if char then return char:FindFirstChild("HumanoidRootPart") end
    return nil
end

-- =============================================
-- FUNÇÃO SEGURA PARA OLHAR PARA UM PONTO
-- (Evita NaN quando a distância é 0)
-- =============================================
function safeLookAt(fromPos, toPos)
    local diff = fromPos - toPos
    -- Se os pontos forem praticamente iguais, evita NaN
    if diff.Magnitude < 0.05 then
        return CFrame.new(fromPos)
    end
    return CFrame.new(fromPos, toPos)
end

-- =============================================
-- M1 REAL DO MOUSE
-- =============================================
function fireRealM1()
    pcall(function()
        if mouse1click then mouse1click() end
    end)
    pcall(function()
        local mouse = LocalPlayer:GetMouse()
        local x, y = mouse.X, mouse.Y
        VirtualInputManager:SendMouseButtonEvent(x, y, 0, true, game, 1)
        task.wait(0.03)
        VirtualInputManager:SendMouseButtonEvent(x, y, 0, false, game, 1)
    end)
end

-- =============================================
-- M1: COLA A HITBOX NO ALVO
-- =============================================
function doM1Teleport()
    if m1Active then return end

    local myHRP = getLocalHRP()
    if not myHRP then return end

    -- Garante um alvo
    local targetChar = TargetPlayer and TargetPlayer.Character
    if not targetChar or not targetChar:FindFirstChild("Humanoid") or targetChar.Humanoid.Health <= 0 then
        TargetPlayer = getRandomTarget()
        targetChar = TargetPlayer and TargetPlayer.Character
    end
    if not targetChar then return end

    local targetHRP = targetChar:FindFirstChild("HumanoidRootPart")
    if not targetHRP then return end

    m1Active = true

    -- Cola no alvo: fica LIGEIRAMENTE acima (1 stud) para evitar NaN
    -- e mantém a direção do próprio alvo
    local targetPos = targetHRP.Position
    local myNewPos = targetPos + Vector3.new(0, 1, 0)

    -- Usa a própria orientação do alvo, virado pra ele
    myHRP.CFrame = CFrame.new(myNewPos) * (targetHRP.CFrame - targetHRP.CFrame.Position)

    myHRP.Velocity = Vector3.zero
    myHRP.RotVelocity = Vector3.zero

    -- Dispara o M1 real
    task.wait(0.05)
    fireRealM1()

    -- Após o tempo configurado, sai do modo "colado"
    task.delay(M1Duration, function()
        m1Active = false
    end)
end

-- =============================================
-- FOCUS (sem paralizar)
-- =============================================
function updateFocus()
    if not FocusEnabled or not TargetPlayer then return end

    local targetChar = TargetPlayer.Character
    if not targetChar then
        TargetPlayer = getRandomTarget()
        return
    end

    local targetHRP = targetChar:FindFirstChild("HumanoidRootPart")
    local targetHum = targetChar:FindFirstChild("Humanoid")
    if not targetHRP or not targetHum or targetHum.Health <= 0 then
        TargetPlayer = getRandomTarget()
        return
    end

    local myHRP = getLocalHRP()
    if not myHRP then return end

    local targetPos = targetHRP.Position

    if m1Active then
        -- Modo M1: cola no alvo (1 stud acima pra evitar NaN)
        local newPos = targetPos + Vector3.new(0, 1, 0)
        -- Mantém a rotação do alvo, mas não usa lookAt pra não dar NaN
        myHRP.CFrame = CFrame.new(newPos) * (targetHRP.CFrame - targetHRP.CFrame.Position)
    else
        -- Modo normal: fica na distância configurada acima, olhando pro alvo
        local newPos = targetPos + Vector3.new(0, FocusDistance, 0)
        myHRP.CFrame = safeLookAt(newPos, targetPos)
    end

    myHRP.Velocity = Vector3.zero
    myHRP.RotVelocity = Vector3.zero
end

-- =============================================
-- AIMBOT
-- =============================================
function updateAimbot()
    if not AimbotEnabled or not TargetPlayer then return end

    local targetChar = TargetPlayer.Character
    if not targetChar then return end

    local targetHead = targetChar:FindFirstChild("Head") or targetChar:FindFirstChild("HumanoidRootPart")
    if not targetHead then return end

    local headPos = targetHead.Position
    local camPos = Camera.CFrame.Position
    local desiredCFrame = CFrame.lookAt(camPos, headPos)

    if AimbotSmoothness <= 0 then
        Camera.CFrame = desiredCFrame
    else
        Camera.CFrame = Camera.CFrame:Lerp(desiredCFrame, 1 - AimbotSmoothness)
    end
end

-- ========== LOOPS ==========
RunService.Stepped:Connect(function()
    if FocusEnabled or m1Active then
        updateFocus()
    end
end)

RunService:BindToRenderStep("FocusAimbotCam", Enum.RenderPriority.Camera.Value + 1, function()
    if AimbotEnabled then updateAimbot() end
end)

-- ========== MORTES ==========
LocalPlayer.CharacterAdded:Connect(function(char)
    local hum = char:WaitForChild("Humanoid")
    hum.Died:Connect(function()
        if FocusEnabled then
            FocusEnabled = false
            if FocusToggle then FocusToggle:Set(false) end
            TargetPlayer = nil
            Rayfield:Notify({Title = "Focus", Content = "Você morreu. Focus desativado.", Duration = 3})
        end
        if AimbotEnabled then
            AimbotEnabled = false
            if AimbotToggle then AimbotToggle:Set(false) end
        end
        m1Active = false
    end)
end)

task.spawn(function()
    while task.wait(0.5) do
        if (FocusEnabled or AimbotEnabled) and TargetPlayer then
            local char = TargetPlayer.Character
            if not char or not char:FindFirstChild("Humanoid") or char.Humanoid.Health <= 0 then
                TargetPlayer = getRandomTarget()
            end
        end
    end
end)

-- =============================================
-- BOTÃO M1 FLUTUANTE FORA DA GUI
-- =============================================
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "FocusM1Button"
ScreenGui.ResetOnSpawn = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")

local M1Button = Instance.new("TextButton")
M1Button.Name = "M1Button"
M1Button.Size = UDim2.new(0, 110, 0, 110)
M1Button.Position = UDim2.new(0, 20, 0.5, -55)
M1Button.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
M1Button.BackgroundTransparency = 0.2
M1Button.Text = "M1"
M1Button.TextColor3 = Color3.fromRGB(255, 255, 255)
M1Button.TextScaled = true
M1Button.Font = Enum.Font.GothamBold
M1Button.AutoButtonColor = false
M1Button.Active = true
M1Button.Draggable = true
M1Button.Parent = ScreenGui

local UICorner = Instance.new("UICorner")
UICorner.CornerRadius = UDim.new(1, 0)
UICorner.Parent = M1Button

local UIStroke = Instance.new("UIStroke")
UIStroke.Color = Color3.fromRGB(0, 170, 255)
UIStroke.Thickness = 3
UIStroke.Parent = M1Button

M1Button.MouseButton1Click:Connect(function()
    doM1Teleport()
    M1Button.BackgroundColor3 = Color3.fromRGB(0, 170, 255)
    task.delay(0.15, function()
        if M1Button and M1Button.Parent then
            M1Button.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
        end
    end)
end)

Rayfield:Notify({
    Title = "Focus Script",
    Content = "Script carregado! Botão M1 está na tela.",
    Duration = 5
})

Features & Information

Its a rage script, bannable, and AI created this script

Community Comments (0)

No comments yet for this script.