Gnomes Hub
Key Required

Gnomes Hub

Stealing Gnomes [HORROR]Tea_LOLTea_LOL 1.4K views 595 executesUpdated Jul 2, 2026
Unrated
00
Lua Script•1273 lines (44570 chars)
local Player = game.Players.LocalPlayer
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local MarketplaceService = game:GetService("MarketplaceService")
local TweenService = game:GetService("TweenService")
local CollectionService = game:GetService("CollectionService")
local CurrentCamera = workspace.CurrentCamera

local SESSION_KEY = "_GnomesHubSession"
_G[SESSION_KEY] = (_G[SESSION_KEY] or 0) + 1
local SESSION = _G[SESSION_KEY]

local existing = Player:FindFirstChild("PlayerGui") and Player.PlayerGui:FindFirstChild("GnomesHub")
if existing then existing:Destroy() end

local MAT_COLORS = {
    Clonk = Color3.fromRGB(255, 180, 40),
    Fraggles = Color3.fromRGB(70, 200, 90),
    Plasto = Color3.fromRGB(50, 150, 255),
    Weapon = Color3.fromRGB(220, 50, 50),
    Trap = Color3.fromRGB(180, 100, 30)
}
local MAT_NAMES = {
    Clonk = "Clonk",
    Fraggles = "Fraggles",
    Plasto = "Plasto",
    Weapon = "Weapon",
    Trap = "Trap"
}

local ITEM_OVERRIDES = {
    Gun = { label = nil, mat = "Weapon" },
    Knife1 = { label = "Knife", mat = "Weapon" },
    Knife2 = { label = "Knife", mat = "Weapon" },
    Knife3 = { label = "Knife", mat = "Weapon" },
    Spoon1 = { label = "Spoon", mat = nil },
    Spoon2 = { label = "Spoon", mat = nil },
    Spoon3 = { label = "Spoon", mat = nil },
    PaperPlane = { label = "Paper Plane", mat = nil },
    MouseTrap = { label = "Mouse Trap", mat = "Trap" },
    PlungerMODEL = { label = "Plunger", mat = "Plasto" }
}

local function getSprintSpeed()
    local base = game.StarterPlayer.CharacterWalkSpeed + 4
    local mult = 1
    local ok1, v = pcall(MarketplaceService.UserOwnsGamePassAsync, MarketplaceService, Player.UserId, 1862894357)
    if ok1 and v then mult = mult * 1.1 end
    local ok2, v = pcall(MarketplaceService.UserOwnsGamePassAsync, MarketplaceService, Player.UserId, 1875417216)
    if ok2 and v then mult = mult * 1.2 end
    return base * mult
end

local sprintSpeed = getSprintSpeed()

local infiniteStamina = false
local mouseUnlock = false
local mouseUnlockConn = nil
local postSimConn = nil

local function applyMouseUnlock(enabled)
    if enabled then
        Player.CameraMode = Enum.CameraMode.Classic
        UserInputService.MouseIconEnabled = true
        UserInputService.MouseBehavior = Enum.MouseBehavior.Default
    else
        Player.CameraMode = Enum.CameraMode.LockFirstPerson
        UserInputService.MouseIconEnabled = false
        UserInputService.MouseBehavior = Enum.MouseBehavior.Default
    end
end

local function toggleMouseUnlock()
    mouseUnlock = not mouseUnlock
    applyMouseUnlock(mouseUnlock)

    if mouseUnlockConn then
        mouseUnlockConn:Disconnect()
        mouseUnlockConn = nil
    end
    if postSimConn then
        postSimConn:Disconnect()
        postSimConn = nil
    end

    if mouseUnlock then
        mouseUnlockConn = Player:GetPropertyChangedSignal("CameraMode"):Connect(function()
            if _G[SESSION_KEY] ~= SESSION then return end
            if mouseUnlock and Player.CameraMode ~= Enum.CameraMode.Classic then
                Player.CameraMode = Enum.CameraMode.Classic
            end
        end)
        postSimConn = RunService.PostSimulation:Connect(function()
            if _G[SESSION_KEY] ~= SESSION then return end
            if mouseUnlock and Player.CameraMode ~= Enum.CameraMode.Classic then
                Player.CameraMode = Enum.CameraMode.Classic
            end
        end)
    end
end

local preRenderConn = nil
local clonedSound = nil
local animTrack = nil

local function cleanupStamina()
    if preRenderConn then
        preRenderConn:Disconnect()
        preRenderConn = nil
    end
    if clonedSound then
        clonedSound:Stop()
        clonedSound:Destroy()
        clonedSound = nil
    end
    if animTrack then
        animTrack:Stop()
        animTrack = nil
    end
end

