script crashing unity

Hello, I hope i write to right section…
I try to create loop for activating special move once in awhile, when i wrote it and save, unity dont write any error but when i play it and loop turn on special move, game crash and not responding.
Here is script:

using UnityEngine;
using System.Collections;

public class PlayerControl: MonoBehaviour {

    public float moveSpeed = 24;
    public int hp = 5;
    public bool timer = true;
    public bool special = false;
    int i = 0;
    void Start () {
       
    }
   
    void Update () {
        /*    Here is problem!
        if (timer == true) {
            i++;
            while (i > 100) {
                special = true;
                timer = false;
            }
        }
        */
        if (Input.GetKey (KeyCode.W))
            transform.Translate (Vector3.up * moveSpeed * Time.deltaTime, Space.World);
        if (Input.GetKey (KeyCode.S))
            transform.Translate (Vector3.down * moveSpeed * Time.deltaTime, Space.World);
        if (Input.GetKey (KeyCode.A)) {
            transform.Translate (Vector3.left * moveSpeed * Time.deltaTime, Space.World);
            if (Input.GetKeyDown (KeyCode.LeftControl) & special == true) {
                transform.position = new Vector3 (transform.position.x - 20, transform.position.y, transform.position.z);
                timer = true;
                special = false;
            }
        }
        if (Input.GetKey (KeyCode.D)) {
            transform.Translate (Vector3.right * moveSpeed * Time.deltaTime, Space.World);
            if (Input.GetKeyDown (KeyCode.LeftControl) & special == true) {
                transform.position = new Vector3 (transform.position.x + 20, transform.position.y, transform.position.z);
                timer = true;
                special = false;
            }
        }
        GetComponent<PlayerGUI>().hpNum = hp;
    }

    void OnCollisionEnter2D(Collision2D collision){
        if (collision.gameObject.tag == "EnemyBullet") {
            hp -= 1;
            if(hp == 0) Destroy(gameObject);       
        }
    }
}

When i dont use commented code problem is solved… Do i anything bad? Or its problem in unity?

Usually, whenever Unity crashes because of a script, it is a fault of the coder. I would recommend finding another method to do what you’re trying to do. Some things just for some reason seem to completely break Unity. Someone else can probably give you a better answer, but for now, I’d try to find another way to do that.

While (i > 100), the block of code underneath will keep running. Since you don’t change ‘i’ inside that block of code, it never becomes larger than 100. If you replace ‘while’ with ‘if’, you’re good to go.