In Massachusetts, that item X would have been registered in your name. If your friend is caught with it...as an unregistered firearm...he gets a year in jail. Mandatory.
You could sell him X for whatever reason you like but the actual transfer and paperwork required by MA would need to be done by an FFL. No one would risk conviction by having an unregistered firearm in this state. I can't wait to leave. Unless this type of thing becomes the norm all over the country.
I assume you mean no otherwise law abiding gun owners would risk having an unregistered firearm in this state, because I'm guessing there are a whole lot of drug dealers, gang bangers and other criminals with them...