local function toggleInfiniteStamina(value)
    infiniteStamina = value

    if not value then
        cleanupStamina()
        return
    end

    local handlerScript = Player:FindFirstChild("PlayerGui") and Player.PlayerGui:FindFirstChild("HUD") and Player.PlayerGui.HUD:FindFirstChild("Handler")
    local runAnim = handlerScript and handlerScript:FindFirstChild("RunAnimation")
    local originalSound = game:GetService("SoundService"):FindFirstChild("Sprinting")

    if originalSound then
        clonedSound = originalSound:Clone()
        clonedSound.Parent = game:GetService("SoundService")
        clonedSound.Name = "GnomesSprintSound"
    end

    preRenderConn = RunService.PreRender:Connect(function()
        if _G[SESSION_KEY] ~= SESSION then return end
        local char = Player.Character
        if not char then return end

        local hum = char:FindFirstChildOfClass("Humanoid")
        if not hum then return end

        local isCrouched = Player:FindFirstChild("IsCrouched") and Player.IsCrouched.Value
        local isAnchored = hum.RootPart and (hum.RootPart.Anchored or hum.RootPart:FindFirstChildWhichIsA("WeldConstraint"))
        local shiftHeld = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift)
        local moving = hum.MoveDirection.Magnitude > 0
        local shouldSprint = shiftHeld and moving and not isCrouched and not isAnchored

        if shouldSprint then
            hum.WalkSpeed = sprintSpeed

            if clonedSound and not clonedSound.IsPlaying then
                clonedSound:Play()
            end

            if runAnim then
                local animator = hum:FindFirstChildOfClass("Animator")
                if animator then
                    if not animTrack or not animTrack.IsPlaying then
                        if animTrack then
                            animTrack:Stop()
                        end
                        animTrack = animator:LoadAnimation(runAnim)
                        animTrack.Priority = Enum.AnimationPriority.Movement
                        animTrack:Play()
                    end
                end
            end

            if CurrentCamera.CameraType ~= Enum.CameraType.Scriptable then
                local beatStage = Player:GetAttribute("BeatStage") or 0
                local targetFov = beatStage > 0 and 90 or 87
                if CurrentCamera.FieldOfView ~= targetFov then
                    TweenService:Create(CurrentCamera, TweenInfo.new(0.25, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
                        FieldOfView = targetFov
                    }):Play()
                end
            end
        else
            if clonedSound and clonedSound.IsPlaying then
                clonedSound:Stop()
            end
            if animTrack and animTrack.IsPlaying then
                animTrack:Stop()
                animTrack = nil
            end

            if CurrentCamera.CameraType ~= Enum.CameraType.Scriptable then
                local beatStage = Player:GetAttribute("BeatStage") or 0
                local targetFov = beatStage > 0 and 85 or 82
                if CurrentCamera.FieldOfView ~= targetFov then
                    TweenService:Create(CurrentCamera, TweenInfo.new(0.35, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
                        FieldOfView = targetFov
                    }):Play()
                end
            end
        end

        local pg = Player:FindFirstChild("PlayerGui")
        if pg then
            local hud = pg:FindFirstChild("HUD")
            if hud then
                local stats = hud:FindFirstChild("Stats")
                if stats then
                    local stamina = stats:FindFirstChild("Stamina")
                    if stamina then
                        local level = stamina:FindFirstChild("level")
                        if level then
                            for _, tween in level:GetTweens() do
                                tween:Cancel()
                            end
                            level.Size = UDim2.new(1, 0, 1, 0)
                        end
                    end
                end
            end
        end
    end)
end

local itemFilters = {
    Clonk = true,
    Fraggles = true,
    Plasto = true,
    Weapon = true,
    Trap = true
}

local ENEMY_FILTER_KEYS = {
    Grandpa_Model = "Grandpa",
    Rat = "Rat",
    Roach = "Roach"
}

local enemyFilters = {
    Grandpa = true,
    Rat = true,
    Roach = true
}

local espEnabled = false
local espItems = {}
local espConnections = {}
local espAddConn = nil

local function applyItemFilters()
    for _, data in next, espItems do
        local visible = espEnabled and (itemFilters[data.material] ~= false)
        if data.highlight then data.highlight.Enabled = visible end
        if data.billboard then data.billboard.Enabled = visible end
    end
end

local function lookupMaterial(name)
    local mat = nil
    for _, cat in game.ReplicatedStorage.Assets.Items:GetChildren() do
        local found = cat:FindFirstChild(name)
        if found then
            mat = found:GetAttribute("Material")
            if mat then return mat end
        end
    end
    return nil
end

local function getItemDefinition(itemModel)
    local name = itemModel.Name
    local override = ITEM_OVERRIDES[name]
    if override then
        local label = override.label or name
        local mat = override.mat or itemModel:GetAttribute("Material") or lookupMaterial(name) or "Fraggles"
        return mat, label
    end
    local mat = itemModel:GetAttribute("Material")
    if mat then return mat, name end
    mat = lookupMaterial(name)
    if mat then return mat, name end
    return "Fraggles", name
end

local function createItemEsp(itemModel)
    if not itemModel.PrimaryPart then return end
    if espItems[itemModel] then return end

    local oldHl = itemModel:FindFirstChild("GnomesItemHl")
    if oldHl then oldHl:Destroy() end
    local oldBg = itemModel:FindFirstChild("GnomesItemBg")
    if oldBg then oldBg:Destroy() end

    local mat, displayName = getItemDefinition(itemModel)
    local color = MAT_COLORS[mat] or Color3.fromRGB(200, 200, 200)

    local highlight = Instance.new("Highlight")
    highlight.Name = "GnomesItemHl"
    highlight.Adornee = itemModel
    highlight.FillColor = color
    highlight.FillTransparency = 0.7
    highlight.OutlineColor = color
    highlight.OutlineTransparency = 0.3
    highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
    highlight.Parent = itemModel

    local pp = itemModel.PrimaryPart
    local labelYOff = pp.Size.Y / 2 + 2

    local bg = Instance.new("BillboardGui")
    bg.Name = "GnomesItemBg"
    bg.Adornee = pp
    bg.Size = UDim2.new(0, 120, 0, 26)
    bg.StudsOffset = Vector3.new(0, labelYOff, 0)
    bg.AlwaysOnTop = true
    bg.Parent = itemModel

    local bgFrame = Instance.new("Frame")
    bgFrame.Size = UDim2.new(1, 0, 1, 0)
    bgFrame.BackgroundColor3 = Color3.fromRGB(10, 10, 15)
    bgFrame.BackgroundTransparency = 0.25
    bgFrame.BorderSizePixel = 0
    bgFrame.Parent = bg

    local bgCorner = Instance.new("UICorner")
    bgCorner.CornerRadius = UDim.new(0, 6)
    bgCorner.Parent = bgFrame

    local dot = Instance.new("Frame")
    dot.Size = UDim2.new(0, 8, 0, 8)
    dot.Position = UDim2.new(0, 8, 0.5, -4)
    dot.BackgroundColor3 = color
    dot.BorderSizePixel = 0
    dot.Parent = bgFrame

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

    local nameLabel = Instance.new("TextLabel")
    nameLabel.Size = UDim2.new(1, -24, 0, 14)
    nameLabel.Position = UDim2.new(0, 22, 0, 1)
    nameLabel.BackgroundTransparency = 1
    nameLabel.Text = displayName
    nameLabel.TextColor3 = Color3.fromRGB(230, 230, 240)
    nameLabel.Font = Enum.Font.GothamBold
    nameLabel.TextSize = 12
    nameLabel.TextXAlignment = Enum.TextXAlignment.Left
    nameLabel.TextTransparency = 0.1
    nameLabel.Parent = bgFrame

    local matLabel = Instance.new("TextLabel")
    matLabel.Size = UDim2.new(1, -24, 0, 11)
    matLabel.Position = UDim2.new(0, 22, 0, 15)
    matLabel.BackgroundTransparency = 1
    matLabel.Text = mat
    matLabel.TextColor3 = color
    matLabel.Font = Enum.Font.Gotham
    matLabel.TextSize = 9
    matLabel.TextXAlignment = Enum.TextXAlignment.Left
    matLabel.TextTransparency = 0.3
    matLabel.Parent = bgFrame

    local visible = itemFilters[mat] ~= false
    highlight.Enabled = visible
    bg.Enabled = visible

    espItems[itemModel] = {
        highlight = highlight,
        billboard = bg,
        item = itemModel,
        material = mat
    }

    local conn = itemModel.AncestryChanged:Connect(function()
        if _G[SESSION_KEY] ~= SESSION then conn:Disconnect() return end
        if not itemModel.Parent then
            conn:Disconnect()
            removeItemEsp(itemModel)
        end
    end)
    table.insert(espConnections, conn)
