My husband and I have dealt with this with his ex wife many times. Through a custody battle for their children and outside of court when she has said false things to the kids.
Here's my advice to you. Document everything! It's very important. If you keep a calendar just for this, you can use it in court and it will stand much more with a judge than just off the top of your head knowledge of something that happends. The more details the better.
As far as personally dealing with the children, we were there too. We have 40% in the school year and 50% in the summer with the kids. Because we have only 10% less time with the children, we have to pay child support.
Last year, the children were constantly coming up to us saying that their mother told them she could not do anything with them or buy anything for them when they were with her because my husband wasn't paying child support. This infuriated us because that money comes out and we never see it. After hearing it all summer long, we decided that we were not going to outright just call their mother a liar, but the best way to handle it was to go onto the child support website and prove to them that this accusation was false. We did and they were very disappointed, but they knew truth and it didn't take us using our emotions, feelings, and even explaining our disappointment in the matter. They saw proof that we were taking care of them.
Unfortunately, so many of us are in these situations and the children are brought into it. I don't know your case but cover your steps. If your being accused falsely of something that could be used against you in court, do what you can to gain proof that that accusation is false. For instance, if your ex is saying that your abusive, have notorized letters from a few people (friends, family, co-workers etc) that you know stating their experience in seeing you with your children. Depending on the state, you may be able to use this in court for your defense.
You have to tread carefully in a situation like this. The ex will often use anything and everything they can against you. Little things they can't use in court or you know won't stand up I would just blow off. They aren't worth your stress.
I hope this helps.