weird discharge

So about a week ago I had thick, cottage-cheese like discharge. This week I have been cramping on and off, and now my discharge is runny and sometimes slimy and has a bad odor. This morning I woke up ad its still the same but bloody too. What is this? Should I be worried? I have an IUD too