local x do x=setmetatable({},{__tostring=function()return"\067\111\110\110\101\099\116\105\111\110"end})x.__index=x function x.new(...)local t=setmetatable({},x)return t:constructor(...)or t end function x.constructor(Z,x,t)Z.signal=x Z.Connected=true Z._fn=t end function x.Disconnect(x)if not x.Connected then return nil end x.Connected=false if x.signal._handlerListHead==x then x.signal._handlerListHead=x._next else local t=x.signal._handlerListHead while t and t._next~=x do t=t._next end if t then t._next=x._next end end end function x.Destroy(x)x:Disconnect()end end
-- Compiled with roblox-ts v2.1.0
--[[
	*
	* Represents a connection to a signal.
]]
local Connection
do
	Connection = setmetatable({}, {
		__tostring = function()
			return "Connection"
		end,
	})
	Connection.__index = Connection
	function Connection.new(...)
		local self = setmetatable({}, Connection)
		return self:constructor(...) or self
	end
	function Connection:constructor(signal, fn)
		self.signal = signal
		self.Connected = true
		self._fn = fn
	end
	function Connection:Disconnect()
		if not self.Connected then
			return nil
		end
		self.Connected = false
		if self.signal._handlerListHead == self then
			self.signal._handlerListHead = self._next
		else
			local prev = self.signal._handlerListHead
			while prev and prev._next ~= self do
				prev = prev._next
			end
			if prev then
				prev._next = self._next
			end
		end
	end
	function Connection:Destroy()
		self:Disconnect()
	end
end
