local i=require(script:WaitForChild("\080\108\117\103\105\110\070\114\097\109\101\119\111\114\107"))local c local P=script.PluginFramework local m=P.Shared local f=m.Libraries.Packages local C=m.Utils local v=m.Classes local b=P.Plugin local z=P.Macros local E=P.Studio local J=P.Socket local function Q()i:AddCustomModule("\082\111\097\099\116",f.roact)i:AddCustomModule("\082\111\100\117\120",f.rodux)i:AddCustomModule("\082\111\097\099\116\082\111\100\117\120",f["\114\111\097\099\116-\114\111\100\117\120"])i:Load(C,v,b,z,E,J)end local function n()c=i:Require("\080\108\117\103\105\110\072\097\110\100\108\101\114")end local function Z()c:Load(plugin)end local function s()return not script:IsDescendantOf(game.ServerScriptService)end if s()then Q()n()Z()end
---
---Necessary script to initialise the plugin!
---

--------------------------------------------------
-- Types
-- ...

--------------------------------------------------
-- Dependencies
local PluginFramework = require(script:WaitForChild("PluginFramework")) ---@type Framework
local PluginHandler ---@type PluginHandler

--------------------------------------------------
-- Constants
-- ...

--------------------------------------------------
-- Members
local pluginFrameworkScript = script.PluginFramework
local sharedDirectory = pluginFrameworkScript.Shared

local librariesDirectory = sharedDirectory.Libraries.Packages

local utilsDirectory = sharedDirectory.Utils
local classesDirectory = sharedDirectory.Classes
local pluginDirectory = pluginFrameworkScript.Plugin
local macrosDirectory = pluginFrameworkScript.Macros
local studioDirectory = pluginFrameworkScript.Studio
local socketDirectory = pluginFrameworkScript.Socket

---Loads everything onto the plugin framework
local function setupFramework()
    -- Libraries
    PluginFramework:AddCustomModule("Roact", librariesDirectory.roact)
    PluginFramework:AddCustomModule("Rodux", librariesDirectory.rodux)
    PluginFramework:AddCustomModule("RoactRodux", librariesDirectory["roact-rodux"])

    -- General files
    PluginFramework:Load(utilsDirectory, classesDirectory, pluginDirectory, macrosDirectory, studioDirectory, socketDirectory)
end

local function grabDependencies()
    PluginHandler = PluginFramework:Require("PluginHandler")
end

local function loadPlugin()
    PluginHandler:Load(plugin)
end

local function isInPluginContext()
    return not script:IsDescendantOf(game.ServerScriptService)
end

--------------------------------------------------
-- Logic

if isInPluginContext() then
    setupFramework()
    grabDependencies()
    loadPlugin()
end
