Update main.js

I added the rolling functions. Also, I don't know how to use git, so I hope this is how I edit a file.