Jezilas

Untitled

Aug 12th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1. ----------------------------------------------------------------------------------------
  2. -- Adonis Loader --
  3. ----------------------------------------------------------------------------------------
  4. -- Epix Incorporated. Not Everything is so Black and White. --
  5. ----------------------------------------------------------------------------------------
  6. -- Edit settings in-game or using the settings module in the Config folder --
  7. ----------------------------------------------------------------------------------------
  8. -- This is not designed to work in solo mode --
  9. ----------------------------------------------------------------------------------------
  10.  
  11. if _G["__Adonis_MUTEX"] and type(_G["__Adonis_MUTEX"])=="string" then
  12. warn("\n-----------------------------------------------"
  13. .."\nAdonis is already running! Aborting..."
  14. .."\nRunning Location: ".._G["__Adonis_MUTEX"]
  15. .."\nThis Location: "..script:GetFullName()
  16. .."\n-----------------------------------------------")
  17. script:Destroy()
  18. else
  19. _G["__Adonis_MUTEX"] = script:GetFullName()
  20.  
  21. local model = script.Parent.Parent
  22. local config = model.Config
  23. local core = model.Loader
  24.  
  25. local dropper = core.Dropper
  26. local loader = core.Loader
  27. local runner = script
  28.  
  29. local settings = config.Settings
  30. local plugins = config.Plugins
  31. local themes = config.Themes
  32.  
  33. local backup = model:Clone()
  34. local pEvent
  35.  
  36. local data = {
  37. Settings = {};
  38. Descriptions = {};
  39. ServerPlugins = {};
  40. ClientPlugins = {};
  41. Themes = {};
  42.  
  43. Model = model;
  44. Config = config;
  45. Core = core;
  46.  
  47. Loader = loader;
  48. Dopper = dropper;
  49. Runner = runner;
  50.  
  51. ModuleID = 359948692;
  52. LoaderID = 360052698;
  53.  
  54. DebugMode = false
  55. }
  56.  
  57. --// Init
  58. script:Destroy()
  59. model.Name = math.random()
  60. local moduleId = data.ModuleID
  61. local a,setTab = pcall(require,settings)
  62. if not a then
  63. warn'::Adonis:: Settings module errored while loading; Using defaults;'
  64. setTab = {}
  65. end
  66. data.Settings, data.Descriptions, data.Order = setTab.Settings,setTab.Descriptions,setTab.Order
  67. for _,Plugin in next,plugins:GetChildren()do if Plugin.Name:sub(1,8)=="Client: " then table.insert(data.ClientPlugins,Plugin) elseif Plugin.Name:sub(1,8)=="Server: " then table.insert(data.ServerPlugins,Plugin) else warn("Unknown Plugin Type for "..tostring(Plugin)) end end
  68. for _,Theme in next,themes:GetChildren()do table.insert(data.Themes,Theme) end
  69. if data.DebugMode then moduleId = model.Parent.MainModule end
  70. local module = require(moduleId)
  71. local response = module(data)
  72. if response == "SUCCESS" then
  73. if (data.Settings and data.Settings.HideScript) and not data.DebugMode then
  74. model.Parent = nil
  75. game:BindToClose(function() model.Parent = game:GetService("ServerScriptService") model.Name = "Adonis_Loader" end)
  76. end
  77. model.Name = "Adonis_Loader"
  78. else
  79. error("MainModule failed to load")
  80. end
  81. end
  82.  
  83. --[[
  84. --___________________________________________________________________________________________--
  85. --___________________________________________________________________________________________--
  86. --___________________________________________________________________________________________--
  87. --___________________________________________________________________________________________--
  88.  
  89. ___________ .__ .___
  90. \_ _____/_____ |__|__ ___ | | ____ ____
  91. | __)_\____ \| \ \/ / | |/ \_/ ___\
  92. | \ |_> > |> < | | | \ \___
  93. /_______ / __/|__/__/\_ \ |___|___| /\___ > /\
  94. \/|__| \/ \/ \/ \/
  95. --------------------------------------------------------
  96. Epix Incorporated. Not Everything is so Black and White.
  97. --------------------------------------------------------
  98.  
  99. --___________________________________________________________________________________________--
  100. --___________________________________________________________________________________________--
  101. --___________________________________________________________________________________________--
  102. --___________________________________________________________________________________________--
  103. --]]
Add Comment
Please, Sign In to add comment