How to add terrain destruction

How to make a script that makes a crater after being damaged (like an explosion)
And how to add the script so it works because it always gives an error (cannot be imported because file isnt completed)

Btw i am kinda new to Unity

Download link in description.