Create Messages Hardcore Reconnect (JS).scpt

Port to JavaScript for Automation, with some minor improvements.