end

local function removeItemEsp(itemModel)
    local data = espItems[itemModel]
    if data then
        if data.highlight then data.highlight:Destroy() end
        if data.billboard then data.billboard:Destroy() end
        espItems[itemModel] = nil
    end
end

local function cleanupEsp()
    for item, data in next, espItems do
        if data.highlight then data.highlight:Destroy() end
        if data.billboard then data.billboard:Destroy() end
    end
    for k in next, espItems do
        espItems[k] = nil
    end
    if espAddConn then
        espAddConn:Disconnect()
        espAddConn = nil
    end
    for _, conn in espConnections do
        conn:Disconnect()
    end
    for i = #espConnections, 1, -1 do
        table.remove(espConnections)
    end
end

local enemyEsp = {}
local enemyEspConns = {}
local enemyAddConn = nil
local enemyEspEnabled = false

local function applyEnemyFilters()
    for _, data in next, enemyEsp do
        local visible = enemyEspEnabled and (enemyFilters[data.filterKey] ~= false)
        if data.highlight then data.highlight.Enabled = visible end
        if data.billboard then data.billboard.Enabled = visible end
    end
end

local function createEnemyEsp(model)
    if enemyEsp[model] then return end
    local hum = model:FindFirstChildWhichIsA("Humanoid")
    local root = hum and hum.RootPart or model.PrimaryPart
    if not root then return end

    local oldHl = model:FindFirstChild("GnomesEnemyHl")
    if oldHl then oldHl:Destroy() end
    local oldBg = model:FindFirstChild("GnomesEnemyBg")
    if oldBg then oldBg:Destroy() end

    local highlight = Instance.new("Highlight")
    highlight.Name = "GnomesEnemyHl"
    highlight.Adornee = model
    highlight.FillColor = Color3.fromRGB(255, 60, 60)
    highlight.FillTransparency = 0.6
    highlight.OutlineColor = Color3.fromRGB(255, 30, 30)
    highlight.OutlineTransparency = 0.2
    highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
    highlight.Parent = model

    local bg = Instance.new("BillboardGui")
    bg.Name = "GnomesEnemyBg"
    bg.Adornee = root
    bg.Size = UDim2.new(0, 140, 0, 34)
    bg.StudsOffset = Vector3.new(0, root.Size.Y / 2 + 2, 0)
    bg.AlwaysOnTop = true
    bg.Parent = model

    local bgFrame = Instance.new("Frame")
    bgFrame.Size = UDim2.new(1, 0, 1, 0)
    bgFrame.BackgroundColor3 = Color3.fromRGB(15, 10, 10)
    bgFrame.BackgroundTransparency = 0.2
    bgFrame.BorderSizePixel = 0
    bgFrame.Parent = bg

    local bgCorner = Instance.new("UICorner")
    bgCorner.CornerRadius = UDim.new(0, 6)
    bgCorner.Parent = bgFrame

    local nameLabel = Instance.new("TextLabel")
    nameLabel.Size = UDim2.new(1, -10, 0, 16)
    nameLabel.Position = UDim2.new(0, 5, 0, 2)
    nameLabel.BackgroundTransparency = 1
    nameLabel.Text = model.Name:gsub("_Model", ""):gsub("_", " ")
    nameLabel.TextColor3 = Color3.fromRGB(255, 220, 220)
    nameLabel.Font = Enum.Font.GothamBold
    nameLabel.TextSize = 12
    nameLabel.TextXAlignment = Enum.TextXAlignment.Left
    nameLabel.Parent = bgFrame

    local barBg = Instance.new("Frame")
    barBg.Size = UDim2.new(1, -10, 0, 4)
    barBg.Position = UDim2.new(0, 5, 0, 20)
    barBg.BackgroundColor3 = Color3.fromRGB(40, 20, 20)
    barBg.BorderSizePixel = 0
    barBg.Parent = bgFrame

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

    local barFill = Instance.new("Frame")
    barFill.Size = UDim2.new(1, 0, 1, 0)
    barFill.BackgroundColor3 = Color3.fromRGB(255, 60, 60)
    barFill.BorderSizePixel = 0
    barFill.Parent = barBg

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

    local healthLabel = Instance.new("TextLabel")
    healthLabel.Size = UDim2.new(1, -10, 0, 12)
    healthLabel.Position = UDim2.new(0, 5, 0, 24)
    healthLabel.BackgroundTransparency = 1
    healthLabel.Text = tostring(math.floor(hum.Health)) .. "/" .. tostring(hum.MaxHealth)
    healthLabel.TextColor3 = Color3.fromRGB(220, 200, 200)
    healthLabel.Font = Enum.Font.Gotham
    healthLabel.TextSize = 9
    healthLabel.TextXAlignment = Enum.TextXAlignment.Left
    healthLabel.TextTransparency = 0.2
    healthLabel.Parent = bgFrame

    bg.Size = UDim2.new(0, 140, 0, 36)

    local filterKey = ENEMY_FILTER_KEYS[model.Name] or model.Name
    local visible = enemyFilters[filterKey] ~= false
    highlight.Enabled = visible
    bg.Enabled = visible

    enemyEsp[model] = { highlight = highlight, billboard = bg, barFill = barFill, healthLabel = healthLabel, humanoid = hum, filterKey = filterKey }

    local healthConn = hum.HealthChanged:Connect(function()
        if _G[SESSION_KEY] ~= SESSION then return end
        local data = enemyEsp[model]
        if data then
            data.barFill.Size = UDim2.new(math.clamp(hum.Health / hum.MaxHealth, 0, 1), 0, 1, 0)
            data.healthLabel.Text = tostring(math.floor(hum.Health)) .. "/" .. tostring(hum.MaxHealth)
        end
    end)
    table.insert(enemyEspConns, healthConn)

    local diedConn = hum.Died:Connect(function()
        if _G[SESSION_KEY] ~= SESSION then return end
        removeEnemyEsp(model)
    end)
    table.insert(enemyEspConns, diedConn)
