Fixed some extremely complicated bugs in the halloween script