Scripts for smoother gameplay on Kour.io
// ==UserScript==
// @name Wolf_ tools 2.0
// @namespace http://tampermonkey.net
// @version updated
// @description Scripts for smoother gameplay on Kour.io
// @author Wolf_
// @match *://kour.io/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function () {
'use strict';
if (document.getElementById('wolf-menu')) return;
const getStored = (key, def) => {
const v = localStorage.getItem(key);
return v === null ? def : v;
};
let savedTop = getStored('wolf_top', '20px');
let savedLeft = getStored('wolf_left', '20px');
let states = {
arms: getStored('wolf_hide_arms', 'false') === 'true',
weapon: getStored('wolf_hide_weapon', 'false') === 'true',
crossVisible: getStored('wolf_cross_visible', 'true') === 'true',
glow: getStored('wolf_glow', 'true') === 'true',
customCross: getStored('wolf_custom_cross', 'myrrr'),
crossColor: getStored('wolf_cross_color', '#ffffff'),
crossScale: getStored('wolf_cross_scale', '1.0'),
hideGameCross: getStored('wolf_hide_game_cross', 'false') === 'true',
crossTransparent: getStored('wolf_cross_transparent', 'true') === 'true',
rainbow: getStored('wolf_cross_rainbow', 'false') === 'true'
};
// CSS για το Rainbow Εφέ
const rainbowStyle = document.createElement('style');
rainbowStyle.innerHTML = `
@keyframes wolfRainbow {
0% { background: #ff0000; border-color: #ff0000; }
17% { background: #ffa500; border-color: #ffa500; }
33% { background: #ffff00; border-color: #ffff00; }
50% { background: #008000; border-color: #008000; }
67% { background: #0000ff; border-color: #0000ff; }
83% { background: #4b0082; border-color: #4b0082; }
100% { background: #ee82ee; border-color: #ee82ee; }
}
@keyframes wolfRainbowBorderOnly {
0% { border-color: #ff0000; }
17% { border-color: #ffa500; }
33% { border-color: #ffff00; }
50% { border-color: #008000; }
67% { border-color: #0000ff; }
83% { border-color: #4b0082; }
100% { border-color: #ee82ee; }
}
.wolf-rainbow-active {
animation: wolfRainbow 4s linear infinite !important;
mix-blend-mode: normal !important;
}
.wolf-rainbow-border-active {
animation: wolfRainbowBorderOnly 4s linear infinite !important;
mix-blend-mode: normal !important;
}
`;
document.head ? document.head.appendChild(rainbowStyle) : document.documentElement.appendChild(rainbowStyle);
const styleEl = document.createElement('style');
document.head ? document.head.appendChild(styleEl) : document.documentElement.appendChild(styleEl);
function updateGameCrosshairVisibility() {
if (states.hideGameCross) {
styleEl.innerHTML = `
.crosshair, #crosshair, [class*="crosshair"], [id*="crosshair"],
#unity-container canvas + div, .game-crosshair, unity-canvas-crosshair {
display: none !important;
opacity: 0 !important;
visibility: hidden !important;
}
`;
} else {
styleEl.innerHTML = '';
}
}
updateGameCrosshairVisibility();
const weaponPattern = /\/StreamingAssets\/(awp|usps|deagle|uzi|pkm|revolver|mp5|scar|minigun|famas|vector1|vector2|vector3|flamethrower|kar98|m4a4|tec9|beretta|cz|ak109|p90|thompson|ump45|xm1014|lasergun1|lasergun2|grenade|knife|butterfly|bayonet|karambit)(\.|\?|$)/i;
const originalFetch = window.fetch;
window.fetch = function (url, options) {
const requestUrl = typeof url === "string" ? url : url.url;
if (states.weapon && weaponPattern.test(requestUrl)) {
if (!requestUrl.includes("map") && !requestUrl.includes("level") && !requestUrl.includes("floor")) {
return Promise.resolve(new Response("", { status: 200 }));
}
}
return originalFetch.apply(this, arguments);
};
const WebGL = WebGL2RenderingContext.prototype;
const drawHandler = {
apply(target, thisArgs, args) {
const count = args[1] || args[0];
const armsIDs = [1098];
if (states.arms && armsIDs.includes(count)) return;
return Reflect.apply(target, thisArgs, args);
}
};
if (WebGL.drawElements) WebGL.drawElements = new Proxy(WebGL.drawElements, drawHandler);
if (WebGL.drawElementsInstanced) WebGL.drawElementsInstanced = new Proxy(WebGL.drawElementsInstanced, drawHandler);
const crossContainer = document.createElement('div');
Object.assign(crossContainer.style, {
position: 'fixed', top: '50%', left: '50%',
zIndex: '10000', pointerEvents: 'none', display: 'none'
});
const initInterval = setInterval(() => {
if (document.body) {
clearInterval(initInterval);
document.body.appendChild(crossContainer);
document.body.appendChild(menu);
applyCross();
}
}, 50);
function applyCross() {
crossContainer.innerHTML = '';
if (!states.crossVisible || states.customCross === 'none') {
crossContainer.style.display = 'none';
return;
}
crossContainer.style.display = 'flex';
crossContainer.style.alignItems = 'center';
crossContainer.style.justifyContent = 'center';
crossContainer.style.transform = `translate(-50%, -50%) scale(${states.crossScale})`;
const color = states.crossColor;
const style = states.customCross;
const glowStyle = states.glow ? `0 0 8px ${color}` : 'none';
const currentOpacity = states.crossTransparent ? '0.7' : '1.0';
const currentBlend = (states.crossTransparent && !states.rainbow) ? 'difference' : 'normal';
const baseStyle = {
position: 'absolute',
background: color,
borderRadius: '1px',
boxShadow: glowStyle,
mixBlendMode: currentBlend,
opacity: currentOpacity
};
if (style === 'myrrr') {
const h = document.createElement('div');
const v = document.createElement('div');
Object.assign(h.style, baseStyle, { width: '18px', height: '3px' });
Object.assign(v.style, baseStyle, { width: '3px', height: '18px' });
if (states.rainbow) { h.classList.add('wolf-rainbow-active'); v.classList.add('wolf-rainbow-active'); }
crossContainer.append(h, v);
} else if (style === 'dot') {
const dot = document.createElement('div');
Object.assign(dot.style, baseStyle, { width: '7px', height: '7px', borderRadius: '50%' });
if (states.rainbow) dot.classList.add('wolf-rainbow-active');
crossContainer.appendChild(dot);
} else if (style === 'shotgun') {
const circle = document.createElement('div');
Object.assign(circle.style, baseStyle, {
width: '40px',
height: '40px',
border: `4px solid ${color}`,
background: 'transparent',
borderRadius: '50%'
});
if (states.rainbow) circle.classList.add('wolf-rainbow-border-active');
crossContainer.appendChild(circle);
}
}
const menu = document.createElement("div");
menu.id = "wolf-menu";
Object.assign(menu.style, {
position: 'fixed', top: savedTop, left: savedLeft,
width: '220px', background: 'linear-gradient(135deg, #bf953f, #fcf6ba, #b38728)',
border: '2px solid #5d4037', borderRadius: '10px', zIndex: '10001',
fontFamily: 'Arial', textAlign: 'center', userSelect: 'none', boxShadow: '0 8px 24px rgba(0,0,0,0.5)'
});
const header = document.createElement("div");
header.innerText = "Wolf_ tools";
Object.assign(header.style, { padding: '12px', cursor: 'move', fontWeight: 'bold', color: '#5d4037' });
menu.appendChild(header);
const content = document.createElement("div");
content.style.padding = "12px";
menu.appendChild(content);
function createRow(text, key, storageKey) {
const row = document.createElement("div");
Object.assign(row.style, { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '8px' });
const btn = document.createElement("button");
const dot = document.createElement("div");
let isActive = states[key];
if (key === 'hideGameCross') isActive = !states[key];
Object.assign(dot.style, { width: '10px', height: '10px', borderRadius: '50%', background: isActive ? '#00ff00' : '#ff0000' });
let buttonText = key === 'glow' ? "Make the crosshair glow" : (states[key] ? "Show " : "Hide ") + text;
btn.innerText = buttonText;
Object.assign(btn.style, { flex: '1', padding: '8px', backgroundColor: '#5d4037', color: '#fcf6ba', border: 'none', borderRadius: '4px', cursor: 'pointer', fontWeight: 'bold', fontSize: '11px', marginRight: '8px' });
btn.onclick = () => {
states[key] = !states[key];
localStorage.setItem(storageKey, states[key]);
let currentActive = states[key];
if (key === 'hideGameCross') {
currentActive = !states[key];
updateGameCrosshairVisibility();
}
btn.innerText = key === 'glow' ? "Make the crosshair glow" : (states[key] ? "Show " : "Hide ") + text;
dot.style.background = currentActive ? '#00ff00' : '#ff0000';
applyCross();
if (key === 'weapon') location.reload();
};
row.append(btn, dot);
return row;
}
content.append(createRow("arms", "arms", "wolf_hide_arms"));
content.append(createRow("weapon", "weapon", "wolf_hide_weapon"));
content.append(createRow("crosshair", "crossVisible", "wolf_cross_visible"));
content.append(createRow("glow", "glow", "wolf_glow"));
content.append(createRow("game crosshair", "hideGameCross", "wolf_hide_game_cross"));
content.append(createRow("crosshair opacity", "crossTransparent", "wolf_cross_transparent"));
content.append(createRow("rainbow crosshair", "rainbow", "wolf_cross_rainbow"));
const sel = document.createElement("select");
Object.assign(sel.style, { width: '100%', padding: '5px', marginTop: '5px', background: '#5d4037', color: '#fcf6ba', border: 'none', borderRadius: '4px' });
['myrrr', 'dot', 'shotgun', 'none'].forEach(v => {
const o = document.createElement("option");
o.value = v; o.innerText = v;
if (states.customCross === v) o.selected = true;
sel.appendChild(o);
});
sel.onchange = () => { states.customCross = sel.value; localStorage.setItem('wolf_custom_cross', sel.value); applyCross(); };
content.appendChild(sel);
const scaleRow = document.createElement("div");
Object.assign(scaleRow.style, { display: 'flex', flexDirection: 'column', alignItems: 'stretch', marginTop: '8px', marginBottom: '8px' });
const scaleLabelRow = document.createElement("div");
Object.assign(scaleLabelRow.style, { display: 'flex', justifyContent: 'space-between', color: '#5d4037', fontSize: '11px', fontWeight: 'bold' });
const scaleLabel = document.createElement("span");
scaleLabel.innerText = "Crosshair Scale";
const scaleValue = document.createElement("span");
scaleValue.innerText = states.crossScale + "x";
scaleLabelRow.append(scaleLabel, scaleValue);
const scaleSlider = document.createElement("input");
scaleSlider.type = "range"; scaleSlider.min = "0.4"; scaleSlider.max = "3.0"; scaleSlider.step = "0.1";
scaleSlider.value = states.crossScale;
Object.assign(scaleSlider.style, { width: '100%', marginTop: '4px', cursor: 'pointer' });
scaleSlider.oninput = (e) => {
states.crossScale = e.target.value;
scaleValue.innerText = states.crossScale + "x";
localStorage.setItem('wolf_cross_scale', states.crossScale);
applyCross();
};
scaleRow.append(scaleLabelRow, scaleSlider);
content.appendChild(scaleRow);
const colorRow = document.createElement("div");
Object.assign(colorRow.style, { display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginTop: '8px' });
const colorLabel = document.createElement("span");
colorLabel.innerText = "Crosshair Colors";
Object.assign(colorLabel.style, { color: '#5d4037', fontSize: '11px', fontWeight: 'bold' });
const colorPicker = document.createElement("input");
colorPicker.type = "color"; colorPicker.value = states.crossColor;
Object.assign(colorPicker.style, { width: '40px', height: '25px', border: 'none', background: 'transparent', cursor: 'pointer' });
colorPicker.oninput = (e) => { states.crossColor = e.target.value; localStorage.setItem('wolf_cross_color', states.crossColor); applyCross(); };
colorRow.append(colorLabel, colorPicker);
content.appendChild(colorRow);
const instructions = document.createElement("div");
instructions.innerText = "Open/close menu with the button 'M'";
Object.assign(instructions.style, { marginTop: "12px", fontSize: "10px", color: "#5d4037", fontWeight: "bold", opacity: "0.8" });
content.appendChild(instructions);
let drag = false, sx, sy, ix, iy;
header.addEventListener("mousedown", (e) => {
drag = true; sx = e.clientX; sy = e.clientY;
ix = menu.offsetLeft; iy = menu.offsetTop;
});
window.addEventListener("mousemove", (e) => {
if (!drag) return;
let nx = ix + (e.clientX - sx);
let ny = iy + (e.clientY - sy);
const maxX = window.innerWidth - menu.offsetWidth;
const maxY = window.innerHeight - menu.offsetHeight;
nx = Math.max(0, Math.min(nx, maxX));
ny = Math.max(0, Math.min(ny, maxY));
menu.style.left = nx + "px";
menu.style.top = ny + "px";
localStorage.setItem('wolf_left', menu.style.left);
localStorage.setItem('wolf_top', menu.style.top);
});
window.addEventListener("mouseup", () => drag = false);
window.addEventListener("keydown", (e) => {
if (e.key.toLowerCase() === 'm' && !e.target.matches("input, textarea, select")) {
menu.style.display = menu.style.display === 'none' ? 'block' : 'none';
}
});
})();