Update script.coffee

Hopefully fixed out of bounds errors