Well it doesn’t work very well. In spite of all that legislation, people continue to rape, murder, and steal.
The truth is that you can’t really legislate morality.
See #36.
You cant legislate someone into being moral but you can make being immoral unaccepted by society. Not sure we’ll all like where this leads though.