function init(L)local C=L.Element local u=L._Maid local M=L._DragBind local a=Vector3.new()local I u:Mark(L._DragBind)u:Mark(L._StartBind)u:Mark(L._StopBind)u:Mark(C.InputBegan:Connect(function(C)if VALID_PRESS[C.UserInputType]then a=C.Position L.IsDragging=true L._StartBind:Fire()local u u=C.Changed:Connect(function()if C.UserInputState==Enum.UserInputState.End or C.UserInputState==Enum.UserInputState.Cancel then if u then u:Disconnect()u=nil L.IsDragging=false L._StopBind:Fire()end end end)end end))u:Mark(C.InputChanged:Connect(function(L)if VALID_MOVEMENT[L.UserInputType]then I=L end end))u:Mark(UIS.InputChanged:Connect(function(u,x)if u==I and L.IsDragging then local L=u.Position-a M:Fire(C,u,L)end end))end


function init(self)
	local element = self.Element
	local maid = self._Maid
	local dragBind = self._DragBind
	local lastMousePosition = Vector3.new()
	local dragInput
	
	maid:Mark(self._DragBind)
	maid:Mark(self._StartBind)
	maid:Mark(self._StopBind)
	
	maid:Mark(element.InputBegan:Connect(function(input)
		if (VALID_PRESS[input.UserInputType]) then
			lastMousePosition = input.Position
			self.IsDragging = true
			self._StartBind:Fire()
			
			local inputEndConn; inputEndConn = input.Changed:Connect(function()
				if input.UserInputState == Enum.UserInputState.End or input.UserInputState == Enum.UserInputState.Cancel then
					if inputEndConn then
						inputEndConn:Disconnect()
						inputEndConn = nil
						
						self.IsDragging = false
						self._StopBind:Fire()
					end
				end
			end)
		end
	end))
	
	maid:Mark(element.InputChanged:Connect(function(input)
		if (VALID_MOVEMENT[input.UserInputType]) then
			dragInput = input
		end
	end))
	
	maid:Mark(UIS.InputChanged:Connect(function(input, process)
		if input == dragInput and self.IsDragging then
			local delta = input.Position - lastMousePosition
			dragBind:Fire(element, input, delta)
		end
	end))
	
	--maid:Mark(element.InputBegan:Connect(function(input)
	--	if (VALID_PRESS[input.UserInputType]) then
	--		lastMousePosition = input.Position
	--		self.IsDragging = true
	--		self._StartBind:Fire()
	--	end
	--end))
	
	--maid:Mark(UIS.InputEnded:Connect(function(input)
	--	if (VALID_PRESS[input.UserInputType]) then
	--		self.IsDragging = false
	--		self._StopBind:Fire()
	--	end
	--end))
	
	--maid:Mark(UIS.InputChanged:Connect(function(input, process)
	--	if (self.IsDragging) then
	--		if (VALID_MOVEMENT[input.UserInputType]) then
	--			local delta = input.Position - lastMousePosition
	--			lastMousePosition = input.Position
	--			dragBind:Fire(element, input, delta)
	--		end
	--	end
	--end))
end
