function Signal.new()local X=setmetatable({},Signal)X._bindableEvent=Instance.new("\066\105\110\100\097\098\108\101\069\118\101\110\116")X._argMap={}X._source=ENABLE_TRACEBACK and debug.traceback()or""X._bindableEvent.Event:Connect(function(G)X._argMap[G]=nil if not X._bindableEvent and not next(X._argMap)then X._argMap=nil end end)return X end

function Signal.new()
	local self = setmetatable({}, Signal)

	self._bindableEvent = Instance.new("BindableEvent")
	self._argMap = {}
	self._source = ENABLE_TRACEBACK and debug.traceback() or ""

	-- Events in Roblox execute in reverse order as they are stored in a linked list and
	-- new connections are added at the head. This event will be at the tail of the list to
	-- clean up memory.
	self._bindableEvent.Event:Connect(function(key)
		self._argMap[key] = nil

		-- We've been destroyed here and there's nothing left in flight.
		-- Let's remove the argmap too.
		-- This code may be slower than leaving this table allocated.
		if (not self._bindableEvent) and (not next(self._argMap)) then
			self._argMap = nil
		end
	end)

	return self
end
