On a practical level and in terms of being 'natural' WILL and GOING TO are almost always interchangeable.
If we consider the work of M.Lewis in The English Verb he would propose that the two uses are slightly different in meaning.
In short, WILL is a reaction, a new plan, something with NO PREVIOUS. So I will tell your mother is a reaction to the child not stopping.
GOING TO, is a form similar to the Present Continuous and so includes the past. If I say I am seeing my dentist tomorrow, it means I made an appointment IN THE PAST (other motives for using P.C. are also possible).
So if you say I'm going to tell your mother if you don't stop, well it implies that you have already made the decision and the child's stopping WILL STOP YOU from telling the mother. But otherwise you have a plan to tell her already.
So this is all splitting hairs because the practical meaning is the same.