Rayu hub (aimbot) BETA
Key RequiredUniversal Patched

Rayu hub (aimbot) BETA

Universal Scriptseisseteseissete 475 views 615 executesUpdated Sep 25, 2026
5.0/ 5(1 votes)
10100% Positive
Lua Script•351 lines (12758 chars)
--============================================================
--  RAYU HUB - UI Moderna com Aimbot
--  Autor: Rayu Hub
--  Coloque em: StarterPlayer > StarterPlayerScripts (LocalScript)
--============================================================

-- Serviços
local Players            = game:GetService("Players")
local RunService         = game:GetService("RunService")
local UserInputService   = game:GetService("UserInputService")
local TweenService       = game:GetService("TweenService")

local LocalPlayer        = Players.LocalPlayer
local Camera             = workspace.CurrentCamera

--============================================================
-- VARIÁVEIS DE ESTADO
--============================================================
local AimbotAtivo    = false
local FOVRaio        = 120      -- valor inicial do círculo
local VelocidadeCam  = 0.25     -- suavidade da câmera (menor = mais rápido)
local AlvoAtual      = nil

--============================================================
-- CRIAÇÃO DA INTERFACE (ScreenGui)
--============================================================
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "RayuHub"
ScreenGui.ResetOnSpawn = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")

--============================================================
-- FRAME PRINCIPAL (arrastável, cantos arredondados)
--============================================================
local Main = Instance.new("Frame")
Main.Name = "MainFrame"
Main.Size = UDim2.new(0, 320, 0, 260)
Main.Position = UDim2.new(0.5, -160, 0.5, -130)
Main.BackgroundColor3 = Color3.fromRGB(22, 22, 30)
Main.BorderSizePixel = 0
Main.Active = true
Main.Draggable = true -- já vem com drag nativo
Main.Parent = ScreenGui

local MainCorner = Instance.new("UICorner")
MainCorner.CornerRadius = UDim.new(0, 12)
MainCorner.Parent = Main

-- Borda sutil
local MainStroke = Instance.new("UIStroke")
MainStroke.Color = Color3.fromRGB(60, 60, 90)
MainStroke.Thickness = 1
MainStroke.Transparency = 0.4
MainStroke.Parent = Main

-- Gradiente no topo (efeito profissional)
local TopGradient = Instance.new("Frame")
TopGradient.Size = UDim2.new(1, 0, 0, 60)
TopGradient.BackgroundColor3 = Color3.fromRGB(30, 30, 45)
TopGradient.BorderSizePixel = 0
TopGradient.Parent = Main

local TopGradientCorner = Instance.new("UICorner")
TopGradientCorner.CornerRadius = UDim.new(0, 12)
TopGradientCorner.Parent = TopGradient

--============================================================
-- TÍTULO "Rayu Hub"
--============================================================
local Titulo = Instance.new("TextLabel")
Titulo.Name = "Titulo"
Titulo.Size = UDim2.new(1, 0, 0, 60)
Titulo.BackgroundTransparency = 1
Titulo.Text = "RAYU HUB"
Titulo.Font = Enum.Font.GothamBold
Titulo.TextSize = 26
Titulo.TextColor3 = Color3.fromRGB(255, 255, 255)
Titulo.TextXAlignment = Enum.TextXAlignment.Center
Titulo.Parent = Main

