--[[ ██████╗ █████╗ ██╗ ██╗██╗ ██╗ ██╗ ██╗██╗ ██╗██████╗ ██╔══██╗██╔══██╗╚██╗ ██╔╝██║ ██║ ██║ ██║██║ ██║██╔══██╗ ██████╔╝███████║ ╚████╔╝ ██║ ██║ ███████║██║ ██║██████╔╝ ██╔══██╗██╔══██║ ╚██╔╝ ██║ ██║ ██╔══██║██║ ██║██╔══██╗ ██║ ██║██║ ██║ ██║ ╚██████╔╝ ██║ ██║╚██████╔╝██████╔╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ RAYU HUB — Aimbot UI (LocalScript) ]] -- ================================================================ -- SERVIÇOS -- ================================================================ local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Workspace = game:GetService("Workspace") local LocalPlayer = Players.LocalPlayer local Camera = Workspace.CurrentCamera -- ================================================================ -- ESTADO GLOBAL DO HUB -- ================================================================ local State = { AimbotOn = false, -- Aimbot ligado/desligado TeamCheck = false, -- Filtro de time ligado/desligado FOV = 120, -- Raio do FOV em pixels } -- ================================================================ -- PALETA DE CORES (tema escuro profissional) -- ================================================================ local Colors = { Background = Color3.fromRGB(18, 18, 26), Section = Color3.fromRGB(28, 28, 40), SectionAlt = Color3.fromRGB(36, 36, 50), AccentOff = Color3.fromRGB(52, 52, 68), Text = Color3.fromRGB(235, 235, 245), SubText = Color3.fromRGB(150, 150, 170), Success = Color3.fromRGB(46, 204, 113), Stroke = Color3.fromRGB(60, 60, 80), FOVStroke = Color3.fromRGB(255, 255, 255), } -- ================================================================ -- HELPERS DE UI -- ================================================================ local function addCorner(parent, radius) local c = Instance.new("UICorner") c.CornerRadius = UDim.new(0, radius or 6) c.Parent = parent return c end local function addStroke(parent, color, thickness, transparency) local s = Instance.new("UIStroke") s.Color = color or Colors.Stroke s.Thickness = thickness or 1 s.Transparency = transparency or 0 s.Parent = parent return s end local function addPadding(parent, top, bottom, left, right) local p = Instance.new("UIPadding") p.PaddingTop = UDim.new(0, top) p.PaddingBottom = UDim.new(0, bottom) p.PaddingLeft = UDim.new(0, left) p.PaddingRight = UDim.new(0, right) p.Parent = parent return p end -- ================================================================ -- SCREEN GUI -- ================================================================ local ScreenGui = Instance.new("ScreenGui") ScreenGui.Name = "RayuHub" ScreenGui.ResetOnSpawn = false ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling ScreenGui.IgnoreGuiInset = true ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") -- ================================================================ -- CÍRCULO DE FOV (fica exatamente no centro da tela) -- ================================================================ local FOVCircle = Instance.new("Frame") FOVCircle.Name = "FOVCircle" FOVCircle.AnchorPoint = Vector2.new(0.5, 0.5) -- centraliza o pivô FOVCircle.Position = UDim2.fromScale(0.5, 0.5) -- centro absoluto FOVCircle.Size = UDim2.fromOffset(State.FOV * 2, State.FOV * 2) FOVCircle.BackgroundTransparency = 1 FOVCircle.BorderSizePixel = 0 FOVCircle.Visible = false FOVCircle.ZIndex = 1 FOVCircle.Parent = ScreenGui -- Círculo perfeito usando UICorner em escala total (1 = totalmente redondo) local fovCorner = Instance.new("UICorner") fovCorner.CornerRadius = UDim.new(1, 0) fovCorner.Parent = FOVCircle -- Borda do círculo local fovStroke = addStroke(FOVCircle, Colors.FOVStroke, 1.5, 0.15) -- Atualiza o tamanho do círculo com base no FOV atual local function updateFOVCircle() FOVCircle.Size = UDim2.fromOffset(State.FOV * 2, State.FOV * 2) end -- ================================================================ -- JANELA PRINCIPAL (arrastável) -- ================================================================ local Main = Instance.new("Frame") Main.Name = "Main" Main.Position = UDim2.new(0, 40, 0, 40) Main.Size = UDim2.fromOffset(240, 280) Main.BackgroundColor3 = Colors.Background Main.BorderSizePixel = 0 Main.ZIndex = 5 Main.Parent = ScreenGui addCorner(Main, 10) addStroke(Main, Colors.Stroke, 1, 0.25) -- ---------------- BARRA DE TÍTULO ---------------- local TitleBar = Instance.new("Frame") TitleBar.Name = "TitleBar" TitleBar.Size = UDim2.new(1, 0, 0, 36) TitleBar.BackgroundColor3 = Colors.Section TitleBar.BorderSizePixel = 0 TitleBar.ZIndex = 6 TitleBar.Parent = Main -- Cantos arredondados no topo da title bar local tbCorner = Instance.new("UICorner") tbCorner.CornerRadius = UDim.new(0, 10) tbCorner.Parent = TitleBar local TitleLabel = Instance.new("TextLabel") TitleLabel.Size = UDim2.new(1, -60, 1, 0) TitleLabel.Position = UDim2.new(0, 14, 0, 0) TitleLabel.BackgroundTransparency = 1 TitleLabel.Text = "Rayu Hub" TitleLabel.TextColor3 = Colors.Text TitleLabel.TextXAlignment = Enum.TextXAlignment.Left TitleLabel.Font = Enum.Font.GothamBold TitleLabel.TextSize = 14 TitleLabel.ZIndex = 7 TitleLabel.Parent = TitleBar -- Botão de fechar (X) local CloseBtn = Instance.new("TextButton") CloseBtn.Size = UDim2.fromOffset(20, 20) CloseBtn.Position = UDim2.new(1, -28, 0.5, -10) CloseBtn.BackgroundColor3 = Colors.AccentOff CloseBtn.BorderSizePixel = 0 CloseBtn.Text = "×" CloseBtn.TextColor3 = Colors.Text CloseBtn.Font = Enum.Font.GothamBold CloseBtn.TextSize = 16 CloseBtn.AutoButtonColor = false CloseBtn.ZIndex = 7 CloseBtn.Parent = TitleBar addCorner(CloseBtn, 4) CloseBtn.MouseButton1Click:Connect(function() ScreenGui:Destroy() end) -- ---------------- CONTEÚDO ---------------- local Content = Instance.new("Frame") Content.Name = "Content" Content.Position = UDim2.new(0, 0, 0, 36) Content.Size = UDim2.new(1, 0, 1, -36) Content.BackgroundTransparency = 1 Content.Parent = Main addPadding(Content, 10, 10, 10, 10) local contentLayout = Instance.new("UIListLayout") contentLayout.Padding = UDim.new(0, 8) contentLayout.SortOrder = Enum.SortOrder.LayoutOrder contentLayout.Parent = Content -- ================================================================ -- FUNÇÕES DE CRIAÇÃO DOS ELEMENTOS -- ================================================================ -- Cria uma "seção" com título local function createSection(title, order) local sec = Instance.new("Frame") sec.Name = title .. "Section" sec.Size = UDim2.new(1, 0, 0, 0) sec.AutomaticSize = Enum.AutomaticSize.Y sec.BackgroundColor3 = Colors.Section sec.BorderSizePixel = 0 sec.LayoutOrder = order sec.Parent = Content addCorner(sec, 8) addPadding(sec, 8, 8, 8, 8) local layout = Instance.new("UIListLayout") layout.Padding = UDim.new(0, 6) layout.SortOrder = Enum.SortOrder.LayoutOrder layout.Parent = sec local lbl = Instance.new("TextLabel") lbl.Size = UDim2.new(1, 0, 0, 14) lbl.BackgroundTransparency = 1 lbl.Text = title lbl.TextColor3 = Colors.SubText lbl.TextXAlignment = Enum.TextXAlignment.Left lbl.Font = Enum.Font.GothamBold lbl.TextSize = 10 lbl.LayoutOrder = 0 lbl.Parent = sec return sec end -- Cria um botão de toggle ON/OFF com estado visual claro local function createToggle(parent, labelText, order) local btn = Instance.new("TextButton") btn.Size = UDim2.new(1, 0, 0, 32) btn.BackgroundColor3 = Colors.AccentOff btn.BorderSizePixel = 0 btn.Text = "" btn.AutoButtonColor = false btn.LayoutOrder = order btn.Parent = parent addCorner(btn, 6) local lbl = Instance.new("TextLabel") lbl.Size = UDim2.new(1, -60, 1, 0) lbl.Position = UDim2.new(0, 12, 0, 0) lbl.BackgroundTransparency = 1 lbl.Text = labelText lbl.TextColor3 = Colors.Text lbl.TextXAlignment = Enum.TextXAlignment.Left lbl.Font = Enum.Font.GothamMedium lbl.TextSize = 13 lbl.Parent = btn local status = Instance.new("TextLabel") status.Size = UDim2.new(0, 40, 1, 0) status.Position = UDim2.new(1, -52, 0, 0) status.BackgroundTransparency = 1 status.Text = "OFF" status.TextColor3 = Colors.SubText status.TextXAlignment = Enum.TextXAlignment.Right status.Font = Enum.Font.GothamBold status.TextSize = 11 status.Parent = btn -- Atualiza visual ON/OFF local function refresh(isOn) if isOn then btn.BackgroundColor3 = Colors.Success status.Text = "ON" status.TextColor3 = Color3.new(1, 1, 1) else btn.BackgroundColor3 = Colors.AccentOff status.Text = "OFF" status.TextColor3 = Colors.SubText end end return btn, refresh end -- ================================================================ -- SEÇÃO: AIMBOT -- ================================================================ local aimbotSec = createSection("AIMBOT", 1) local aimbotBtn, refreshAimbot = createToggle(aimbotSec, "Aimbot", 1) aimbotBtn.MouseButton1Click:Connect(function() State.AimbotOn = not State.AimbotOn FOVCircle.Visible = State.AimbotOn refreshAimbot(State.AimbotOn) end) -- ================================================================ -- SEÇÃO: FILTRO DE TIME -- ================================================================ local teamSec = createSection("FILTRO DE TIME", 2) local teamBtn, refreshTeam = createToggle(teamSec, "Team Check", 1) teamBtn.MouseButton1Click:Connect(function() State.TeamCheck = not State.TeamCheck refreshTeam(State.TeamCheck) end) -- ================================================================ -- SEÇÃO: TAMANHO DO FOV -- ================================================================ local fovSec = createSection("ÁREA DE FOV", 3) local fovBox = Instance.new("TextBox") fovBox.Size = UDim2.new(1, 0, 0, 32) fovBox.BackgroundColor3 = Colors.SectionAlt fovBox.BorderSizePixel = 0 fovBox.Text = tostring(State.FOV) fovBox.PlaceholderText = "Ex: 120" fovBox.TextColor3 = Colors.Text fovBox.PlaceholderColor3 = Colors.SubText fovBox.Font = Enum.Font.GothamMedium fovBox.TextSize = 13 fovBox.ClearTextOnFocus = false fovBox.LayoutOrder = 1 fovBox.Parent = fovSec addCorner(fovBox, 6) addStroke(fovBox, Colors.Stroke, 1, 0.4) -- Aplica o valor digitado quando o usuário sai do TextBox fovBox.FocusLost:Connect(function() local num = tonumber(fovBox.Text) if num and num >= 10 and num <= 1000 then State.FOV = math.floor(num) fovBox.Text = tostring(State.FOV) updateFOVCircle() else -- Valor inválido: restaura o anterior fovBox.Text = tostring(State.FOV) end end) -- ================================================================ -- ARRASTAR A JANELA (pela barra de título) -- ================================================================ local dragging, dragStart, startPos TitleBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = Main.Position end end) TitleBar.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) UserInputService.InputChanged:Connect(function(input) if not dragging then return end if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then local delta = input.Position - dragStart Main.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end) -- ================================================================ -- LÓGICA DO AIMBOT -- ================================================================ -- Retorna a cabeça de um jogador válido (ou nil se inválido) local function getTargetHead(player) if player == LocalPlayer then return nil end local char = player.Character if not char then return nil end local humanoid = char:FindFirstChildOfClass("Humanoid") if not humanoid or humanoid.Health <= 0 then return nil end local head = char:FindFirstChild("Head") if not head then return nil end -- Filtro de time if State.TeamCheck then if player.Team ~= nil and player.Team == LocalPlayer.Team then return nil end end return head end -- Encontra o alvo mais próximo do centro da tela dentro do FOV local function findClosestTarget() local viewport = Camera.ViewportSize local center = Vector2.new(viewport.X / 2, viewport.Y / 2) local closestHead, closestDist = nil, State.FOV for _, player in ipairs(Players:GetPlayers()) do local head = getTargetHead(player) if head then local screenPos, onScreen = Camera:WorldToViewportPoint(head.Position) if onScreen and screenPos.Z > 0 then local diff = Vector2.new(screenPos.X, screenPos.Y) - center local dist = diff.Magnitude if dist <= closestDist then closestHead = head closestDist = dist end end end end return closestHead end -- Loop principal do aimbot RunService.RenderStepped:Connect(function() if not State.AimbotOn then return end local target = findClosestTarget() if target then -- Mantém a posição da câmera e apenas rotaciona em direção à cabeça local camPos = Camera.CFrame.Position Camera.CFrame = CFrame.new(camPos, target.Position) end -- Sem alvo: não mexemos na câmera → comportamento normal retorna sozinho end)