Creation of a script to run "init 0"

Dear Friends,
I wanted to know how to create a script so
that the moment I run that script I am able to run the
"init 0" system command. I had done it earlier by
creating the script file containing the text "init 0"
and then assigning the file a special permission by
using the command --- chmod. The script file use to
assign itself super user priviledge on execution.

Popular White Paper On This Topic

I must tell you that no shell, (ksh, sh, bash, csh) in "normal" modern
UNIX variants
(AIX, Solaris, HP-UX, SVR4, Linux) can run as a root user, regardless of
the setuid bit status.
This would be a huge security hole (as in early versions of UNIX when it
was allowed).
However, I'm at a loss as to why you would want to run this via a shell
script
unless there are specific processes you wish to monitor to completion
before a shutdown.
Obviously, you will need to be "root" to run this script. You may want
to still use the
"shutdown" command