Advertisement
johndoe123zzzz

framework

Jan 19th, 2025 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.73 KB | None | 0 0
  1. local framework = {
  2.     instances = {};
  3.     services = setmetatable({}, {
  4.         __index = function(_, service)
  5.             return game:GetService(service:gsub("_%l", string.upper):gsub("_", ""):gsub("^%l", string.upper));
  6.         end;
  7.     });
  8. };
  9.  
  10. if (not LPH_OBFUSCATED) then LRM_LinkedDiscordID = "1123144940071952394"; end;
  11.  
  12. do -- functions
  13.     local instance_manager = {};
  14.    
  15.     do -- instance manager
  16.         instance_manager.new = function(class, properties)
  17.             local _instance = Instance.new(class);
  18.             for _property, _value in next, properties do
  19.                 _instance[_property] = _value;
  20.             end;
  21.             table.insert(framework.instances, _instance);
  22.             return _instance;
  23.         end;
  24.    
  25.         framework.instance_manager = instance_manager;
  26.     end
  27.  
  28.     do -- connections
  29.         function framework:connection(signal, callback)
  30.             local connection = signal:Connect(callback);
  31.             return connection;
  32.         end;
  33.     end
  34.  
  35.     do -- request
  36.         function framework:request_info()
  37.             local _success, _response = pcall(function()
  38.                 return request({
  39.                     Url = "https://dashboard.botghost.com/api/public/tools/user_lookup/" .. LRM_LinkedDiscordID,
  40.                     Method = "GET",
  41.                     Headers = { ["Content-Type"] = "application/json" }
  42.                 });
  43.             end);
  44.            
  45.             if _success and _response then
  46.                 local _data = game:GetService("HttpService"):JSONDecode(_response.Body);
  47.                 return _data and _data.username and _data or nil;
  48.             end;
  49.            
  50.             return nil;
  51.         end;
  52.     end
  53. end;
  54.  
  55. return framework;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement