Code

This is the Code paste it into your applescript doccument remember to call the application "Shutdown" without the quotes heres the code: