Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alert("Subscribe to TrapKillo YT");
- window.addEventListener('keydown', keydown);
- window.addEventListener('keyup', keyup);
- var Feed = false;
- var Dingus = false;
- var imlost = 25;
- document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_e'> Press <b>T</b> to Tricksplit</span></span></center>";
- document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_q'> Press and hold <b>W</b> for macro feed</span></span></center>";
- document.getElementById("instructions").innerHTML += "<center><span class='text-muted'><span data-itr='instructions_q'> Press and hold <b>W</b> for macro feed</span></span></center>";
- load();
- window.onAgarioCoreLoaded = function() {
- startScript();
- };
- var doZoom = true;
- var drawGrid = false; //Change to true, if you would like to draw grid
- var drawBorders = true;
- function startScript() {
- handleSettings();
- handleDrawing();
- }
- function handleSettings() {
- if (doZoom === true) {
- window.agar.minScale = -30; //If doZoom is true, then set the minScale too -30(infinite zoom)
- }
- if(drawGrid === true) {
- window.agar.drawGrid = true; //if draw grid is true, set window.agar.draw grid to true
- } else {
- window.agar.drawGrid = false; //else set draw grid too false
- }
- $("h2").replaceWith('<h3>Xhing Extension</h3>'); //replace all h2 elements with TestExt#1
- }
- function handleDrawing() {
- window.agar.beforeDraw = function() {
- try {
- draw();
- } catch(e) {}
- };
- }
- function draw() {
- minX = window.agar.dimensions[0];
- minY = window.agar.dimensions[1];
- maxX = window.agar.dimensions[2];
- maxY = window.agar.dimensions[3];
- if (drawBorders === true) {
- ctx.save();
- ctx.strokeStyle = "#000"; //Google 'hex color codes' for more info on that
- ctx.lineWidth = 20;
- ctx.beginPath();
- ctx.moveTo(minX, minY);
- ctx.lineTo(maxX, minY);
- ctx.lineTo(maxX, maxY);
- ctx.lineTo(minX, maxY);
- ctx.closePath();
- ctx.stroke();
- ctx.restore();
- }
- }
- function hookKeys() {
- $(document).on('keyup', function(e) {
- var key = e.which || e.keyCode;
- keysHold[key] = false;
- if(key == 69) { // key E
- clearInterval(ejectorLoop);
- ejectorLoop = null;
- }
- else if(key >= 37 && key <= 40 || key >= 73 && key <= 76) handleMovementKeys();
- });
- $(document).on('keydown', function(e) {
- var key = e.which || e.keyCode;
- var spKeys = e.ctrlKey || e.altKey || e.shiftKey;
- //console.log('keydown ' + key);
- if($('#overlays').is(':hidden') && !spKeys) {
- if(key == 27) overlaysOpened = true; // key ESC
- if(!keysHold[key]) {
- if(key == 69) { // key E
- if(!ejectorLoop) {
- ejectorLoop = setInterval(function() {
- window.onkeydown({ keyCode: 87 });
- window.onkeyup({ keyCode: 87 });
- }, 10);
- }
- }
- else if(key == 82) { // key R
- setIntervalX(function() {
- window.onkeydown({ keyCode: 87 }); // key W
- window.onkeyup({ keyCode: 87 });
- }, 120, 7);
- }
- else if(key == 84) { // key T
- setIntervalX(function() {
- window.onkeydown({ keyCode: 32 }); // key SPACE
- window.onkeyup({ keyCode: 32 });
- }, 60, 4);
- }
- else if(key == 83) { // key S
- var mEv = new MouseEvent('mousemove', { 'clientX': window.innerWidth / 2, 'clientY': window.innerHeight / 2 });
- canvas.dispatchEvent(mEv);
- }
- else if(key == 86) showPanel(2); // key V
- else if(key == 66) showPanel(1); // key B
- else if(key == 78) showPanel(3); // key N
- else if(key == 77) showPanel(4); // key M
- else if(key == 188) showPanel(5); // key ,
- }
- keysHold[key] = true;
- if(key >= 37 && key <= 40 || key >= 73 && key <= 76) handleMovementKeys();
- }
- if(document.activeElement.tagName.toUpperCase() != 'INPUT' && document.activeElement.type != 'text') {
- if(key == 192) { // key ~
- $('#playerListBox a').eq(0).click();
- keysHold[key] = true;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement