function Enemy.start(C)(coroutine.wrap(function()C._active=true while C._active do C:_update()wait(UPDATE_TIME_INTERVAL)end end))()end function Enemy.stop(C)C._active=false C._model.Humanoid.WalkSpeed=0 end function Enemy._destroy(C)C._model:Destroy()end function Enemy._onTouch(h,C)if h._active and CollectionService:HasTag(C,"\080\108\097\116\102\111\114\109")then hitPlatformEvent:Fire()h:stop()h:_destroy()end end return Enemy
-- Main enemy loop
function Enemy:start()
	coroutine.wrap(function()
		self._active = true
		while self._active do
			self:_update()
			wait(UPDATE_TIME_INTERVAL)
		end
	end)()
end

function Enemy:stop()
	self._active = false
	self._model.Humanoid.WalkSpeed = 0
end

function Enemy:_destroy()
	self._model:Destroy()
end

function Enemy:_onTouch(otherPart)
	if self._active and CollectionService:HasTag(otherPart, "Platform") then
		hitPlatformEvent:Fire()
		self:stop()
		self:_destroy()
	end
end

return Enemy
