Fixing bad code and setting up game scripts

What the title says