Does it get stuck without your script?
If it only gets stuck with your script, then perhaps you have made an infinite loop somewhere.
Post your script. Please use code tags: Using code tags properly
How to report problems productively in the Unity3D forums: