in the us as long as you don't change the lower receiver - I think you can change anything else.
Any printed firearm components are probably illegal in the uk.
no clue about the rest of the world :-)