just ask them to stop being mean and cursing or anything 'toxic' politely and if they keep it up just say ' I can't deal with your toxicity and it's too much for me. I don't want to have to worry about this. bye. ' and leave