Remove the quotes from this line.
"sudo yum install gstreamer-plugins-bad;sudo yum install gstreamer-plugins-ugly"; break;;
Actually, you could change the line to
sudo yum install gstreamer-plugins-bad gstreamer-plugins-ugly; break;;
No need to call yum twice. I think you should run the whole script with permissions instead of entering passwords several times.
This would be my take on your script. You would only need to enter sudo password once.
#RPM Fusion installer script
# Need root permissions
if [[ $EUID -ne 0 ]] ; then
echo "Need root permissions to execute this script."
echo "Welcome to the RPM Fusion installer script. The first thing we will do is
to update your system. You may be prompted for a password."
read -n1 -r -p "Press ENTER to update..." key ENTER
echo "Now you are ready to install the RPM Fusion repository."
read -n1 -r -p "Press ENTER to download and install the RPM Fusion repository..." key ENTER
rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
#finishing the install with a question
while true; do
read -p "Do you want to install mp3 and mp4 codecs? (Y/N)" yn
case $yn in
[Yy]* ) yum install gstreamer-plugins-bad gstreamer-plugins-ugly; break;;
[Nn]* ) exit;;
* ) echo "Please answer Y/N, or press <CTRL>+<C> to quit.";;
echo "You're done!"
read -n1 -r -p "Press ENTER to exit..." key ENTER
So to run the script you would execute
sudo sh script.sh
Maybe the rpmfusion install line from the rpmfusion web site would be more appropriate.
yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm