Rickys Hub V4 TEST DEMO
Key RequiredUniversal

Rickys Hub V4 TEST DEMO

Universal Scriptdonmallettiiidonmallettiii 508 views 160 executesUpdated Apr 6, 2026
Unrated
00
Lua Script•699 lines (27564 chars)
--[[
╔══════════════════════════════════════════════════════════╗
║   R I C K Y S   H U B  —  Premium Executor  v4.0       ║
║   LocalScript  →  StarterPlayerScripts                  ║
╚══════════════════════════════════════════════════════════╝
--]]

local Players      = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UIS          = game:GetService("UserInputService")
local RunService   = game:GetService("RunService")

local plr  = Players.LocalPlayer
local pgui = plr:WaitForChild("PlayerGui")

-- ══════════════════════════════════════════
-- UTILITIES
-- ══════════════════════════════════════════
local function tw(obj, props, t, style)
    TweenService:Create(obj,
        TweenInfo.new(t or 0.18, style or Enum.EasingStyle.Quart, Enum.EasingDirection.Out),
        props):Play()
end
local function addCorner(p, r)
    local c = Instance.new("UICorner"); c.CornerRadius = UDim.new(0, r or 8); c.Parent = p; return c
end
local function addStroke(p, col, thick, trans)
    local s = Instance.new("UIStroke")
    s.Color = col; s.Thickness = thick or 1.5; s.Transparency = trans or 0; s.Parent = p; return s
end
local function addGrad(p, c0, c1, rot)
    local g = Instance.new("UIGradient")
    g.Color = ColorSequence.new(c0, c1); g.Rotation = rot or 90; g.Parent = p; return g
end
local function newFrame(parent, props)
    local f = Instance.new("Frame"); f.BorderSizePixel = 0
    for k, v in pairs(props) do f[k] = v end; f.Parent = parent; return f
end
local function newLabel(parent, props)
    local l = Instance.new("TextLabel"); l.BackgroundTransparency = 1
    for k, v in pairs(props) do l[k] = v end; l.Parent = parent; return l
end

-- ══════════════════════════════════════════
-- PALETTE
-- ══════════════════════════════════════════
local BG0     = Color3.fromRGB(9,  8, 12)
local BG1     = Color3.fromRGB(13, 11, 18)
local BG2     = Color3.fromRGB(18, 14, 26)
local BG3     = Color3.fromRGB(23, 17, 34)
local BORDER  = Color3.fromRGB(50, 20, 80)
local ACCENT  = Color3.fromRGB(140,  0, 220)
local ACCENT2 = Color3.fromRGB(220,  0,  90)
local ACCENTG = Color3.fromRGB( 30, 200,  90)
local ACCENTR = Color3.fromRGB(200,  40,  40)
local ACCENTB = Color3.fromRGB( 40, 140, 255)
local TEXT    = Color3.fromRGB(228, 218, 238)
local SUBTXT  = Color3.fromRGB(120, 105, 145)
local EDITOR  = Color3.fromRGB( 10,  8, 16)
local LINENR  = Color3.fromRGB( 55, 40, 80)
local BTNBG   = Color3.fromRGB( 20, 14, 32)
local BTNHOV  = Color3.fromRGB( 70,  8, 110)
local TAB_ACT = Color3.fromRGB( 95,  0, 145)
local TAB_DEF = Color3.fromRGB( 17, 11, 25)
local TAB_HOV = Color3.fromRGB( 38,  6, 58)

-- ══════════════════════════════════════════
-- SCREEN GUI
-- ══════════════════════════════════════════
if pgui:FindFirstChild("RickysHub") then pgui.RickysHub:Destroy() end

local SG = Instance.new("ScreenGui")
SG.Name           = "RickysHub"
SG.ResetOnSpawn   = false
SG.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
SG.IgnoreGuiInset = true
SG.DisplayOrder   = 999
SG.Parent         = pgui

