local m=require(((game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")):WaitForChild("\086\101\110\100\111\114")):WaitForChild("\082\117\110\116\105\109\101\076\105\098"))local b=m.import(script,(m.getModule(script,"\064\114\098\120\116\115","\109\097\105\100")).Maid)local R=m.import(script,m.getModule(script,"\064\114\098\120\116\115","\115\101\114\118\105\099\101\115"))local k=R.HttpService local F=R.PhysicsService local d=R.Workspace local L=(m.import(script,game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101"),"\067\111\109\109\111\110","\104\101\108\112\101\114\115","\099\111\109\109\111\110")).getNearestPart local h=(m.import(script,game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101"),"\099\117\115\116\111\109\101\114\115","\099\111\109\112\111\110\101\110\116\115","\097\110\105\109\097\116\105\111\110\115")).CustomerAnimations local p=(m.import(script,game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101"),"\099\117\115\116\111\109\101\114\115","\099\111\109\112\111\110\101\110\116\115","\097\112\112\101\097\114\097\110\099\101")).CustomerAppearance local K=(m.import(script,game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101"),"\099\117\115\116\111\109\101\114\115","\099\111\109\112\111\110\101\110\116\115","\109\111\118\101\109\101\110\116")).CustomerMovement local w=(m.import(script,game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101"),"\099\117\115\116\111\109\101\114\115","\099\111\109\112\111\110\101\110\116\115","\109\111\118\101\109\101\110\116","\119\097\121\112\111\105\110\116\115")).waypoints local y do y=setmetatable({},{__tostring=function()return"\067\117\115\116\111\109\101\114"end})y.__index=y function y.new(...)local m=setmetatable({},y)return m:constructor(...)or m end function y.constructor(R,m)R.config=m R.id=k:GenerateGUID(false)R.appearance=p.new(R)R.model=R.appearance:GetModel()R.rootPart=R.model:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")R.humanoid=R.model:WaitForChild("\072\117\109\097\110\111\105\100")R.movement=K.new(R)R.animations=h.new(R)R.maid=b.new()R.maid:GiveTask(R.model)R.maid:GiveTask(R.movement)R.maid:GiveTask(R.animations)end function y.Spawn(m)local b=w.Spawn[(math.random(#w.Spawn)-1)+1].Position local R=Vector3.new(0,m.humanoid.HipHeight+3,0)local k=b+R local L=m.model:GetDescendants()local h=function(m)if m:IsA("\066\097\115\101\080\097\114\116")then F:SetPartCollisionGroup(m,"\067\117\115\116\111\109\101\114\115")end end for m,b in ipairs(L)do h(b,m-1,L)end m.spawnOffset=R m.model.Parent=d m.model:PivotTo(CFrame.new(k))m:Log("\083\112\097\119\110\101\100")end function y.MoveTo(R,m,b)R.humanoid.Sit=false if type(m)=="\115\116\114\105\110\103"then local k=R.movement local F=b if not(F~=0 and(F==F and(F~=""and F)))then F=R.config.floorId end k:MoveToWaypoint(m,F)else R.movement:MoveTo(m)end end function y.Sit(b,m)if not m then m=L(w.Seat,b.rootPart.Position)end m:Sit(b.humanoid)end function y.Destroy(m)m.maid:Destroy()end function y.Log(m,...)local b={...}end end return{Customer=y}

local TS = require(game:GetService("ReplicatedStorage"):WaitForChild("Vendor"):WaitForChild("RuntimeLib"))
local Maid = TS.import(script, TS.getModule(script, "@rbxts", "maid").Maid)
local _services = TS.import(script, TS.getModule(script, "@rbxts", "services"))
local HttpService = _services.HttpService
local PhysicsService = _services.PhysicsService
local Workspace = _services.Workspace
local getNearestPart = TS.import(script, game:GetService("ReplicatedStorage"), "Common", "helpers", "common").getNearestPart
local CustomerAnimations = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "animations").CustomerAnimations
local CustomerAppearance = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "appearance").CustomerAppearance
local CustomerMovement = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "movement").CustomerMovement
local waypoints = TS.import(script, game:GetService("ServerScriptService"), "customers", "components", "movement", "waypoints").waypoints
local Customer
do
	Customer = setmetatable({}, {
		__tostring = function()
			return "Customer"
		end,
	})
	Customer.__index = Customer
	function Customer.new(...)
		local self = setmetatable({}, Customer)
		return self:constructor(...) or self
	end
	function Customer:constructor(config)
		self.config = config
		self.id = HttpService:GenerateGUID(false)
		self.appearance = CustomerAppearance.new(self)
		self.model = self.appearance:GetModel()
		self.rootPart = self.model:WaitForChild("HumanoidRootPart")
		self.humanoid = self.model:WaitForChild("Humanoid")
		self.movement = CustomerMovement.new(self)
		self.animations = CustomerAnimations.new(self)
		self.maid = Maid.new()
		self.maid:GiveTask(self.model)
		self.maid:GiveTask(self.movement)
		self.maid:GiveTask(self.animations)
	end
	function Customer:Spawn()
		local position = waypoints.Spawn[math.random(#waypoints.Spawn) - 1 + 1].Position
		local spawnOffset = Vector3.new(0, self.humanoid.HipHeight + 3, 0)
		local spawnPosition = position + spawnOffset
		local _exp = self.model:GetDescendants()
		local _arg0 = function(desc)
			if desc:IsA("BasePart") then
				PhysicsService:SetPartCollisionGroup(desc, "Customers")
			end
		end
		-- ▼ ReadonlyArray.forEach ▼
		for _k, _v in ipairs(_exp) do
			_arg0(_v, _k - 1, _exp)
		end
		-- ▲ ReadonlyArray.forEach ▲
		self.spawnOffset = spawnOffset
		self.model.Parent = Workspace
		self.model:PivotTo(CFrame.new(spawnPosition))
		self:Log("Spawned")
	end
	function Customer:MoveTo(target, floorId)
		self.humanoid.Sit = false
		if type(target) == "string" then
			local _fn = self.movement
			local _condition = floorId
			if not (_condition ~= 0 and (_condition == _condition and (_condition ~= "" and _condition))) then
				_condition = self.config.floorId
			end
			_fn:MoveToWaypoint(target, _condition)
		else
			self.movement:MoveTo(target)
		end
	end
	function Customer:Sit(seat)
		if not seat then
			seat = getNearestPart(waypoints.Seat, self.rootPart.Position)
		end
		seat:Sit(self.humanoid)
	end
	function Customer:Destroy()
		self.maid:Destroy()
	end
	function Customer:Log(...)
		local messages = { ... }
	end
end
return {
	Customer = Customer,
}
