Seems like you are trying to access the pauseBtn before DOM is ready, this is working in Codepen because it is automatically taking care of that.
Putting you code inside DOMContentLoaded worked for me. Something like this:
document.addEventListener('DOMContentLoaded', function(){
var pauseBtn = document.getElementById("pause"),
tl = new TimelineMax();
tl.staggerTo(".circle", 1.5, {x:640, repeat:-1, repeatDelay:0.5, force3D:true, ease:SlowMo.ease.config(0.2, 0.5)}, 0.15)
pauseBtn.onclick = function() {
tl.paused(!tl.paused());
pauseBtn.innerHTML = tl.paused() ? "play" : "pause";
}
});