I would suggest saying the racial slurs in a subtle manner and not straightforward-ly. I saw this being discussed on twitter with agents & writers and it was about how a young girl had picked up a book and got upset at the racial slurs within the novel. Even though it was a character who didn't mean to say those words, the child was still upset. So (if what I said makes sense), its best to not say it outright. One way this is done is in the show - Stranger Things, season 2; from the way Billy treated Lucas.

But if its swear words - then go ahead.

Hope this helps!