Just two quick ones.
I have it all planned out, including the ending. I’m usually working like ten or fifteen scripts ahead, but I also have some scripts way way in the future mostly done. For some story beats though I just have a more general note like, “Sans confronts Undyne about Papyrus, she’s unimpressed with him but the two of them make friends” and then as I get closer to that point (or inspiration for a specific line or image strikes me) I sit down and write the actual script. Working way in advance lets me refine scripts over a longer time, which sometimes helps me find fun parallels that wouldn’t happen otherwise. I try to keep track of details, but even so sometimes things do slip my mind... we all make mistakes now and then, haha.
I wrote a longer answer to this originally but this pretty much sums it up












