problem with sudo su and .sh script

here is my script:

#!/bin/sh

cd /Users/a

echo "what is the name of the file u want?"
read var1
var1=$var1
var3=$var1

echo "is this $var1 okay?"
echo "enter the type of file u want"
echo "your choices are .java, .c, .sh, .ksh, .csh"
read var2
var2=$var2

var4=`find . -type f | grep "$var1$var2" | wc -l`
var5=0

if test $var4 -ne $var5
then
echo "next "$var2" prog"
exit 0
fi

if test "$var1$var2" = "$var3.java"
then
cd /Users/a/Javaprogs
mkdir ./$var1.java
emacs /Users/a/Javaprogs/$var1.java/$var1.java
cat ../defaults/javadefaultfile.txt >> ./Javaprogs/$var1.java/$var1.java
exit 0
fi

if test "$var1$var2" = "$var3.c"
then
cd /Users/a/cprogs
mkdir ./$var1.c
emacs /Users/a/cprogs/$var1.c/$var1.c
cat ../default/cprogdefaultfile.txt >> /Users/la/cprogs/$var1.c/$var1.c
exit 0
fi

if test "$var1$var2" = "$var3.sh"
then
`sudo su`
cd /bin
mkdir ./$var1
emacs ./$var1/$var1.sh
cat /Users/a/defaults/shdefaultfile.txt >> ./$var1/$var1.sh
exit 0
fi

the part in red contains the problem, the `sudo su` command does prompt me, but once I enter my passwd i change prompt as normal. I can type, but no commands are recognized and ctrl-c does nothing but enter a new blank line. Any help would be appreciated.

what you are trying to do is run the commands in red with root permissions?
when you wrote "sudo su" what happens is that the "su" command runs with root permissions and opens you a new shell. if you quit this shell your script will finish it execution.
you should use the sudo command for each command you want to run with root permissions.