Ultra Service Load
Key RequiredUniversal

Ultra Service Load

Universal ScriptWeduxisWeduxis 28 views 29 executesUpdated Jul 19, 2026
Unrated
00
Lua Script•1084 lines (34056 chars)
--[[
    ╔══════════════════════════════════════╗
    ║   ULTRA HUB — ALL IN ONE SCRIPT      ║
    ║   Un solo script con todo incluido:   ║
    ║   GUI, funciones, colores, botones.  ║
    ║   Place in StarterPlayerScripts       ║
    ╚══════════════════════════════════════╝
]]

--// ═══════════════ SERVICES ═══════════════
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

--// ═══════════════ PLAYER ═══════════════
local player = Players.LocalPlayer

--// ═══════════════ CONFIG ═══════════════
local openKey = Enum.KeyCode.K
local savedSpeed = 16
local flySpeedVal = 80
local spinSpeedVal = 720
local hitboxSizeVal = 5

--// ═══════════════ STATES ═══════════════
local guiVisible = true
local minimized = false
local currentTab = "Main"
local flyOn = false
local spinOn = false
local noclipOn = false
local infJumpOn = false
local invisibleOn = false
local autoShotOn = false
local hitboxEspOn = false
local musicOn = true

--// ═══════════════ INTERNALS ═══════════════
local flyBV, flyBG, flyConn
local spinConn
local noclipConn
local invisibleActive = false
local invisibleOriginals = {}
local invisibleConn
local autoShotConn
local hitboxEspObjects = {}
local hitboxEspLoopConn

--// ═══════════════ COLOR THEME ═══════════════
local C = {
    bg       = Color3.fromRGB(15, 15, 28),
    top      = Color3.fromRGB(20, 20, 38),
    accent   = Color3.fromRGB(88, 101, 242),
    accentH  = Color3.fromRGB(110, 120, 255),
    text     = Color3.fromRGB(225, 225, 240),
    sub      = Color3.fromRGB(130, 130, 160),
    btn      = Color3.fromRGB(28, 28, 52),
    btnH     = Color3.fromRGB(40, 40, 68),
    off      = Color3.fromRGB(50, 50, 72),
    on       = Color3.fromRGB(88, 101, 242),
    input    = Color3.fromRGB(22, 22, 42),
    div      = Color3.fromRGB(38, 38, 62),
    notif    = Color3.fromRGB(20, 20, 38),
    sliderBg = Color3.fromRGB(38, 38, 62),
    sliderFl = Color3.fromRGB(88, 101, 242),
    red      = Color3.fromRGB(220, 60, 60),
    green    = Color3.fromRGB(60, 200, 80),
}

--// ═══════════════ UI HELPERS ═══════════════
local function corner(obj, r)
    local c = Instance.new("UICorner")
    c.CornerRadius = UDim.new(0, r or 8)
    c.Parent = obj
    return c
end

local function stroke(obj, col, thick)
    local s = Instance.new("UIStroke")
    s.Color = col or C.div
    s.Thickness = thick or 1
    s.Parent = obj
    return s
end

local function pad(obj, t, b, l, r)
    local p = Instance.new("UIPadding")
    p.PaddingTop    = UDim.new(0, t or 0)
    p.PaddingBottom = UDim.new(0, b or 0)
    p.PaddingLeft   = UDim.new(0, l or 0)
    p.PaddingRight  = UDim.new(0, r or 0)
    p.Parent = obj
    return p
end

local function addHover(btn, normalCol, hoverCol)
    btn.MouseEnter:Connect(function()
        TweenService:Create(btn, TweenInfo.new(0.15), {
            BackgroundColor3 = hoverCol
        }):Play()
    end)
    btn.MouseLeave:Connect(function()
        TweenService:Create(btn, TweenInfo.new(0.15), {
            BackgroundColor3 = normalCol
        }):Play()
    end)
end

--// ═══════════════ NOTIFICATION SYSTEM ═══════════════
local gui = Instance.new("ScreenGui")
gui.Name = "UltraHub"
gui.ResetOnSpawn = false
gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling

local function showNotification(text, duration)
    duration = duration or 5
    local notif = Instance.new("Frame")
    notif.Size = UDim2.new(0, 260, 0, 54)
    notif.Position = UDim2.new(1, 280, 0.82, 0)
    notif.BackgroundColor3 = C.notif
    notif.BorderSizePixel = 0
    notif.Parent = gui
    corner(notif, 10)
    stroke(notif, C.accent, 1)

    local nLbl = Instance.new("TextLabel")
    nLbl.Size = UDim2.new(1, -16, 1, 0)
    nLbl.Position = UDim2.new(0, 8, 0, 0)
    nLbl.BackgroundTransparency = 1
    nLbl.Text = text
    nLbl.TextColor3 = C.text
    nLbl.TextSize = 12
    nLbl.Font = Enum.Font.Gotham
    nLbl.TextWrapped = true
    nLbl.TextXAlignment = Enum.TextXAlignment.Center
    nLbl.Parent = notif

    TweenService:Create(notif, TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
        Position = UDim2.new(1, -280, 0.82, 0)
    }):Play()

    task.delay(duration, function()
        if not notif or not notif.Parent then return end
        local t = TweenService:Create(notif, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
            Position = UDim2.new(1, 280, 0.82, 0)
        })
        t:Play()
        t.Completed:Connect(function()
            if notif then notif:Destroy() end
        end)
    end)