-- ══════════════════════════════════════════
-- HEAD BILLBOARD
-- ══════════════════════════════════════════
local tagOn = true
local function MakeBillboard()
    local char = plr.Character or plr.CharacterAdded:Wait()
    local head = char:WaitForChild("Head", 5); if not head then return end
    if char:FindFirstChild("RickysTag") then char.RickysTag:Destroy() end

    local bb = Instance.new("BillboardGui")
    bb.Name = "RickysTag"; bb.Adornee = head
    bb.Size = UDim2.new(0, 220, 0, 38); bb.StudsOffset = Vector3.new(0, 3.2, 0)
    bb.AlwaysOnTop = false; bb.Enabled = tagOn; bb.Parent = char

    local bg = newFrame(bb, { Size=UDim2.new(1,0,1,0), BackgroundColor3=Color3.fromRGB(8,5,14) })
    addCorner(bg, 19); addStroke(bg, Color3.fromRGB(160, 0, 220), 1.5)
    addGrad(bg, Color3.fromRGB(160, 0, 220), Color3.fromRGB(200, 0, 0), 0)
    newLabel(bg, {
        Size=UDim2.new(1,0,1,0), Text="⚡  Rickys User",
        TextColor3=Color3.fromRGB(255,255,255), TextScaled=true, Font=Enum.Font.GothamBold,
    })
    return bb
end
local headBB = MakeBillboard()
plr.CharacterAdded:Connect(function() task.wait(1); headBB = MakeBillboard() end)

-- ══════════════════════════════════════════
-- TOAST NOTIFICATION
-- ══════════════════════════════════════════
local toastBg = newFrame(SG, {
    Size=UDim2.new(0,320,0,46), Position=UDim2.new(0.5,-160,1,-70),
    BackgroundColor3=BG2, BackgroundTransparency=1, ZIndex=999,
})
addCorner(toastBg, 11)
addStroke(toastBg, ACCENT, 1.5)

local toastDot = newFrame(toastBg, {
    Size=UDim2.new(0,7,0,7), Position=UDim2.new(0,14,0.5,-3.5),
    BackgroundColor3=ACCENTG, ZIndex=1000,
})
addCorner(toastDot, 4)

local toastTxt = newLabel(toastBg, {
    Size=UDim2.new(1,-35,1,0), Position=UDim2.new(0,30,0,0),
    Text="", TextColor3=TEXT, TextSize=13, Font=Enum.Font.GothamSemibold,
    TextXAlignment=Enum.TextXAlignment.Left, TextTransparency=1, ZIndex=1000,
})

local function Notify(msg, kind)
    toastDot.BackgroundColor3 = kind=="err" and ACCENTR or kind=="warn" and Color3.fromRGB(220,160,0) or ACCENTG
    toastTxt.Text = msg
    tw(toastBg,  {BackgroundTransparency=0.07}, 0.2)
    tw(toastTxt, {TextTransparency=0},          0.2)
    task.delay(2.8, function()
        tw(toastBg,  {BackgroundTransparency=1}, 0.3)
        tw(toastTxt, {TextTransparency=1},       0.3)
    end)
end

-- ══════════════════════════════════════════
-- MAIN WINDOW
-- ══════════════════════════════════════════
local WW, WH = 920, 590

local win = newFrame(SG, {
    Name="Window",
    Size=UDim2.new(0,WW,0,WH),
    Position=UDim2.new(0.5,-WW/2,0.5,-WH/2),
    BackgroundColor3=BG0, ClipsDescendants=true,
})
addCorner(win, 14)
addStroke(win, BORDER, 2)
addGrad(win, Color3.fromRGB(15, 10, 22), Color3.fromRGB(7, 6, 11), 140)

-- Top glow strip
local topStrip = newFrame(win, { Size=UDim2.new(1,0,0,2), BackgroundColor3=ACCENT, ZIndex=3 })
addGrad(topStrip, ACCENT, ACCENT2, 0)

-- ── TITLE BAR ──────────────────────────────
local titleBar = newFrame(win, {
    Size=UDim2.new(1,0,0,52), BackgroundColor3=BG1, ZIndex=5,
})
newFrame(titleBar, {
    Size=UDim2.new(1,0,0,1), Position=UDim2.new(0,0,1,-1),
    BackgroundColor3=BORDER, ZIndex=6,
})

-- Logo pill
local logoPill = newFrame(titleBar, {
    Size=UDim2.new(0,40,0,40), Position=UDim2.new(0,12,0.5,-20),
    BackgroundColor3=ACCENT, ZIndex=7,
})
addCorner(logoPill, 9)
addGrad(logoPill, ACCENT, ACCENT2, 135)
newLabel(logoPill, {
    Size=UDim2.new(1,0,1,0), Text="R", TextColor3=Color3.fromRGB(255,255,255),
    TextSize=22, Font=Enum.Font.GothamBold, ZIndex=8,
})

