First and I know it's nitpicking

...don't name a bash script with *.sh as an extension. "filename.sh" will assume your are writing a "sh-script", which is different from "bash-scripts". Just don't use an extension for bash scripts at all. Just name it "filename" ... nothing else.
Example using functions:
explanation....functions are codeblocks inside scripts which can be called from everywhere inside the script....again and again!!
Code:
#!/bin/bash
clear
echo -e "Welcome\x1b[31m Asso'\x1b[0m : $(date)"
echo -e "---------------------------------"
echo -e "- Press TRIANGLE ▲ - Kodi"
echo -e "- Press SQUARE ■ - EmulationStation"
echo -e "- Press CIRCLE \033[1mO\033[0m - StartX"
echo -e
echo -e "- Press Any Key - Back to shell"
echo -e "---------------------------------"
echo -e
input() {
read -s -N 1 answer
case "$answer" in
'button_for_triangle')
echo "Kodi is starting"
start_kodi
;;
'button_for_rectangle/square')
echo "EmulationStation is Starting"
start_emulatiostation
;;
'button_for_circle')
start_x
;;
*)
echo "Wrong input. Please try again"
input
;;
esac
}
start_kodi() {
kodi
input
}
start_emulationstation() {
emulationstation
input
}
start_x() {
startx
}
input
This could be an example how the script could work with functions. The script starts at the top, echoing all what you wrote at the top. Then it will read all the functions, but doing nothing with them as you didn't call them yet. Then it will read the command "input" at the bottom and then the input-function will be called and the magic happens

.
It will read your input an In "case" you will press the button for kodi, it will call the "start_kodi"-function and kodi will run. After you exit kodi (the script will still run as it waits for the termination of Kodi to go further) it will call the input-function again and you are in your "case" again.
The same will take place for emulationstation. Press a specific key for that application and after exiting it, the input-function will be called and you are in the "case" again and the script waits for a specific input.
You could understand all the above as a big loop which will run as long as you exit it
if the case won't work those
then you are probably able to map another key for that buttonpress. Probably some real charakter such as "k" for Kodi and "e" for Emulationstation. Then the case part for the input function could look as:
Code:
input() {
read -s -N 1 answer
case "$answer" in
'k')
echo "Kodi is starting"
start_kodi
;;
'e')
echo "EmulationStation is Starting"
start_emulatiostation
;;
'o')
start_x
;;
*)
echo "Wrong input. Please try again"
input
;;
esac
}
I couldn't runtime test this script and maybe it's a bit hacky

. But maybe it gives you another idea how things might be done. So you don't need to care how to call the script multiple times as that would cause multiple subprocesses probably which I would try to avoid if I were you

.
That script hasn't the option to exit. Maybe you are able to map "x" to the "X"-Button for exit and add:
before the "*)" part at the case-statement.
Hope it helps.
Cheers
Edit:
Btw....don't use just "exit" to exit a script. Use "exit 0" instead. That will mean that the script run successfully. If you will ever write other scripts for your systems, you might need different exit-statuses and explain (inside the script with comments) what the specific exit-status could mean. Assume some command didn't run or you check for something which might fail (probably if a folder exists), then you should exit the script with anything else beside "0" (zero). for example "exit 1", or "exit 2" and so on. Everything else beside "0" will mean that the script exits with an issue or something didn't worked as expected or how it should.
See that for example:
https://github.com/LibreELEC/LibreELEC.t...ts/getedid
That's a script I wrote some time ago where I have explained all the exit-statuses at top.