end

local function removeEnemyEsp(model)
    local data = enemyEsp[model]
    if data then
        if data.highlight then data.highlight:Destroy() end
        if data.billboard then data.billboard:Destroy() end
        enemyEsp[model] = nil
    end
end

local function cleanupEnemyEsp()
    for model, data in next, enemyEsp do
        if data.highlight then data.highlight:Destroy() end
        if data.billboard then data.billboard:Destroy() end
    end
    for k in next, enemyEsp do
        enemyEsp[k] = nil
    end
    if enemyAddConn then
        enemyAddConn:Disconnect()
        enemyAddConn = nil
    end
    for _, conn in enemyEspConns do
        conn:Disconnect()
    end
    for i = #enemyEspConns, 1, -1 do
        table.remove(enemyEspConns)
    end
end

local function shouldBeEnemy(model)
    if not model:IsA("Model") or not model:IsDescendantOf(workspace) then return false end
    if model == Player.Character then return false end
    local n = model.Name
    if n == "PoseStatueGuy" or n == "grandpa" or n == "baby" or n:find("Arms") then return false end
    local hum = model:FindFirstChildWhichIsA("Humanoid")
    if not hum or hum.Health <= 0 then return false end
    return true
end

local function toggleEsp(value)
    espEnabled = value
    if not value then
        cleanupEsp()
        return
    end
    for _, item in CollectionService:GetTagged("CanGrab") do
        if item:IsDescendantOf(workspace) and item:IsA("Model") and item.PrimaryPart then
            createItemEsp(item)
        end
    end
    espAddConn = CollectionService:GetInstanceAddedSignal("CanGrab"):Connect(function(item)
        if _G[SESSION_KEY] ~= SESSION then return end
        if espEnabled and item:IsDescendantOf(workspace) and item:IsA("Model") and item.PrimaryPart then
            createItemEsp(item)
        end
    end)
end

local function toggleEnemyEsp(value)
    enemyEspEnabled = value
    if not value then
        cleanupEnemyEsp()
        return
    end
    for _, obj in workspace:GetDescendants() do
        local hum = obj:IsA("Humanoid") and obj or obj:FindFirstChildWhichIsA("Humanoid")
        if hum then
            local model = hum.Parent
            if model and shouldBeEnemy(model) then
                createEnemyEsp(model)
            end
        end
    end
    enemyAddConn = workspace.DescendantAdded:Connect(function(obj)
        if _G[SESSION_KEY] ~= SESSION then return end
        if not enemyEspEnabled then return end
        local hum = obj:IsA("Humanoid") and obj or obj:FindFirstChildWhichIsA("Humanoid")
        if hum then
            local model = hum.Parent
            if model and shouldBeEnemy(model) then
                createEnemyEsp(model)
            end
        end
    end)
end

UserInputService.InputBegan:Connect(function(input, processed)
    if _G[SESSION_KEY] ~= SESSION then return end
    if processed then return end
    if input.KeyCode == Enum.KeyCode.X then
        toggleMouseUnlock()
    end
end)

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "GnomesHub"
ScreenGui.ResetOnSpawn = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.Parent = Player:WaitForChild("PlayerGui")

local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 280, 0, 320)
MainFrame.Position = UDim2.new(0.5, -140, 0.5, -160)
MainFrame.BackgroundColor3 = Color3.fromRGB(15, 15, 20)
MainFrame.BackgroundTransparency = 0.08
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Parent = ScreenGui

local MainCorner = Instance.new("UICorner")
MainCorner.CornerRadius = UDim.new(0, 10)
MainCorner.Parent = MainFrame

local TopBar = Instance.new("Frame")
TopBar.Size = UDim2.new(1, 0, 0, 32)
TopBar.BackgroundColor3 = Color3.fromRGB(25, 25, 32)
TopBar.BackgroundTransparency = 0.3
TopBar.BorderSizePixel = 0
TopBar.Parent = MainFrame