end

--// ═══════════════ MUSIC ═══════════════
local music = Instance.new("Sound")
music.Name = "BGMusic"
music.SoundId = "rbxassetid://1843456175"
music.Volume = 0.35
music.Looped = true
music.Parent = gui

--// ═══════════════ MAIN FRAME ═══════════════
local main = Instance.new("Frame")
main.Name = "Main"
main.Size = UDim2.new(0, 310, 0, 460)
main.Position = UDim2.new(0.5, -155, 0.5, -230)
main.BackgroundColor3 = C.bg
main.BorderSizePixel = 0
main.ClipsDescendants = true
main.Parent = gui
corner(main, 14)
stroke(main, C.div, 1)

--// ═══════════════ TOP BAR ═══════════════
local topBar = Instance.new("Frame")
topBar.Name = "TopBar"
topBar.Size = UDim2.new(1, 0, 0, 40)
topBar.BackgroundColor3 = C.top
topBar.BorderSizePixel = 0
topBar.Parent = main
corner(topBar, 14)

local topCover = Instance.new("Frame")
topCover.Size = UDim2.new(1, 0, 0, 14)
topCover.Position = UDim2.new(0, 0, 1, -14)
topCover.BackgroundColor3 = C.top
topCover.BorderSizePixel = 0
topCover.Parent = topBar

local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, -80, 1, 0)
title.Position = UDim2.new(0, 14, 0, 0)
title.BackgroundTransparency = 1
title.Text = "Ultra Hub"
title.TextColor3 = C.text
title.TextSize = 18
title.Font = Enum.Font.GothamBold
title.TextXAlignment = Enum.TextXAlignment.Left
title.Parent = topBar

local closeBtn = Instance.new("TextButton")
closeBtn.Size = UDim2.new(0, 28, 0, 28)
closeBtn.Position = UDim2.new(1, -36, 0.5, -14)
closeBtn.BackgroundColor3 = C.red
closeBtn.Text = "\195\151"
closeBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
closeBtn.TextSize = 13
closeBtn.Font = Enum.Font.GothamBold
closeBtn.BorderSizePixel = 0
closeBtn.Parent = topBar
corner(closeBtn, 7)

local minBtn = Instance.new("TextButton")
minBtn.Size = UDim2.new(0, 28, 0, 28)
minBtn.Position = UDim2.new(1, -70, 0.5, -14)
minBtn.BackgroundColor3 = C.btn
minBtn.Text = "\226\128\148"
minBtn.TextColor3 = C.text
minBtn.TextSize = 14
minBtn.Font = Enum.Font.GothamBold
minBtn.BorderSizePixel = 0
minBtn.Parent = topBar
corner(minBtn, 7)

--// ═══════════════ TAB BAR ═══════════════
local tabBar = Instance.new("Frame")
tabBar.Size = UDim2.new(1, -20, 0, 34)
tabBar.Position = UDim2.new(0, 10, 0, 48)
tabBar.BackgroundColor3 = C.btn
tabBar.BorderSizePixel = 0
tabBar.Parent = main
corner(tabBar, 8)

local tabList = Instance.new("UIListLayout")
tabList.FillDirection = Enum.FillDirection.Horizontal
tabList.HorizontalAlignment = Enum.HorizontalAlignment.Center
tabList.Padding = UDim.new(0, 4)
tabList.Parent = tabBar
pad(tabBar, 3, 3, 4, 4)

local mainTabBtn = Instance.new("TextButton")
mainTabBtn.Size = UDim2.new(0.333, -6, 1, -6)
mainTabBtn.BackgroundColor3 = C.accent
mainTabBtn.Text = "Main"
mainTabBtn.TextColor3 = C.text
mainTabBtn.TextSize = 12
mainTabBtn.Font = Enum.Font.GothamBold
mainTabBtn.BorderSizePixel = 0
mainTabBtn.Parent = tabBar
corner(mainTabBtn, 6)

local aimTabBtn = Instance.new("TextButton")
aimTabBtn.Size = UDim2.new(0.333, -6, 1, -6)
aimTabBtn.BackgroundColor3 = Color3.fromRGB(22, 22, 42)
aimTabBtn.Text = "Aim"
aimTabBtn.TextColor3 = C.sub
aimTabBtn.TextSize = 12
aimTabBtn.Font = Enum.Font.GothamBold
aimTabBtn.BorderSizePixel = 0
aimTabBtn.Parent = tabBar
corner(aimTabBtn, 6)

