updated script.js

added the inital input loops