GuiC_AYAY

ss

Apr 1st, 2025 (edited)
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. -- Save the original request function
  2. local original_request = request or http_request or syn.request
  3.  
  4. -- Create new request function with custom user-agent
  5. getgenv().request = function(options)
  6. -- Add/modify user-agent header
  7. if options.Headers then
  8. options.Headers["User-Agent"] = "MyCustomAgent/1.0 (Roblox)"
  9. else
  10. options.Headers = {
  11. ["User-Agent"] = "MyCustomAgent/1.0 (Roblox)"
  12. }
  13. end
  14.  
  15. -- Call original request function
  16. return original_request(options)
  17. end
  18.  
  19. -- Optional: Also modify HttpGet if needed
  20. getgenv().HttpGet = function(url, decode)
  21. return request({
  22. Url = url,
  23. Method = "GET"
  24. }).Body
  25. end
Advertisement
Add Comment
Please, Sign In to add comment