local function B(B,f,e)local L={Primary=f;Secondary=e}actions[B]=L end local function f(B)for f,e in pairs(actions)do if e.Primary then if e.Primary.EnumType==Enum.KeyCode then if B.KeyCode==e.Primary then return f end elseif e.Primary.EnumType==Enum.UserInputType then if B.UserInputType==e.Primary then return f end end end if e.Secondary then if e.Secondary.EnumType==Enum.KeyCode then if B.KeyCode==e.Secondary then return f end elseif e.Secondary.EnumType==Enum.UserInputType then if B.UserInputType==e.Secondary then return f end end end end end


local function RegisterAction(action, primary, secondary)
	local info	= {
		Primary		= primary;
		Secondary	= secondary;
	}
	
	actions[action]	= info
end

local function ActionFromInputObject(inputObject)
	for action, info in pairs(actions) do
		if info.Primary then
			if info.Primary.EnumType == Enum.KeyCode then
				if inputObject.KeyCode == info.Primary then
					return action
				end
			elseif info.Primary.EnumType == Enum.UserInputType then
				if inputObject.UserInputType == info.Primary then
					return action
				end
			end
		end
		
		if info.Secondary then
			if info.Secondary.EnumType == Enum.KeyCode then
				if inputObject.KeyCode == info.Secondary then
					return action
				end
			elseif info.Secondary.EnumType == Enum.UserInputType then
				if inputObject.UserInputType == info.Secondary then
					return action
				end
			end
		end
	end
end
