I don't understand why you complicate your life with script.
su
halt
or
su
shutdown -h now
Why make a script to do this? There are a couple of reasons that come to mind. First, you may want a script to launch at a certain time. You may not be there to type in the command.
Second, you may make a launcher for the script in case the machine is being stubborn. When I upgraded from Ubuntu 10.10 to 12.04, selecting shutdown only logs me out. Even at the log in screen, I am no longer able to shutdown or restart, it just leaves me at the log in prompt. I could write a short script with a launcher to bypass this problem until I fix it. If I hadn't already made up my mind to switch to Fedora, I would have probably chosen that option rather than opening a terminal each time to type in the commands.