Need help command su

Hello all,
I made a small installation script that works well with the command sudo , What is the variant with the su command ? I can not do nothing works . The Linux distribution I use today does not use sudo ..... but su... I am lost. Help me do a greater good , I 'm not a pro of script, I'm a beginer.

#!/bin/sh

#for programs where the package name is the same as the name of the executeable
if [ -f /usr/bin/$1 ] || [ -f /usr/sbin/$1 ] || [ -f /sbin/$1 ] || [ -f /usr/bin/$1 ]  ||  [ -f /usr/local/bin/$1 ] ; then
   "$@"
else
   xterm -e "echo 'this program is not installed, I will install it now. be shure you have internet on and any update manager closed' ;\
   sudo apt-get install -y --force-yes $1"
  "$@"
fi

How I can transforme it with only su commande.
Thank you very much for your help, and excuse my English I'm French.

The problem with su is that it will ask for the root password...
So the only way to do that without having issues would be to do the su before executing the script...

ok all good I've found

su -c "apt-get install what you want"