local settTabBtn = Instance.new("TextButton")
settTabBtn.Size = UDim2.new(0.333, -6, 1, -6)
settTabBtn.BackgroundColor3 = Color3.fromRGB(22, 22, 42)
settTabBtn.Text = "Settings"
settTabBtn.TextColor3 = C.sub
settTabBtn.TextSize = 12
settTabBtn.Font = Enum.Font.GothamBold
settTabBtn.BorderSizePixel = 0
settTabBtn.Parent = tabBar
corner(settTabBtn, 6)

--// ═══════════════ CONTENT AREA ═══════════════
local content = Instance.new("Frame")
content.Name = "Content"
content.Size = UDim2.new(1, -20, 1, -92)
content.Position = UDim2.new(0, 10, 0, 88)
content.BackgroundTransparency = 1
content.ClipsDescendants = true
content.Parent = main

local function makeScroll(name, visible)
    local scroll = Instance.new("ScrollingFrame")
    scroll.Name = name
    scroll.Size = UDim2.new(1, 0, 1, 0)
    scroll.BackgroundTransparency = 1
    scroll.BorderSizePixel = 0
    scroll.ScrollBarThickness = 3
    scroll.ScrollBarImageColor3 = C.accent
    scroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
    scroll.CanvasSize = UDim2.new(0, 0, 0, 0)
    scroll.Visible = visible
    scroll.Parent = content

    local list = Instance.new("UIListLayout")
    list.Padding = UDim.new(0, 6)
    list.SortOrder = Enum.SortOrder.LayoutOrder
    list.Parent = scroll
    pad(scroll, 2, 2, 2, 2)

    return scroll
end

local mainScroll = makeScroll("MainScroll", true)
local aimScroll = makeScroll("AimScroll", false)
local settScroll = makeScroll("SettScroll", false)

--// ═══════════════ TOGGLE FACTORY ═══════════════
local toggleStates = {}

local function makeToggle(parent, name, order, callback)
    local f = Instance.new("Frame")
    f.Size = UDim2.new(1, 0, 0, 40)
    f.BackgroundColor3 = C.btn
    f.BorderSizePixel = 0
    f.LayoutOrder = order
    f.Parent = parent
    corner(f, 8)

    local lbl = Instance.new("TextLabel")
    lbl.Size = UDim2.new(1, -65, 1, 0)
    lbl.Position = UDim2.new(0, 12, 0, 0)
    lbl.BackgroundTransparency = 1
    lbl.Text = name
    lbl.TextColor3 = C.text
    lbl.TextSize = 13
    lbl.Font = Enum.Font.Gotham
    lbl.TextXAlignment = Enum.TextXAlignment.Left
    lbl.Parent = f

    local btn = Instance.new("TextButton")
    btn.Size = UDim2.new(0, 44, 0, 22)
    btn.Position = UDim2.new(1, -54, 0.5, -11)
    btn.BackgroundColor3 = C.off
    btn.Text = ""
    btn.BorderSizePixel = 0
    btn.Parent = f
    corner(btn, 11)

    local dot = Instance.new("Frame")
    dot.Size = UDim2.new(0, 18, 0, 18)
    dot.Position = UDim2.new(0, 2, 0.5, -9)
    dot.BackgroundColor3 = Color3.fromRGB(190, 190, 205)
    dot.BorderSizePixel = 0
    dot.Parent = btn
    corner(dot, 9)

    toggleStates[name] = false

    btn.MouseButton1Click:Connect(function()
        toggleStates[name] = not toggleStates[name]
        local st = toggleStates[name]
        TweenService:Create(btn, TweenInfo.new(0.2), {
            BackgroundColor3 = st and C.on or C.off
        }):Play()
        TweenService:Create(dot, TweenInfo.new(0.2), {
            Position = st and UDim2.new(0, 24, 0.5, -9) or UDim2.new(0, 2, 0.5, -9)
        }):Play()
        if callback then callback(st) end
    end)

    return f
end

