Update scripts.js

Updated rules