A child has tell a lies. How remove habit

Aditi Ahuja please help

This is a problem that develops due to reasons like fear if telling truth thinking I will get scolding or thrashing..also sometimes Children learn it from friends..even at way out is to explain the child by talking to the child that it's a bad habit and harmful in long run..tell him moral stories..also tell the benefits of speaking truth.and that he will be not scolded if he tells truth..he can feel free to share anything..