My friend deleted some hidden files on his Mac (OS X 10.9.4) laptop.

After restarting his laptop the Mac just shows loading progress bar and nothing else.

How can we restore the hidden files and get the computer working again?