provide an user warning

My last script is taking a lot of time, and i want to provide some warning, along with a checkmark, to prevent the system to freeze for a long time.
How i can do this best, or does anybody knows a script, who does show a warning ?