--// ═══════════════ SLIDER FACTORY ═══════════════
local function makeSlider(parent, name, order, min, max, default, callback)
    local f = Instance.new("Frame")
    f.Size = UDim2.new(1, 0, 0, 60)
    f.BackgroundColor3 = C.btn
    f.BorderSizePixel = 0
    f.LayoutOrder = order
    f.Parent = parent
    corner(f, 8)

    local lbl = Instance.new("TextLabel")
    lbl.Size = UDim2.new(0.55, -12, 0, 20)
    lbl.Position = UDim2.new(0, 12, 0, 6)
    lbl.BackgroundTransparency = 1
    lbl.Text = name
    lbl.TextColor3 = C.text
    lbl.TextSize = 13
    lbl.Font = Enum.Font.Gotham
    lbl.TextXAlignment = Enum.TextXAlignment.Left
    lbl.Parent = f

    local valLbl = Instance.new("TextLabel")
    valLbl.Size = UDim2.new(0.45, -12, 0, 20)
    valLbl.Position = UDim2.new(0.55, 0, 0, 6)
    valLbl.BackgroundTransparency = 1
    valLbl.Text = tostring(math.floor(default))
    valLbl.TextColor3 = C.accent
    valLbl.TextSize = 13
    valLbl.Font = Enum.Font.GothamBold
    valLbl.TextXAlignment = Enum.TextXAlignment.Right
    valLbl.Parent = f

    local track = Instance.new("Frame")
    track.Size = UDim2.new(1, -24, 0, 8)
    track.Position = UDim2.new(0, 12, 0, 36)
    track.BackgroundColor3 = C.sliderBg
    track.BorderSizePixel = 0
    track.Parent = f
    corner(track, 4)

    local fill = Instance.new("Frame")
    fill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0)
    fill.BackgroundColor3 = C.sliderFl
    fill.BorderSizePixel = 0
    fill.Parent = track
    corner(fill, 4)

    local knob = Instance.new("Frame")
    knob.Size = UDim2.new(0, 14, 0, 14)
    knob.Position = UDim2.new(fill.Size.X.Scale, -7, 0.5, -7)
    knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
    knob.BorderSizePixel = 0
    knob.ZIndex = 2
    knob.Parent = track
    corner(knob, 7)

    local function update(val)
        val = math.clamp(val, min, max)
        local pct = (val - min) / (max - min)
        fill.Size = UDim2.new(pct, 0, 1, 0)
        knob.Position = UDim2.new(pct, -7, 0.5, -7)
        valLbl.Text = string.format("%.0f", val)
        if callback then callback(val) end
    end

    local draggingSlider = false

    track.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1
        or input.UserInputType == Enum.UserInputType.Touch then
            draggingSlider = true
            local relX = math.clamp(
                (input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X, 0, 1)
            update(min + relX * (max - min))
        end
    end)

    UIS.InputChanged:Connect(function(input)
        if draggingSlider
        and (input.UserInputType == Enum.UserInputType.MouseMovement
            or input.UserInputType == Enum.UserInputType.Touch) then
            local relX = math.clamp(
                (input.Position.X - track.AbsolutePosition.X) / track.AbsoluteSize.X, 0, 1)
            update(min + relX * (max - min))
        end
    end)

    UIS.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1
        or input.UserInputType == Enum.UserInputType.Touch then
            draggingSlider = false
        end
    end)

    return f, update
end

--// ═══════════════ BUTTON FACTORY ═══════════════
local function makeButton(parent, name, order, bgColor, textColor, callback)
    local f = Instance.new("Frame")
    f.Size = UDim2.new(1, 0, 0, 40)
    f.BackgroundColor3 = bgColor or C.red
    f.BorderSizePixel = 0
    f.LayoutOrder = order
    f.Parent = parent
    corner(f, 8)

    local btn = Instance.new("TextButton")
    btn.Size = UDim2.new(1, 0, 1, 0)
    btn.BackgroundTransparency = 1
    btn.Text = name
    btn.TextColor3 = textColor or Color3.fromRGB(255, 255, 255)
    btn.TextSize = 13
    btn.Font = Enum.Font.GothamBold
    btn.BorderSizePixel = 0
    btn.Parent = f

    if callback then
        btn.MouseButton1Click:Connect(callback)
    end

    return f, btn
end

--// ═══════════════════════════════════════════════
--//              BUILD MAIN TAB
--// ═══════════════════════════════════════════════
makeToggle(mainScroll, "Fly", 1, function(v) flyOn = v end)
makeToggle(mainScroll, "Spin", 2, function(v) spinOn = v end)
makeToggle(mainScroll, "Noclip", 3, function(v) noclipOn = v end)
makeToggle(mainScroll, "Infinite Jump", 4, function(v) infJumpOn = v end)
makeToggle(mainScroll, "Invisible", 5, function(v) invisibleOn = v end)

-- Walk Speed Input
local speedF = Instance.new("Frame")
speedF.Size = UDim2.new(1, 0, 0, 68)
speedF.BackgroundColor3 = C.btn
speedF.BorderSizePixel = 0
speedF.LayoutOrder = 6
speedF.Parent = mainScroll
corner(speedF, 8)

local speedLbl = Instance.new("TextLabel")
speedLbl.Size = UDim2.new(1, -24, 0, 18)
speedLbl.Position = UDim2.new(0, 12, 0, 6)
speedLbl.BackgroundTransparency = 1
speedLbl.Text = "Walk Speed"
speedLbl.TextColor3 = C.text
speedLbl.TextSize = 13
speedLbl.Font = Enum.Font.Gotham
speedLbl.TextXAlignment = Enum.TextXAlignment.Left
speedLbl.Parent = speedF

