The script will just sit there waiting for you to be the only person in the channel. When that occurs, then the script will part you from the channel, then re-join it one second later. There is a small chance that someone could enter the channel during that one second period, but it's doubtful.

You must be in the channel for the script to work, so if you were logged out when the channel became empty, then the script couldn't have noticed that the channel was empty and have completed the rest of the code.