Cooperation among individuals has been key to sustaining societies. However, natural selection favors defection over cooperation. Cooperation can be favored when the mobility of individuals allows cooperators to form a cluster (or group). Mobility patterns of animals sometimes follow a Lévy flight. A Lévy flight is a kind of random walk but it is composed of many small movements with a few big movements. Here, we developed an agent-based model in a square lattice where agents perform Lévy flights depending on the fraction of neighboring defectors. We focus on how the sensitivity to defectors when performing Lévy flights promotes the evolution of cooperation. Results of evolutionary simulations showed that cooperation was most promoted when the sensitivity to defectors was moderate. As the population density became larger, higher sensitivity was more beneficial for cooperation to evolve.