local p={}p.__index=p function p.new()return setmetatable({_handlerListHead=false},p)end function p.Connect(M,p)local t=Connection.new(M,p)if M._handlerListHead then t._next=M._handlerListHead M._handlerListHead=t else M._handlerListHead=t end return t end

local Signal = {}
Signal.__index = Signal

function Signal.new()
	return setmetatable({
		_handlerListHead = false,
	}, Signal)
end

function Signal:Connect(fn)
	local connection = Connection.new(self, fn)
	if self._handlerListHead then
		connection._next = self._handlerListHead
		self._handlerListHead = connection
	else
		self._handlerListHead = connection
	end
	return connection
end