-- Gradiente de texto (fica elegante)
local TituloGradient = Instance.new("UIGradient")
TituloGradient.Color = ColorSequence.new{
    ColorSequenceKeypoint.new(0, Color3.fromRGB(120, 180, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(200, 120, 255)),
}
TituloGradient.Parent = Titulo

-- Linha divisória
local Divider = Instance.new("Frame")
Divider.Size = UDim2.new(1, -30, 0, 1)
Divider.Position = UDim2.new(0, 15, 0, 60)
Divider.BackgroundColor3 = Color3.fromRGB(60, 60, 90)
Divider.BorderSizePixel = 0
Divider.Parent = Main

--============================================================
-- BOTÃO AIMBOT (Toggle com indicador ON/OFF)
--============================================================
local BotaoAimbot = Instance.new("TextButton")
BotaoAimbot.Name = "BotaoAimbot"
BotaoAimbot.Size = UDim2.new(1, -30, 0, 50)
BotaoAimbot.Position = UDim2.new(0, 15, 0, 80)
BotaoAimbot.BackgroundColor3 = Color3.fromRGB(35, 35, 50)
BotaoAimbot.BorderSizePixel = 0
BotaoAimbot.Text = ""
BotaoAimbot.AutoButtonColor = false
BotaoAimbot.Parent = Main

local BotaoAimbotCorner = Instance.new("UICorner")
BotaoAimbotCorner.CornerRadius = UDim.new(0, 8)
BotaoAimbotCorner.Parent = BotaoAimbot

-- Texto do botão
local TextoBotao = Instance.new("TextLabel")
TextoBotao.Size = UDim2.new(0.6, 0, 1, 0)
TextoBotao.Position = UDim2.new(0, 15, 0, 0)
TextoBotao.BackgroundTransparency = 1
TextoBotao.Text = "Aimbot"
TextoBotao.Font = Enum.Font.GothamMedium
TextoBotao.TextSize = 16
TextoBotao.TextColor3 = Color3.fromRGB(230, 230, 240)
TextoBotao.TextXAlignment = Enum.TextXAlignment.Left
TextoBotao.Parent = BotaoAimbot

-- Indicador ON/OFF
local Indicador = Instance.new("TextLabel")
Indicador.Size = UDim2.new(0, 60, 0, 26)
Indicador.Position = UDim2.new(1, -75, 0.5, -13)
Indicador.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
Indicador.Text = "OFF"
Indicador.Font = Enum.Font.GothamBold
Indicador.TextSize = 13
Indicador.TextColor3 = Color3.fromRGB(200, 200, 210)
Indicador.Parent = BotaoAimbot

local IndicadorCorner = Instance.new("UICorner")
IndicadorCorner.CornerRadius = UDim.new(0, 13)
IndicadorCorner.Parent = Indicador

--============================================================
-- SEÇÃO FOV (Label + TextBox)
--============================================================
local LabelFOV = Instance.new("TextLabel")
LabelFOV.Size = UDim2.new(1, -30, 0, 20)
LabelFOV.Position = UDim2.new(0, 15, 0, 145)
LabelFOV.BackgroundTransparency = 1
LabelFOV.Text = "Tamanho do FOV"
LabelFOV.Font = Enum.Font.GothamMedium
LabelFOV.TextSize = 13
LabelFOV.TextColor3 = Color3.fromRGB(160, 160, 180)
LabelFOV.TextXAlignment = Enum.TextXAlignment.Left
LabelFOV.Parent = Main

local TextBoxFOV = Instance.new("TextBox")
TextBoxFOV.Name = "TextBoxFOV"
TextBoxFOV.Size = UDim2.new(1, -30, 0, 45)
TextBoxFOV.Position = UDim2.new(0, 15, 0, 170)
TextBoxFOV.BackgroundColor3 = Color3.fromRGB(35, 35, 50)
TextBoxFOV.BorderSizePixel = 0
TextBoxFOV.Text = tostring(FOVRaio)
TextBoxFOV.PlaceholderText = "Digite o valor..."
TextBoxFOV.Font = Enum.Font.GothamMedium
TextBoxFOV.TextSize = 15
TextBoxFOV.TextColor3 = Color3.fromRGB(230, 230, 240)
TextBoxFOV.PlaceholderColor3 = Color3.fromRGB(120, 120, 140)
TextBoxFOV.ClearTextOnFocus = false
TextBoxFOV.Parent = Main

local TextBoxCorner = Instance.new("UICorner")
TextBoxCorner.CornerRadius = UDim.new(0, 8)
TextBoxCorner.Parent = TextBoxFOV

local TextBoxStroke = Instance.new("UIStroke")
TextBoxStroke.Color = Color3.fromRGB(60, 60, 90)
TextBoxStroke.Thickness = 1
TextBoxStroke.Transparency = 0.5
TextBoxStroke.Parent = TextBoxFOV

-- Rodapé com status
local Rodape = Instance.new("TextLabel")
Rodape.Size = UDim2.new(1, -30, 0, 20)
Rodape.Position = UDim2.new(0, 15, 1, -28)
Rodape.BackgroundTransparency = 1
Rodape.Text = "v1.0  •  Rayu Hub"
Rodape.Font = Enum.Font.Gotham
Rodape.TextSize = 11
Rodape.TextColor3 = Color3.fromRGB(100, 100, 130)
Rodape.TextXAlignment = Enum.TextXAlignment.Left
Rodape.Parent = Main

--============================================================
-- CÍRCULO DE FOV (centralizado na tela, em ScreenGui separado)
--============================================================
local FOVGui = Instance.new("ScreenGui")
FOVGui.Name = "RayuFOV"
FOVGui.ResetOnSpawn = false
FOVGui.IgnoreGuiInset = true
FOVGui.Parent = LocalPlayer:WaitForChild("PlayerGui")

local CirculoFOV = Instance.new("Frame")
CirculoFOV.Name = "CirculoFOV"
CirculoFOV.AnchorPoint = Vector2.new(0.5, 0.5)
CirculoFOV.Position = UDim2.new(0.5, 0, 0.5, 0)
CirculoFOV.Size = UDim2.new(0, FOVRaio * 2, 0, FOVRaio * 2)
CirculoFOV.BackgroundTransparency = 1
CirculoFOV.Visible = false
CirculoFOV.Parent = FOVGui

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

local CirculoStroke = Instance.new("UIStroke")
CirculoStroke.Color = Color3.fromRGB(120, 180, 255)
CirculoStroke.Thickness = 1.5
CirculoStroke.Transparency = 0.2
CirculoStroke.Parent = CirculoFOV

--============================================================
-- FUNÇÃO: atualizar tamanho do círculo
--============================================================
local function AtualizarFOV()
    CirculoFOV.Size = UDim2.new(0, FOVRaio * 2, 0, FOVRaio * 2)
end

--============================================================
-- FUNÇÃO: alternar estado do Aimbot (visual do botão)
--============================================================
local function AtualizarVisualBotao()
    if AimbotAtivo then
        TweenService:Create(BotaoAimbot, TweenInfo.new(0.2), {
            BackgroundColor3 = Color3.fromRGB(40, 90, 70),
        }):Play()
        TweenService:Create(Indicador, TweenInfo.new(0.2), {
            BackgroundColor3 = Color3.fromRGB(80, 220, 140),
            TextColor3 = Color3.fromRGB(15, 30, 20),
        }):Play()
        Indicador.Text = "ON"
        CirculoFOV.Visible = true
    else
        TweenService:Create(BotaoAimbot, TweenInfo.new(0.2), {
            BackgroundColor3 = Color3.fromRGB(35, 35, 50),
        }):Play()
        TweenService:Create(Indicador, TweenInfo.new(0.2), {
            BackgroundColor3 = Color3.fromRGB(60, 60, 80),
            TextColor3 = Color3.fromRGB(200, 200, 210),
        }):Play()
        Indicador.Text = "OFF"
        CirculoFOV.Visible = false
        AlvoAtual = nil
    end
end

--============================================================
-- CLIQUE NO BOTÃO AIMBOT
--============================================================
BotaoAimbot.MouseButton1Click:Connect(function()
    AimbotAtivo = not AimbotAtivo
    AtualizarVisualBotao()
end)

-- Efeito de hover no botão
BotaoAimbot.MouseEnter:Connect(function()
    if not AimbotAtivo then
        TweenService:Create(BotaoAimbot, TweenInfo.new(0.15), {
            BackgroundColor3 = Color3.fromRGB(45, 45, 65),
        }):Play()
    end
end)
BotaoAimbot.MouseLeave:Connect(function()
    if not AimbotAtivo then
        TweenService:Create(BotaoAimbot, TweenInfo.new(0.15), {
            BackgroundColor3 = Color3.fromRGB(35, 35, 50),
        }):Play()
    end
end)

--============================================================
-- TEXTBOX: atualizar FOV em tempo real
--============================================================
TextBoxFOV:GetPropertyChangedSignal("Text"):Connect(function()
    local Numero = tonumber(TextBoxFOV.Text)
    if Numero and Numero > 0 and Numero <= 1000 then
        FOVRaio = Numero
        AtualizarFOV()
        TextBoxStroke.Color = Color3.fromRGB(60, 60, 90)
    else
        -- Feedback visual de erro
        TextBoxStroke.Color = Color3.fromRGB(220, 80, 80)
    end
end)

--============================================================
-- LÓGICA DO AIMBOT
--============================================================
-- Retorna o jogador mais próximo dentro do FOV
local function ObterAlvo()
    local MaisProximo = nil
    local MenorDistancia = FOVRaio
    local CentroTela = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)

    for _, Player in ipairs(Players:GetPlayers()) do
        if Player ~= LocalPlayer and Player.Character then
            local Head = Player.Character:FindFirstChild("Head")
            local Humanoid = Player.Character:FindFirstChildOfClass("Humanoid")

            if Head and Humanoid and Humanoid.Health > 0 then
                -- Projeta posição da cabeça na tela
                local PosTela, NaTela = Camera:WorldToViewportPoint(Head.Position)
                if NaTela then
                    -- Verifica se está do lado certo da câmera
                    local Direcao = (Head.Position - Camera.CFrame.Position).Unit
                    local Facing = Camera.CFrame.LookVector:Dot(Direcao)
                    if Facing > 0 then
                        local Dist = (Vector2.new(PosTela.X, PosTela.Y) - CentroTela).Magnitude
                        if Dist < MenorDistancia then
                            MenorDistancia = Dist
                            MaisProximo = Head
                        end
                    end
                end
            end
        end
    end
    return MaisProximo
end

-- Loop de atualização da câmera (prioridade alta)
RunService.RenderStepped:Connect(function()
    if not AimbotAtivo then return end

    local Alvo = ObterAlvo()
    if Alvo then
        AlvoAtual = Alvo
        -- Suaviza a câmera mirando na cabeça
        local PosAlvo = CFrame.new(Camera.CFrame.Position, Alvo.Position)
        Camera.CFrame = Camera.CFrame:Lerp(PosAlvo, VelocidadeCam)
    else
        AlvoAtual = nil
    end
end)

--============================================================
-- ATUALIZAÇÃO INICIAL
--============================================================
AtualizarFOV()
AtualizarVisualBotao()

print("[Rayu Hub] Carregado com sucesso ✔")

Features & Information

My first script, I hope you enjoy it. Aimbot!
#aimbot

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts