madmoney072

Untitled 708

Mar 16th, 2026
7
0
Never
Not a member of gistpad yet? Sign Up, it unlocks many cool features!
None 13.76 KB | None | 0 0
  1. --[[
  2. FEATHER HUB v5.0 — DELTA MOBILE FIX
  3.  
  4. Problem: Delta's request() HANGS forever on api.github.com
  5. and discord.com/api. It doesn't error — it just never returns.
  6. The main script's IRC loop and webhook calls freeze the entire script.
  7.  
  8. Fix: This loader patches the global environment so all HTTP calls
  9. have a 5-second timeout. If they hang, they get killed and return nil
  10. instead of freezing forever.
  11.  
  12. Put your Feather Hub v5 script URL below.
  13. ]]
  14.  
  15. local FEATHERHUB_URL = "https://gistpad.com/raw/main-loader";
  16. -- ^ Change this to wherever your Feather Hub v5 script is hosted
  17.  
  18. -- ══════════════════════════════════
  19. -- STEP 1: Patch request() with timeout
  20. -- ══════════════════════════════════
  21. local HTTP_TIMEOUT = 5 -- seconds before giving up
  22.  
  23. -- Find which HTTP function exists on this executor
  24. local _rawHttpFn = nil
  25. pcall(function() if request then _rawHttpFn = request end end)
  26. pcall(function() if not _rawHttpFn and http_request then _rawHttpFn = http_request end end)
  27. pcall(function() if not _rawHttpFn and syn and syn.request then _rawHttpFn = syn.request end end)
  28. pcall(function() if not _rawHttpFn and http and http.request then _rawHttpFn = http.request end end)
  29. pcall(function() if not _rawHttpFn and fluxus and fluxus.request then _rawHttpFn = fluxus.request end end)
  30.  
  31. if _rawHttpFn then
  32. -- Create a timeout-safe version
  33. local function safeRequest(opts)
  34. local result = nil
  35. local finished = false
  36.  
  37. -- Run the actual request in a separate thread
  38. task.spawn(function()
  39. local ok, res = pcall(_rawHttpFn, opts)
  40. if ok and type(res) == "table" then
  41. result = res
  42. end
  43. finished = true
  44. end)
  45.  
  46. -- Wait with timeout
  47. local t0 = tick()
  48. while not finished and (tick() - t0) < HTTP_TIMEOUT do
  49. task.wait(0.1)
  50. end
  51.  
  52. if not finished then
  53. finished = true -- tell the thread to stop caring
  54. -- Don't warn every time or it floods output
  55. return {StatusCode = 0, Body = "", Headers = {}}
  56. end
  57.  
  58. return result
  59. end
  60.  
  61. -- Override ALL the global HTTP functions with the safe version
  62. -- This way the main script's httpReq() will use our safe version
  63. -- no matter which function it tries
  64.  
  65. if request then
  66. local _orig = request
  67. request = function(opts)
  68. return safeRequest(opts)
  69. end
  70. end
  71.  
  72. if http_request then
  73. local _orig = http_request
  74. http_request = function(opts)
  75. return safeRequest(opts)
  76. end
  77. end
  78.  
  79. if syn and syn.request then
  80. local _orig = syn.request
  81. syn.request = function(opts)
  82. return safeRequest(opts)
  83. end
  84. end
  85.  
  86. if http and http.request then
  87. local _orig = http.request
  88. http.request = function(opts)
  89. return safeRequest(opts)
  90. end
  91. end
  92.  
  93. if fluxus and fluxus.request then
  94. local _orig = fluxus.request
  95. fluxus.request = function(opts)
  96. return safeRequest(opts)
  97. end
  98. end
  99.  
  100. print("[Delta Fix] HTTP timeout patch applied (" .. HTTP_TIMEOUT .. "s)")
  101. else
  102. warn("[Delta Fix] No HTTP function found — IRC/webhooks will be disabled")
  103. end
  104.  
  105. -- ══════════════════════════════════
  106. -- STEP 2: Safe getgenv fallback
  107. -- ══════════════════════════════════
  108. if not getgenv then
  109. getgenv = function() return _G end
  110. end
  111.  
  112. -- ══════════════════════════════════
  113. -- STEP 3: Load the main script
  114. -- ══════════════════════════════════
  115. local src = nil
  116. local ok, err = pcall(function()
  117. src = game:HttpGet(FEATHERHUB_URL, true)
  118. end)
  119.  
  120. if not ok or not src or src == "" then
  121. -- Try alternate method
  122. pcall(function()
  123. local res = (request or http_request)({
  124. Url = FEATHERHUB_URL,
  125. Method = "GET"
  126. })
  127. if res and res.Body then
  128. src = res.Body
  129. end
  130. end)
  131. end
  132.  
  133. if src and src ~= "" then
  134. local fn, compileErr = loadstring(src)
  135. if fn then
  136. local runOk, runErr = pcall(fn)
  137. if not runOk then
  138. warn("[Delta Fix] Runtime error: " .. tostring(runErr):sub(1, 200))
  139. end
  140. else
  141. warn("[Delta Fix] Compile error: " .. tostring(compileErr):sub(1, 200))
  142. end
  143. else
  144. warn("[Delta Fix] Could not fetch Feather Hub script from URL")
  145. warn("[Delta Fix] URL: " .. FEATHERHUB_URL)
  146.  
  147. -- Show error on screen so mobile users can see it
  148. pcall(function()
  149. local Player = game:GetService("Players").LocalPlayer
  150. local sg = Instance.new("ScreenGui")
  151. sg.Parent = Player:WaitForChild("PlayerGui")
  152. sg.ResetOnSpawn = false
  153. local f = Instance.new("Frame")
  154. f.Size = UDim2.new(0, 280, 0, 80)
  155. f.Position = UDim2.new(0.5, -140, 0.5, -40)
  156. f.BackgroundColor3 = Color3.fromRGB(40, 10, 10)
  157. f.BorderSizePixel = 0
  158. f.Parent = sg
  159. Instance.new("UICorner", f).CornerRadius = UDim.new(0, 10)
  160. local t = Instance.new("TextLabel")
  161. t.Size = UDim2.new(1, -20, 1, -10)
  162. t.Position = UDim2.new(0, 10, 0, 5)
  163. t.BackgroundTransparency = 1
  164. t.Text = "Feather Hub failed to load.\nCheck your internet or try a different URL."
  165. t.TextColor3 = Color3.fromRGB(255, 100, 100)
  166. t.TextSize = 12
  167. t.Font = Enum.Font.GothamBold
  168. t.TextWrapped = true
  169. t.Parent = f
  170. task.delay(8, function() pcall(function() sg:Destroy() end) end)
  171. end)
  172. end
RAW Gist Data Copied