local TopCorner = Instance.new("UICorner")
TopCorner.CornerRadius = UDim.new(0, 10)
TopCorner.Parent = TopBar

local TopBarFill = Instance.new("Frame")
TopBarFill.Size = UDim2.new(1, 0, 0, 10)
TopBarFill.Position = UDim2.new(0, 0, 1, -10)
TopBarFill.BackgroundColor3 = Color3.fromRGB(25, 25, 32)
TopBarFill.BackgroundTransparency = 0.3
TopBarFill.BorderSizePixel = 0
TopBarFill.Parent = TopBar

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 1, 0)
Title.BackgroundTransparency = 1
Title.Text = "Gnomes Hub"
Title.TextColor3 = Color3.fromRGB(220, 220, 235)
Title.Font = Enum.Font.GothamBold
Title.TextSize = 14
Title.Parent = TopBar

local Content = Instance.new("Frame")
Content.Size = UDim2.new(1, 0, 1, -32)
Content.Position = UDim2.new(0, 0, 0, 32)
Content.BackgroundTransparency = 1
Content.Parent = MainFrame

local staminaToggled = false
local unlockToggled = false
local espToggled = false
local enemyEspToggled = false
local antiBreakToggled = false
local antiBreakConn = nil
local grabToggled = false
local grabOverrideActive = false

local function createToggle(parent, yPos, labelText)
    local Label = Instance.new("TextLabel")
    Label.Size = UDim2.new(0.65, -10, 0, 28)
    Label.Position = UDim2.new(0, 14, 0, yPos)
    Label.BackgroundTransparency = 1
    Label.Text = labelText
    Label.TextColor3 = Color3.fromRGB(190, 190, 210)
    Label.Font = Enum.Font.Gotham
    Label.TextSize = 14
    Label.TextXAlignment = Enum.TextXAlignment.Left
    Label.Parent = parent

    local ToggleBg = Instance.new("ImageButton")
    ToggleBg.Name = labelText:gsub("%[.-%]", ""):gsub("%s+$", "") .. "Toggle"
    ToggleBg.Size = UDim2.new(0, 44, 0, 24)
    ToggleBg.Position = UDim2.new(1, -56, 0, yPos + 2)
    ToggleBg.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
    ToggleBg.AutoButtonColor = false
    ToggleBg.BorderSizePixel = 0
    ToggleBg.Parent = parent

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

    local ToggleKnob = Instance.new("Frame")
    ToggleKnob.Size = UDim2.new(0, 18, 0, 18)
    ToggleKnob.Position = UDim2.new(0, 3, 0.5, -9)
    ToggleKnob.BackgroundColor3 = Color3.fromRGB(200, 200, 210)
    ToggleKnob.BorderSizePixel = 0
    ToggleKnob.Parent = ToggleBg

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

    return Label, ToggleBg, ToggleKnob
end

local staminaLabel, staminaBg, staminaKnob = createToggle(Content, 6, "Infinite Stamina")
local unlockLabel, unlockBg, unlockKnob = createToggle(Content, 38, "Free Mouse [X]")
local espLabel, espBg, espKnob = createToggle(Content, 70, "Item ESP")
local enemyEspLabel, enemyEspBg, enemyEspKnob = createToggle(Content, 188, "Enemy ESP")
local antiBreakLabel, antiBreakBg, antiBreakKnob = createToggle(Content, 220, "Anti Break Arms")
local grabLabel, grabBg, grabKnob = createToggle(Content, 252, "Infinite Grab")
local function createMiniToggle(parent, yPos, labelText, color)
    local Label = Instance.new("TextLabel")
    Label.Size = UDim2.new(0.65, -10, 0, 18)
    Label.Position = UDim2.new(0, 24, 0, yPos)
    Label.BackgroundTransparency = 1
    Label.Text = "  " .. labelText
    Label.TextColor3 = color or Color3.fromRGB(160, 160, 180)
    Label.Font = Enum.Font.Gotham
    Label.TextSize = 12
    Label.TextXAlignment = Enum.TextXAlignment.Left
    Label.Parent = parent

    local ToggleBg = Instance.new("ImageButton")
    ToggleBg.Name = labelText:gsub("%s+", "") .. "FilterToggle"
    ToggleBg.Size = UDim2.new(0, 32, 0, 16)
    ToggleBg.Position = UDim2.new(1, -44, 0, yPos + 1)
    ToggleBg.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
    ToggleBg.AutoButtonColor = false
    ToggleBg.BorderSizePixel = 0
    ToggleBg.Parent = parent

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

    local ToggleKnob = Instance.new("Frame")
    ToggleKnob.Size = UDim2.new(0, 12, 0, 12)
    ToggleKnob.Position = UDim2.new(0, 2, 0.5, -6)
    ToggleKnob.BackgroundColor3 = Color3.fromRGB(200, 200, 210)
    ToggleKnob.BorderSizePixel = 0
    ToggleKnob.Parent = ToggleBg

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

    return Label, ToggleBg, ToggleKnob
end

local function animateMiniKnob(knob, bg, state)
    if state then
        bg.BackgroundColor3 = Color3.fromRGB(60, 130, 255)
        knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
        knob:TweenPosition(UDim2.new(1, -14, 0.5, -6), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.15, true)
    else
        bg.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
        knob.BackgroundColor3 = Color3.fromRGB(200, 200, 210)
        knob:TweenPosition(UDim2.new(0, 2, 0.5, -6), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.15, true)
    end
end

local itemFilterRows = {}
local function toggleItemFilter(name)
    itemFilters[name] = not itemFilters[name]
    animateMiniKnob(itemFilterRows[name].knob, itemFilterRows[name].bg, itemFilters[name])
    applyItemFilters()
end

local enemyFilterRows = {}
local function toggleEnemyFilter(name)
    enemyFilters[name] = not enemyFilters[name]
    animateMiniKnob(enemyFilterRows[name].knob, enemyFilterRows[name].bg, enemyFilters[name])
    applyEnemyFilters()
