Unity playmode freeze

When I attached any script with my game Object the script is not working and the screen is frozen. The playmode is working without adding any script in hierarchy gameobject but playmode is not working when I add script in hierarchy gameobject.

Now, anyone can tell me the solution.