Show dialog reminder window before macos shutdown

Hello,

I created a small Apple Script that displays a dialog window containing a reminder message.

set theDialogText to "PLEASE TURN OFF THE UPS AFTER COMPUTER SHUTDOWN!!"
display dialog theDialogText with title "!!!!!!WARNING!!!!!!"

Is there a way to make this dialog window appear before the shutdown of my mac mini M1 (Monterey 12.2.1)? On the bind of the shutdown button for example?

The user must click on the dialog window OK button to confirm that he has seen the message.

Thank you

Show dialog reminder window before macos shutdown
 
 
Q