Not a member of gistpad yet?
Sign Up,
it unlocks many cool features!
- --[[
- FEATHER HUB v5.0 — DELTA MOBILE FIX
- Problem: Delta's request() HANGS forever on api.github.com
- and discord.com/api. It doesn't error — it just never returns.
- The main script's IRC loop and webhook calls freeze the entire script.
- Fix: This loader patches the global environment so all HTTP calls
- have a 5-second timeout. If they hang, they get killed and return nil
- instead of freezing forever.
- Put your Feather Hub v5 script URL below.
- ]]
- local FEATHERHUB_URL = "https://gistpad.com/raw/main-loader"
- -- ^ Change this to wherever your Feather Hub v5 script is hosted
- -- ══════════════════════════════════
- -- STEP 1: Patch request() with timeout
- -- ══════════════════════════════════
- local HTTP_TIMEOUT = 5 -- seconds before giving up
- -- Find which HTTP function exists on this executor
- local _rawHttpFn = nil
- pcall(function() if request then _rawHttpFn = request end end)
- pcall(function() if not _rawHttpFn and http_request then _rawHttpFn = http_request end end)
- pcall(function() if not _rawHttpFn and syn and syn.request then _rawHttpFn = syn.request end end)
- pcall(function() if not _rawHttpFn and http and http.request then _rawHttpFn = http.request end end)
- pcall(function() if not _rawHttpFn and fluxus and fluxus.request then _rawHttpFn = fluxus.request end end)
- if _rawHttpFn then
- -- Create a timeout-safe version
- local function safeRequest(opts)
- local result = nil
- local finished = false
- -- Run the actual request in a separate thread
- task.spawn(function()
- local ok, res = pcall(_rawHttpFn, opts)
- if ok and type(res) == "table" then
- result = res
- end
- finished = true
- end)
- -- Wait with timeout
- local t0 = tick()
- while not finished and (tick() - t0) < HTTP_TIMEOUT do
- task.wait(0.1)
- end
- if not finished then
- finished = true -- tell the thread to stop caring
- -- Don't warn every time or it floods output
- return {StatusCode = 0, Body = "", Headers = {}}
- end
- return result
- end
- -- Override ALL the global HTTP functions with the safe version
- -- This way the main script's httpReq() will use our safe version
- -- no matter which function it tries
- if request then
- local _orig = request
- request = function(opts)
- return safeRequest(opts)
- end
- end
- if http_request then
- local _orig = http_request
- http_request = function(opts)
- return safeRequest(opts)
- end
- end
- if syn and syn.request then
- local _orig = syn.request
- syn.request = function(opts)
- return safeRequest(opts)
- end
- end
- if http and http.request then
- local _orig = http.request
- http.request = function(opts)
- return safeRequest(opts)
- end
- end
- if fluxus and fluxus.request then
- local _orig = fluxus.request
- fluxus.request = function(opts)
- return safeRequest(opts)
- end
- end
- print("[Delta Fix] HTTP timeout patch applied (" .. HTTP_TIMEOUT .. "s)")
- else
- warn("[Delta Fix] No HTTP function found — IRC/webhooks will be disabled")
- end
- -- ══════════════════════════════════
- -- STEP 2: Safe getgenv fallback
- -- ══════════════════════════════════
- if not getgenv then
- getgenv = function() return _G end
- end
- -- ══════════════════════════════════
- -- STEP 3: Load the main script
- -- ══════════════════════════════════
- local src = nil
- local ok, err = pcall(function()
- src = game:HttpGet(FEATHERHUB_URL, true)
- end)
- if not ok or not src or src == "" then
- -- Try alternate method
- pcall(function()
- local res = (request or http_request)({
- Url = FEATHERHUB_URL,
- Method = "GET"
- })
- if res and res.Body then
- src = res.Body
- end
- end)
- end
- if src and src ~= "" then
- local fn, compileErr = loadstring(src)
- if fn then
- local runOk, runErr = pcall(fn)
- if not runOk then
- warn("[Delta Fix] Runtime error: " .. tostring(runErr):sub(1, 200))
- end
- else
- warn("[Delta Fix] Compile error: " .. tostring(compileErr):sub(1, 200))
- end
- else
- warn("[Delta Fix] Could not fetch Feather Hub script from URL")
- warn("[Delta Fix] URL: " .. FEATHERHUB_URL)
- -- Show error on screen so mobile users can see it
- pcall(function()
- local Player = game:GetService("Players").LocalPlayer
- local sg = Instance.new("ScreenGui")
- sg.Parent = Player:WaitForChild("PlayerGui")
- sg.ResetOnSpawn = false
- local f = Instance.new("Frame")
- f.Size = UDim2.new(0, 280, 0, 80)
- f.Position = UDim2.new(0.5, -140, 0.5, -40)
- f.BackgroundColor3 = Color3.fromRGB(40, 10, 10)
- f.BorderSizePixel = 0
- f.Parent = sg
- Instance.new("UICorner", f).CornerRadius = UDim.new(0, 10)
- local t = Instance.new("TextLabel")
- t.Size = UDim2.new(1, -20, 1, -10)
- t.Position = UDim2.new(0, 10, 0, 5)
- t.BackgroundTransparency = 1
- t.Text = "Feather Hub failed to load.\nCheck your internet or try a different URL."
- t.TextColor3 = Color3.fromRGB(255, 100, 100)
- t.TextSize = 12
- t.Font = Enum.Font.GothamBold
- t.TextWrapped = true
- t.Parent = f
- task.delay(8, function() pcall(function() sg:Destroy() end) end)
- end)
- end
RAW Gist Data
Copied
