Child custody

I m 32 yrs female...wd 12 yrs of marriage having 2 kids ..my son is 11 n daughter is 6..frm the day of marriage within month we hd not good relationship....all time quarreling...he hitted me so many tyms....I left house 3 tyms before....last yr again I left house wd my kids for 4 months again we settled because of kids....this yr again we were not talking frm 6 months n soon I met one of my schooltym frnd ..I started chatting wd him n we hv had some selfie too which was normal ....but my husband hacked my acc. N he got all that stuff .....he started hitting me n I hv to left house as soon as possible otherwise he had kill me otherwise....I want my kids ....I hv filed case of child custody...I m worried that he wll prove me that I m characterless n I wll not get my kids back...my son n daughter wants to live wd me...I m a teacher .....I m a hardworking mother n teach them well as compare to my husband ...because he is 8th fail too.....can u please tell me chats n photos wll prove anything in yhe court .....plz