Applescript ping result

Hello,

I would like to let me show the ping result on my Touchbar.
I found that script:

set Ip_adress to "google.com"
set ping_val to (do shell script "ping -c 1 -o " & Ip_adress & " | sed -En 's/.time=(.).(ms)/\1\2/p'")
return ping_val

I have created a touch bar button and have selected "Apple Script / Java Script" put in the script from above.

Everything is working fine when I start bettertouchtool. after some ramdon time i often notice that i do not get any result on the touchbar.
When I went into the configuration and run the skript there. result is showing fine but still not present on the touchbar.
Any ideas on that?

Thanks,