Cant give you an answer to that without seeing the logs.
The script goes to bank once it runs out of food and it eats at the lowest around ~ 1/3rd hp, considering crabs have super low att/str i dont think you can really get killed while the script is running.
So my best guess would be you lagg/dc while being on a lower level account?