end

local ITEM_FILTER_COLORS = {
    Clonk = Color3.fromRGB(255, 180, 40),
    Fraggles = Color3.fromRGB(70, 200, 90),
    Plasto = Color3.fromRGB(50, 150, 255),
    Weapon = Color3.fromRGB(220, 50, 50),
    Trap = Color3.fromRGB(180, 100, 30)
}

local ENEMY_FILTER_COLORS = {
    Grandpa = Color3.fromRGB(255, 60, 60),
    Rat = Color3.fromRGB(200, 100, 100),
    Roach = Color3.fromRGB(160, 120, 80)
}

-- Item Filter Panel
local itemFilterFrame = Instance.new("Frame")
itemFilterFrame.Size = UDim2.new(1, 0, 0, 90)
itemFilterFrame.Position = UDim2.new(0, 0, 0, 98)
itemFilterFrame.BackgroundTransparency = 1
itemFilterFrame.Visible = false
itemFilterFrame.Parent = Content

local itemFilterYStart = 0
for name in next, itemFilters do
    local filterName = name
    local lbl, bg, knob = createMiniToggle(itemFilterFrame, itemFilterYStart, filterName, ITEM_FILTER_COLORS[filterName])
    itemFilterRows[filterName] = { label = lbl, bg = bg, knob = knob, state = true }
    animateMiniKnob(knob, bg, true)
    bg.MouseButton1Click:Connect(function()
        toggleItemFilter(filterName)
    end)
    itemFilterYStart = itemFilterYStart + 18
end

-- Enemy Filter Panel
local enemyFilterFrame = Instance.new("Frame")
enemyFilterFrame.Size = UDim2.new(1, 0, 0, 54)
enemyFilterFrame.Position = UDim2.new(0, 0, 0, 216)
enemyFilterFrame.BackgroundTransparency = 1
enemyFilterFrame.Visible = false
enemyFilterFrame.Parent = Content

local enemyFilterYStart = 0
for name in next, enemyFilters do
    local filterName = name
    local lbl, bg, knob = createMiniToggle(enemyFilterFrame, enemyFilterYStart, filterName, ENEMY_FILTER_COLORS[filterName])
    enemyFilterRows[filterName] = { label = lbl, bg = bg, knob = knob, state = true }
    animateMiniKnob(knob, bg, true)
    bg.MouseButton1Click:Connect(function()
        toggleEnemyFilter(filterName)
    end)
    enemyFilterYStart = enemyFilterYStart + 18
end

local HotkeyHint = Instance.new("TextLabel")
HotkeyHint.Size = UDim2.new(1, -14, 0, 16)
HotkeyHint.Position = UDim2.new(0, 14, 0, 274)
HotkeyHint.BackgroundTransparency = 1
HotkeyHint.Text = "Press X to toggle mouse freedom"
HotkeyHint.TextColor3 = Color3.fromRGB(120, 120, 140)
HotkeyHint.Font = Enum.Font.Gotham
HotkeyHint.TextSize = 11
HotkeyHint.TextXAlignment = Enum.TextXAlignment.Left
HotkeyHint.TextTransparency = 0.4
HotkeyHint.Parent = Content

local function repositionLayout()
    local itemFilterH = espToggled and 90 or 0
    local enemyFilterH = enemyEspToggled and 54 or 0
    local enemyY = 98 + itemFilterH
    enemyEspLabel.Position = UDim2.new(0, 14, 0, enemyY)
    enemyEspBg.Position = UDim2.new(1, -56, 0, enemyY + 2)
    local enemyFilterY = enemyY + 28
    enemyFilterFrame.Position = UDim2.new(0, 0, 0, enemyFilterY)
    local antiBreakY = enemyFilterY + enemyFilterH + 4
    antiBreakLabel.Position = UDim2.new(0, 14, 0, antiBreakY)
    antiBreakBg.Position = UDim2.new(1, -56, 0, antiBreakY + 2)
    local grabY = antiBreakY + 32
    grabLabel.Position = UDim2.new(0, 14, 0, grabY)
    grabBg.Position = UDim2.new(1, -56, 0, grabY + 2)
    HotkeyHint.Position = UDim2.new(0, 14, 0, grabY + 28 + 4)
    MainFrame.Size = UDim2.new(0, 280, 0, 36 + grabY + 28 + 4 + 16)
end

