Create dialogue.js

added basic functionality