I remember trying that kind of thing with Pokémon Emerald when I must’ve been about ten. It was supposed to allow me to clone an item.
When I put the cartridge back in, the screen was blank apart from a message simply saying something like ‘The save file is corrupted. A new save file must be created.’.
I was devastated. 200 hours and what felt like a life’s journey. And it was all gone.