For getting to work this script, packages zenity and xterm must be installed.
The Script:
#!/bin/sh
zenity --question --text "Would you like to check updates?"
if [ $? = 0 ];
then
xterm -e sudo apt-get update
else exit 0
fi
zenity --question --text "Would you like to install updates?"
if [ $? = 0 ];
then
xterm -e sudo apt-get upgrade && zenity --info --text "System Upgraded"
fi
exit 1