Press [Space] to check for internet connection. Positive = 1 Negative = 0 Try doing it after putting your device into airplane mode. 'Ping' is how long it took for the script to recognize the internet (in seconds). (If there is no internet, it will be Infinity) The lower you set 'Time for negative', the time that the project takes to recognize negative lowers, but the chance of false negatives gets higher. I recommend setting it at 3 or higher, but at 7 or lower. You can bring it to your project using the bag, but please give me credit! There is a script which runs it constantly. (See inside)
How it works: ------------------------------- Some extensions use internet For this, I used translate, as it is only text, which means that it would work faster. So, the project translates a word, and if it took shorter than the 'time for negative' variable, it says it's positive. If it took longer than 'time for negative' it says it's negative. However, when the project translates a word, it stores the word and its translation, so if you translate the same word again, even if offline, it'll translate it almost immediately. To fix this, I made it so it always generates a different 'word' to translate. It starts with a, b, c... and when it runs out of letters, it goes to aa, ab, ac... and so on. That's it. No cloud variables, so it works even with new Scratchers. Internet tester Internet checker Internet detector