A few years ago, the late Gilbert Gottfried, the King of the "Too Soon" joke, tweeted: "Somebody once said 'Tragedy plus time equals comedy” and I always felt like why wait?"
I was listening to this guy the other day complain about the use of profanity like it was something cheap, unnecessary, and as he said, "unattractive." I wholeheartedly disagree. I find profanity refreshing, cathartic, and authentic. As a writer, you will not please everyone. If you're writing a script you plan on selling, think about who your audience is. Think about the platform. Obviously, you're not going to write profanity in an episode for Sesame Street. You're also not going to write it for network television.
What about sex? What about violence? What about Holocaust jokes? This is your art. Be authentic with your creative expression, not gratuitous. If belongs there, put it in. If you stuck it in there because you're trying to be something you're not, then rethink it. If you're not sure how your date rape joke might land, run it by a group of people you trust, and see what the majority says.
Are you an actor and you're being offered material that offends you? Well, that's between you and your moral compass. But remember that even tennis players have to wear those little white shoes. You may need to dress the part sometimes, metaphorically and literally speaking. You're not playing yourself, you're playing someone else.
Be true to yourself as an artist, and you (probably) can't go wrong.