function uisBinds.BindToInput(i,L,m,...)local M={...}i.connections[L]={}for N=1,#M,1 do local T=M[N]i.connections[L][T]={UIS.InputBegan:Connect(function(i,M)if i.KeyCode==T then m(L,i.UserInputState,i)end end),UIS.InputChanged:Connect(function(i,M)if i.KeyCode==T then m(L,i.UserInputState,i)end end);UIS.InputEnded:Connect(function(i,M)if i.KeyCode==T then m(L,i.UserInputState,i)end end)}end end function uisBinds.UnbindAction(m,L)for L,m in next,m.connections[L]do for L=1,#m,1 do m[L]:Disconnect()end end m.connections[L]=nil end


function uisBinds:BindToInput(actionName, func, ...)
	local binds = {...};
	self.connections[actionName] = {}
	
	for i = 1, #binds do
		local keycode = binds[i];
		self.connections[actionName][keycode] = {
			UIS.InputBegan:Connect(function(input, process)
				if (input.KeyCode == keycode) then
					func(actionName, input.UserInputState, input);
				end
			end),
			
			UIS.InputChanged:Connect(function(input, process)
				if (input.KeyCode == keycode) then
					func(actionName, input.UserInputState, input);
				end
			end),
			
			UIS.InputEnded:Connect(function(input, process)
				if (input.KeyCode == keycode) then
					func(actionName, input.UserInputState, input);
				end
			end)
		}
	end
end

function uisBinds:UnbindAction(actionName)
	for keycode, array in next, self.connections[actionName] do
		for i = 1, #array do
			array[i]:Disconnect();
		end
	end
	self.connections[actionName] = nil;
end
