Write script