// ==UserScript==
// @name KRUNKER.IO AIMBOT, XRAY, SPINBOT, WIREFRAME, FOV BOX, AND 3RD PERSON BY DOGEWARE
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Krunker's Mod Menu Aimbot targets nearest VISIBLE player. Adjust Smoothing for precision. Use Xray to see through walls, wireframe for players & world, and more
// @author DOGEWARE
// @match *://krunker.io/*
// @match *://browserfps.com/*
// @icon https://media.giphy.com/media/CxYGmxv0Oyz4I/giphy.gif
// @grant none
// @require https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js
// @antifeature ads
// @downloadURL none
// ==/UserScript==
const THREE = window.THREE;
const urlParams = new URLSearchParams(window.location.search)
let key = urlParams.get('key');
const Start = ["H7", "J6", "P9", "H8"]
const End = ["BJ8", "C8Y", "PLOG", "C149"]
const x = 2
let usedKey = localStorage.getItem('key')
const alertMsg = `⚠️ Invalid Key Alert ⚠️
This script now requires our license key for activation. To obtain the key, please visit our official page at dogescripts.pages.dev. This process only takes a few seconds and needs to be done about twice a day.
🛑 Please Note: The site is currently in the testing phase, and your cooperation is highly appreciated. Thank you for your understanding!
`
const ChanceToReload = Math.floor(Math.random() * 4) + 1
if(key !== null) {
localStorage.setItem('key', key)
}
if(localStorage.getItem('key') === null) {
alert(alertMsg)
location.href = `https://dogescripts.pages.dev/games/?script=${location.hostname}`
return
} else {
console.log(ChanceToReload)
if(ChanceToReload === x) {
alert(alertMsg, usedKey)
location.href = `https://dogescripts.pages.dev/games/?script=${location.hostname}`
return
}
}
let isValidKey = false;
switch(isValidKey) {
case true:
alert("Dont Modify This Script")
return
case null:
alert("Dont Modify This Script")
return
}
try {
for(const startStr of Start) {
if(key.startsWith(startStr)) {
for(const endStr of End) {
if(key.endsWith(endStr)) {
isValidKey = true
break;
}
}
break;
}
}
} catch {
isValidKey = true
}
if(isValidKey) {
console.log('Vaild Key')
} else {
return;
}
let WorldScene;
let intersections;
let DOGEWARE = {
player: {
wireframe: false,
opacity: 0.5
},
spinbot: {
on: false,
speed: 0.1,
spinAngle: 0
},
xray: {
on: false,
layer: 2,
opacity: 0.3
},
Camera: {
on: true,
x: 0,
y: 0,
z: 0
},
aimbot: {
on: true,
smoothingFactor: 0.99,
onfov: false,
size: 0.15,
},
scene: {
wireframe: false
},
}
let norms = {
allowTarget: true,
console: console.log,
injectTime: 3000
}
const temporaryVector3 = new THREE.Vector3()
const placeholderObj = new THREE.Object3D()
placeholderObj.rotation.order = 'YXZ'
const origialArrayPush = Array.prototype.push
const getMainScene = function(object) {
if(object && object.parent && object.parent.type === "Scene" && object.parent.name === "Main") {
WorldScene = object.parent;
Array.prototype.push = origialArrayPush;
}
return origialArrayPush.apply(this, arguments);
};
function Inject() {
requestAnimationFrame.call(window, Inject);
if(!WorldScene) {
window.setTimeout(() => {
Array.prototype.push = getMainScene;
}, norms.injectTime)
}
const entities = []
let myController
let Player2Target = Infinity
let RangeFactor = 9999
for(const child of WorldScene.children) {
if(child.material) {
child.material.wireframe = DOGEWARE.scene.wireframe
child.material.blending = DOGEWARE.xray.on ? 2 : 1
}
}
WorldScene.children.forEach(child => {
if(child.type === 'Object3D') {
try {
const Camera = child.children[0]?.children[0]
if(Camera && Camera.type === 'PerspectiveCamera') {
myController = child
} else {
entities.push(child)
}
} catch {}
}
});
if(!myController) {
Array.prototype.push = getMainScene
return
}
placeholderObj.matrix.copy(myController.matrix)
.invert()
entities.forEach(player => {
const playerPosition = player.position
const controllerPosition = myController.position
if(playerPosition.x !== controllerPosition.x || playerPosition.z !== controllerPosition.z) {
const dist = playerPosition.distanceTo(controllerPosition)
if(dist < RangeFactor) {
Player2Target = player
RangeFactor = dist
}
}
});
temporaryVector3.setScalar(0);
if(DOGEWARE.spinbot.on) {
DOGEWARE.spinbot.spinAngle += DOGEWARE.spinbot.speed
const targetRotationY = DOGEWARE.spinbot.spinAngle % (Math.PI * 2)
myController.children[0].rotation.y += (targetRotationY - myController.children[0].rotation.y) * DOGEWARE.aimbot.smoothingFactor
}
myController.layers.mask = 1
try {
Player2Target.children[0].children[0].localToWorld(temporaryVector3)
} catch {}
myController.children[0].position.y = DOGEWARE.Camera.y
myController.children[0].position.x = DOGEWARE.Camera.x
myController.children[0].position.z = DOGEWARE.Camera.z
if(typeof myController !== 'undefined' && typeof Player2Target !== 'undefined' && norms.allowTarget) {
const raycaster = new THREE.Raycaster()
const direction = new THREE.Vector3()
const myPlayerPosition = new THREE.Vector3()
myController.getWorldPosition(myPlayerPosition)
if(DOGEWARE.aimbot.onfov) {
direction.subVectors(Player2Target.position, myPlayerPosition).normalize()
const frontDirection = new THREE.Vector3(0, 0, myController.rotation.z)
const angleOffset = DOGEWARE.aimbot.size
const axis = new THREE.Vector3().crossVectors(frontDirection, direction).normalize()
const angle = Math.acos(frontDirection.dot(direction))
const quaternion = new THREE.Quaternion().setFromAxisAngle(axis, angleOffset)
const fanOutDirection = direction.clone().applyQuaternion(quaternion).normalize()
raycaster.set(myPlayerPosition, fanOutDirection)
raycaster.near = 0.05
raycaster.far = 1000
norms.allowTarget = true;
intersections = raycaster.intersectObject(Player2Target, true);
} else {
const raycaster = new THREE.Raycaster()
const direction = new THREE.Vector3()
const myPlayerPosition = new THREE.Vector3()
myController.getWorldPosition(myPlayerPosition)
raycaster.set(myPlayerPosition, direction.subVectors(Player2Target.position, myPlayerPosition).normalize())
raycaster.near = 0.1
raycaster.far = 100
norms.allowTarget = true
intersections = raycaster.intersectObject(Player2Target, true)
}
try {
if(intersections[0].object.material && intersections[0].object) {
const material = intersections[0].object.material
intersections[0].object.renderOrder = 9999
material.transparent = true;
norms.console(intersections[0].object.renderOrder)
material.wireframe = DOGEWARE.player.wireframe
material.opacity = DOGEWARE.player.opacity
} else {}
} catch {}
if(intersections[0].object && norms.allowTarget) {
if(DOGEWARE.aimbot.on) {
placeholderObj.position.copy(myController.position)
placeholderObj.lookAt(temporaryVector3)
norms.allowTarget = true
const targetRotationX = -placeholderObj.rotation.x;
const targetRotationY = placeholderObj.rotation.y + Math.PI
myController.children[0].rotation.x += (targetRotationX - myController.children[0].rotation.x) * DOGEWARE.aimbot.smoothingFactor
myController.rotation.y += (targetRotationY - myController.rotation.y) * DOGEWARE.aimbot.smoothingFactor
norms.console('Player2Target is visible to myPlayer.')
norms.console(myController)
}
} else {
norms.allowTarget = false
}
} else {}
}
function createMenuItem() {
const styleTag = document.createElement('style')
styleTag.textContent = `
.menuHeaderText1{
font-size: 35px;
font-weight: 900;
text-align: center !important;
animation: rgbAnimation 0.5s infinite alternate; /* Adding the animation */
}
.menuItemTitle1 {
font-size: 18px;
animation: rgbAnimation 0.5s infinite alternate; /* Adding the animation */
}
@keyframes rgbAnimation {
0% { color: rgb(255, 0, 0); }
25% { color: rgb(255, 255, 0); }
50% { color: rgb(0, 255, 0); }
75% { color: rgb(0, 255, 255); }
100% { color: rgb(255, 0, 255); }
}
.menuItem1:hover img{
transform: scale(1.1);
}
`;
document.head.appendChild(styleTag)
const menuItemDiv = document.createElement('div')
menuItemDiv.classList.add('menuItem')
menuItemDiv.classList.add('menuItem1')
menuItemDiv.setAttribute('onmouseenter', 'playTick()');
menuItemDiv.setAttribute('onclick', 'playSelect()');
const iconSpan = document.createElement('span')
iconSpan.innerHTML = ``
iconSpan.style.color = '#ff6a0b';
const titleDiv = document.createElement('div')
titleDiv.classList.add('menuItemTitle1')
titleDiv.classList.add('menuItemTitle')
titleDiv.id = 'menuBtnProfile';
titleDiv.style.fontSize = '18px';
titleDiv.textContent = 'CH3ATS';
menuItemDiv.addEventListener('click', openCheats)
menuItemDiv.appendChild(iconSpan);
menuItemDiv.appendChild(titleDiv);
const menuItemContainer = document.getElementById('menuItemContainer')
if(menuItemContainer) {
menuItemContainer.appendChild(menuItemDiv)
} else {
alert('Error: #menuItemContainer not found.')
}
}
setTimeout(function() {
createMenuItem()
}, 700)
setTimeout(function() {
if(document.getElementById('mapInfo') && !document.getElementById('mapInfo')
.innerText.includes("All")) {
//location.href = `https://${location.hostname}/`;
} else {}
}, 4000)
const style = document.createElement('style');
style.innerHTML = `
#menuContainer {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #212121;
padding: 10px;
border-radius: 10px;
border: revert-layer;
z-index: 1000;
max-width: 400px;
font-size: 14px;
line-height: 1.5;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
#menuContainer *{
font-family: monospace !important;
-webkit-font-smoothing: antialiased; /* Apply webkit anti-aliasing */
font-smoothing: antialiased; /* Standard anti-aliasing */
}
#menuContainer label{
color: white !important;
font-weight: bold;
}
.tab {
display: flex;
justify-content: space-around;
margin-bottom: 10px;
}
.tab button {
background-color: #f0f0f0;
border: 1px solid #ccc;
padding: 3px 5px;
cursor: pointer;
}
.tab button.active {
background-color: #ccc;
}
.tabcontent {
display: none;
margin-top: 10px;
}
.tabcontent.active {
display: block;
}
label {
display: block;
margin-bottom: 5px;
}
select, input[type="text"] {
width: calc(100% - 12px);
padding: 3px;
margin-bottom: 5px;
}
select{
width: calc(100% - 2px) !important;
}
.header {
position: relative;
text-align: center;
}
.headerContent {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.header h2 {
margin: 0;
position: relative;
bottom: -100px;
}
.headerImage {
width: 100%;
height: auto;
margin-top: -50px;
border-radius: 10px;
object-fit: cover;
}
`;
document.head.appendChild(style);
const menuContainer = document.createElement('div')
menuContainer.id = 'menuContainer'
document.body.appendChild(menuContainer)
const header = document.createElement('div')
header.innerHTML = `