-- Title text
newLabel(titleBar, {
    Size=UDim2.new(0,240,0,26), Position=UDim2.new(0,60,0,7),
    Text="RICKYS HUB", TextColor3=Color3.fromRGB(255,255,255),
    TextSize=17, Font=Enum.Font.GothamBold,
    TextXAlignment=Enum.TextXAlignment.Left, ZIndex=7,
})
newLabel(titleBar, {
    Size=UDim2.new(0,260,0,16), Position=UDim2.new(0,60,0,30),
    Text="Premium Executor  ·  v4.0", TextColor3=SUBTXT,
    TextSize=10, Font=Enum.Font.Gotham,
    TextXAlignment=Enum.TextXAlignment.Left, ZIndex=7,
})

-- Live status
local statusDot = newFrame(titleBar, {
    Size=UDim2.new(0,8,0,8), Position=UDim2.new(0,330,0.5,-4),
    BackgroundColor3=ACCENTG, ZIndex=7,
})
addCorner(statusDot, 4)
newLabel(titleBar, {
    Size=UDim2.new(0,70,1,0), Position=UDim2.new(0,344,0,0),
    Text="ATTACHED", TextColor3=ACCENTG, TextSize=10,
    Font=Enum.Font.GothamBold, TextXAlignment=Enum.TextXAlignment.Left, ZIndex=7,
})

-- Separator dots decoration
for i = 0, 2 do
    local dot = newFrame(titleBar, {
        Size=UDim2.new(0,3,0,3),
        Position=UDim2.new(0,424+i*9,0.5,-1.5),
        BackgroundColor3=SUBTXT, ZIndex=7,
    })
    addCorner(dot, 2)
end

-- ── WIN CONTROL BUTTONS ───────────────────
local function WinBtn(xOff, bg, ico)
    local b = Instance.new("TextButton")
    b.Size=UDim2.new(0,30,0,24); b.Position=UDim2.new(1,xOff,0.5,-12)
    b.BackgroundColor3=bg; b.Text=ico
    b.TextColor3=Color3.fromRGB(255,255,255); b.TextSize=13
    b.Font=Enum.Font.GothamBold; b.BorderSizePixel=0
    b.AutoButtonColor=false; b.ZIndex=8; b.Parent=titleBar
    addCorner(b, 6)
    b.MouseEnter:Connect(function() tw(b,{BackgroundTransparency=0.3}) end)
    b.MouseLeave:Connect(function() tw(b,{BackgroundTransparency=0}) end)
    return b
end
local btnClose = WinBtn(-40,  Color3.fromRGB(190, 32, 32), "✕")
local btnMin   = WinBtn(-76,  Color3.fromRGB(175,105,  0), "⎯")
local btnMax   = WinBtn(-112, Color3.fromRGB( 30,145, 30), "+")

-- ── DRAGGING ──────────────────────────────
do
    local drag, ds, ws
    titleBar.InputBegan:Connect(function(i)
        if i.UserInputType == Enum.UserInputType.MouseButton1 then
            drag=true; ds=i.Position; ws=win.Position
            i.Changed:Connect(function()
                if i.UserInputState==Enum.UserInputState.End then drag=false end
            end)
        end
    end)
    UIS.InputChanged:Connect(function(i)
        if drag and i.UserInputType==Enum.UserInputType.MouseMovement then
            local d = i.Position-ds
            win.Position = UDim2.new(ws.X.Scale,ws.X.Offset+d.X,ws.Y.Scale,ws.Y.Offset+d.Y)
        end
    end)
end

-- ── MIN / CLOSE / MAX ─────────────────────
local minimised = false
btnMin.MouseButton1Click:Connect(function()
    minimised = not minimised
    tw(win, {Size = minimised and UDim2.new(0,WW,0,52) or UDim2.new(0,WW,0,WH)}, 0.25)
end)

local reopenBtn = Instance.new("TextButton")
reopenBtn.Size=UDim2.new(0,148,0,36); reopenBtn.Position=UDim2.new(0,12,0.5,-18)
reopenBtn.BackgroundColor3=BG2; reopenBtn.Text="⚡  RICKYS HUB"
reopenBtn.TextColor3=Color3.fromRGB(255,255,255); reopenBtn.TextSize=12
reopenBtn.Font=Enum.Font.GothamBold; reopenBtn.BorderSizePixel=0
reopenBtn.Visible=false; reopenBtn.ZIndex=999; reopenBtn.Parent=SG
addCorner(reopenBtn, 10); addStroke(reopenBtn, ACCENT, 1.5)

