Update script.js

Increased functionality