To modify your script so that it continues to respond to the heartbeat requests while still effectively blocking the third-party scripts, you can adjust the behavior in the WebSocket `send` function.
This adjustment ensures that your script will return a valid response for heartbeat messages. I've made the necessary changes, focusing on the area where the WebSocket processes heartbeats.
**Here’s the updated part of your