btnClose.MouseButton1Click:Connect(function()
    tw(win, {Size=UDim2.new(0,WW,0,0),Position=UDim2.new(0.5,-WW/2,0.5,0)}, 0.22)
    task.wait(0.25); win.Visible=false
    if headBB then headBB.Enabled=false end; reopenBtn.Visible=true
end)
reopenBtn.MouseButton1Click:Connect(function()
    win.Visible=true; win.Size=UDim2.new(0,0,0,0); win.Position=UDim2.new(0.5,0,0.5,0)
    tw(win, {Size=UDim2.new(0,WW,0,WH),Position=UDim2.new(0.5,-WW/2,0.5,-WH/2)}, 0.28)
    if headBB then headBB.Enabled=true end; reopenBtn.Visible=false
end)

local big = false
btnMax.MouseButton1Click:Connect(function()
    big = not big
    if big then tw(win,{Size=UDim2.new(0.96,0,0.93,0),Position=UDim2.new(0.02,0,0.035,0)},0.25)
    else tw(win,{Size=UDim2.new(0,WW,0,WH),Position=UDim2.new(0.5,-WW/2,0.5,-WH/2)},0.25) end
end)

-- ══════════════════════════════════════════
-- BODY
-- ══════════════════════════════════════════
local body = newFrame(win, {
    Size=UDim2.new(1,0,1,-52), Position=UDim2.new(0,0,0,52),
    BackgroundTransparency=1, ClipsDescendants=true,
})

-- ── LEFT SIDEBAR ──────────────────────────
local SB = 195

local sidebar = newFrame(body, { Size=UDim2.new(0,SB,1,0), BackgroundColor3=BG1 })

-- Sidebar heading
newLabel(sidebar, {
    Size=UDim2.new(1,0,0,30),
    Text="  SAVED SCRIPTS", TextColor3=SUBTXT, TextSize=9,
    Font=Enum.Font.GothamBold, TextXAlignment=Enum.TextXAlignment.Left,
    LetterSpacing=3,
})

-- Sidebar scroll
local sideScroll = Instance.new("ScrollingFrame")
sideScroll.Size=UDim2.new(1,0,1,-32); sideScroll.Position=UDim2.new(0,0,0,32)
sideScroll.BackgroundTransparency=1; sideScroll.BorderSizePixel=0
sideScroll.ScrollBarThickness=2; sideScroll.ScrollBarImageColor3=ACCENT
sideScroll.ScrollBarImageTransparency=0.4
sideScroll.CanvasSize=UDim2.new(0,0,0,0); sideScroll.AutomaticCanvasSize=Enum.AutomaticSize.Y
sideScroll.Parent=sidebar

local sideListLayout = Instance.new("UIListLayout")
sideListLayout.Padding=UDim.new(0,3); sideListLayout.Parent=sideScroll

local sidePad = Instance.new("UIPadding")
sidePad.PaddingLeft=UDim.new(0,6); sidePad.PaddingRight=UDim.new(0,6)
sidePad.PaddingTop=UDim.new(0,2); sidePad.PaddingBottom=UDim.new(0,8)
sidePad.Parent=sideScroll

-- Sidebar right border
newFrame(body, {
    Size=UDim2.new(0,1,1,0), Position=UDim2.new(0,SB,0,0),
    BackgroundColor3=BORDER,
})

-- ── MAIN EDITOR PANEL ─────────────────────
local mainPanel = newFrame(body, {
    Size=UDim2.new(1,-(SB+1),1,0), Position=UDim2.new(0,SB+1,0,0),
    BackgroundColor3=BG0,
})

-- ── INNER TAB BAR ─────────────────────────
local tabBar = newFrame(mainPanel, {
    Size=UDim2.new(1,0,0,36), BackgroundColor3=BG1,
})
newFrame(tabBar, {
    Size=UDim2.new(1,0,0,1), Position=UDim2.new(0,0,1,-1),
    BackgroundColor3=BORDER,
})

local activeTopTab = nil
local topTabInds   = {}

