Arduino with GSM module

i just want to ask something using arduino uno and gsm module.
i have a problem regarding on when my sensor is triggered my gsm module continuous to send message. i want is to only send one message. even if my sensor is being triggered for a long time. here is the sample code for sms i want to change.

Thank you so much..

Capture.PNG

I brought up your picture of your code, and use some dry-erase markers to mark it up, so as to not make a permanent mess of my monitor. Hope you were able to see them before I hit the screen with the Windex.

Post your code AS TEXT, not as a stupid picture.

Look at the state change detection example, to learn how to react when a pin changes state. Send a message when the pin becomes the "Oh my God, the world is disintegrating" state.