local c=require("\108\101\109\117\114")local K=c.Habitat.new()local function w(c)return"\046\046\047\111\117\116\047\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101\047"..c end local function Z(c)return"\046\046\047\111\117\116\047\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101\047"..c end local function m(c)return Z("\084\111\117\103\104\083\047"..c)end local D=K.game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101")local C=K.game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local P=K.game local n=K:loadFromFs(Z(""))n.Parent=C local N=K:loadFromFs(m(""))N.Parent=C local J=K:loadFromFs(m("\083\116\097\110\100\097\114\100\076\105\098"))J.Parent=N local t=K:loadFromFs(m("\083\116\097\110\100\097\114\100\076\105\098\047\068\097\116\097\065\099\099\101\115\115"))t.Parent=J local H=K:loadFromFs(Z("\084\111\117\103\104\083\047\067\111\109\112\111\110\101\110\116\077\111\100\101\108"))H.Parent=N local T=K:loadFromFs(Z("\084\111\117\103\104\083\047\067\111\109\112\111\110\101\110\116\077\111\100\101\108\047\070\097\099\116\105\111\110\115"))T.Parent=H local I=K:loadFromFs("\046\047\095\110\101\118\101\114\109\111\114\101\073\110\105\116\046\108\117\097")I.Parent=D local q=K:loadFromFs(Z("\078\101\118\101\114\109\111\114\101"))q.Parent=C local u=K:loadFromFs(w("\078\101\118\101\114\109\111\114\101"))u.Parent=D local S=K:loadFromFs("\046\047\095\110\101\118\101\114\109\111\114\101\073\110\105\116\046\108\117\097")S.Parent=D local v=K:loadFromFs(Z("\069\113\117\105\112\109\101\110\116"))v.Parent=C local V=K:loadFromFs(w(""))V.Parent=D local x=K:loadFromFs(w("\067\111\110\102\105\103"))x.Parent=D local d=K:loadFromFs(w("\067\111\109\112\111\110\101\110\116\115"))d.Parent=D local z=K:loadFromFs(w("\067\111\109\112\111\110\101\110\116\115\047\069\108\115"))z.Parent=d local B=K:loadFromFs(w("\067\111\109\112\111\110\101\110\116\115\047\070\097\099\116\105\111\110\115"))B.Parent=d local j=K:loadFromFs(w("\070\117\110\099\116\105\111\110\097\108\068\111\109\097\105\110\115"))j.Parent=D local L=K:loadFromFs(w("\070\117\110\099\116\105\111\110\097\108\068\111\109\097\105\110\115\047\084\114\097\110\115\112\111\114\116\105\110\103"))L.Parent=j local o=K:loadFromFs(w("\065\103\101\110\116\115"))o.Parent=D local R=K:loadFromFs(w("\065\103\101\110\116\115\047\067\111\109\112\111\110\101\110\116\115"))R.Parent=o local M=K:loadFromFs(w("\070\105\110\100\101\114\115"))M.Parent=D local g=K:loadFromFs(w("\083\112\097\119\110\105\110\103"))g.Parent=D local Y=K:loadFromFs(w("\083\112\097\119\110\105\110\103\047\078\112\099\083\112\097\119\110\101\114\115"))Y.Parent=g local k=K:loadFromFs(w("\071\097\109\101\077\111\100\117\108\101\115"))k.Parent=D local X=K:loadFromFs(w("\071\097\109\101\077\111\100\117\108\101\115\047\067\097\112\116\117\114\101\084\104\101\070\108\097\103"))X.Parent=k local h=K:loadFromFs(w("\065\112\112\083\116\097\114\116"))h.Parent=D local f=(K.game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101")):GetChildren()for c,K in pairs(f)do print(K)end local y={game=P;habitat=K;ServerScriptService=D;ReplicatedStorage=C}return y

-- newproxy = function(yesOrNo)
--     if yesOrNo ~= true then
--         return {}
--     end
    
--     local proto = {}
--     local meta = { 
--         __index = proto,
--         __len = 0,
--         __type = "userdata"
--      }
    
--     local receiver = setmetatable({}, meta)
--     return receiver
-- end

local lemur = require("lemur")
local habitat = lemur.Habitat.new()

local function ServerScriptServicePath( serverScriptServicePath  )
    return "../out/ServerScriptService/" .. serverScriptServicePath
end

local function ReplicatedStoragePath( replicatedStoragePath  )
    return "../out/ReplicatedStorage/" .. replicatedStoragePath
end
local function ToughSPath( toughSPath )
    return ReplicatedStoragePath("ToughS/" .. toughSPath) 