local function MakeTopTab(name, onSelect)
    local t = Instance.new("TextButton")
    t.Size=UDim2.new(0,110,1,0); t.BackgroundTransparency=1
    t.Text=name; t.TextColor3=SUBTXT; t.TextSize=12
    t.Font=Enum.Font.GothamSemibold; t.BorderSizePixel=0; t.AutoButtonColor=false
    t.Parent=tabBar

    local ind = newFrame(t, {
        Size=UDim2.new(0.75,0,0,2), Position=UDim2.new(0.125,0,1,-2),
        BackgroundColor3=ACCENT, BackgroundTransparency=1,
    })

    t.MouseButton1Click:Connect(function()
        -- deactivate old
        if activeTopTab and activeTopTab~=t then
            tw(activeTopTab,{TextColor3=SUBTXT},0.1)
            if topTabInds[activeTopTab] then
                tw(topTabInds[activeTopTab],{BackgroundTransparency=1},0.15)
            end
        end
        activeTopTab=t; topTabInds[t]=ind
        tw(t,{TextColor3=TEXT},0.1)
        tw(ind,{BackgroundTransparency=0},0.15)
        if onSelect then onSelect() end
    end)

    return t, ind
end

-- ── EDITOR AREA ───────────────────────────
local editorOuter = newFrame(mainPanel, {
    Size=UDim2.new(1,0,1,-36-130),
    Position=UDim2.new(0,0,0,36),
    BackgroundColor3=EDITOR,
})

-- Line numbers column
local lineCol = newFrame(editorOuter, {
    Size=UDim2.new(0,46,1,0), BackgroundColor3=Color3.fromRGB(12,9,18),
})
newFrame(lineCol, {
    Size=UDim2.new(0,1,1,0), Position=UDim2.new(1,-1,0,0),
    BackgroundColor3=BORDER,
})

local lineNumTxt = newLabel(lineCol, {
    Size=UDim2.new(1,-4,1,-10), Position=UDim2.new(0,0,0,8),
    TextColor3=LINENR, TextSize=13, Font=Enum.Font.Code,
    TextXAlignment=Enum.TextXAlignment.Right,
    TextYAlignment=Enum.TextYAlignment.Top,
    Text="",
})

-- Code TextBox
local codeBox = Instance.new("TextBox")
codeBox.Size=UDim2.new(1,-54,1,-10); codeBox.Position=UDim2.new(0,52,0,8)
codeBox.BackgroundTransparency=1; codeBox.BorderSizePixel=0
codeBox.Text="-- Rickys Hub Executor v4\n-- Type your code and press Execute\n\nprint(\"Hello from Rickys Hub!\")"
codeBox.TextColor3=Color3.fromRGB(195,175,255); codeBox.TextSize=13
codeBox.Font=Enum.Font.Code; codeBox.MultiLine=true; codeBox.ClearTextOnFocus=false
codeBox.TextXAlignment=Enum.TextXAlignment.Left; codeBox.TextYAlignment=Enum.TextYAlignment.Top
codeBox.PlaceholderText="-- Write your Lua code here..."
codeBox.PlaceholderColor3=SUBTXT; codeBox.Parent=editorOuter

-- Update line numbers
local function UpdateLines(txt)
    local count = 1
    for _ in txt:gmatch("\n") do count+=1 end
    count = math.max(count, 22)
    local t={}; for i=1,count do t[i]=tostring(i) end
    lineNumTxt.Text = table.concat(t,"\n")
end
codeBox:GetPropertyChangedSignal("Text"):Connect(function() UpdateLines(codeBox.Text) end)
UpdateLines(codeBox.Text)

-- Active line highlight (cosmetic)
local lineHL = newFrame(editorOuter, {
    Size=UDim2.new(1,-46,0,15), Position=UDim2.new(0,46,0,8),
    BackgroundColor3=Color3.fromRGB(100,0,180), BackgroundTransparency=0.9,
})

-- ── BOTTOM PANEL ──────────────────────────
local bottomH = 130
local bottomPanel = newFrame(mainPanel, {
    Size=UDim2.new(1,0,0,bottomH), Position=UDim2.new(0,0,1,-bottomH),
    BackgroundColor3=BG1,
})
newFrame(bottomPanel, {
    Size=UDim2.new(1,0,0,1), BackgroundColor3=BORDER,
})

-- ── CONSOLE ───────────────────────────────
local consoleWrap = newFrame(bottomPanel, {
    Size=UDim2.new(1,-196,1,-14), Position=UDim2.new(0,8,0,8),
    BackgroundColor3=EDITOR,
})
addCorner(consoleWrap, 8); addStroke(consoleWrap, BORDER, 1.5)

newLabel(consoleWrap, {
    Size=UDim2.new(1,0,0,20), Position=UDim2.new(0,10,0,1),
    Text="OUTPUT", TextColor3=SUBTXT, TextSize=9,
    Font=Enum.Font.GothamBold, TextXAlignment=Enum.TextXAlignment.Left, LetterSpacing=4,
})

