Yeah the code is chaotic but it works! It's as clean as I can make lol With stuff like this, custom blocks are your best friend. Hope this somewhat helps!
Coding is by me, art belongs to -claw-dia-.