local d=game:GetService("\082\117\110\083\101\114\118\105\099\101")local h={}h.TypesPath=script.Types h.Types=require(h.TypesPath)h.Shared={}h.Shared.C={}h.Shared.C.Instance=require(script.Shared.Components.Instance)h.Shared.C.Logger=require(script.Shared.Components.Logger)h.Shared.C.Loop=require(script.Shared.Components.Loop)h.Shared.C.Marketplace=require(script.Shared.Components.Marketplace)h.Shared.C.Math=require(script.Shared.Components.Math)h.Shared.C.Parallel=require(script.Shared.Components.Parallel)h.Shared.C.Player=require(script.Shared.Components.Player)h.Shared.C.String=require(script.Shared.Components.String)h.Shared.C.Table=require(script.Shared.Components.Table)h.Shared.C.CustomShared=require(script.Shared.Components.CustomShared)h.Shared.CC={}h.Shared.CC.Animator=require(script.Shared.Classes.Animator)h.Shared.CC.DampedSpring=require(script.Shared.Classes.DampedSpring)h.Shared.CC.NumberComputer=require(script.Shared.Classes.NumberComputer)h.Shared.CC.Observer=require(script.Shared.Classes.Observer)h.Shared.CC.Raycaster=require(script.Shared.Classes.Raycaster)h.Shared.CC.ReasonTo=require(script.Shared.Classes.ReasonTo)h.Shared.CC.SimpleSpring=require(script.Shared.Classes.SimpleSpring)h.Shared.CC.Tweener=require(script.Shared.Classes.Tweener)h.Server={}h.Server.C={}h.Server.C.CustomServer=require(script.Server.Components.CustomServer)h.Server.CC={}h.Server.CC.GoogleSpreadsheetLogger=require(script.Server.Classes.GoogleSpreadsheetLogger)h.Server.CC.ReceiptProcessor=require(script.Server.Classes.ReceiptProcessor)h.Client={}h.Client.C={}h.Client.C.CustomClient=require(script.Client.Components.CustomClient)h.Client.C.PlayerAdditions=require(script.Client.Components.PlayerAdditions)h.Client.CC={}h.Client.CC.Draggable=require(script.Client.Classes.Draggable)function h.Init(h)if d:IsServer()then for d,h in h.Shared.C do h:Init()end for d,h in h.Server.C do h:Init()end elseif d:IsClient()then for d,h in h.Shared.C do h:Init()end for d,h in h.Client.C do h:Init()end end end return h
local RunService = game:GetService("RunService")
--Multilib Rewrite
--VYSX/FENGEE 2024

--PROJECT NAMING CONVENTION - KEEP IN MIND WHEN CHANGING THINGS
--VARIABLES - camelCase
--CLASSES, TYPES, PUBLIC FUNCTIONS/PROPORTIES - PascalCase
--PRIVATE FUNCTIONS/PROPORTIES - _PascalCase

--[=[
	@class Main Package
	Container for loaders and all Packages pathes.
]=]

-- Core

local Multilib = {}

	Multilib.TypesPath = script.Types
	Multilib.Types = require(Multilib.TypesPath)

	--SHARED COMPONENTS
	Multilib.Shared = {}
	Multilib.Shared.C = {}
	Multilib.Shared.C.Instance = require(script.Shared.Components.Instance)
	Multilib.Shared.C.Logger = require(script.Shared.Components.Logger)
	Multilib.Shared.C.Loop = require(script.Shared.Components.Loop)
	Multilib.Shared.C.Marketplace = require(script.Shared.Components.Marketplace)
	Multilib.Shared.C.Math = require(script.Shared.Components.Math)
	Multilib.Shared.C.Parallel = require(script.Shared.Components.Parallel)
	Multilib.Shared.C.Player = require(script.Shared.Components.Player)
	Multilib.Shared.C.String = require(script.Shared.Components.String)
	Multilib.Shared.C.Table = require(script.Shared.Components.Table)
	Multilib.Shared.C.CustomShared = require(script.Shared.Components.CustomShared)

	--SHARED CLASSES
	Multilib.Shared.CC = {}
	Multilib.Shared.CC.Animator = require(script.Shared.Classes.Animator)
	Multilib.Shared.CC.DampedSpring = require(script.Shared.Classes.DampedSpring)
	Multilib.Shared.CC.NumberComputer = require(script.Shared.Classes.NumberComputer)
	Multilib.Shared.CC.Observer = require(script.Shared.Classes.Observer)
	Multilib.Shared.CC.Raycaster = require(script.Shared.Classes.Raycaster)
	Multilib.Shared.CC.ReasonTo = require(script.Shared.Classes.ReasonTo)
	Multilib.Shared.CC.SimpleSpring = require(script.Shared.Classes.SimpleSpring)
	Multilib.Shared.CC.Tweener = require(script.Shared.Classes.Tweener)

	--SERVER COMPONENTS
	Multilib.Server = {}
	Multilib.Server.C = {}
	Multilib.Server.C.CustomServer = require(script.Server.Components.CustomServer)

	--SERVER CLASSES
	Multilib.Server.CC = {}
	Multilib.Server.CC.GoogleSpreadsheetLogger = require(script.Server.Classes.GoogleSpreadsheetLogger)
	Multilib.Server.CC.ReceiptProcessor = require(script.Server.Classes.ReceiptProcessor)
	
	--CLIENT COMPONENTS
	Multilib.Client = {}
	Multilib.Client.C = {}
	Multilib.Client.C.CustomClient = require(script.Client.Components.CustomClient)
	Multilib.Client.C.PlayerAdditions = require(script.Client.Components.PlayerAdditions)

	--CLIENT CLASSES
	Multilib.Client.CC = {}
	Multilib.Client.CC.Draggable = require(script.Client.Classes.Draggable)


	--[=[
		@within Main Package
		Initializes Packages.
	]=]

	function Multilib:Init()
		if RunService:IsServer() then
			for _, Component in self.Shared.C do
				Component:Init()
			end
			for _, Component in self.Server.C do
				Component:Init()
			end
		elseif RunService:IsClient() then
			for _, Component in self.Shared.C do
				Component:Init()
			end
			for _, Component in self.Client.C do
				Component:Init()
			end
		end
	end

return Multilib
