DBS script
Key Required

DBS script

Difficulty Button Simulatorgdproat3amgdproat3am 623 views 111 executesUpdated Feb 6, 2026
Unrated
00
Lua Script•2646 lines (102286 chars)
https://pastebin.com/raw/qskARXjF

or 

local repo = "https://raw.githubusercontent.com/deividcomsono/Obsidian/main/"
local Library = loadstring(game:HttpGet(repo .. "Library.lua"))()

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer
local isMobile = UserInputService.TouchEnabled


-- Teleport function
local function tryTeleport(target)
    local char = player.Character
    if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    if not hrp then return end

    local part = target
    if not part:IsA("BasePart") then
        part = target:FindFirstChildWhichIsA("BasePart", true) or target
    end

    if part and part:IsA("BasePart") then
        hrp.CFrame = part.CFrame * CFrame.new(0, 5, 0)
        print("Teleported → " .. part:GetFullName())
    else
        warn("No valid BasePart for teleport")
    end
end

-- Function to find teleport locations in a class
local function findClassTeleports(classNum)
    local areas = workspace:FindFirstChild("Areas")
    if not areas then return {} end

    local classFolder = areas:FindFirstChild("Class" .. classNum)
    if not classFolder then return {} end

    local teleports = {}
    
    -- Common named parts
    local namedParts = {"Start", "part", "Spawn", "SpawnPoint", "Teleport", "Checkpoint", "HealingPad"}
    for _, name in ipairs(namedParts) do
        local part = classFolder:FindFirstChild(name)
        if part and part:IsA("BasePart") then
            table.insert(teleports, {text = "TP to " .. name, target = part})
        elseif part then
            local basePart = part:FindFirstChildWhichIsA("BasePart")
            if basePart then
                table.insert(teleports, {text = "TP to " .. name, target = basePart})
            end
        end
    end

    -- Search for floors (common pattern: Floor1, Floor2, etc.)
    for i = 1, 20 do
        local floor = classFolder:FindFirstChild("Floor" .. i) or classFolder:FindFirstChild("Floor " .. i)
        if floor then
            local part = floor:IsA("BasePart") and floor or floor:FindFirstChildWhichIsA("BasePart")
            if part then
                table.insert(teleports, {text = "TP to Floor " .. i, target = part})
            end
        end
    end

    -- Search children for models with "part" or common names
    local children = classFolder:GetChildren()
    for idx, child in ipairs(children) do
        if child:IsA("Model") then
            local part = child:FindFirstChild("part") or child:FindFirstChildWhichIsA("BasePart")
            if part then
                local name = child.Name
                if name ~= "Floor1" and name ~= "Floor2" and name ~= "Floor3" then -- Avoid duplicates
                    table.insert(teleports, {text = "TP to " .. name, target = part})
                end
            end
        elseif child:IsA("BasePart") and child.Name ~= "Start" and child.Name ~= "part" then
            table.insert(teleports, {text = "TP to " .. child.Name, target = child})
        end
    end

    -- If no teleports found, add a generic start teleport
    if #teleports == 0 then
        local firstPart = classFolder:FindFirstChildWhichIsA("BasePart", true)
        if firstPart then
            table.insert(teleports, {text = "TP to Start", target = firstPart})
        end
    end

    return teleports
end

-- Function to add class teleports directly to a tab
local function addClassTeleportsToTab(tab, classNum)
    local teleports = findClassTeleports(classNum)
    local group = tab:AddLeftGroupbox("Class " .. classNum .. " Teleports")
    
    if #teleports == 0 then
        group:AddButton("No teleport locations found", function() end)
    else
        for _, entry in ipairs(teleports) do
            group:AddButton(entry.text, function()
                if entry.target then
                    tryTeleport(entry.target)
                else
                    warn("Class " .. classNum .. " - invalid target: " .. entry.text)
                end
            end)
        end
    end
end

-- Function to add Class 1 teleports to a tab
local function addClass1TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 1 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 1 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local lighting = kit:FindFirstChild("ClientSidedObjects")
            if lighting then
                lighting = lighting:FindFirstChild("LightingChangers")
                if lighting then
                    local children = lighting:GetChildren()
                    if #children >= 32 and children[32] then
                        targetPart = children[32]
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 1 - Start: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects.LightingChangers:GetChildren()[32]")
        end
    end)

    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class1 = areas and areas:FindFirstChild("Class1")
        if class1 then
            local children = class1:GetChildren()
            if #children >= 1582 and children[1582] then
                targetPart = children[1582]
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 1 - End: Could not find workspace.Areas.Class1:GetChildren()[1582] as a BasePart")
        end
    end)
end

-- Function to add Class 2 teleports to a tab
local function addClass2TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 2 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 2 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local canister = workspace:FindFirstChild("CanisterMode")
        if canister then
            local target = canister:FindFirstChild("Class2-3")
            if target then
                local part = target:IsA("BasePart") and target or target:FindFirstChildWhichIsA("BasePart")
                if part then
                    tryTeleport(part)
                else
                    warn("Class 2 - Start: No valid BasePart found in Class2-3")
                end
            else
                warn("Class 2 - Start: Class2-3 not found in CanisterMode")
            end
        else
            warn("Class 2 - Start: CanisterMode not found")
        end
    end)

    -- TP to the End
    group:AddButton("TP to End", function()
        local areas = workspace:FindFirstChild("Areas")
        if areas then
            local target = areas:FindFirstChild("Class2-3")
            if target then
                local children = target:GetChildren()
                if #children >= 216 then
                    local part = children[216]:IsA("BasePart") and children[216] or children[216]:FindFirstChildWhichIsA("BasePart")
                    if part then
                        tryTeleport(part)
                    else
                        warn("Class 2 - End: No valid BasePart found in children[216]")
                    end
                else
                    warn("Class 2 - End: Not enough children (need at least 216, found " .. #children .. ")")
                end
            else
                warn("Class 2 - End: Class2-3 not found in Areas")
            end
        else
            warn("Class 2 - End: Areas not found")
        end
    end)

    -- TP to Secret
    group:AddButton("TP to Secret", function()
        local areas = workspace:FindFirstChild("Areas")
        if areas then
            local target = areas:FindFirstChild("Class2-3")
            if target then
                local children = target:GetChildren()
                if #children >= 19 then
                    local part = children[19]:FindFirstChild("part")
                    if part then
                        tryTeleport(part)
                    else
                        warn("Class 2 - Secret: part not found in children[19]")
                    end
                else
                    warn("Class 2 - Secret: Not enough children (need at least 19, found " .. #children .. ")")
                end
            else
                warn("Class 2 - Secret: Class2-3 not found in Areas")
            end
        else
            warn("Class 2 - Secret: Areas not found")
        end
    end)

    -- TP to the End of the Secret
    group:AddButton("TP Secret End", function()
        local areas = workspace:FindFirstChild("Areas")
        if areas then
            local target = areas:FindFirstChild("Class2-3")
            if target then
                local children = target:GetChildren()
                if #children >= 210 then
                    local part = children[210]:IsA("BasePart") and children[210] or children[210]:FindFirstChildWhichIsA("BasePart")
                    if part then
                        tryTeleport(part)
                    else
                        warn("Class 2 - Secret End: No valid BasePart found in children[210]")
                    end
                else
                    warn("Class 2 - Secret End: Not enough children (need at least 210, found " .. #children .. ")")
                end
            else
                warn("Class 2 - Secret End: Class2-3 not found in Areas")
            end
        else
            warn("Class 2 - Secret End: Areas not found")
        end
    end)
end

-- Function to add Class 3 teleports to a tab
local function addClass3TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 3 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 3 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local canister = workspace:FindFirstChild("CanisterMode")
        if canister then
            local children = canister:GetChildren()
            if #children >= 21 and children[21] then
                targetPart = children[21]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 3 - Start: Could not find workspace.CanisterMode:GetChildren()[21]")
        end
    end)

    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class23 = areas and areas:FindFirstChild("Class2-3")
        if class23 then
            local children = class23:GetChildren()
            if #children >= 41 and children[41] then
                targetPart = children[41]:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 3 - End: Could not find workspace.Areas['Class2-3']:GetChildren()[41].part")
        end
    end)
end

-- Function to add Class 4 teleports to a tab
local function addClass4TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 4 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 4 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local canister = workspace:FindFirstChild("CanisterMode")
        if canister then
            local class4 = canister:FindFirstChild("Class4")
            if class4 then
                targetPart = class4
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 4 - Start: Could not find workspace.CanisterMode.Class4")
        end
    end)

    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class4 = areas and areas:FindFirstChild("Class4")
        if class4 then
            local children = class4:GetChildren()
            if #children >= 3 and children[3] then
                targetPart = children[3]:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 4 - End: Could not find workspace.Areas.Class4:GetChildren()[3].part")
        end
    end)
