
KeylessUniversal

-- [[ Cryptic Hub - Main Engine V9.0 ]]
-- Developer: Yami
-- Supports 4 languages: Arabic, English, Russian, Portuguese
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local StarterGui = game:GetService("StarterGui")
local lp = Players.LocalPlayer
local Cryptic = {
Config = {
UserName = "OnlyCryptic", RepoName = "Cryptic", Branch = "hm",
Discord = "https://discord.gg/QSvQJs7BdP"
},
-- Note: The map lists (NameMatchers / PlaceIds / GameIds) are now
-- in the file Cryptic/Maps/index.lua to keep this file clean.
-- They get loaded below, after Import is defined.
}
-- ============================================================
-- Import a file from the repository
-- ============================================================
local function Import(path)
local url = "https://raw.githubusercontent.com/" .. Cryptic.Config.UserName .. "/" .. Cryptic.Config.RepoName .. "/" .. Cryptic.Config.Branch .. "/" .. path .. "?v=" .. tick()
local s, r = pcall(game.HttpGet, game, url)
if s and r then
local f = loadstring(r)
if f then return f() end
end
return nil
end
-- ============================================================
-- Load the map registry from Cryptic/Maps/index.lua
-- (this way main.lua stays clean, and every new map is added there)
-- ============================================================
do
local registry = Import("Maps/index.lua")
if type(registry) == "table" then
Cryptic.MapNameMatchers = registry.NameMatchers or {}
Cryptic.Maps = registry.PlaceIds or {}
Cryptic.GameIds = registry.GameIds or {}
else
Cryptic.MapNameMatchers = {}
Cryptic.Maps = {}
Cryptic.GameIds = {}
end
end
-- ============================================================
-- Load i18n and make it globally available before anything else
-- ============================================================
local i18n = Import("i18n.lua")
if i18n then
i18n.Load() -- Reads the saved language if one exists
getgenv().CrypticI18n = i18n -- Available to all modules
end
-- ============================================================
-- Physics Guard: runs silently, prevents physics jitter in all features
-- ============================================================
pcall(function() Import("Modules/Core/physics_guard.lua") end)
-- ============================================================
-- Build the structure (uses i18n for dynamic tab names)
-- ============================================================
local function T(key)
if i18n then return i18n.T(key) end
return key
end
local function BuildStructure()
-- Icon + " " + translation
Cryptic.Structure = {
["player"] = { Icon = "👤", Key = "tab.player", Folder = "Player", Files = {"lol", "auto_apple", "speed", "fly", "jumppower", "noclip", "walkfling", "antifling", "wallwalk", "nofall", "infinitejump", "restart", "discord"} },
["tools"] = { Icon = "🔧", Key = "tab.tools", Folder = "Misc", Files = {"lol", "tptool", "auto_tool", "fling_tool", "noclip_tool", "emotes", "esp", "shiftlock", "invis_tool", "spin_tool", "x-ray", "fullbright", "no_fog", "camera"} },
["target"] = { Icon = "🎯", Key = "tab.target", Folder = "Combat", Files = {"target_select", "target_tp", "target_spectate", "target_aimbot", "target_sit", "target_mimic", "target_fling", "bring_parts", "carry", "jark", "Target_follow", "target_esp", "copy_skin1", "target_emotes", "target_facesit", "info_t", "skinz"} },
["server"] = { Icon = "🌐", Key = "tab.server", Folder = "Server", Files = {"server", "rejoin", "join_id", "players"} },
["teleport"] = { Icon = "📍", Key = "tab.teleport", Folder = "Teleport", Files = {"lol", "tp_locations", "checkpoint"} },
["other"] = { Icon = "⚡", Key = "tab.other", Folder = "Other", Files = {"animations", "lol", "vfly", "zero_gravity", "anti_block", "anti_sit", "fling_all", "infinite_zoom", "no_camera_clip", "anti_afk"} },
["settings"] = { Icon = "⚙️", Key = "tab.settings", Folder = "Settings", Files = {"transparency", "ui_lock", "settings", "suggestion_box"} },
}
Cryptic.TabsOrder = {
"player", "tools", "target", "other", "teleport", "server", "settings"
}
end
-- Ready-made tab name with icon + translation
local function TabDisplayName(id)
local data = Cryptic.Structure[id]
if not data then return id end
if data._isMapTab and data._mapData then
return "🗺️ " .. data._mapData.Name
end
return T(data.Key)
end
local function TabIcon(id)
local data = Cryptic.Structure[id]
if not data then return nil end
if data._isMapTab then return nil end
return data.Icon
end
local ElementCache = {}
local function LoadElement(elementName)
if ElementCache[elementName] then return ElementCache[elementName] end
local url = "https://raw.githubusercontent.com/" .. Cryptic.Config.UserName .. "/" .. Cryptic.Config.RepoName .. "/" .. Cryptic.Config.Branch .. "/UI/Elements/" .. elementName .. ".lua?v=" .. tick()
local s, r = pcall(game.HttpGet, game, url)
if s and r then
local chunk = loadstring(r)
if chunk then
local func = chunk()
ElementCache[elementName] = func
return func
end
end
warn("Cryptic Hub: Failed to load element - " .. elementName)
return nil
end
local function InjectMapTab()
local mapFilePath
-- ───── Method 1: match by game name (strongest) ─────
if Cryptic.MapNameMatchers then
local placeName
pcall(function()
placeName = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name
end)
if placeName and placeName ~= "" then
local lower = string.lower(placeName)
for _, m in ipairs(Cryptic.MapNameMatchers) do
if m.pattern and m.file and string.find(lower, m.pattern, 1, true) then
mapFilePath = m.file
break
end
end
end
end
-- ───── Method 2: PlaceId (known place IDs) ─────
if not mapFilePath and Cryptic.Maps then
mapFilePath = Cryptic.Maps[game.PlaceId]
end
-- ───── Method 4: GameId / UniverseId (covers all worlds/universes) ─────
if not mapFilePath and Cryptic.GameIds then
mapFilePath = Cryptic.GameIds[game.GameId]
end
if not mapFilePath then return end
local mapData = Import(mapFilePath .. ".lua")
if type(mapData) ~= "table" then return end
local id = "map_current"
Cryptic.Structure[id] = { _isMapTab = true, _mapData = mapData }
table.insert(Cryptic.TabsOrder, 2, id)
end
-- ============================================================
-- Rejoin the server after changing the language
-- ============================================================
local function RejoinForLanguage()
local loaderURL = string.format(
"https://raw.githubusercontent.com/%s/%s/%s/main.lua",
Cryptic.Config.UserName, Cryptic.Config.RepoName, Cryptic.Config.Branch
)
local loader = string.format(
'task.wait(2); pcall(function() loadstring(game:HttpGet(%q .. "?v=" .. tick()))() end)',
loaderURL
)
-- Queue auto-execution after teleport
pcall(function()
if queue_on_teleport then
queue_on_teleport(loader)
elseif syn and syn.queue_on_teleport then
syn.queue_on_teleport(loader)
elseif fluxus and fluxus.queue_on_teleport then
fluxus.queue_on_teleport(loader)
end
end)
local function notify(text)
pcall(function()
StarterGui:SetCore("SendNotification", {
Title = "Cryptic Hub", Text = text, Duration = 5,
})
end)
end
-- 1) Try to return to the same server
notify(T("lang.rejoining"))
local sameOk = pcall(function()
TeleportService:TeleportToPlaceInstance(game.PlaceId, game.JobId, lp)
end)
if sameOk then return end
-- 2) If that failed, server hop via the Roblox API
notify(T("lang.hopping"))
local hopOk = false
pcall(function()
local cursor = ""
for _ = 1, 4 do
local apiUrl = "https://games.roblox.com/v1/games/" .. game.PlaceId
.. "/servers/Public?sortOrder=Asc&limit=100"
.. (cursor ~= "" and ("&cursor=" .. cursor) or "")
local res = game:HttpGet(apiUrl)
if not res or res == "" then break end
local data = HttpService:JSONDecode(res)
if data and data.data then
for _, srv in ipairs(data.data) do
if srv.id ~= game.JobId
and type(srv.playing) == "number"
and type(srv.maxPlayers) == "number"
and srv.playing < srv.maxPlayers then
local ok = pcall(function()
TeleportService:TeleportToPlaceInstance(game.PlaceId, srv.id, lp)
end)
if ok then hopOk = true return end
end
end
if data.nextPageCursor and data.nextPageCursor ~= "" then
cursor = data.nextPageCursor
else break end
else break end
end
end)
if hopOk then return end
-- 3) If we couldn't, we let the player leave and rejoin manually
notify(T("lang.fail"))
end
-- ============================================================
-- Start the Cryptic Hub UI
-- ============================================================
local function StartCrypticHub()
BuildStructure()
InjectMapTab()
local UI = Import("UI/Core.lua")
if UI then
local MainWin = UI:CreateWindow("Cryptic Hub / " .. Cryptic.Config.Discord)
-- Make opening the language picker accessible from Core (the flag badge)
getgenv().CrypticOpenLangPicker = function()
local Picker = Import("UI/LanguagePicker.lua")
if Picker and i18n then
Picker.Show(i18n, function(code)
if not code then return end
if code == i18n.Get() then return end
i18n.Set(code)
RejoinForLanguage()
end, { closable = true, preselected = i18n.Get() })
end
end
for _, tabId in ipairs(Cryptic.TabsOrder) do
local tabData = Cryptic.Structure[tabId]
if tabData then
local CurrentTab = MainWin:CreateTab(TabDisplayName(tabId), TabIcon(tabId))
local elementsList = {
"Button", "Toggle", "LockedToggle", "ExclusiveToggle", "TimedToggle", "Input", "LargeInput",
"SpeedControl", "Dropdown", "PlayerSelector", "AddAutoOffToggle", "ProfileCard",
"Line", "Label", "Paragraph", "Folder", "HotkeyToggle"
}
for _, el in ipairs(elementsList) do
CurrentTab["Add" .. el] = function(self, ...)
local elementFunc = LoadElement(el)
if elementFunc then return elementFunc(self, ...) end
end
end
task.spawn(function(data, tab, nameOfTab)
-- 1. Handle the custom map tab
if data._isMapTab and data._mapData then
local mapData = data._mapData
-- If the map has its own Render function → run it directly
if type(mapData.Render) == "function" then
pcall(function() mapData.Render(tab, UI) end)
else
-- Otherwise, display the traditional script cards
tab:AddLabel("🗺️ " .. T("tab.map_scripts"))
local MapCardFunc = LoadElement("MapCard")
if MapCardFunc then pcall(function() MapCardFunc(tab, mapData) end) end
end
return
end
-- Helper function: runs a list of files and automatically
-- adds a separator line between them
local function RunModules(targetTab, folder, fileList)
for i, fname in ipairs(fileList) do
local filePath = (folder == "") and (fname .. ".lua") or ("Modules/" .. folder .. "/" .. fname .. ".lua")
local init = Import(filePath)
if type(init) == "function" then
local ok, result = pcall(init, targetTab, UI)
if ok and result ~= false then
targetTab:AddLine()
end
end
end
end
-- 2. Handle the targeting tab (sub-menu system)
if nameOfTab == "target" then
local tsInit = Import("Modules/Combat/target_select.lua")
if type(tsInit) == "function" then pcall(function() tsInit(tab, UI) end) end
local function MakeOpen(title, icon)
local openFunc = LoadElement("Open")
if not openFunc then return tab end
local openTab = openFunc(tab, title, icon)
local els = {"Button", "Toggle", "LockedToggle", "ExclusiveToggle", "TimedToggle", "Input", "LargeInput", "SpeedControl", "Dropdown", "PlayerSelector", "ProfileCard", "Label", "Paragraph", "Folder", "Line"}
for _, el in ipairs(els) do
openTab["Add" .. el] = function(self, ...)
local f = LoadElement(el)
if f then return f(self, ...) end
end
end
return openTab
end
-- ── 1. Surveillance / Spy ──────────────────────────────
local spyTab = MakeOpen(T("open.spy"), "👁️")
for _, fname in ipairs({"target_spectate", "target_tp", "Target_follow", "target_esp", "skinz", "info_t"}) do
local init = Import("Modules/Combat/" .. fname .. ".lua")
if type(init) == "function" then pcall(function() init(spyTab, UI) end) end
end
-- ── 2. Fun (exclusive toggling: only one toggle at a time) ──
local funTab = MakeOpen(T("open.fun"), "😂")
local funGroup = {}
-- ── Exclusive wrapper for AddToggle ─────────────────
local origFunToggle = funTab.AddToggle
funTab.AddToggle = function(self, label, callback)
local toggleObj
local wrapped = function(active)
if active then
for _, other in ipairs(funGroup) do
if other ~= toggleObj then
pcall(function() other:SetState(false) end)
end
end
end
if callback then callback(active) end
end
toggleObj = origFunToggle(self, label, wrapped)
if toggleObj then table.insert(funGroup, toggleObj) end
return toggleObj
end
-- ── Exclusive wrapper for AddLockedToggle ─────────────
-- Supports both call forms: (label, reason, cb) or (label, cb)
local origFunLockedToggle = funTab.AddLockedToggle
funTab.AddLockedToggle = function(self, label, reasonOrCb, callbackOrNil)
local reason, callback
if type(reasonOrCb) == "function" then
-- Called without a reason: (label, callback)
reason = ""
callback = reasonOrCb
else
-- Full call: (label, reason, callback)
reason = reasonOrCb
callback = callbackOrNil
end
local toggleObj
local wrapped = function(active)
if active then
for _, other in ipairs(funGroup) do
if other ~= toggleObj then
pcall(function() other:SetState(false) end)
end
end
end
if callback then callback(active) end
end
toggleObj = origFunLockedToggle(self, label, reason, wrapped)
if toggleObj then table.insert(funGroup, toggleObj) end
return toggleObj
end
for _, fname in ipairs({"bang", "target_facesit", "jark", "target_hug", "target_sit", "backpack", "carry", "target_dee", "lkm", "target_shit"}) do
local init = Import("Modules/Combat/" .. fname .. ".lua")
if type(init) == "function" then pcall(function() init(funTab, UI) end) end
end
-- ── 3. Tricks ──────────────────────────────────
local tricksTab = MakeOpen(T("open.tricks"), "🎭")
for _, fname in ipairs({"target_fling", "bring_parts", "target_mimic", "copy_walk", "target_aimbot", "target_emotes"}) do
local init = Import("Modules/Combat/" .. fname .. ".lua")
if type(init) == "function" then pcall(function() init(tricksTab, UI) end) end
end
return
end
-- 3. Handle the "Other" tab (sub-menu system)
if nameOfTab == "other" then
local function MakeOpen(title, icon)
local openFunc = LoadElement("Open")
if not openFunc then return tab end
local openTab = openFunc(tab, title, icon)
local els = {"Button", "Toggle", "LockedToggle", "TimedToggle", "Input", "LargeInput", "SpeedControl", "Dropdown", "PlayerSelector", "ProfileCard", "Label", "Paragraph", "Folder", "Line"}
for _, el in ipairs(els) do
openTab["Add" .. el] = function(self, ...)
local f = LoadElement(el)
if f then return f(self, ...) end
end
end
return openTab
end
RunModules(tab, data.Folder, {"lol", "animations", "vfly", "zero_gravity", "anti_block", "anti_sit", "fling_all", "infinite_zoom", "no_camera_clip", "anti_afk"})
local buildTab = MakeOpen(T("other.build.tab"), "🏗️")
local buildInit = Import("Modules/Other/build.lua")
if type(buildInit) == "function" then pcall(function() buildInit(buildTab, UI) end) end
tab:AddLine()
return
end
-- 4. Default loading for the remaining tabs
RunModules(tab, data.Folder, data.Files)
end, tabData, CurrentTab, tabId)
end
end
end
end
-- ============================================================
-- Inbox check — displays new messages only once
-- ============================================================
local function RunInboxCheck()
task.spawn(function()
local CheckInbox = Import("Modules/Inbox.lua")
if type(CheckInbox) == "function" then
CheckInbox(Cryptic.Config)
end
end)
end
-- ============================================================
-- Main entry point
-- - First time the script runs → show the language selection
-- screen → save → rejoin
-- - After that → launch the UI directly
-- ============================================================
local function Boot()
-- Check messages in the background (in parallel, doesn't block loading)
RunInboxCheck()
-- Run the Grow a Garden 2 shop trackers (only if the game is gag2)
local isGAG2 = false
do
local GAG2_PLACEIDS = { [97598239454123] = true }
local GAG2_GAMEIDS = { [10200395747] = true }
local GAG2_PATTERNS = { "grow a garden 2", "growagarden2", "grow a garden2" }
if GAG2_PLACEIDS[game.PlaceId] or GAG2_GAMEIDS[game.GameId] then
isGAG2 = true
else
pcall(function()
local name = string.lower(game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name or "")
for _, p in ipairs(GAG2_PATTERNS) do
if name:find(p, 1, true) then isGAG2 = true break end
end
end)
end
end
if isGAG2 then
task.spawn(function()
pcall(function() Import("cryptic/gag2_seedshop.lua") end)
end)
task.spawn(function()
pcall(function() Import("cryptic/gag2_gearshop.lua") end)
end)
end
if not i18n then
-- If i18n failed to load, run in English without a language picker
StartCrypticHub()
return
end
if i18n.HasSaved() then
-- Language was previously chosen → launch directly
StartCrypticHub()
return
end
-- First time → language selection screen, then launch the UI directly (no rejoin)
-- Rejoining is only required when changing the language via the flag badge after startup.
local Picker = Import("UI/LanguagePicker.lua")
if not Picker then
StartCrypticHub()
return
end
Picker.Show(i18n, function(code)
if code then i18n.Set(code) end
StartCrypticHub()
end, { closable = false })
end
-- Double-execution protection system
if getgenv().CrypticHub_Loaded then
local Bindable = Instance.new("BindableFunction")
Bindable.OnInvoke = function(buttonText)
if buttonText == T("rerun.yes") then Boot() end
end
pcall(function()
StarterGui:SetCore("SendNotification", {
Title = T("rerun.title") .. " ⚠️",
Text = T("rerun.text"),
Duration = 15,
Button1 = T("rerun.yes"),
Button2 = T("rerun.cancel"),
Callback = Bindable
})
end)
else
getgenv().CrypticHub_Loaded = true
Boot()
end



Confirmed.