The Bt toxin is encoded by the cry gene. The cry I AC and cry II Ab control cotton boll worms, while the cry I Ab controls corn borer. Bt gene produces Bt toxin. This toxin provides resistance to plants against lepidopteron, coleopteron and dipterans pests.
An example is Bt cotton, in which the gene from the bacterium that encodes for the toxin is incorporated. The activated Bt toxin binds to the surface of the midgut epithelium of the insects and causes swelling and cell lysis, which eventually leads to the death of the insects.
In the process of producing insect-resistant crops, specific Bt toxin genes are isolated from B.thuringiensis, and incorporated into the crops. Since these toxins are insect specific, they do not harm the crops or humans.