end

-- Function to add Class 5 teleports to a tab
local function addClass5TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 5 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 5 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local canister = workspace:FindFirstChild("CanisterMode")
        if canister then
            local class5 = canister:FindFirstChild("Class5")
            if class5 then
                targetPart = class5
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 5 - Start: Could not find workspace.CanisterMode.Class5")
        end
    end)

    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class5 = areas and areas:FindFirstChild("Class5")
        if class5 then
            local children = class5:GetChildren()
            if #children >= 77 and children[77] then
                targetPart = children[77]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 5 - End: Could not find workspace.Areas.Class5:GetChildren()[77]")
        end
    end)
end

-- Function to add Class 6 teleports to a tab
local function addClass6TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 6 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 6 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local lighting = kit:FindFirstChild("ClientSidedObjects")
            if lighting then
                lighting = lighting:FindFirstChild("LightingChangers")
                if lighting then
                    local children = lighting:GetChildren()
                    if #children >= 20 and children[20] then
                        targetPart = children[20]
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 6 - Start: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects.LightingChangers:GetChildren()[20]")
        end
    end)

    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class6 = areas and areas:FindFirstChild("Class6")
        if class6 then
            local multiplier = class6:FindFirstChild("Multiplier")
            if multiplier then
                targetPart = multiplier:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 6 - End: Could not find workspace.Areas.Class6.Multiplier.part")
        end
    end)
end

-- Function to add Class 7 teleports to a tab
local function addClass7TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 7 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 7 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local canister = workspace:FindFirstChild("CanisterMode")
        if canister then
            local class7 = canister:FindFirstChild("Class7")
            if class7 then
                targetPart = class7
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 7 - Start: Could not find workspace.CanisterMode.Class7")
        end
    end)

    -- TP to volcano obby
    group:AddButton("TP to volcano obby", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class7 = areas and areas:FindFirstChild("Class7")
        if class7 then
            local children = class7:GetChildren()
            if #children >= 5 and children[5] then
                targetPart = children[5]:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 7 - Volcano Obby: Could not find workspace.Areas.Class7:GetChildren()[5].part")
        end
    end)

    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class7 = areas and areas:FindFirstChild("Class7")
        if class7 then
            local children = class7:GetChildren()
            if #children >= 17 and children[17] then
                targetPart = children[17]:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 7 - End: Could not find workspace.Areas.Class7:GetChildren()[17].part")
        end
    end)
end

-- Function to add Class 8 teleports to a tab
local function addClass8TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 8 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 8 for TPs to work")
    
    local fullBrightEnabled = false

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local canister = workspace:FindFirstChild("CanisterMode")
        if canister then
            local class8 = canister:FindFirstChild("Class8")
            if class8 then
                targetPart = class8
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 8 - Start: Could not find workspace.CanisterMode.Class8")
        end
    end)

    -- Full Brightness Toggle
    group:AddToggle("FullBright", {
        Text = "Full Brightness",
        Default = false,
        Callback = function(value)
            fullBrightEnabled = value
            local Lighting = game:GetService("Lighting")
            if value then
                Lighting.Brightness = 2
                Lighting.ClockTime = 14
                Lighting.FogEnd = 100000
                Lighting.GlobalShadows = false
                Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
            else
                Lighting.Brightness = 1
                Lighting.ClockTime = 12
                Lighting.FogEnd = 100000
                Lighting.GlobalShadows = true
                Lighting.OutdoorAmbient = Color3.fromRGB(70, 70, 70)
            end
        end
    })

    -- Finish part 1
    group:AddButton("Finish part 1", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class8 = areas and areas:FindFirstChild("Class8")
        if class8 then
            local children = class8:GetChildren()
            if #children >= 66 and children[66] then
                local subChildren = children[66]:GetChildren()
                if #subChildren >= 2 and subChildren[2] then
                    targetPart = subChildren[2]
                    if not targetPart:IsA("BasePart") then
                        targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 8 - Finish Part 1: Could not find workspace.Areas.Class8:GetChildren()[66]:GetChildren()[2]")
        end
    end)

    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class8 = areas and areas:FindFirstChild("Class8")
        if class8 then
            local children = class8:GetChildren()
            if #children >= 213 and children[213] then
                targetPart = children[213]:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 8 - End: Could not find workspace.Areas.Class8:GetChildren()[213].part")
        end
    end)
end

-- Function to add Class 9 teleports to a tab
local function addClass9TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 9 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 9 for TPs to work")

    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local yesSpeed = workspace:FindFirstChild("YesSpeedZones")
        if yesSpeed then
            local children = yesSpeed:GetChildren()
            if #children >= 2 and children[2] then
                targetPart = children[2]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 9 - Start: Could not find workspace.YesSpeedZones:GetChildren()[2]")
        end
    end)

    -- TP infront of error chain portal
    group:AddButton("TP infront of error chain portal", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class9 = areas and areas:FindFirstChild("Class9")
        if class9 then
            local portal = class9:FindFirstChild("Revamped Obelisk Portal")
            if portal then
                local children = portal:GetChildren()
                if #children >= 44 and children[44] then
                    targetPart = children[44]
                    if not targetPart:IsA("BasePart") then
                        targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 9 - Error Chain Portal: Could not find workspace.Areas.Class9['Revamped Obelisk Portal']:GetChildren()[44]")
        end
    end)

    -- TP to start of error chain
    group:AddButton("TP to start of error chain", function()
        local targetPart = nil
        local canister = workspace:FindFirstChild("CanisterMode")
        if canister then
            local class91 = canister:FindFirstChild("Class9.1")
            if class91 then
                targetPart = class91
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 9 - Start of Error Chain: Could not find workspace.CanisterMode['Class9.1']")
        end
    end)
end

