Yes, when you're using Custom Dialogue boxes in script, I would advise having an If statement directly afterwards to exit the script - or whatever you want the script to do if the user cancels..something like :
If [Get ( LastMessageChoice ) =2] # if user clicks the second button - usually 'Cancel'
Exit Script 
and of course you can change the text on those buttons, see attached ....
Thanks for explaining this so clearly!