Unix Executable file with Terminal

Anyone know to create an Unix Executable file with Terminal ?
with commands:
login root
(password) blabla
sudo blabla
sudo blabla
exit

Thanks

Eg:

--> write some code lines to "sample.command" in user's desktop
do shell script "echo 'echo `PWD`' > ~/Desktop/sample.command"
do shell script "echo 'echo ALL' >> ~/Desktop/sample.command"
do shell script "echo 'echo DONE' >> ~/Desktop/sample.command"
--> make such file executable
do shell script "chmod 755 ~/Desktop/sample.command"

Then, double-click “sample.command” in your desktop.

My script asl to password…

But i want to write the password into script !

Thanks