-- Console gutter dot
local cgDot = newFrame(consoleWrap, {
    Size=UDim2.new(0,6,0,6), Position=UDim2.new(1,-16,0,7),
    BackgroundColor3=ACCENTG,
})
addCorner(cgDot,3)

local consoleScroll = Instance.new("ScrollingFrame")
consoleScroll.Size=UDim2.new(1,-10,1,-24); consoleScroll.Position=UDim2.new(0,6,0,22)
consoleScroll.BackgroundTransparency=1; consoleScroll.BorderSizePixel=0
consoleScroll.ScrollBarThickness=2; consoleScroll.ScrollBarImageColor3=ACCENT
consoleScroll.ScrollBarImageTransparency=0.5
consoleScroll.CanvasSize=UDim2.new(0,0,0,0); consoleScroll.AutomaticCanvasSize=Enum.AutomaticSize.Y
consoleScroll.Parent=consoleWrap

local consoleListLayout=Instance.new("UIListLayout")
consoleListLayout.Padding=UDim.new(0,1); consoleListLayout.Parent=consoleScroll

local function ConsolePrint(msg, kind)
    local col = kind=="err" and ACCENTR or kind=="warn" and Color3.fromRGB(220,160,0)
             or kind=="sys" and Color3.fromRGB(140,100,220) or ACCENTG
    local prefix = kind=="err" and "ERR" or kind=="warn" and "WRN" or kind=="sys" and "SYS" or "OUT"
    local row = newLabel(consoleScroll, {
        Size=UDim2.new(1,0,0,14),
        Text=" ["..prefix.."]  "..tostring(msg):sub(1,200),
        TextColor3=col, TextSize=11, Font=Enum.Font.Code,
        TextXAlignment=Enum.TextXAlignment.Left,
    })
    task.wait()
    consoleScroll.CanvasPosition = Vector2.new(0, consoleListLayout.AbsoluteContentSize.Y+40)
    return row
end

-- ── EXECUTE / ACTION BUTTONS ──────────────
local btnWrap = newFrame(bottomPanel, {
    Size=UDim2.new(0,180,1,-14), Position=UDim2.new(1,-188,0,8),
    BackgroundTransparency=1,
})
local btnWrapList=Instance.new("UIListLayout")
btnWrapList.Padding=UDim.new(0,6); btnWrapList.Parent=btnWrap

local function ActionBtn(ico, txt, accentCol, cb)
    local b = Instance.new("TextButton")
    b.Size=UDim2.new(1,0,0,28); b.BackgroundColor3=BTNBG
    b.Text=""; b.BorderSizePixel=0; b.AutoButtonColor=false; b.Parent=btnWrap
    addCorner(b,7); addStroke(b,accentCol,1.2,0.45)

    newLabel(b,{Size=UDim2.new(0,26,1,0),Text=ico,TextSize=13,Font=Enum.Font.GothamBold,TextColor3=accentCol})
    newLabel(b,{
        Size=UDim2.new(1,-30,1,0),Position=UDim2.new(0,28,0,0),
        Text=txt,TextSize=12,Font=Enum.Font.GothamSemibold,TextColor3=TEXT,
        TextXAlignment=Enum.TextXAlignment.Left,
    })

    b.MouseEnter:Connect(function() tw(b,{BackgroundColor3=BTNHOV},0.1) end)
    b.MouseLeave:Connect(function() tw(b,{BackgroundColor3=BTNBG},0.1) end)
    b.MouseButton1Click:Connect(function()
        tw(b,{BackgroundColor3=accentCol},0.08)
        task.delay(0.14,function() tw(b,{BackgroundColor3=BTNBG},0.14) end)
        task.spawn(function() if cb then pcall(cb) end end)
    end)
    return b
end

-- ══════════════════════════════════════════
-- EXECUTE ENGINE
-- ══════════════════════════════════════════
local function Execute(code)
    if not code or code:gsub("%s","") == "" then
        Notify("Nothing to execute","warn"); ConsolePrint("No code provided.","warn"); return
    end
    ConsolePrint("─── Executing ───────────────────────────────","sys")
    local fn, compErr = loadstring(code)
    if not fn then
        Notify("Syntax error","err"); ConsolePrint(tostring(compErr),"err"); return
    end
    local ok, runErr = pcall(fn)
    if ok then
        Notify("Executed successfully ✓"); ConsolePrint("Script finished successfully.","sys")
    else
        Notify("Runtime error","err"); ConsolePrint(tostring(runErr),"err")
    end
end

