Enlist the help of a friend. Sharing a difficult experience or task with a friend or partner will make the whole experience more tolerable, even enjoyable. Enlisting a friend to help you in your endeavor to stop swearing can work in one of two ways:
You can either rope in a friend who also has a swearing problem and work towards cutting out the bad language together, or you can ask a clean-mouthed comrade to monitor your language and give you a gentle reminder whenever you slip up.
Either way, having someone to hold you accountable for your swearing slip-ups will force you to stick to your guns and kick this bad habit once and for all.