end

local ServerScriptService = habitat.game:GetService("ServerScriptService")
local ReplicatedStorage = habitat.game:GetService("ReplicatedStorage")

local game = habitat.game

--[[
    ToughS folder contents
]]
local topLevelReplicatedStorage = habitat:loadFromFs(ReplicatedStoragePath(""))
topLevelReplicatedStorage.Parent = ReplicatedStorage

local toughS = habitat:loadFromFs(ToughSPath(""))
toughS.Parent = ReplicatedStorage

-- StandardLib
local toughSStdLib = habitat:loadFromFs(ToughSPath("StandardLib"))
toughSStdLib.Parent = toughS

local toughSStdLibDataAccess = habitat:loadFromFs(ToughSPath("StandardLib/DataAccess"))
toughSStdLibDataAccess.Parent = toughSStdLib

-- ComponentModel

local toughSComponentModel = habitat:loadFromFs(ReplicatedStoragePath("ToughS/ComponentModel"))
toughSComponentModel.Parent = toughS

local toughSFactions = habitat:loadFromFs(ReplicatedStoragePath("ToughS/ComponentModel/Factions"))
toughSFactions.Parent = toughSComponentModel

local nevermoreInit = habitat:loadFromFs("./_nevermoreInit.lua")
nevermoreInit.Parent = ServerScriptService

local nevermoreScripts = habitat:loadFromFs(ReplicatedStoragePath("Nevermore"))
nevermoreScripts.Parent = ReplicatedStorage

local nvrMoreServerSide = habitat:loadFromFs(ServerScriptServicePath("Nevermore"))
nvrMoreServerSide.Parent = ServerScriptService

local nevermoreInit = habitat:loadFromFs("./_nevermoreInit.lua")
nevermoreInit.Parent = ServerScriptService

--local nevermoreResources = habitat:loadFromFs(ReplicatedStoragePath("NevermoreResources"))
--nevermoreResources.Parent = ReplicatedStorage

local equipment = habitat:loadFromFs(ReplicatedStoragePath("Equipment"))
equipment.Parent = ReplicatedStorage

--[[
    ServerScriptService
]]
local sss = habitat:loadFromFs(ServerScriptServicePath(""))
sss.Parent = ServerScriptService

local config = habitat:loadFromFs(ServerScriptServicePath("Config"))
config.Parent = ServerScriptService

-- Components folder
local componentsFolder = habitat:loadFromFs(ServerScriptServicePath("Components"))
componentsFolder.Parent = ServerScriptService

local elsComponents = habitat:loadFromFs(ServerScriptServicePath("Components/Els"))
elsComponents.Parent = componentsFolder

local factions = habitat:loadFromFs(ServerScriptServicePath("Components/Factions"))
factions.Parent = componentsFolder

--[[ FunctionalDomains ]]
local functionalDomains = habitat:loadFromFs(ServerScriptServicePath("FunctionalDomains"))
functionalDomains.Parent = ServerScriptService

local trxDomain = habitat:loadFromFs(ServerScriptServicePath("FunctionalDomains/Transporting"))
trxDomain.Parent = functionalDomains

--[[ Agents ]]
local agents = habitat:loadFromFs(ServerScriptServicePath("Agents"))
agents.Parent = ServerScriptService

local agentsComponents = habitat:loadFromFs(ServerScriptServicePath("Agents/Components"))
agentsComponents.Parent = agents

-- Finders
local finderFolder = habitat:loadFromFs(ServerScriptServicePath("Finders"))
finderFolder.Parent = ServerScriptService

--[[ Spawning ]]
local spawning = habitat:loadFromFs(ServerScriptServicePath("Spawning"))
spawning.Parent = ServerScriptService

local npcSpawners = habitat:loadFromFs(ServerScriptServicePath("Spawning/NpcSpawners"))
npcSpawners.Parent = spawning

--[[ GameModules ]]
local gameModules = habitat:loadFromFs(ServerScriptServicePath("GameModules"))
gameModules.Parent = ServerScriptService

local ctfModule = habitat:loadFromFs(ServerScriptServicePath("GameModules/CaptureTheFlag"))
ctfModule.Parent = gameModules

-- AppStart
local appStart = habitat:loadFromFs(ServerScriptServicePath("AppStart"))
appStart.Parent = ServerScriptService

local childses = habitat.game:GetService("ServerScriptService"):GetChildren()

for _, name in pairs(childses) do
    print(name)
end


local module = {
    game = game,
    habitat = habitat,
    ServerScriptService = ServerScriptService,
    ReplicatedStorage = ReplicatedStorage
}

return module