-- Wired action buttons
ActionBtn("▶","Execute",    ACCENTG, function() Execute(codeBox.Text) end)
ActionBtn("🗑","Clear",     Color3.fromRGB(200,140,0), function()
    codeBox.Text=""; Notify("Editor cleared","warn"); ConsolePrint("Editor cleared.","sys") end)
ActionBtn("📋","Copy",      ACCENTB, function()
    local ok=pcall(function() setclipboard(codeBox.Text) end)
    Notify(ok and "Copied!" or "Copy not supported","warn"); ConsolePrint("Copy attempted.","sys") end)
ActionBtn("✕","Clear Output",ACCENTR, function()
    for _,c in ipairs(consoleScroll:GetChildren()) do if c:IsA("TextLabel") then c:Destroy() end end
    Notify("Output cleared"); ConsolePrint("Console cleared.","sys") end)

-- ══════════════════════════════════════════
-- SAVED SCRIPTS (left sidebar)
-- ══════════════════════════════════════════
local savedScripts = {
    { name="👟  Speed ×6",      code='game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 96' },
    { name="🦘  Jump Power",    code='game.Players.LocalPlayer.Character.Humanoid.JumpPower = 200' },
    { name="⚡  God Mode",      code='local h=game.Players.LocalPlayer.Character.Humanoid\nh.MaxHealth=math.huge\nh.Health=math.huge\nprint("God mode!")' },
    { name="♾️  Infinite Jump", code=[[
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
UIS.JumpRequest:Connect(function()
    if plr.Character then
        plr.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
    end
end)
print("Infinite jump!")]] },
    { name="🫥  Invisible",     code=[[
for _, p in ipairs(game.Players.LocalPlayer.Character:GetDescendants()) do
    if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then
        p.Transparency = 1
    end
end
print("Invisible!")]] },
    { name="👤  Visible",       code=[[
for _, p in ipairs(game.Players.LocalPlayer.Character:GetDescendants()) do
    if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then
        p.Transparency = 0
    end
end
print("Visible!")]] },
    { name="🌌  Zero Gravity",  code='workspace.Gravity=0\nprint("Zero gravity!")' },
    { name="🌍  Normal Gravity",code='workspace.Gravity=196.2\nprint("Normal gravity!")' },
    { name="🔮  Noclip",        code=[[
local RS = game:GetService("RunService")
RS.Stepped:Connect(function()
    for _, p in ipairs(game.Players.LocalPlayer.Character:GetDescendants()) do
        if p:IsA("BasePart") then p.CanCollide = false end
    end
end)
print("Noclip!")]] },
    { name="📍  TP to Spawn",   code='game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame=CFrame.new(0,10,0)\nprint("Teleported!")' },
    { name="❤️  Full HP",       code='local h=game.Players.LocalPlayer.Character.Humanoid\nh.Health=h.MaxHealth\nprint("Full HP!")' },
    { name="🌞  Set Day",       code='game:GetService("Lighting").ClockTime=12\nprint("Day!")' },
    { name="🌙  Set Night",     code='game:GetService("Lighting").ClockTime=0\nprint("Night!")' },
    { name="☀️  Max Brightness",code='game:GetService("Lighting").Brightness=10\nprint("Max brightness!")' },
    { name="👥  Print Players", code=[[
for _, p in ipairs(game.Players:GetPlayers()) do
    print(p.Name .. "  |  ID: " .. p.UserId)
end]] },
    { name="🌈  Rainbow Char",  code=[[
local RS = game:GetService("RunService")
local t = 0
RS.Heartbeat:Connect(function(dt)
    t += dt
    local char = game.Players.LocalPlayer.Character
    if char then
        for _, p in ipairs(char:GetDescendants()) do
            if p:IsA("BasePart") and p.Name ~= "HumanoidRootPart" then
                p.Color = Color3.fromHSV((t*0.25)%1, 1, 1)
            end
        end
    end
end)
print("Rainbow!")]] },
    { name="🧊  Freeze Char",   code='game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored=true\nprint("Frozen!")' },
    { name="🔥  Unfreeze",      code='game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored=false\nprint("Unfrozen!")' },
    { name="📸  1st Person",    code='game.Players.LocalPlayer.CameraMaxZoomDistance=0.5\nprint("First person!")' },
    { name="📷  3rd Person",    code='game.Players.LocalPlayer.CameraMaxZoomDistance=40\nprint("Third person!")' },
    { name="⏩  Anti-AFK",      code=[[
local VU = game:GetService("VirtualUser")
game.Players.LocalPlayer.Idled:Connect(function()
    VU:CaptureController(); VU:ClickButton2(Vector2.new())
end)
print("Anti-AFK on!")]] },
    { name="💬  Hello World",   code='print("Hello from Rickys Hub! 👋")' },
}