local speedIn = Instance.new("TextBox")
speedIn.Size = UDim2.new(1, -82, 0, 30)
speedIn.Position = UDim2.new(0, 12, 0, 30)
speedIn.BackgroundColor3 = C.input
speedIn.Text = "16"
speedIn.TextColor3 = C.text
speedIn.PlaceholderText = "Speed..."
speedIn.PlaceholderColor3 = C.sub
speedIn.TextSize = 12
speedIn.Font = Enum.Font.Gotham
speedIn.BorderSizePixel = 0
speedIn.ClearTextOnFocus = false
speedIn.Parent = speedF
corner(speedIn, 6)

local applyBtn = Instance.new("TextButton")
applyBtn.Size = UDim2.new(0, 58, 0, 30)
applyBtn.Position = UDim2.new(1, -70, 0, 30)
applyBtn.BackgroundColor3 = C.accent
applyBtn.Text = "Set"
applyBtn.TextColor3 = C.text
applyBtn.TextSize = 12
applyBtn.Font = Enum.Font.GothamBold
applyBtn.BorderSizePixel = 0
applyBtn.Parent = speedF
corner(applyBtn, 6)

applyBtn.MouseButton1Click:Connect(function()
    local n = tonumber(speedIn.Text)
    if n and n > 0 then
        savedSpeed = n
        local c = player.Character
        if c then
            local h = c:FindFirstChildOfClass("Humanoid")
            if h then h.WalkSpeed = n end
        end
    end
end)

makeSlider(mainScroll, "Fly Speed", 7, 10, 300, 80, function(v) flySpeedVal = v end)
makeSlider(mainScroll, "Spin Speed", 8, 0, 2000, 720, function(v) spinSpeedVal = v end)

--// ═══════════════════════════════════════════════
--//              BUILD AIM TAB
--// ═══════════════════════════════════════════════
makeToggle(aimScroll, "Auto Shot", 1, function(v) autoShotOn = v end)
makeToggle(aimScroll, "Hitbox ESP", 2, function(v) hitboxEspOn = v end)
makeSlider(aimScroll, "Hitbox Size", 3, 1, 20, 5, function(v) hitboxSizeVal = v end)

local _, autoWinBtn = makeButton(aimScroll, "Auto Win", 4, C.red, Color3.fromRGB(255, 255, 255), function()
    local remoteEvent = ReplicatedStorage:FindFirstChild("UltraHub_AutoWin")
    if remoteEvent and remoteEvent:IsA("RemoteEvent") then
        remoteEvent:FireServer()
    end
    showNotification("Auto Win activated!", 3)
end)

--// ═══════════════════════════════════════════════
--//              BUILD SETTINGS TAB
--// ═══════════════════════════════════════════════

-- Keybind Section
local kbF = Instance.new("Frame")
kbF.Size = UDim2.new(1, 0, 0, 68)
kbF.BackgroundColor3 = C.btn
kbF.BorderSizePixel = 0
kbF.LayoutOrder = 1
kbF.Parent = settScroll
corner(kbF, 8)

local kbLbl = Instance.new("TextLabel")
kbLbl.Size = UDim2.new(1, -24, 0, 18)
kbLbl.Position = UDim2.new(0, 12, 0, 6)
kbLbl.BackgroundTransparency = 1
kbLbl.Text = "Open Key"
kbLbl.TextColor3 = C.text
kbLbl.TextSize = 13
kbLbl.Font = Enum.Font.Gotham
kbLbl.TextXAlignment = Enum.TextXAlignment.Left
kbLbl.Parent = kbF

local kbBtn = Instance.new("TextButton")
kbBtn.Size = UDim2.new(1, -24, 0, 30)
kbBtn.Position = UDim2.new(0, 12, 0, 30)
kbBtn.BackgroundColor3 = C.input
kbBtn.Text = openKey.Name
kbBtn.TextColor3 = C.accent
kbBtn.TextSize = 13
kbBtn.Font = Enum.Font.GothamBold
kbBtn.BorderSizePixel = 0
kbBtn.Parent = kbF
corner(kbBtn, 6)

local waitingKey = false
kbBtn.MouseButton1Click:Connect(function()
    waitingKey = true
    kbBtn.Text = "Press a key..."
    kbBtn.TextColor3 = C.sub
end)

makeToggle(settScroll, "Music", 2, function(v)
    musicOn = v
    if v then music:Resume() else music:Pause() end
end)

makeSlider(settScroll, "Music Volume", 3, 0, 100, 35, function(v)
    music.Volume = v / 100
end)

makeSlider(settScroll, "UI Transparency", 4, 0, 80, 0, function(v)
    main.BackgroundTransparency = v / 100
    topBar.BackgroundTransparency = v / 100
end)

makeButton(settScroll, "Reset Character", 5, C.red, Color3.fromRGB(255, 255, 255), function()
    local c = player.Character
    if c then
        local h = c:FindFirstChildOfClass("Humanoid")
        if h then h.Health = 0 end
    end
end)

