I have noticed when it is selecting a world it will sometimes select a world that is full and will just end the script. Maybe could you make it choose a different world if the first one it chooses is full or offline?

Thanks