Yes you can, the script only says:
1 - If the Librem Key is removed do action A
2 - If the Librem Key is plugged then to action B
What actions A or B are can be edited and changed.
You can create a modified version of this set it to power off the laptop if the key is removed.
Since the script used the device and vendor ID to identify the USB device in question you can also use this script with a generic USB device, say a usb thumbdrive, a USB wifi dongle, a LTE/UMTS/GSM HiLink Modem/Networkcard. You just need the correct vendor and device ID
options are plenty