local _, rejoinBtn = makeButton(settScroll, "Rejoin Server", 6, C.btn, C.accent, function()
    game:GetService("TeleportService"):TeleportToPlaceInstance(
        game.PlaceId, game.JobId, player)
end)
if rejoinBtn then
    local rejoinF = rejoinBtn.Parent
    if rejoinF then stroke(rejoinF, C.accent, 1) end
end

--// ═══════════════ TAB SWITCHING ═══════════════
local function switchTab(tab)
    currentTab = tab
    mainScroll.Visible = false
    aimScroll.Visible = false
    settScroll.Visible = false

    local inactive = Color3.fromRGB(22, 22, 42)
    for _, btn in {mainTabBtn, aimTabBtn, settTabBtn} do
        TweenService:Create(btn, TweenInfo.new(0.2), {
            BackgroundColor3 = inactive
        }):Play()
        btn.TextColor3 = C.sub
    end

    local targetScroll, targetBtn
    if tab == "Main" then
        targetScroll, targetBtn = mainScroll, mainTabBtn
    elseif tab == "Aim" then
        targetScroll, targetBtn = aimScroll, aimTabBtn
    else
        targetScroll, targetBtn = settScroll, settTabBtn
    end

    targetScroll.Visible = true
    TweenService:Create(targetBtn, TweenInfo.new(0.2), {
        BackgroundColor3 = C.accent
    }):Play()
    targetBtn.TextColor3 = C.text
end

mainTabBtn.MouseButton1Click:Connect(function() switchTab("Main") end)
aimTabBtn.MouseButton1Click:Connect(function() switchTab("Aim") end)
settTabBtn.MouseButton1Click:Connect(function() switchTab("Settings") end)

--// ═══════════════ CLOSE / MINIMIZE ═══════════════
closeBtn.MouseButton1Click:Connect(function()
    guiVisible = false
    TweenService:Create(main, TweenInfo.new(0.25), {
        Size = UDim2.new(0, 310, 0, 0),
        BackgroundTransparency = 1
    }):Play()
    task.delay(0.25, function()
        main.Visible = false
    end)
    showNotification('Press "' .. openKey.Name .. '" to reopen', 5)
end)

minBtn.MouseButton1Click:Connect(function()
    minimized = not minimized
    if minimized then
        content.Visible = false
        tabBar.Visible = false
        TweenService:Create(main, TweenInfo.new(0.25), {
            Size = UDim2.new(0, 310, 0, 40)
        }):Play()
        minBtn.Text = "+"
    else
        content.Visible = true
        tabBar.Visible = true
        TweenService:Create(main, TweenInfo.new(0.25), {
            Size = UDim2.new(0, 310, 0, 460)
        }):Play()
        minBtn.Text = "\226\128\148"
    end
end)

--// ═══════════════ KEY INPUT ═══════════════
UIS.InputBegan:Connect(function(input, gpe)
    if gpe then return end

    if input.KeyCode == openKey then
        guiVisible = not guiVisible
        if guiVisible then
            main.Visible = true
            minimized = false
            content.Visible = true
            tabBar.Visible = true
            main.Size = UDim2.new(0, 310, 0, 460)
            main.BackgroundTransparency = 0
            minBtn.Text = "\226\128\148"
        else
            main.Visible = false
        end
    end

    if waitingKey and input.KeyCode ~= Enum.KeyCode.Unknown then
        openKey = input.KeyCode
        kbBtn.Text = openKey.Name
        kbBtn.TextColor3 = C.accent
        waitingKey = false
    end
end)

--// ═══════════════ DRAG SYSTEM ═══════════════
local dragging = false
local dragStart, startPos

topBar.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
        input.Changed:Connect(function()
            if input.UserInputState == Enum.UserInputState.End then
                dragging = false
            end
        end)
    end
end)

