GMS2 version: v2022.9.1.66, IDE v2022.9.1.51 - there might be a lot of spaghetti code. Sorry for that