local activeSideBtn = nil

local function MakeSideBtn(snip)
    local btn = Instance.new("TextButton")
    btn.Size=UDim2.new(1,0,0,32); btn.BackgroundColor3=TAB_DEF
    btn.Text=""; btn.BorderSizePixel=0; btn.AutoButtonColor=false; btn.Parent=sideScroll
    addCorner(btn,7)

    -- Active bar
    local bar = newFrame(btn,{
        Size=UDim2.new(0,3,0.55,0), Position=UDim2.new(0,0,0.225,0),
        BackgroundColor3=ACCENT, BackgroundTransparency=1,
    }); addCorner(bar,2)

    newLabel(btn,{
        Size=UDim2.new(1,-10,1,0), Position=UDim2.new(0,10,0,0),
        Text=snip.name, TextColor3=TEXT, TextSize=12,
        Font=Enum.Font.GothamSemibold, TextXAlignment=Enum.TextXAlignment.Left,
    })

    btn.MouseEnter:Connect(function()
        if btn~=activeSideBtn then tw(btn,{BackgroundColor3=TAB_HOV},0.1) end
    end)
    btn.MouseLeave:Connect(function()
        if btn~=activeSideBtn then tw(btn,{BackgroundColor3=TAB_DEF},0.1) end
    end)
    btn.MouseButton1Click:Connect(function()
        if activeSideBtn then
            tw(activeSideBtn,{BackgroundColor3=TAB_DEF},0.15)
            for _,c in ipairs(activeSideBtn:GetChildren()) do
                if c:IsA("Frame") then tw(c,{BackgroundTransparency=1},0.1) end
            end
        end
        activeSideBtn=btn
        tw(btn,{BackgroundColor3=TAB_ACT},0.15)
        tw(bar,{BackgroundTransparency=0},0.15)
        codeBox.Text = snip.code:gsub("^[\n\r]+",""):gsub("[\n\r]+$","")
        UpdateLines(codeBox.Text)
        ConsolePrint('Loaded: "'..snip.name:gsub("[^%a%s]",""):gsub("^%s+","")..'"',"sys")
        Notify("Loaded script")
    end)
end

for _,s in ipairs(savedScripts) do MakeSideBtn(s) end

-- ══════════════════════════════════════════
-- TOP TAB WIRING
-- ══════════════════════════════════════════
local t1,i1 = MakeTopTab("EDITOR",   function() editorOuter.Visible=true end)
local t2,i2 = MakeTopTab("CONSOLE",  function()
    task.wait(0.05)
    consoleScroll.CanvasPosition=Vector2.new(0,consoleListLayout.AbsoluteContentSize.Y+40)
end)
local t3,i3 = MakeTopTab("SETTINGS", function()
    ConsolePrint("Settings panel coming soon.","sys"); Notify("Coming soon","warn") end)

-- activate first tab visually
tw(t1,{TextColor3=TEXT},0); tw(i1,{BackgroundTransparency=0},0); activeTopTab=t1; topTabInds[t1]=i1

-- ══════════════════════════════════════════
-- KEYBOARD SHORTCUTS
-- ══════════════════════════════════════════
UIS.InputBegan:Connect(function(input, gpe)
    if gpe then return end
    local ctrl = UIS:IsKeyDown(Enum.KeyCode.LeftControl) or UIS:IsKeyDown(Enum.KeyCode.RightControl)
    if ctrl and input.KeyCode==Enum.KeyCode.Return then Execute(codeBox.Text) end
    if ctrl and input.KeyCode==Enum.KeyCode.L      then codeBox.Text="" end
end)

-- ══════════════════════════════════════════
-- STARTUP MESSAGES
-- ══════════════════════════════════════════
ConsolePrint("Rickys Hub v4.0 — Premium Executor","sys")
ConsolePrint("Select a saved script or write your own.","sys")
ConsolePrint("Shortcut: Ctrl+Enter to execute  |  Ctrl+L to clear","sys")
ConsolePrint("──────────────────────────────────────────────────","sys")
Notify("⚡ Rickys Hub ready!")
print("[Rickys Hub v4] Loaded.")

Features & Information

Hmm execute in random ahh game

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts