M.V.
The funny thing about bad words is that they are most often used in the act of rejecting something. Which can leave one feeling hypocrital if they reject the one using them since it is the same action, rejecting, that is at the heart of it all.
People who use swear words don't know how to transform situations for good yet. Their vocabulary is devoid of building, validating, honoring words. As they struggle in their crazy, disrespectful way to try to create positive change through destructive means it can be very hard to be around them.
However, regardless of their behavior, if you can establish a relationship of trust and invite them to try an honoring approach to the same problem and they are able to build a new association to respectful communication then you have done two things. You have kept a friend and helped them become a richer, more capable person.
The heart of the problem is rejection. People can quietly struggle with this too.