UIS.InputChanged:Connect(function(input)
    if dragging
    and (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)

--// ═══════════════════════════════════════════════
--//              FEATURE IMPLEMENTATIONS
--// ═══════════════════════════════════════════════

--// FLY
local function startFly()
    local char = player.Character
    if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    local hum = char:FindFirstChildOfClass("Humanoid")
    if not hrp or not hum then return end

    hum.PlatformStand = true

    flyBV = Instance.new("BodyVelocity")
    flyBV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
    flyBV.Velocity = Vector3.zero
    flyBV.Parent = hrp

    flyBG = Instance.new("BodyGyro")
    flyBG.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
    flyBG.P = 9000
    flyBG.D = 500
    flyBG.Parent = hrp

    flyConn = RunService.RenderStepped:Connect(function()
        if not flyOn or not flyBV or not flyBV.Parent then return end
        local cam = workspace.CurrentCamera
        flyBG.CFrame = cam.CFrame

        local dir = Vector3.zero
        if UIS:IsKeyDown(Enum.KeyCode.W) then dir = dir + cam.CFrame.LookVector end
        if UIS:IsKeyDown(Enum.KeyCode.S) then dir = dir - cam.CFrame.LookVector end
        if UIS:IsKeyDown(Enum.KeyCode.A) then dir = dir - cam.CFrame.RightVector end
        if UIS:IsKeyDown(Enum.KeyCode.D) then dir = dir + cam.CFrame.RightVector end
        if UIS:IsKeyDown(Enum.KeyCode.Space) then dir = dir + Vector3.new(0, 1, 0) end
        if UIS:IsKeyDown(Enum.KeyCode.LeftControl) then dir = dir - Vector3.new(0, 1, 0) end

        flyBV.Velocity = (dir.Magnitude > 0 and dir.Unit or Vector3.zero) * flySpeedVal
    end)
end

local function stopFly()
    if flyConn then flyConn:Disconnect() flyConn = nil end
    if flyBV then flyBV:Destroy() flyBV = nil end
    if flyBG then flyBG:Destroy() flyBG = nil end
    local char = player.Character
    if char then
        local hum = char:FindFirstChildOfClass("Humanoid")
        if hum then hum.PlatformStand = false end
    end
end

--// SPIN
local function startSpin()
    local char = player.Character
    if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    if not hrp then return end

    spinConn = RunService.RenderStepped:Connect(function(dt)
        if not spinOn then return end
        if hrp and hrp.Parent then
            hrp.CFrame = hrp.CFrame * CFrame.Angles(0, math.rad(spinSpeedVal * dt), 0)
        end
    end)
end

local function stopSpin()
    if spinConn then spinConn:Disconnect() spinConn = nil end
end

--// NOCLIP
local function startNoclip()
    noclipConn = RunService.Stepped:Connect(function()
        if not noclipOn then return end
        local char = player.Character
        if char then
            for _, p in char:GetDescendants() do
                if p:IsA("BasePart") then
                    p.CanCollide = false
                end
            end
        end
    end)
end

local function stopNoclip()
    if noclipConn then noclipConn:Disconnect() noclipConn = nil end
    local char = player.Character
    if char then
        for _, p in char:GetDescendants() do
            if p:IsA("BasePart") then
                p.CanCollide = true
            end
        end
    end
end

--// INVISIBLE
local function startInvisible()
    if invisibleActive then return end
    invisibleActive = true
    local char = player.Character
    if not char then return end
    invisibleOriginals = {}
    for _, p in char:GetDescendants() do
        if p:IsA("BasePart") or p:IsA("Decal") or p:IsA("Texture") then
            invisibleOriginals[p] = p.Transparency
        end
    end
    invisibleConn = RunService.RenderStepped:Connect(function()
        local c = player.Character
        if c then
            for _, p in c:GetDescendants() do
                if p:IsA("BasePart") or p:IsA("Decal") or p:IsA("Texture") then
                    p.Transparency = 1
                end
            end
        end
    end)
end

local function stopInvisible()
    invisibleActive = false
    if invisibleConn then invisibleConn:Disconnect() invisibleConn = nil end
    for part, origTrans in invisibleOriginals do
        if part and part.Parent then
            part.Transparency = origTrans
        end
    end
    invisibleOriginals = {}
end

--// AUTO SHOT
local lastAutoShot = 0
local function startAutoShot()
    autoShotConn = RunService.RenderStepped:Connect(function()
        if not autoShotOn then return end
        local now = tick()
        if now - lastAutoShot < 0.1 then return end
        lastAutoShot = now
        local char = player.Character
        if char then
            local tool = char:FindFirstChildOfClass("Tool")
            if tool then tool:Activate() end
        end
    end)
end

local function stopAutoShot()
    if autoShotConn then autoShotConn:Disconnect() autoShotConn = nil end
end

--// HITBOX ESP
local function clearHitboxEsp()
    for _, obj in hitboxEspObjects do
        if obj and obj.Parent then obj:Destroy() end
    end
    hitboxEspObjects = {}
end

local function updateHitboxEsp()
    clearHitboxEsp()
    if not hitboxEspOn then return end

    for _, p in Players:GetPlayers() do
        if p ~= player and p.Character then
            local hrp = p.Character:FindFirstChild("HumanoidRootPart")
            if hrp then
                local box = Instance.new("Part")
                box.Name = "HitboxESP"
                box.Size = Vector3.new(hitboxSizeVal, hitboxSizeVal, hitboxSizeVal)
                box.Transparency = 0.6
                box.BrickColor = BrickColor.new("Really red")
                box.Material = Enum.Material.Neon
                box.CanCollide = false
                box.Anchored = false
                box.Massless = true
                box.Parent = p.Character

                local weld = Instance.new("WeldConstraint")
                weld.Part0 = hrp
                weld.Part1 = box
                weld.Parent = box
                box.CFrame = hrp.CFrame

                table.insert(hitboxEspObjects, box)

                local selBox = Instance.new("SelectionBox")
                selBox.Adornee = box
                selBox.Color3 = Color3.fromRGB(255, 50, 50)
                selBox.Transparency = 0.3
                selBox.LineThickness = 0.03
                selBox.Parent = box

                table.insert(hitboxEspObjects, selBox)

                local hitboxEvent = ReplicatedStorage:FindFirstChild("UltraHub_Hitbox")
                if hitboxEvent and hitboxEvent:IsA("RemoteEvent") then
                    hitboxEvent:FireServer(p, hitboxSizeVal)
                end
            end
        end
    end
end

local function startHitboxEsp()
    updateHitboxEsp()
    hitboxEspLoopConn = RunService.Heartbeat:Connect(function()
        if not hitboxEspOn then return end
        for _, obj in hitboxEspObjects do
            if obj and obj.Parent and obj.Name == "HitboxESP" then
                obj.Size = Vector3.new(hitboxSizeVal, hitboxSizeVal, hitboxSizeVal)
            end
        end
    end)
end

local function stopHitboxEsp()
    clearHitboxEsp()
    if hitboxEspLoopConn then hitboxEspLoopConn:Disconnect() hitboxEspLoopConn = nil end
    local hitboxEvent = ReplicatedStorage:FindFirstChild("UltraHub_Hitbox")
    if hitboxEvent and hitboxEvent:IsA("RemoteEvent") then
        hitboxEvent:FireServer(nil, 0)
    end
end

--// INFINITE JUMP
UIS.JumpRequest:Connect(function()
    if infJumpOn then
        local char = player.Character
        if char then
            local hum = char:FindFirstChildOfClass("Humanoid")
            if hum then
                hum:ChangeState(Enum.HumanoidStateType.Jumping)
            end
        end
    end
end)

--// ═══════════════ STATE MANAGER ═══════════════
RunService.RenderStepped:Connect(function()
    if flyOn and not flyBV then startFly()
    elseif not flyOn and flyBV then stopFly() end

    if spinOn and not spinConn then startSpin()
    elseif not spinOn and spinConn then stopSpin() end

    if noclipOn and not noclipConn then startNoclip()
    elseif not noclipOn and noclipConn then stopNoclip() end

    if invisibleOn and not invisibleActive then startInvisible()
    elseif not invisibleOn and invisibleActive then stopInvisible() end

    if autoShotOn and not autoShotConn then startAutoShot()
    elseif not autoShotOn and autoShotConn then stopAutoShot() end

    if hitboxEspOn and not hitboxEspLoopConn then startHitboxEsp()
    elseif not hitboxEspOn and hitboxEspLoopConn then stopHitboxEsp() end
end)

--// ═══════════════ CHARACTER SPAWN HANDLER ═══════════════
player.CharacterAdded:Connect(function(char)
    task.wait(0.5)
    local hum = char:FindFirstChildOfClass("Humanoid")
    if hum then hum.WalkSpeed = savedSpeed end

    if flyOn then stopFly() task.wait(0.3) startFly() end
    if spinOn then stopSpin() task.wait(0.3) startSpin() end
    if invisibleOn then invisibleActive = false task.wait(0.3) startInvisible() end
end)

--// Player tracking for Hitbox ESP
Players.PlayerAdded:Connect(function(p)
    if hitboxEspOn then
        p.CharacterAdded:Connect(function()
            task.wait(1)
            updateHitboxEsp()
        end)
    end
end)

Players.PlayerRemoving:Connect(function()
    if hitboxEspOn then task.wait(0.5) updateHitboxEsp() end
end)

--// ═══════════════ HOVER EFFECTS ═══════════════
addHover(closeBtn, C.red, Color3.fromRGB(240, 80, 80))
addHover(minBtn, C.btn, C.btnH)
addHover(applyBtn, C.accent, C.accentH)
addHover(mainTabBtn, C.accent, C.accentH)
addHover(aimTabBtn, Color3.fromRGB(22, 22, 42), C.btnH)
addHover(settTabBtn, Color3.fromRGB(22, 22, 42), C.btnH)
addHover(kbBtn, C.input, C.btnH)
if autoWinBtn then addHover(autoWinBtn, C.red, Color3.fromRGB(240, 80, 80)) end
if rejoinBtn then addHover(rejoinBtn, C.btn, C.btnH) end

--// ═══════════════ MOBILE ADAPTATION ═══════════════
if UIS.TouchEnabled and not UIS.KeyboardEnabled then
    main.Size = UDim2.new(0, 280, 0, 430)
    main.Position = UDim2.new(0.5, -140, 0.5, -215)
end

--// ═══════════════ START MUSIC ═══════════════
music:Play()

--// ═══════════════ PARENT GUI ═══════════════
gui.Parent = player:WaitForChild("PlayerGui")

Features & Information

CTC script by Weduxis and TheBacon

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts