The Hays Code, officially the Motion Picture Production Code, was a set of self-imposed moral guidelines enforced by Hollywood studios from 1934 to 1968, prohibiting profanity, obscenity, and explicit depictions of sex, violence, and homosexuality, profoundly shaping American cinema for decades.