local function animateKnob(knob, bg, state)
    if state then
        bg.BackgroundColor3 = Color3.fromRGB(60, 130, 255)
        knob.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
        knob:TweenPosition(UDim2.new(1, -21, 0.5, -9), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
    else
        bg.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
        knob.BackgroundColor3 = Color3.fromRGB(200, 200, 210)
        knob:TweenPosition(UDim2.new(0, 3, 0.5, -9), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
    end
end

local preSimAntiBreak = nil

local function clearViewRig(char)
    if not char then return end
    for _, v in char:GetChildren() do
        if v:IsA("BasePart") and string.find(v.Name, "Arm") then
            v.Transparency = 0
        end
        if v:IsA("Model") and v.Name == "ViewRig" then
            for _, part in v:GetDescendants() do
                if part:IsA("BasePart") then part.Transparency = 0 end
            end
        end
    end
end

local function toggleAntiBreakArms(value)
    if value then
        local attName = Player.Name .. "Att"
        local grabbedPart = nil
        local launched = false

        local function findGrabbedPart()
            grabbedPart = nil
            for _, desc in workspace:GetDescendants() do
                if desc:IsA("Attachment") and desc.Name == attName then
                    local part = desc.Parent
                    if part and part:IsA("BasePart") then
                        grabbedPart = part
                        return
                    end
                end
            end
        end

        local function isGrabbing()
            if grabbedPart and grabbedPart:FindFirstChild(attName) then
                return true
            end
            findGrabbedPart()
            return grabbedPart ~= nil
        end

        findGrabbedPart()

        preSimAntiBreak = RunService.PreSimulation:Connect(function()
            local char = Player.Character
            if not char then return end
            for _, cp in char:GetDescendants() do
                if cp.Name == "ColliderPart" then
                    cp:Destroy()
                end
            end
            local root = char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso")
            if root and Vector3.new(root.Velocity.X, 0, root.Velocity.Z).Magnitude > 80 then
                root.Velocity = Vector3.new(0, root.Velocity.Y, 0)
            end
        end)

        antiBreakConn = RunService.Heartbeat:Connect(function()
            local char = Player.Character
            if not char then return end

            local isRagdoll = char:FindFirstChild("IsRagdoll")
            if isRagdoll and isRagdoll.Value then
                isRagdoll.Value = false
            end

            local humanoid = char:FindFirstChildWhichIsA("Humanoid")
            local root = char:FindFirstChild("HumanoidRootPart") or char:FindFirstChild("Torso")

            if humanoid then
                if humanoid.PlatformStand then
                    humanoid.PlatformStand = false
                end
                if not humanoid.AutoRotate then
                    humanoid.AutoRotate = true
                end
                humanoid:ChangeState(Enum.HumanoidStateType.Running)
            end

            clearViewRig(char)

            for _, cp in char:GetDescendants() do
                if cp.Name == "ColliderPart" then
                    cp:Destroy()
                end
            end

            if root then
                local flatSpeed = Vector3.new(root.Velocity.X, 0, root.Velocity.Z).Magnitude
                if flatSpeed > 80 then
                    root.Velocity = Vector3.new(0, root.Velocity.Y, 0)
                    launched = true
                elseif launched and flatSpeed < 15 then
                    launched = false
                end
            end

            if isGrabbing() and not launched and not grabOverrideActive then
                if not root then return end
                local bp = grabbedPart:FindFirstChildWhichIsA("BodyPosition")
                if bp then
                    local offset = bp.Position - root.Position
                    if offset.Magnitude > 18 then
                        bp.Position = root.Position + offset.Unit * 18
                    end
                end
            end
        end)
    else
        if preSimAntiBreak then
            preSimAntiBreak:Disconnect()
            preSimAntiBreak = nil
        end
        if antiBreakConn then
            antiBreakConn:Disconnect()
            antiBreakConn = nil
        end
    end
end

local grabConn = nil
local grabScrollConn = nil
local grabClickConn = nil
local grabReleaseConn = nil
local grabDropConn = nil
local grabbedBP = nil
local grabReleaseQueued = false

local function findGrabbedBP()
    if grabbedBP and grabbedBP.Parent then
        return grabbedBP
    end
    grabbedBP = nil
    for _, obj in workspace:GetDescendants() do
        if obj:IsA("BodyPosition") then
            local part = obj.Parent
            if part and (part:IsA("BasePart") or part:IsA("Attachment")) then
                local model = part:FindFirstAncestorWhichIsA("Model")
                if model and model:HasTag("CanGrab") then
                    grabbedBP = obj
                    return obj
                end
            end
        end
    end
    return nil
end

local function getRemote(name)
    local remotes = game.ReplicatedStorage:FindFirstChild("Remotes")
    return remotes and remotes:FindFirstChild(name or "GrabEvent")
end

local function findInteractiveInView(maxDist)
    local char = Player.Character
    if not char then return nil end
    local filter = RaycastParams.new()
    filter.FilterType = Enum.RaycastFilterType.Exclude
    local exclude = { char }
    local viewRig = char:FindFirstChild(Player.Name .. "Arms")
    if viewRig then table.insert(exclude, viewRig) end
    filter.FilterDescendantsInstances = exclude
    local result = workspace:Raycast(CurrentCamera.CFrame.Position, CurrentCamera.CFrame.LookVector * maxDist, filter)
    if result and result.Instance then
        local model = result.Instance:FindFirstAncestorWhichIsA("Model")
        if model and model:GetAttribute("System") then
            return model
        end
    end
end

local grabModelRef = nil

local function grabRelease()
    if not grabReleaseQueued then return end
    grabReleaseQueued = false
    local model = grabModelRef
    grabModelRef = nil
    if not model or not model.Parent then
        local bp = findGrabbedBP()
        if bp then
            model = bp.Parent:FindFirstAncestorWhichIsA("Model")
        end
    end
    if model then
        local ge = getRemote()
        if ge then ge:FireServer(model) end
    end
end

local grabScriptsState = {}
local function disableGrabScripts(disable)
    if not Player.Character then return end
    local char = Player.Character
    local targets = {
        char:FindFirstChild("GrabClient"),
        char:FindFirstChild("UPDGrabClient"),
    }
    for _, script in ipairs(targets) do
        if script and script:IsA("LocalScript") then
            if disable then
                if not grabScriptsState[script] then
                    grabScriptsState[script] = script.Disabled
                end
                script.Disabled = true
            else
                local orig = grabScriptsState[script]
                if orig ~= nil then
                    script.Disabled = orig
                end
                grabScriptsState[script] = nil
            end
        end
    end
end

local function findGrabbableInView(maxDist)
    local char = Player.Character
    if not char then return nil end
    local camPos = CurrentCamera.CFrame.Position
    local lookVec = CurrentCamera.CFrame.LookVector
    local filter = RaycastParams.new()
    filter.FilterType = Enum.RaycastFilterType.Exclude
    local exclude = { char }
    local viewRig = char:FindFirstChild(Player.Name .. "Arms")
    if viewRig then table.insert(exclude, viewRig) end
    filter.FilterDescendantsInstances = exclude

    local result = workspace:Raycast(camPos, lookVec * maxDist, filter)
    if result and result.Instance then
        local model = result.Instance:FindFirstAncestorWhichIsA("Model")
        if model and model:HasTag("CanGrab") then
            return model
        end
    end

    return nil
end

local function toggleGrab(value)
    grabOverrideActive = value
    if value then
        local myDistance = 50

        disableGrabScripts(true)

        grabScrollConn = UserInputService.InputChanged:Connect(function(input, processed)
            if processed then return end
            if input.UserInputType == Enum.UserInputType.MouseWheel then
                myDistance = math.clamp(myDistance + input.Position.Z * 5, 5, 500)
            end
        end)

        grabClickConn = UserInputService.InputBegan:Connect(function(input, processed)
            if processed or input.UserInputType ~= Enum.UserInputType.MouseButton1 then return end
            if findGrabbedBP() then return end

            -- Try interactive (System) objects first: short raycast, close range only
            local interactiveModel = findInteractiveInView(1000)
            if interactiveModel then
                local cs = getRemote("CheckSystem")
                if cs then cs:FireServer(interactiveModel) end
                return
            end

            local model = findGrabbableInView(1000)
            if model and model.PrimaryPart then
                local ge = getRemote()
                if ge then
                    ge:FireServer(model, model.PrimaryPart.Position)
                    grabReleaseQueued = true
                    grabModelRef = model
                end
            end
        end)

        grabDropConn = UserInputService.InputBegan:Connect(function(input, processed)
            if processed then return end
            if input.KeyCode == Enum.KeyCode.H and grabReleaseQueued then
                grabRelease()
            end
        end)

        grabbedBP = nil
        grabConn = RunService.PreRender:Connect(function()
            if not Player.Character then return end
            local bp = findGrabbedBP()
            if bp then
                local targetPos = CurrentCamera.CFrame.Position + CurrentCamera.CFrame.LookVector * myDistance
                bp.MaxForce = Vector3.new(500000, 500000, 500000)
                bp.P = 15000
                bp.D = 2000
                bp.Position = targetPos
                local part = bp.Parent
                if part and part:IsA("BasePart") then
                    local model = part:FindFirstAncestorWhichIsA("Model")
                    if model and model.PrimaryPart then
                        model.PrimaryPart.CFrame = CFrame.new(targetPos)
                    end
                end
                if not UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
                    grabRelease()
                end
            end
        end)
    else
        disableGrabScripts(false)
        if grabConn then grabConn:Disconnect(); grabConn = nil end
        if grabScrollConn then grabScrollConn:Disconnect(); grabScrollConn = nil end
        if grabClickConn then grabClickConn:Disconnect(); grabClickConn = nil end
        if grabReleaseConn then grabReleaseConn:Disconnect(); grabReleaseConn = nil end
        if grabDropConn then grabDropConn:Disconnect(); grabDropConn = nil end
        grabbedBP = nil
        grabModelRef = nil
        grabReleaseQueued = false
    end
end

staminaBg.MouseButton1Click:Connect(function()
    staminaToggled = not staminaToggled
    animateKnob(staminaKnob, staminaBg, staminaToggled)
    toggleInfiniteStamina(staminaToggled)
end)

unlockBg.MouseButton1Click:Connect(function()
    unlockToggled = not unlockToggled
    animateKnob(unlockKnob, unlockBg, unlockToggled)
    if unlockToggled ~= mouseUnlock then
        toggleMouseUnlock()
    end
end)

espBg.MouseButton1Click:Connect(function()
    espToggled = not espToggled
    animateKnob(espKnob, espBg, espToggled)
    itemFilterFrame.Visible = espToggled
    toggleEsp(espToggled)
    repositionLayout()
end)

enemyEspBg.MouseButton1Click:Connect(function()
    enemyEspToggled = not enemyEspToggled
    animateKnob(enemyEspKnob, enemyEspBg, enemyEspToggled)
    enemyFilterFrame.Visible = enemyEspToggled
    toggleEnemyEsp(enemyEspToggled)
    repositionLayout()
end)

antiBreakBg.MouseButton1Click:Connect(function()
    antiBreakToggled = not antiBreakToggled
    animateKnob(antiBreakKnob, antiBreakBg, antiBreakToggled)
    toggleAntiBreakArms(antiBreakToggled)
end)

grabBg.MouseButton1Click:Connect(function()
    grabToggled = not grabToggled
    animateKnob(grabKnob, grabBg, grabToggled)
    toggleGrab(grabToggled)
end)

repositionLayout()
MainFrame.Position = UDim2.new(0.5, -140, 0.5, -MainFrame.Size.Y.Offset / 2)
_G._GnomesH = {
    toggleStamina = function(v) staminaToggled = v; animateKnob(staminaKnob, staminaBg, staminaToggled); toggleStamina(staminaToggled) end,
    toggleFreeMouse = function(v) unlockToggled = v; animateKnob(unlockKnob, unlockBg, unlockToggled); toggleFreeMouse(unlockToggled) end,
    toggleItemEsp = function(v) espToggled = v; animateKnob(espKnob, espBg, espToggled); toggleItemEsp(espToggled) end,
    toggleEnemyEsp = function(v) enemyEspToggled = v; animateKnob(enemyEspKnob, enemyEspBg, enemyEspToggled); toggleEnemyEsp(enemyEspToggled) end,
    toggleAntiBreak = function(v) antiBreakToggled = v; animateKnob(antiBreakKnob, antiBreakBg, antiBreakToggled); toggleAntiBreakArms(antiBreakToggled) end,
    toggleGrab = function(v) grabToggled = v; animateKnob(grabKnob, grabBg, grabToggled); toggleGrab(grabToggled) end,
}
print("[Gnomes Hub] Loaded - Press X to free mouse, toggles in GUI")

Features & Information

Infinite Stamina (stamina bar will go down but you will continue to sprint) Free Mouse Item Esp Enemy Esp Anti Break Arms Infinite Grab (VERY OP), works for doors, cabinets, etc

Community Comments (0)

No comments yet for this script.