Nice! Amazing enough what you got from the bot.
Ive been using chatgpt to make some maxscripts recently and it takes some time but its generally pretty good. I used it today to write a little script that organises revit imports into layers by whatever BIM property the user selects from a dropdown and it works great. I find that if you manage to get it working you can then feed the script back into chatgpt and ask it to look at code practices, efficiencies and commenting and it tends to clean things up quite nicely. Sometimes you need to prompt it with pages from the maxscript help. It also doesnt get the 'If, Then Else' structure and keeps trying 'If, Do, Else'.
I also used it to write myself a custom map node that loads colour libraries from csv files and then used it to scrape various paint manufacturers sites for all of the paint hex codes, then parse the hex, name and rgb values into the format i need for the script. Works an absolute dream! I did however manage to break it and now cant figure out how to fix it. More chatGPT maybe!