You can try. ChatGPT is notorious for making errors, especially in programming. That, coupled with the fact that SRB2 use a really esoteric version of Lua (a fork of BLua), means it probably won't go over well. On the off chance it gives you the program you want, be sure to denote on the release page that it was made at least partially by AI, just so that you stay out of trouble.