document.getElementById('highscores').addEventListener('click', () => {
for (let i = 0; i < 100; i++)
localStorage.setItem('level_' + i + '_score', '00:01');
window.location.reload()
});
document.getElementById('nocooldown').addEventListener('click', function () {
this.classList.toggle('active');
noJumpCooldown = !noJumpCooldown;
});
document.getElementById('flight').addEventListener('click', function () {
this.classList.toggle('active');
flight = !flight;
});
(function (w) { w.drewsnow = { 'draggable': (container, dragItem) => { if (dragItem === undefined) dragItem = container;
})(window);
var skins = [ { 'name': 'Default', 'id': 0 }, { 'name': 'Triangles', 'id': 1 }, { 'name': 'Circle', 'id': 2 }, { 'name': 'Checkered', 'id': 3 }, { 'name': 'Cat', 'id': 4 }, { 'name': 'Dog', 'id': 5 }, { 'name': 'Mouse', 'id': 6 }, { 'name': 'Bird', 'id': 7 }, ], canvas = document.getElementById('gameCanvas'), noJumpCooldown = false, flight = false, mouseY = 100, collision = true;
canvas.addEventListener('mousemove', (e) => { mouseY = e.clientY - 5; });
function exploitLoop() { // Flight if (flight && mouseY < Game.player.y) { let speed = Number(document.getElementById('flight-speed').value); Game.player.jumpReady = true; Game.player.y = mouseY; Game.player.jump(speed, 750);
} exploitLoop();
var elem = drewsnow.addHtml(`
`);
drewsnow.addStyle(` input.slider { -webkit-appearance: none; width: 100%; height: 15px; border-radius: 5px; background: #d3d3d3; outline: none; opacity: 0.7; -webkit-transition: .2s; transition: opacity .2s; }
`);
drewsnow.draggable(elem, elem.firstElementChild);
drewsnow.addKeyBind(function () { elem.style.opacity = +this.on; elem.style.pointerEvents = (this.on ? 'auto' : 'none'); }, 192, '`');
document.getElementById('instantwin').addEventListener('click', () => { Game.player.completeLevel(); });
document.getElementById('highscores').addEventListener('click', () => { for (let i = 0; i < 100; i++) localStorage.setItem('level_' + i + '_score', '00:01');
});
document.getElementById('nocooldown').addEventListener('click', function () { this.classList.toggle('active'); noJumpCooldown = !noJumpCooldown; });
document.getElementById('flight').addEventListener('click', function () { this.classList.toggle('active'); flight = !flight; });
document.getElementById('removespikes').addEventListener('click', () => { let map = Game.levelMap.map, spikes = [4, 5, 6, 7];
});
document.getElementById('noclip').addEventListener('click', function () { this.classList.toggle('active'); collision = !collision;
});
document.getElementById('class-selecter').value = localStorage.getItem('skin') || 0; document.getElementById('class-selecter').addEventListener('change', function () { let skin = skins[Number(this.value)]; localStorage.setItem('skin', skin.id); });