Script Request: Ping Check to 8.8.8.8 with Telegram Notification

I am looking for a script that checks the ping time to 8.8.8.8, and if it exceeds 30ms, it sends a notification via Telegram. Additionally, when the ping time goes back below 30ms, it should send another notification.

:local telegramToken “TOKEN TELEGRAM”
:local chatId “-CHATID”
:local host “8.8.8.8”

:local pingResult [/ping address=$host count=1]
:local message ("Ping a " . $host . “: " . $pingResult . " milisegundos”)

/tool fetch url=(“https://api.telegram.org/bot” . $telegramToken . “/sendMessage?chat_id=” . $chatId . “&text='” . $message . “'”) keep-result=no

I’ve been trying to use this Scritp and if you send me the notifications to Telegram but it doesn’t show the numeric value of the penguin. They know how to fix this problem.

Example of what it shows: Ping to www.google.com: milliseconds as they see the numerical value missing between : milliseconds