-- Function to add Class 10 teleports to a tab
local function addClass10TeleportsToTab(tab)
    local kit = workspace:FindFirstChild("JToH Kit v5.35")
    local lighting = kit and kit:FindFirstChild("ClientSidedObjects") and kit.ClientSidedObjects:FindFirstChild("LightingChangers")
    local area10 = workspace.Areas and workspace.Areas:FindFirstChild("Class10")

    local group = tab:AddLeftGroupbox("Class 10 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 10 for TPs to work")

    local tps = {
        {text = "TP to 'the light of day'", target = function()
            return workspace:GetChildren()[90] and workspace:GetChildren()[90]:FindFirstChild("part")
        end},
        {text = "TP to Floor 1", target = function() return lighting and lighting:GetChildren()[9] end},
        {text = "TP to Floor 2", target = function() return lighting and lighting:GetChildren()[10] end},
        {text = "TP to Floor 3", target = function() return lighting and lighting:GetChildren()[11] end},
        {text = "TP to Floor 4", target = function() return lighting and lighting:GetChildren()[12] end},
        {text = "TP to Floor 5 / The Roof", target = function()
            return area10 and area10:GetChildren()[11] and area10:GetChildren()[11]:FindFirstChild("HealingPad")
        end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton(entry.text, function()
            local t = entry.target()
            if t then 
                tryTeleport(t)
            else 
                warn("Class 10 - missing: " .. entry.text)
            end
        end)
    end
end

-- Function to add Class 11 teleports to a tab
local function addClass11TeleportsToTab(tab)
    local canister = workspace:FindFirstChild("CanisterMode")
    local group = tab:AddLeftGroupbox("Class 11 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 11 for TPs to work")

    local tps = {
        {text = "TP to the start of class 11", target = function() return canister and canister:FindFirstChild("Class11") end},
        {text = "TP to the halfway point",     target = function() return canister and canister:GetChildren()[14] end},
        {text = "TP to the end",               target = function() return canister and canister:GetChildren()[36] end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton(entry.text, function()
            local t = entry.target()
            if t then 
                tryTeleport(t)
            else 
                warn("Class 11 - missing: " .. entry.text)
            end
        end)
    end
end

-- Function to add Class 12 teleports to a tab
local function addClass12TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 12 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 12 for TPs to work")
    
    -- TP to Start
    group:AddButton("TP to Start", function()
        local targetPart = nil
        local children = workspace:GetChildren()
        if #children >= 109 and children[109] then
            targetPart = children[109]:FindFirstChild("part")
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - Start: Could not find workspace:GetChildren()[109].part")
        end
    end)
    
    -- TP to halfway point
    group:AddButton("TP to halfway point", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class12 = areas and areas:FindFirstChild("Class12")
        if class12 then
            targetPart = class12:FindFirstChild("Simon")
            if targetPart and not targetPart:IsA("BasePart") then
                targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - Halfway: Could not find workspace.Areas.Class12.Simon")
        end
    end)
    
    -- TP to End
    group:AddButton("TP to End", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class12 = areas and areas:FindFirstChild("Class12")
        if class12 then
            local multiplier = class12:FindFirstChild("Multiplier")
            if multiplier then
                targetPart = multiplier:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - End: Could not find workspace.Areas.Class12.Multiplier.part")
        end
    end)
    
    -- Crystal Buttons Group
    local buttonGroup = tab:AddRightGroupbox("Crystal Buttons")
    
    buttonGroup:AddButton("TP to Blue Crystal Button", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local objs = kit:FindFirstChild("ClientSidedObjects")
            if objs then
                local children = objs:GetChildren()
                if #children >= 177 and children[177] then
                    local subChildren = children[177]:GetChildren()
                    if #subChildren >= 4 and subChildren[4] then
                        targetPart = subChildren[4]:FindFirstChild("Button")
                        if targetPart and not targetPart:IsA("BasePart") then
                            targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                        end
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - Blue Button: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects:GetChildren()[177]:GetChildren()[4].Button")
        end
    end)
    
    buttonGroup:AddButton("TP to Yellow Crystal Button", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local objs = kit:FindFirstChild("ClientSidedObjects")
            if objs then
                local children = objs:GetChildren()
                if #children >= 183 and children[183] then
                    local subChildren = children[183]:GetChildren()
                    if #subChildren >= 4 and subChildren[4] then
                        targetPart = subChildren[4]:FindFirstChild("Button")
                        if targetPart and not targetPart:IsA("BasePart") then
                            targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                        end
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - Yellow Button: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects:GetChildren()[183]:GetChildren()[4].Button")
        end
    end)
    
    -- Crystal Obbies Group
    local obbyGroup = tab:AddLeftGroupbox("Crystal Obbies")
    
    obbyGroup:AddButton("Teleport to Pink Crystal Obby", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class12 = areas and areas:FindFirstChild("Class12")
        if class12 then
            local children = class12:GetChildren()
            if #children >= 355 and children[355] then
                targetPart = children[355]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - Pink Obby: Could not find workspace.Areas.Class12:GetChildren()[355]")
        end
    end)
    
    obbyGroup:AddButton("Auto Complete Pink Obby", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local objs = kit:FindFirstChild("ClientSidedObjects")
            if objs then
                local children = objs:GetChildren()
                if #children >= 63 and children[63] then
                    local subChildren = children[63]:GetChildren()
                    if #subChildren >= 10 and subChildren[10] then
                        targetPart = subChildren[10]
                        if not targetPart:IsA("BasePart") then
                            targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                        end
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
            print("Pink Obby Auto Completed!")
        else
            warn("Class 12 - Pink Auto Complete: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects:GetChildren()[63]:GetChildren()[10]")
        end
    end)
    
    obbyGroup:AddButton("Teleport to Blue Crystal Obby", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class12 = areas and areas:FindFirstChild("Class12")
        if class12 then
            local children = class12:GetChildren()
            if #children >= 281 and children[281] then
                targetPart = children[281]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - Blue Obby: Could not find workspace.Areas.Class12:GetChildren()[281]")
        end
    end)
    
    obbyGroup:AddButton("Auto Complete Blue Obby", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local objs = kit:FindFirstChild("ClientSidedObjects")
            if objs then
                local children = objs:GetChildren()
                if #children >= 187 and children[187] then
                    local subChildren = children[187]:GetChildren()
                    if #subChildren >= 10 and subChildren[10] then
                        targetPart = subChildren[10]
                        if not targetPart:IsA("BasePart") then
                            targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                        end
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
            print("Blue Obby Auto Completed!")
        else
            warn("Class 12 - Blue Auto Complete: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects:GetChildren()[187]:GetChildren()[10]")
        end
    end)
    
    obbyGroup:AddButton("Remove Blue Obby Kill Part", function()
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local objs = kit:FindFirstChild("ClientSidedObjects")
            if objs then
                local killBricks = objs:FindFirstChild("KillBricks")
                if killBricks then
                    local children = killBricks:GetChildren()
                    if #children >= 11 and children[11] then
                        children[11]:Destroy()
                        print("Removed Blue Obby Kill Part!")
                    else
                        warn("Class 12 - Remove Kill Part: Not enough children in KillBricks")
                    end
                else
                    warn("Class 12 - Remove Kill Part: KillBricks not found")
                end
            end
        else
            warn("Class 12 - Remove Kill Part: JToH Kit not found")
        end
    end)
    
    obbyGroup:AddButton("Teleport to Yellow Crystal Obby", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class12 = areas and areas:FindFirstChild("Class12")
        if class12 then
            local children = class12:GetChildren()
            if #children >= 343 and children[343] then
                targetPart = children[343]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Class 12 - Yellow Obby: Could not find workspace.Areas.Class12:GetChildren()[343]")
        end
    end)
    
    obbyGroup:AddButton("Auto Complete Yellow Obby", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local objs = kit:FindFirstChild("ClientSidedObjects")
            if objs then
                local children = objs:GetChildren()
                if #children >= 192 and children[192] then
                    local subChildren = children[192]:GetChildren()
                    if #subChildren >= 10 and subChildren[10] then
                        targetPart = subChildren[10]
                        if not targetPart:IsA("BasePart") then
                            targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                        end
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
            print("Yellow Obby Auto Completed!")
        else
            warn("Class 12 - Yellow Auto Complete: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects:GetChildren()[192]:GetChildren()[10]")
        end
    end)
    
    -- NPC Features Group
    local npcGroup = tab:AddRightGroupbox("NPC Features")
    
    local npcHighlights = {}
    
    npcGroup:AddToggle("HighlightNPCs", {
        Text = "Highlight NPCs",
        Default = false,
        Callback = function(value)
            if value then
                -- Add highlights to all NPCs
                for _, obj in ipairs(workspace:GetDescendants()) do
                    if obj:IsA("Model") and obj.Name == "NPC" then
                        local highlight = Instance.new("Highlight")
                        highlight.FillColor = Color3.fromRGB(255, 255, 0)
                        highlight.OutlineColor = Color3.fromRGB(255, 200, 0)
                        highlight.Parent = obj
                        table.insert(npcHighlights, highlight)
                    end
                end
                print("Highlighted " .. #npcHighlights .. " NPCs")
            else
                -- Remove all highlights
                for _, highlight in ipairs(npcHighlights) do
                    if highlight then
                        highlight:Destroy()
                    end
                end
                npcHighlights = {}
                print("Removed NPC highlights")
            end
        end
    })
    
    npcGroup:AddButton("Remove All NPCs in Class 12", function()
        local count = 0
        local areas = workspace:FindFirstChild("Areas")
        local class12 = areas and areas:FindFirstChild("Class12")
        if class12 then
            for _, obj in ipairs(class12:GetDescendants()) do
                if obj:IsA("Model") and obj.Name == "NPC" then
                    obj:Destroy()
                    count = count + 1
                end
            end
            print("Removed " .. count .. " NPCs from Class 12")
        else
            warn("Class 12 folder not found")
        end
    end)
end

-- Function to add Class 13 teleports to a tab
local function addClass13TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 13 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 13 for TPs to work")

    local tps = {
        {text = "Floor 1", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[38] and class13:GetChildren()[38]:FindFirstChild("part")
        end},
        {text = "Floor 2", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[41] and class13:GetChildren()[41]:FindFirstChild("part")
        end},
        {text = "Floor 3", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[35] and class13:GetChildren()[35]:FindFirstChild("part")
        end},
        {text = "Floor 4", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[33] and class13:GetChildren()[33]:FindFirstChild("part")
        end},
        {text = "Floor 5", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[42] and class13:GetChildren()[42]:FindFirstChild("part")
        end},
        {text = "Floor 6", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[28] and class13:GetChildren()[28]:FindFirstChild("part")
        end},
        {text = "Floor 7", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[31] and class13:GetChildren()[31]:FindFirstChild("part")
        end},
        {text = "Floor 8", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[30] and class13:GetChildren()[30]:FindFirstChild("part")
        end},
        {text = "Floor 9", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[40] and class13:GetChildren()[40]:FindFirstChild("part")
        end},
        {text = "Floor 10", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[36] and class13:GetChildren()[36]:FindFirstChild("part")
        end},
        {text = "Floor 11", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[43] and class13:GetChildren()[43]:FindFirstChild("part")
        end},
        {text = "Floor 12", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[50] and class13:GetChildren()[50]:FindFirstChild("part")
        end},
        {text = "Floor 13", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            return class13 and class13:GetChildren()[44] and class13:GetChildren()[44]:FindFirstChild("part")
        end},
        {text = "End", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class13 = areas and areas:FindFirstChild("Class13")
            local children = class13 and class13:GetChildren()
            if children and #children >= 499 and children[499] then
                local part = children[499]
                return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
            end
        end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton("TP to " .. entry.text, function()
            local t = entry.target()
            if t and t:IsA("BasePart") then 
                tryTeleport(t)
            else
                warn("Class 13 - missing or invalid: " .. entry.text)
            end
        end)
    end
end

-- Function to add Class 14 teleports to a tab
local function addClass14TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 14 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 14 for TPs to work")

    local tps = {
        {text = "Start", target = function()
            local canister = workspace:FindFirstChild("CanisterMode")
            local class14 = canister and canister:FindFirstChild("Class14")
            if class14 then
                return class14:IsA("BasePart") and class14 or class14:FindFirstChildWhichIsA("BasePart")
            end
        end},
        {text = "End", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class14 = areas and areas:FindFirstChild("Class14")
            if class14 then
                local children = class14:GetChildren()
                if #children >= 15 and children[15] then
                    return children[15]:FindFirstChild("part")
                end
            end
        end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton("TP to " .. entry.text, function()
            local t = entry.target()
            if t and t:IsA("BasePart") then 
                tryTeleport(t)
            else
                warn("Class 14 - missing or invalid: " .. entry.text)
            end
        end)
    end
end

-- Function to add Class 15 teleports to a tab
local function addClass15TeleportsToTab(tab)
    local kit = workspace:FindFirstChild("JToH Kit v5.35")
    local objs = kit and kit:FindFirstChild("ClientSidedObjects")
    local group = tab:AddLeftGroupbox("Class 15 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 15 for TPs to work")

    local actions = {
        {text = "Money Givers",     idx = 64},
        {text = "Portals",          idx = 112},
        {text = "Orbs",             special = "orbs"},
        {text = "Skip to Floor 8",  idx = 28}
    }

    for _, act in ipairs(actions) do
        group:AddButton(act.text, function()
            local target
            if act.idx and objs then
                local ch = objs:GetChildren()
                if #ch >= act.idx then
                    target = ch[act.idx]:FindFirstChild("Destination") or ch[act.idx]
                end
            elseif act.special == "orbs" then
                local cm = workspace:FindFirstChild("CanisterMode")
                target = cm and cm:FindFirstChild("Class15.1")
            end

            if target then
                tryTeleport(target)
            else
                warn("Class 15 - missing: " .. act.text)
            end
        end)
    end
end

-- Function to add Class 16 teleports & NPC 2 utilities to a tab
local function addClass16TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 16 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 16 for TPs to work")

    local tps = {
        {text = "Start", target = function()
            local kit = workspace:FindFirstChild("JToH Kit v5.35")
            local objs = kit and kit:FindFirstChild("ClientSidedObjects")
            local lc = objs and objs:FindFirstChild("LightingChangers")
            if lc then
                local children = lc:GetChildren()
                if #children >= 25 and children[25] then
                    return children[25]
                end
            end
        end},
        
        {text = "First Obby", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class16 = areas and areas:FindFirstChild("Class16")
            if class16 then
                local children = class16:GetChildren()
                if #children >= 202 and children[202] then
                    local part = children[202]
                    return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                end
            end
        end},
        
        {text = "Obby Part 2", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class16 = areas and areas:FindFirstChild("Class16")
            if class16 then
                local children = class16:GetChildren()
                if #children >= 25 and children[25] then
                    return children[25]:FindFirstChild("part")
                end
            end
        end},
        
        {text = "Finale Obby", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class16 = areas and areas:FindFirstChild("Class16")
            if class16 then
                local children = class16:GetChildren()
                if #children >= 17 and children[17] then
                    return children[17]:FindFirstChild("part")
                end
            end
        end},
        
        {text = "End", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class16 = areas and areas:FindFirstChild("Class16")
            if class16 then
                local children = class16:GetChildren()
                if #children >= 24 and children[24] then
                    return children[24]:FindFirstChild("part")
                end
            end
        end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton("TP to " .. entry.text, function()
            local t = entry.target()
            if t and t:IsA("BasePart") then 
                tryTeleport(t)
            else
                warn("Class 16 - missing or invalid: " .. entry.text)
            end
        end)
    end

    -- Highlight toggle for NPC 2 (enemies)
    local npcHighlights = {}  -- store highlights for cleanup

    group:AddToggle("HighlightEnemies", {
        Text = "Highlight Enemies (NPC 2)",
        Default = false,
        Callback = function(value)
            if value then
                npcHighlights = {}
                local count = 0
                for _, obj in ipairs(workspace:GetDescendants()) do
                    if obj:IsA("Model") and obj.Name == "NPC 2" then
                        local highlight = Instance.new("Highlight")
                        highlight.Name = "EnemyHighlight"
                        highlight.FillColor = Color3.fromRGB(255, 85, 0)   -- orange-red fill
                        highlight.OutlineColor = Color3.fromRGB(255, 255, 0) -- bright yellow outline
                        highlight.FillTransparency = 0.35
                        highlight.OutlineTransparency = 0
                        highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
                        highlight.Parent = obj
                        table.insert(npcHighlights, highlight)
                        count = count + 1
                    end
                end
                if count > 0 then
                    print("Highlighted " .. count .. " NPC 2 enemy models")
                else
                    warn("No models named 'NPC 2' found to highlight")
                end
            else
                local count = #npcHighlights
                for _, hl in ipairs(npcHighlights) do
                    if hl and hl.Parent then
                        hl:Destroy()
                    end
                end
                npcHighlights = {}
                if count > 0 then
                    print("Removed " .. count .. " NPC 2 highlights")
                end
            end
        end
    })

    -- Remove all NPC 2 models button
    group:AddButton("Remove NPC 2 Models", function()
        local count = 0
        for _, obj in ipairs(workspace:GetDescendants()) do
            if obj:IsA("Model") and obj.Name == "NPC 2" then
                obj:Destroy()
                count = count + 1
            end
        end
        if count > 0 then
            print("Removed " .. count .. " NPC 2 model(s)")
        else
            warn("No models named 'NPC 2' found to remove")
        end
    end)
end

-- Function to add Class 17 teleports to a tab
local function addClass17TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 17 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 17 for TPs to work")

    local tps = {
        {text = "Very Start", target = function()
            local kit = workspace:FindFirstChild("JToH Kit v5.35")
            local lc = kit and kit:FindFirstChild("ClientSidedObjects") and kit.ClientSidedObjects:FindFirstChild("LightingChangers")
            return lc and lc:GetChildren()[33]
        end},
        {text = "Floor 1", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[162]
        end},
        {text = "Floor 2", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[415]
        end},
        {text = "Floor 3", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[842]
        end},
        {text = "Floor 4", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[9] and class17:GetChildren()[9]:FindFirstChild("part")
        end},
        {text = "Floor 5", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[6] and class17:GetChildren()[6]:FindFirstChild("part")
        end},
        {text = "Floor 6", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[1332]
        end},
        {text = "Floor 7", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[29] and class17:GetChildren()[29]:FindFirstChild("part")
        end},
        {text = "Floor 8", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[30] and class17:GetChildren()[30]:FindFirstChild("part")
        end},
        {text = "Floor 9", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[34] and class17:GetChildren()[34]:FindFirstChild("part")
        end},
        {text = "Floor 10", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[35] and class17:GetChildren()[35]:FindFirstChild("part")
        end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton(entry.text, function()
            local t = entry.target()
            if t then 
                tryTeleport(t)
            else
                warn("Class 17 - missing: " .. entry.text)
            end
        end)
    end
end

-- Function to add Class 18 teleports to a tab
local function addClass18TeleportsToTab(tab)
    local group = tab:AddLeftGroupbox("Class 18 Teleports")
    
    group:AddLabel("⚠️ You must be in Class 18 for TPs to work")

    local tps = {
        {text = "the very start", target = function()
            local noSpeed = workspace:FindFirstChild("NoSpeedZones")
            if noSpeed then
                local children = noSpeed:GetChildren()
                if #children >= 3 and children[3] then
                    local part = children[3]
                    return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                end
            end
        end},
        
        {text = "first obby", target = function()
            local kit = workspace:FindFirstChild("JToH Kit v5.35")
            local objs = kit and kit:FindFirstChild("ClientSidedObjects")
            local bp = objs and objs:FindFirstChild("ButtonPlatforms")
            if bp then
                local children = bp:GetChildren()
                if #children >= 215 and children[215] then
                    local part = children[215]
                    return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                end
            end
        end},
        
        {text = "finish part 1 obby / part 2 start", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class18 = areas and areas:FindFirstChild("Class18")
            if class18 then
                local children = class18:GetChildren()
                if #children >= 13 and children[13] then
                    return children[13]:FindFirstChild("part")
                end
            end
        end},
        
        {text = "part 2 obby", target = function()
            local kit = workspace:FindFirstChild("JToH Kit v5.35")
            local objs = kit and kit:FindFirstChild("ClientSidedObjects")
            local bp = objs and objs:FindFirstChild("ButtonPlatforms")
            if bp then
                local children = bp:GetChildren()
                if #children >= 217 and children[217] then
                    local part = children[217]
                    return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                end
            end
        end},
        
        {text = "complete part 2 obby / part 3 start", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class18 = areas and areas:FindFirstChild("Class18")
            if class18 then
                local children = class18:GetChildren()
                if #children >= 28 and children[28] then
                    return children[28]:FindFirstChild("part")
                end
            end
        end},
        
        {text = "part 4", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class18 = areas and areas:FindFirstChild("Class18")
            if class18 then
                local children = class18:GetChildren()
                if #children >= 30 and children[30] then
                    return children[30]:FindFirstChild("part")
                end
            end
        end},
        
        {text = "finish part 4", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class18 = areas and areas:FindFirstChild("Class18")
            if class18 then
                local children = class18:GetChildren()
                if #children >= 47 and children[47] then
                    return children[47]:FindFirstChild("part")
                end
            end
        end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton("TP to " .. entry.text, function()
            local t = entry.target()
            if t and t:IsA("BasePart") then 
                tryTeleport(t)
            else
                warn("Class 18 - missing or invalid: " .. entry.text)
            end
        end)
    end
end

-- Function to add the "Part 18 Finale" (Class 19) tab with all requested teleports & utility
local function addPart18FinaleTab(Window)
    local tab = Window:AddTab("Part 18 Finale", "star", "Class 19 / Finale Teleports")
    
    local group = tab:AddLeftGroupbox("Finale Teleports")
    
    group:AddLabel("⚠️ You must be in Class 19 / Finale for TPs to work")

    local tps = {
        {text = "the start of the obby", target = function()
            local kit = workspace:FindFirstChild("JToH Kit v5.35")
            local objs = kit and kit:FindFirstChild("ClientSidedObjects")
            local lc = objs and objs:FindFirstChild("LightingChangers")
            if lc then
                local children = lc:GetChildren()
                if #children >= 57 and children[57] then
                    return children[57]
                end
            end
        end},
        
        {text = "first tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local box = class19:FindFirstChild("Box")
                if box then
                    local children = box:GetChildren()
                    if #children >= 10 and children[10] then
                        local part = children[10]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "second tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local box = class19:FindFirstChild("Box")
                if box then
                    local children = box:GetChildren()
                    if #children >= 10 and children[10] then
                        local part = children[10]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "third tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 2 and children[2] then
                    local sub = children[2]:GetChildren()
                    if #sub >= 6 and sub[6] then
                        local part = sub[6]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "fourth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 3 and children[3] then
                    local sub = children[3]:GetChildren()
                    if #sub >= 6 and sub[6] then
                        local part = sub[6]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "fifth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 4 and children[4] then
                    local sub = children[4]:GetChildren()
                    if #sub >= 4 and sub[4] then
                        local part = sub[4]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "sixth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 6 and children[6] then
                    local sub = children[6]:GetChildren()
                    if #sub >= 6 and sub[6] then
                        local part = sub[6]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        -- Tower 7
        {text = "seventh tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 5 and children[5] then
                    local part = children[5]:FindFirstChild("Part")
                    return part or (children[5]:IsA("BasePart") and children[5])
                end
            end
        end},
        
        {text = "eighth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 7 and children[7] then
                    local sub = children[7]:GetChildren()
                    if #sub >= 6 and sub[6] then
                        local part = sub[6]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "ninth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 8 and children[8] then
                    local sub = children[8]:GetChildren()
                    if #sub >= 20 and sub[20] then
                        local part = sub[20]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "tenth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 9 and children[9] then
                    local part = children[9]:FindFirstChild("Part")
                    return part or (children[9]:IsA("BasePart") and children[9])
                end
            end
        end},
        
        {text = "eleventh tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 10 and children[10] then
                    local sub = children[10]:GetChildren()
                    if #sub >= 10 and sub[10] then
                        local part = sub[10]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "twelfth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 11 and children[11] then
                    local sub = children[11]:GetChildren()
                    if #sub >= 6 and sub[6] then
                        local part = sub[6]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "thirteenth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 12 and children[12] then
                    local sub = children[12]:GetChildren()
                    if #sub >= 3 and sub[3] then
                        local part = sub[3]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "fourteenth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 13 and children[13] then
                    local sub = children[13]:GetChildren()
                    if #sub >= 2 and sub[2] then
                        local part = sub[2]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "fifteenth tower", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 14 and children[14] then
                    local sub = children[14]:GetChildren()
                    if #sub >= 7 and sub[7] then
                        local part = sub[7]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
        
        {text = "end", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class19 = areas and areas:FindFirstChild("Class19")
            if class19 then
                local children = class19:GetChildren()
                if #children >= 14 and children[14] then
                    local sub = children[14]:GetChildren()
                    if #sub >= 3 and sub[3] then
                        local part = sub[3]
                        return part:IsA("BasePart") and part or part:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end},
    }

    for _, entry in ipairs(tps) do
        group:AddButton("TP to " .. entry.text, function()
            local t = entry.target()
            if t and t:IsA("BasePart") then 
                tryTeleport(t)
            else
                warn("Part 18 Finale - missing or invalid: " .. entry.text)
            end
        end)
    end

    -- Remove all Kill Bricks
    group:AddButton("Remove All Kill Bricks", function()
        local count = 0
        for _, obj in ipairs(workspace:GetDescendants()) do
            if obj:IsA("BasePart") and obj.Name == "Kill Brick" then
                obj:Destroy()
                count = count + 1
            end
        end
        if count > 0 then
            print("Removed " .. count .. " Kill Brick(s)")
        else
            warn("No Kill Bricks found to remove")
        end
    end)
end




-- ========================================================================
-- Class 10 Popup
-- ========================================================================
local function openClass10Popup()
    local popupWindow = Library:CreateWindow({
        Title = "Class 10 – Floor & Lighting TPs",
        ToggleKeybind = Enum.KeyCode.None,
        AutoShow = true,
        Center = true,
    })

    local kit = workspace:FindFirstChild("JToH Kit v5.35")
    local lighting = kit and kit:FindFirstChild("ClientSidedObjects") and kit.ClientSidedObjects:FindFirstChild("LightingChangers")
    local area10 = workspace.Areas and workspace.Areas:FindFirstChild("Class10")

    local popupTab = popupWindow:AddTab("Teleports")
    local popupGroup = popupTab:AddLeftGroupbox("Floor & Lighting Teleports")

    local tps = {
        {text = "TP to 'the light of day'", target = function()
            return workspace:GetChildren()[90] and workspace:GetChildren()[90]:FindFirstChild("part")
        end},
        {text = "TP to Floor 1", target = function() return lighting and lighting:GetChildren()[9] end},
        {text = "TP to Floor 2", target = function() return lighting and lighting:GetChildren()[10] end},
        {text = "TP to Floor 3", target = function() return lighting and lighting:GetChildren()[11] end},
        {text = "TP to Floor 4", target = function() return lighting and lighting:GetChildren()[12] end},
        {text = "TP to Floor 5 / The Roof", target = function()
            return area10 and area10:GetChildren()[11] and area10:GetChildren()[11]:FindFirstChild("HealingPad")
        end},
    }

    for _, entry in ipairs(tps) do
        popupGroup:AddButton(entry.text, function()
            local t = entry.target()
            if t then 
                tryTeleport(t)
            else 
                warn("Class 10 - missing: " .. entry.text)
            end
        end)
    end

    popupGroup:AddButton("← Close", function()
        popupWindow:Destroy()
    end)
end

-- ========================================================================
-- Class 11 Popup
-- ========================================================================
local function openClass11Popup()
    local popupWindow = Library:CreateWindow({
        Title = "Class 11 – Checkpoints",
        ToggleKeybind = Enum.KeyCode.None,
        AutoShow = true,
        Center = true,
    })

    local canister = workspace:FindFirstChild("CanisterMode")

    local popupTab = popupWindow:AddTab("Checkpoints")
    local popupGroup = popupTab:AddLeftGroupbox("Class 11 Checkpoints")

    local tps = {
        {text = "TP to the start of class 11", target = function() return canister and canister:FindFirstChild("Class11") end},
        {text = "TP to the halfway point",     target = function() return canister and canister:GetChildren()[14] end},
        {text = "TP to the end",               target = function() return canister and canister:GetChildren()[36] end},
    }

    for _, entry in ipairs(tps) do
        popupGroup:AddButton(entry.text, function()
            local t = entry.target()
            if t then 
                tryTeleport(t)
            else 
                warn("Class 11 - missing: " .. entry.text)
            end
        end)
    end

    popupGroup:AddButton("← Close", function()
        popupWindow:Destroy()
    end)
end

-- ========================================================================
-- Class 15 Popup
-- ========================================================================
local function openClass15Popup()
    local popupWindow = Library:CreateWindow({
        Title = "Class 15 – Special TPs",
        ToggleKeybind = Enum.KeyCode.None,
        AutoShow = true,
        Center = true,
    })

    local kit = workspace:FindFirstChild("JToH Kit v5.35")
    local objs = kit and kit:FindFirstChild("ClientSidedObjects")

    local popupTab = popupWindow:AddTab("Special TPs")
    local popupGroup = popupTab:AddLeftGroupbox("Class 15 Special Teleports")

    local actions = {
        {text = "Money Givers",     idx = 64},
        {text = "Portals",          idx = 112},
        {text = "Orbs",             special = "orbs"},
        {text = "Skip to Floor 8",  idx = 28}
    }

    for _, act in ipairs(actions) do
        popupGroup:AddButton(act.text, function()
            local target
            if act.idx and objs then
                local ch = objs:GetChildren()
                if #ch >= act.idx then
                    target = ch[act.idx]:FindFirstChild("Destination") or ch[act.idx]
                end
            elseif act.special == "orbs" then
                local cm = workspace:FindFirstChild("CanisterMode")
                target = cm and cm:FindFirstChild("Class15.1")
            end

            if target then
                tryTeleport(target)
            else
                warn("Class 15 - missing: " .. act.text)
            end
        end)
    end

    popupGroup:AddButton("← Close", function()
        popupWindow:Destroy()
    end)
end

-- ========================================================================
-- Class 17 Popup
-- ========================================================================
local function openClass17Popup()
    local popupWindow = Library:CreateWindow({
        Title = "Class 17 – Floor Teleports",
        ToggleKeybind = Enum.KeyCode.None,
        AutoShow = true,
        Center = true,
    })

    local popupTab = popupWindow:AddTab("Floors")
    local popupGroup = popupTab:AddLeftGroupbox("Class 17 Floor Teleports")

    local tps = {
        {text = "Very Start", target = function()
            local kit = workspace:FindFirstChild("JToH Kit v5.35")
            local lc = kit and kit:FindFirstChild("ClientSidedObjects") and kit.ClientSidedObjects:FindFirstChild("LightingChangers")
            return lc and lc:GetChildren()[33]
        end},
        {text = "Floor 1", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[162]
        end},
        {text = "Floor 2", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[415]
        end},
        {text = "Floor 3", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[842]
        end},
        {text = "Floor 4", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[9] and class17:GetChildren()[9]:FindFirstChild("part")
        end},
        {text = "Floor 5", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[6] and class17:GetChildren()[6]:FindFirstChild("part")
        end},
        {text = "Floor 6", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[1332]
        end},
        {text = "Floor 7", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[29] and class17:GetChildren()[29]:FindFirstChild("part")
        end},
        {text = "Floor 8", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[30] and class17:GetChildren()[30]:FindFirstChild("part")
        end},
        {text = "Floor 9", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[34] and class17:GetChildren()[34]:FindFirstChild("part")
        end},
        {text = "Floor 10", target = function()
            local areas = workspace:FindFirstChild("Areas")
            local class17 = areas and areas:FindFirstChild("Class17")
            return class17 and class17:GetChildren()[35] and class17:GetChildren()[35]:FindFirstChild("part")
        end},
    }

    for _, entry in ipairs(tps) do
        popupGroup:AddButton(entry.text, function()
            local t = entry.target()
            if t then 
                tryTeleport(t)
            else
                warn("Class 17 - missing: " .. entry.text)
            end
        end)
    end

    popupGroup:AddButton("← Close", function()
        popupWindow:Destroy()
    end)
end

-- Always show GUI on both PC and mobile
local Window = Library:CreateWindow({
    Title = "V0id Hub",
    ToggleKeybind = Enum.KeyCode.RightControl,   -- Better for mobile: Right Ctrl (or change to ButtonR2 / Thumbstick1 if you use controller)
    AutoShow = true,
    Center = true,
})

-- Now add all your tabs here (copy-paste or keep what was already inside the old if-block)
-- Create individual tabs for each class (1-18)
for i = 1, 18 do
    local classTab = Window:AddTab("Class " .. i, "book", "Class " .. i .. " Teleports")
    
    if i == 1 then
        addClass1TeleportsToTab(classTab)
    elseif i == 2 then
        addClass2TeleportsToTab(classTab)
    elseif i == 3 then
        addClass3TeleportsToTab(classTab)
    elseif i == 4 then
        addClass4TeleportsToTab(classTab)
    elseif i == 5 then
        addClass5TeleportsToTab(classTab)
    elseif i == 6 then
        addClass6TeleportsToTab(classTab)
    elseif i == 7 then
        addClass7TeleportsToTab(classTab)
    elseif i == 8 then
        addClass8TeleportsToTab(classTab)
    elseif i == 9 then
        addClass9TeleportsToTab(classTab)
    elseif i == 10 then
        addClass10TeleportsToTab(classTab)
    elseif i == 11 then
        addClass11TeleportsToTab(classTab)
    elseif i == 12 then
        addClass12TeleportsToTab(classTab)
    elseif i == 13 then
        addClass13TeleportsToTab(classTab)
    elseif i == 14 then
        addClass14TeleportsToTab(classTab)
    elseif i == 15 then
        addClass15TeleportsToTab(classTab)
    elseif i == 16 then
        addClass16TeleportsToTab(classTab)
    elseif i == 17 then
        addClass17TeleportsToTab(classTab)
    elseif i == 18 then
        addClass18TeleportsToTab(classTab)
    end
end

-- Omega Tab
-- Anti Damage Tab
-- Negative Classes Tab (the one we added earlier)
-- Part 18 Finale Tab (addPart18FinaleTab(Window))

-- Optional: Add a small Info tab for mobile users
local infoTab = Window:AddTab("Info / Help", "info")
local infoBox = infoTab:AddLeftGroupbox("Mobile Controls")
infoBox:AddLabel("On mobile: Try pressing Right Ctrl to toggle the menu")
infoBox:AddLabel("If nothing shows → check F9 console for errors")
infoBox:AddButton("Force Show/Hide Menu", function()
    Window:SetVisible(not Window.Visible)
end)

-- Final print so you know it ran
print("V0id Hub loaded" .. (UserInputService.TouchEnabled and " (mobile device detected)" or " (PC detected)") .. " — open with Right Ctrl or check console")

    -- Error Chain / Class 9.1 Tab
    local ErrorChainTab = Window:AddTab("Error Chain (Class 9.1)", "alert-triangle", "Error Chain Teleports")
    local ErrorChainGroup = ErrorChainTab:AddLeftGroupbox("Error Chain Teleports")
    
    ErrorChainGroup:AddLabel("⚠️ You must be in Error Chain for TPs to work")
    
    ErrorChainGroup:AddButton("TP to Start", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class91 = areas and areas:FindFirstChild("Class9.1")
        if class91 then
            local children = class91:GetChildren()
            if #children >= 84 and children[84] then
                targetPart = children[84]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Error Chain - Start: Could not find workspace.Areas['Class9.1']:GetChildren()[84]")
        end
    end)
    
    ErrorChainGroup:AddButton("TP to the end part 1", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class91 = areas and areas:FindFirstChild("Class9.1")
        if class91 then
            local children = class91:GetChildren()
            if #children >= 83 and children[83] then
                targetPart = children[83]
                if not targetPart:IsA("BasePart") then
                    targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Error Chain - End Part 1: Could not find workspace.Areas['Class9.1']:GetChildren()[83]")
        end
    end)
    
    ErrorChainGroup:AddButton("Teleport to part 2 start", function()
        local targetPart = nil
        local areas = workspace:FindFirstChild("Areas")
        local class91 = areas and areas:FindFirstChild("Class9.1")
        if class91 then
            local children = class91:GetChildren()
            if #children >= 39 and children[39] then
                targetPart = children[39]:FindFirstChild("part")
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Error Chain - Part 2 Start: Could not find workspace.Areas['Class9.1']:GetChildren()[39].part")
        end
    end)
    
    ErrorChainGroup:AddButton("TP to End part 2", function()
        local targetPart = nil
        local kit = workspace:FindFirstChild("JToH Kit v5.35")
        if kit then
            local objs = kit:FindFirstChild("ClientSidedObjects")
            if objs then
                local children = objs:GetChildren()
                if #children >= 59 and children[59] then
                    targetPart = children[59]:FindFirstChild("Teleporter")
                    if targetPart and not targetPart:IsA("BasePart") then
                        targetPart = targetPart:FindFirstChildWhichIsA("BasePart")
                    end
                end
            end
        end

        if targetPart and targetPart:IsA("BasePart") then
            tryTeleport(targetPart)
        else
            warn("Error Chain - End Part 2: Could not find workspace['JToH Kit v5.35'].ClientSidedObjects:GetChildren()[59].Teleporter")
        end
    end)

-- Omega Tab (updated with your exact paths)
local OmegaTab = Window:AddTab("Omega", "star", "Omega Features")

local OmegaGroup = OmegaTab:AddLeftGroupbox("Omega Teleports")

OmegaGroup:AddLabel("must be in the right class!")

-- Helper: safe teleport function wrapper
local function safeTP(pathDesc, getTargetFunc)
    local target = getTargetFunc()
    if target and target:IsA("BasePart") then
        tryTeleport(target)
        print("→ " .. pathDesc)
    else
        warn("Failed: " .. pathDesc .. " - no valid BasePart")
    end
end

-- ──────────────────────────────────────────────
-- 1. Omega Rebirth (Class 11)
-- ──────────────────────────────────────────────
OmegaGroup:AddButton("Rebirth - TP to button", function()
    local areas = workspace:FindFirstChild("Areas")
    if not areas then warn("No Areas folder") return end
    
    local c11 = areas:FindFirstChild("Class11")
    if not c11 then warn("Class11 not found") return end
    
    local children = c11:GetChildren()
    if #children < 174 then 
        warn("Class11 has too few children (" .. #children .. ")") 
        return 
    end
    
    local part = children[174]:FindFirstChild("part")
    safeTP("Rebirth button (Class11[174].part)", function() return part end)
end)

OmegaGroup:AddButton("Rebirth - TP in front", function()
    local areas = workspace:FindFirstChild("Areas")
    if not areas then warn("No Areas folder") return end
    
    local c11 = areas:FindFirstChild("Class11")
    if not c11 then warn("Class11 not found") return end
    
    local children = c11:GetChildren()
    if #children < 146 then 
        warn("Class11 has too few children (" .. #children .. ")") 
        return 
    end
    
    local textPart = children[146]:FindFirstChild("Text")
    safeTP("Rebirth front (Class11[146].Text)", function() return textPart end)
end)

-- ──────────────────────────────────────────────
-- 2. Omega Prestige (Class 16)
-- ──────────────────────────────────────────────
OmegaGroup:AddButton("Prestige - TP to orb", function()
    local areas = workspace:FindFirstChild("Areas")
    if not areas then warn("No Areas folder") return end
    
    local c16 = areas:FindFirstChild("Class16")
    if not c16 then warn("Class16 not found") return end
    
    local btn = c16:FindFirstChild("Omega Prestige Button")
    if not btn then warn("Omega Prestige Button not found") return end
    
    local part = btn:FindFirstChild("part")
    safeTP("Prestige orb (Class16.Omega Prestige Button.part)", function() return part end)
end)

OmegaGroup:AddButton("Prestige - TP in front", function()
    local areas = workspace:FindFirstChild("Areas")
    if not areas then warn("No Areas folder") return end
    
    local c16 = areas:FindFirstChild("Class16")
    if not c16 then warn("Class16 not found") return end
    
    local children = c16:GetChildren()
    if #children < 67 then 
        warn("Class16 has too few children (" .. #children .. ")") 
        return 
    end
    
    local textPart = children[67]:FindFirstChild("Text")
    safeTP("Prestige front (Class16[67].Text)", function() return textPart end)
end)

-- ──────────────────────────────────────────────
-- 3. Omega Ascension (Class 19 - original)
-- ──────────────────────────────────────────────
OmegaGroup:AddButton("Ascension - TP to button", function()
    local areas = workspace:FindFirstChild("Areas")
    if not areas then warn("No Areas folder") return end
    
    local c19 = areas:FindFirstChild("Class19")
    if not c19 then warn("Class19 not found") return end
    
    local btn = c19:FindFirstChild("Omega Ascension Button")
    if not btn then warn("Ascension button missing") return end
    
    local target = btn:FindFirstChild("part") or btn:FindFirstChildWhichIsA("BasePart")
    safeTP("Ascension button", function() return target end)
end)

OmegaGroup:AddButton("Ascension - TP in front", function()
    local areas = workspace:FindFirstChild("Areas")
    if not areas then warn("No Areas folder") return end
    
    local c19 = areas:FindFirstChild("Class19")
    if not c19 then warn("Class19 not found") return end
    
    local stand = c19:FindFirstChild("Stand")
    if not stand then warn("Stand missing") return end
    
    local ch = stand:GetChildren()
    if #ch < 32 then warn("Stand too small ("..#ch..")") return end
    
    local target = ch[32]
    if not target:IsA("BasePart") then
        target = target:FindFirstChildWhichIsA("BasePart")
    end
    
    safeTP("Ascension front", function() return target end)
end)




    -- Anti Damage Tab
local Players = game:GetService("Players")
local player = Players.LocalPlayer

local AntiDamageTab = Window:AddTab("Anti Damage", "shield", "Anti Damage Features")
local AntiDamageGroup = AntiDamageTab:AddLeftGroupbox("Remove Obstacles")

-- ──────────────────────────────────────────────
-- Remove Spinning Platforms
-- ──────────────────────────────────────────────
AntiDamageGroup:AddButton("Delete all Spinning Platforms", function()
    local count = 0
    for _, obj in ipairs(workspace:GetDescendants()) do
        if obj:IsA("Model") and obj.Name == "Spinning Platform" then
            obj:Destroy()
            count += 1
        end
    end
    print("Deleted " .. count .. " Spinning Platform(s)")
end)

-- ──────────────────────────────────────────────
-- Remove Turrets
-- ──────────────────────────────────────────────
AntiDamageGroup:AddButton("Remove all Turrets", function()
    local count = 0
    for _, obj in ipairs(workspace:GetDescendants()) do
        if (obj:IsA("Model") or obj:IsA("BasePart")) and obj.Name == "Turret" then
            obj:Destroy()
            count += 1
        end
    end
    print("Removed " .. count .. " Turret(s)")
end)

-- ──────────────────────────────────────────────
-- Remove Moving Platforms
-- ──────────────────────────────────────────────
AntiDamageGroup:AddButton("Remove all Moving Platform", function()
    local count = 0
    for _, obj in ipairs(workspace:GetDescendants()) do
        if obj:IsA("Model") and obj.Name == "Moving Platform" then
            obj:Destroy()
            count += 1
        end
    end
    print("Removed " .. count .. " Moving Platform(s)")
end)

-- ──────────────────────────────────────────────
-- Remove Homing Turrets
-- ──────────────────────────────────────────────
AntiDamageGroup:AddButton("Remove any HomingTurret", function()
    local count = 0
    for _, obj in ipairs(workspace:GetDescendants()) do
        if (obj:IsA("Model") or obj:IsA("BasePart")) and obj.Name == "HomingTurret" then
            obj:Destroy()
            count += 1
        end
    end
    print("Removed " .. count .. " HomingTurret(s)")
end)

-- ──────────────────────────────────────────────
-- GodMode (client-side, best-effort)
-- ──────────────────────────────────────────────
local godModeEnabled = false
local healthConn
local charConn

local function applyGodMode(character)
    local humanoid = character:WaitForChild("Humanoid", 5)
    if not humanoid then return end

    -- Prevent knockdown / physics damage
    pcall(function()
        humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
        humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
        humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, false)
    end)

    humanoid.MaxHealth = math.huge
    humanoid.Health = humanoid.MaxHealth

    if healthConn then healthConn:Disconnect() end
    healthConn = humanoid.HealthChanged:Connect(function()
        if godModeEnabled and humanoid.Health < humanoid.MaxHealth then
            humanoid.Health = humanoid.MaxHealth
        end
    end)
end

AntiDamageGroup:AddButton("GodMode", function()
    godModeEnabled = not godModeEnabled
    print("GodMode:", godModeEnabled and "ENABLED" or "DISABLED")

    if godModeEnabled then
        if player.Character then
            applyGodMode(player.Character)
        end

        if charConn then charConn:Disconnect() end
        charConn = player.CharacterAdded:Connect(function(char)
            task.wait(0.2)
            if godModeEnabled then
                applyGodMode(char)
            end
        end)
    else
        if healthConn then
            healthConn:Disconnect()
            healthConn = nil
        end
        if charConn then
            charConn:Disconnect()
            charConn = nil
        end
    end
end)


-- NEW: Part 18 Finale Tab
    addPart18FinaleTab(Window)


    -- Negative Classes Tab
local NegativeTab = Window:AddTab("Negative Classes", "alert-octagon", "Negative / Secret Classes Teleports")

local negGroup = NegativeTab:AddLeftGroupbox("Negative Class Teleports")

negGroup:AddLabel("⚠️ These may require being in Class -1 or specific areas first")

-- Class -2
negGroup:AddButton("TP to Class -2", function()
    local areas = workspace:FindFirstChild("Areas")
    local classNeg1 = areas and areas:FindFirstChild("Class-1")
    if classNeg1 then
        local children = classNeg1:GetChildren()
        if #children >= 599 and children[599] and children[599]:IsA("BasePart") then
            tryTeleport(children[599])
        else
            warn("Negative -2: Could not find valid part at workspace.Areas['Class-1']:GetChildren()[599]")
        end
    else
        warn("Negative -2: Areas or Class-1 not found")
    end
end)

-- Class -3
negGroup:AddButton("TP to Class -3", function()
    local areas = workspace:FindFirstChild("Areas")
    local classNeg1 = areas and areas:FindFirstChild("Class-1")
    if classNeg1 then
        local children = classNeg1:GetChildren()
        if #children >= 636 and children[636] and children[636]:IsA("BasePart") then
            tryTeleport(children[636])
        else
            warn("Negative -3: Could not find valid part at workspace.Areas['Class-1']:GetChildren()[636]")
        end
    else
        warn("Negative -3: Areas or Class-1 not found")
    end
end)

-- Class -4
negGroup:AddButton("TP to Class -4", function()
    local areas = workspace:FindFirstChild("Areas")
    local classNeg1 = areas and areas:FindFirstChild("Class-1")
    if classNeg1 then
        local children = classNeg1:GetChildren()
        if #children >= 663 and children[663] and children[663]:IsA("BasePart") then
            tryTeleport(children[663])
        else
            warn("Negative -4: Could not find valid part at workspace.Areas['Class-1']:GetChildren()[663]")
        end
    else
        warn("Negative -4: Areas or Class-1 not found")
    end
end)

-- Class -5
negGroup:AddButton("TP to Class -5", function()
    local areas = workspace:FindFirstChild("Areas")
    local classNeg1 = areas and areas:FindFirstChild("Class-1")
    if classNeg1 then
        local children = classNeg1:GetChildren()
        if #children >= 193 and children[193] then
            local part = children[193]:FindFirstChild("part") or children[193]
            if part and part:IsA("BasePart") then
                tryTeleport(part)
            else
                warn("Negative -5: No valid BasePart in children[193]")
            end
        else
            warn("Negative -5: Not enough children or index 193 missing")
        end
    else
        warn("Negative -5: Areas or Class-1 not found")
    end
end)

-- Class -6
negGroup:AddButton("TP to Class -6", function()
    local areas = workspace:FindFirstChild("Areas")
    local classNeg1 = areas and areas:FindFirstChild("Class-1")
    if classNeg1 then
        local children = classNeg1:GetChildren()
        if #children >= 956 and children[956] and children[956]:IsA("BasePart") then
            tryTeleport(children[956])
        else
            warn("Negative -6: Could not find valid part at workspace.Areas['Class-1']:GetChildren()[956]")
        end
    else
        warn("Negative -6: Areas or Class-1 not found")
    end
end)

-- Class -7 (Checkpoint1111)
negGroup:AddButton("TP to Class -7", function()
    local cp = workspace:FindFirstChild("Checkpoint1111")
    if cp and cp:IsA("BasePart") then
        tryTeleport(cp)
    elseif cp then
        local part = cp:FindFirstChildWhichIsA("BasePart", true)
        if part then tryTeleport(part) else warn("Class -7: No BasePart in Checkpoint1111") end
    else
        warn("Class -7: workspace.Checkpoint1111 not found")
    end
end)

-- Class -8 (Checkpoint2222)
negGroup:AddButton("TP to Class -8", function()
    local cp = workspace:FindFirstChild("Checkpoint2222")
    if cp and cp:IsA("BasePart") then
        tryTeleport(cp)
    elseif cp then
        local part = cp:FindFirstChildWhichIsA("BasePart", true)
        if part then tryTeleport(part) else warn("Class -8: No BasePart in Checkpoint2222") end
    else
        warn("Class -8: workspace.Checkpoint2222 not found")
    end
end)

-- Class -9 (different game)
negGroup:AddButton("TP to Class -9 (diff game)", function()
    game:GetService("TeleportService"):Teleport(15335128195, game.Players.LocalPlayer)
end)

-- Class -9.5 / -10 (different game)
negGroup:AddButton("TP to Class -9.5/-10 (diff game)", function()
    game:GetService("TeleportService"):Teleport(15335435479, game.Players.LocalPlayer)
end)

-- Badge Area
negGroup:AddButton("TP to the badge area", function()
    local areas = workspace:FindFirstChild("Areas")
    local classNeg1 = areas and areas:FindFirstChild("Class-1")
    if classNeg1 then
        local children = classNeg1:GetChildren()
        if #children >= 991 and children[991] and children[991]:IsA("BasePart") then
            tryTeleport(children[991])
        else
            warn("Badge Area: Could not find valid part at workspace.Areas['Class-1']:GetChildren()[991]")
        end
    else
        warn("Badge Area: Areas or Class-1 not found")
    end
end)

Features & Information

the best AI script hub, including many good features, but trash games. Mainly supports all executors, so yea, tuff Join https://discord.gg/8rzKmbZg for the full script please :) DBS SOURCE: https://pastebin.com/raw/qskARXjF (or find it in my dc)
#roblox#scripts#AI#Free

Community Comments (0)

No comments yet for this script.