better than other splix hacks
当前为
// ==UserScript==
// @name splixHax Vbetter
// @namespace http://tampermonkey.net/
// @version 2
// @description better than other splix hacks
// @author You
// @match *://splix.io/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
window.addEventListener('load',function(){
MAX_ZOOM=10000;
USERNAME_SIZE=6;
var defzm=BLOCKS_ON_SCREEN,zm=1;
window.addEventListener('wheel',function(e){
zm+=e.deltaY/Math.abs(e.deltaY)*.5;
if(defzm*zm>16000)zm-=.5;
if(defzm*zm<100)zm+=.5;
BLOCKS_ON_SCREEN=defzm*zm;
});
});
var high=false,spam=false,dark=false,keyHandler=function(e){
if(document.activeElement.tagName=="input")return;
if(e.type.endsWith("n")&&e.key=="p"){
pressedKeys=[];
myPlayer.isMyPlayer=!myPlayer.isMyPlayer;
pressedKeys=[];
myPlayer.isMyPlayer=!myPlayer.isMyPlayer;
myPlayer.addHitLine(myPlayer.pos,myColorId);
document.title="paused";
resetTitle();
};
if(e.type.endsWith("p")){
switch(e.key){
case "h":
high=!high;
document.title="high mode"+(high?"en":"dis")+"abled";
break;
case "g":
spam=!spam;
document.title="spam mode"+(spam?"en":"dis")+"abled";
break;
case "f":
GLOBAL_SPEED=.006+(+(GLOBAL_SPEED==.006))*.001;
document.title="speed mode"+(GLOBAL_SPEED==.006?"en":"dis")+"abled";
break;
case "j":
dark=!dark;
document.title="dark mode"+(dark?"en":"dis")+"abled";
break;
}
if("hgfj".split("").includes(e.key)){
myPlayer.addHitLine(myPlayer.pos,myColorId);
resetTitle();
}
}
};
function resetTitle(){setTimeout(()=>document.title="splix.io",3000);}
window.addEventListener('keydown',keyHandler);
window.addEventListener('keyup',keyHandler);
var tmpColId;
setInterval(()=>{
if(myPlayer==null)return;
tmpColId=myColorId;
while(myColorId==tmpColId)myColorId=Math.floor(Math.random()*13);
tmpColId=myColorId;
myPlayer.skinBlock=(high|!dark)?myColorId:13;
if(high)myColorId=13;
colorUI();
if(high)myColorId=tmpColId;
//make other players stoopid
players.filter(v=>v!=myPlayer&&!v.name.startsWith('[stoopid] ')).forEach(v=>v.name="[stoopid] "+v.name);
},1000);
setInterval(()=>{
if(myPlayer==null)return;
if(spam){
honkStart();
honkEnd();
myPlayer.addHitLine(myPlayer.pos,myColorId);
}
if(myPlayer.isDead){
myPlayer.undoDie();
myPlayer.deathWasCertain=false;
}
players.filter(v=>v.isMyPlayer==false).forEach(v=>{v.skinBlock=high?13:myColorId;});
if(high)myPlayer.die();
},1);
document.head.innerHTML+="<style>#playUI>*{transition:all .5s linear;}#miniMap{transform-origin:top left;transform:scale(1.25,1.25);}</style>";
})();