0% found this document useful (0 votes)
605 views7 pages

Venge Mod

Uploaded by

hieu02909
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
605 views7 pages

Venge Mod

Uploaded by

hieu02909
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

// ==UserScript==

// @name Venge.io Cheat Mod 1.5.1


// @version 1.5.1
// @description Cheat mod client for venge.io with UI controls
// @author PentestGPT
// @match https://venge.io/
// @grant none
// @run-at document-start
// ==/UserScript==

class VengeHack {
constructor() {
this.settings = {
infAmmo: true,
infJump: true,
autoKill: true,
speedMlt: 0,
esp: true,
aimbot: true,
timeScale: 0
};
this.hooks = {
network: null,
movement: null,
anticheat: true,
};
this.init();
}

async waitForProp(prop) {
while (!window.hasOwnProperty(prop)) {
await new Promise(r => setTimeout(r, 500));
}
return window[prop];
}

async init() {
this.createUI();
await this.setupHooks();
this.setupBinds();
console.log("VengeHack initialized");
}

createUI() {
const container = document.createElement('div');
container.style.position = 'fixed';
container.style.top = '10px';
container.style.right = '10px';
container.style.backgroundColor = 'rgba(0,0,0,0.7)';
container.style.color = 'white';
container.style.padding = '10px';
container.style.borderRadius = '5px';
container.style.zIndex = '9999';
container.style.fontFamily = 'Arial, sans-serif';
container.style.fontSize = '14px';
container.style.userSelect = 'none';

const title = document.createElement('h3');


title.innerText = 'VengeHack Controls';
title.style.margin = '0 0 10px 0';
container.appendChild(title);

const settings = [
{ key: 'infAmmo', label: 'Infinite Ammo' },
{ key: 'infJump', label: 'Infinite Jump' },
{ key: 'autoKill', label: 'Auto Kill' },
{ key: 'esp', label: 'ESP' },
{ key: 'aimbot', label: 'Aimbot' }
];

settings.forEach(s => {
const label = document.createElement('label');
label.style.display = 'block';
label.style.marginBottom = '5px';

const checkbox = document.createElement('input');


checkbox.type = 'checkbox';
checkbox.checked = this.settings[s.key];
checkbox.style.marginRight = '5px';
checkbox.addEventListener('change', () => {
this.settings[s.key] = checkbox.checked;
this.sendChatMessage(`${s.label} ${checkbox.checked ? 'Enabled' :
'Disabled'}`);
});

label.appendChild(checkbox);
label.appendChild(document.createTextNode(s.label));
container.appendChild(label);
});

// Speed Multiplier control


const speedLabel = document.createElement('label');
speedLabel.style.display = 'block';
speedLabel.style.marginTop = '10px';
speedLabel.innerText = `Speed Multiplier: ${this.settings.speedMlt + 1}x`;
container.appendChild(speedLabel);

const speedBtn = document.createElement('button');


speedBtn.innerText = 'Change Speed';
speedBtn.style.marginTop = '5px';
speedBtn.onclick = () => {
this.settings.speedMlt = (this.settings.speedMlt + 1) % 5;
speedLabel.innerText = `Speed Multiplier: ${this.settings.speedMlt +
1}x`;
this.sendChatMessage(`Speed Multiplier set to ${this.settings.speedMlt
+ 1}x`);
};
container.appendChild(speedBtn);

// Time Scale control


const timeLabel = document.createElement('label');
timeLabel.style.display = 'block';
timeLabel.style.marginTop = '10px';
timeLabel.innerText = `Time Scale: ${this.settings.timeScale + 1}x`;
container.appendChild(timeLabel);

const timeBtn = document.createElement('button');


timeBtn.innerText = 'Change Time Scale';
timeBtn.style.marginTop = '5px';
timeBtn.onclick = () => {
this.settings.timeScale = (this.settings.timeScale + 1) % 5;
timeLabel.innerText = `Time Scale: ${this.settings.timeScale + 1}x`;
if (window.pc && pc.app) {
pc.app.timeScale = this.settings.timeScale + 1;
}
this.sendChatMessage(`Time Scale set to ${this.settings.timeScale +
1}x`);
};
container.appendChild(timeBtn);

document.body.appendChild(container);
this.ui = container;
}

sendChatMessage(msg) {
if (this.hooks.network && this.hooks.network.app) {
this.hooks.network.app.fire("Chat:Message", "VengeHack", msg, true);
}
}

async setupHooks() {
// Wait for game classes
this.Movement = await this.waitForProp('Movement');
this.NetworkManager = await this.waitForProp('NetworkManager');
this.VengeGuard = await this.waitForProp('VengeGuard');
this.Label = await this.waitForProp('Label');

this.hookMovement();
this.hookNetwork();
this.hookAnticheat();
this.hookLabel();
}

setupBinds() {
window.addEventListener('keydown', e => {
if (e.keyCode === 85) { // phím U
if (this.ui.style.display === 'none') {
this.ui.style.display = 'block';
this.sendChatMessage('UI Shown');
} else {
this.ui.style.display = 'none';
this.sendChatMessage('UI Hidden');
}
}
// Các phím khác...
});
window.addEventListener('keydown', e => {
switch (e.keyCode) {
case 190: // .
this.toggleSetting('autoKill', 'Auto Kill');
break;
case 188: // ,
this.toggleSetting('infAmmo', 'Infinite Ammo');
break;
case 186: // ;
this.toggleSetting('aimbot', 'Aimbot');
break;
case 222: // '
this.toggleSetting('infJump', 'Infinite Jump');
break;
case 191: // /
this.changeSpeedMultiplier();
break;
case 219: // [
this.teleportToSafety();
break;
case 221: // ]
this.toggleSetting('esp', 'ESP');
break;
case 220: // \
this.changeTimeScale();
break;
}
});
}

toggleSetting(key, name) {
this.settings[key] = !this.settings[key];
this.sendChatMessage(`${name} ${this.settings[key] ? 'Enabled' :
'Disabled'}`);
}

changeSpeedMultiplier() {
this.settings.speedMlt = (this.settings.speedMlt + 1) % 5;
this.sendChatMessage(`Speed Multiplier set to ${this.settings.speedMlt +
1}x`);
}

teleportToSafety() {
if (this.hooks.network && this.hooks.movement) {
this.sendChatMessage('Teleporting to safety...');
this.hooks.network.app.fire("Player:Respawn", true);
}
}

changeTimeScale() {
this.settings.timeScale = (this.settings.timeScale + 1) % 5;
if (window.pc && pc.app) {
pc.app.timeScale = this.settings.timeScale + 1;
}
this.sendChatMessage(`Time Scale set to ${this.settings.timeScale + 1}x`);
}

hookMovement() {
const originalUpdate = this.Movement.prototype.update;
const self = this;
this.Movement.prototype.update = function (t) {
if (!self.hooks.movement) {
self.hooks.movement = this;
self.defaultSpeed = this.defaultSpeed;
self.strafingSpeed = this.strafingSpeed;
}
self.onTick();
originalUpdate.call(this, t);
self.applyMovementSettings();
};
console.log("Movement hooked");
}

applyMovementSettings() {
if (!this.hooks.movement) return;
if (this.settings.infAmmo) {
this.hooks.movement.setAmmoFull && this.hooks.movement.setAmmoFull();
this.hooks.movement.isHitting = false;
}
if (this.settings.infJump) {
this.hooks.movement.isLanded = true;
this.hooks.movement.bounceJumpTime = 0;
this.hooks.movement.isJumping = false;
}
this.hooks.movement.defaultSpeed = this.defaultSpeed *
(this.settings.speedMlt + 1);
this.hooks.movement.strafingSpeed = this.strafingSpeed *
(this.settings.speedMlt + 1);
}

hookNetwork() {
const originalInitialize = this.NetworkManager.prototype.initialize;
const self = this;
this.NetworkManager.prototype.initialize = function () {
if (!self.hooks.network) {
self.hooks.network = this;
}
originalInitialize.call(this);
};

const originalRespawn = this.NetworkManager.prototype.respawn;


this.NetworkManager.prototype.respawn = function (e) {
originalRespawn.call(this, e);
if (e && e.length > 0 && self.settings.autoKill) {
const targetId = e[0];
const targetPlayer = self.getPlayerById(targetId);
if (targetPlayer && targetId !== this.playerid) {
setTimeout(() => {
this.send(["da", targetId, 100, 1, targetPlayer.position.x,
targetPlayer.position.y, targetPlayer.position.z]);
}, 3500);
}
}
};
console.log("Network hooked");
}

hookAnticheat() {
const self = this;
this.VengeGuard.prototype.onCheck = function () {
this.app.fire("Network:Guard", 1);
};
console.log("Anticheat hooked");
}

hookLabel() {
const self = this;
this.Label.prototype.update = function (t) {
if (!pc.isSpectator) {
if (this.player.isDeath) {
this.labelEntity.enabled = false;
return false;
}
if (Date.now() - this.player.lastDamage > 1800 && !
self.settings.esp) {
this.labelEntity.enabled = false;
return false;
}
}
self.updateLabelPosition.call(this);
};
console.log("Label hooked");
}

updateLabelPosition() {
const position = new pc.Vec3();
const camera = this.currentCamera;
const pixelRatio = this.app.graphicsDevice.maxPixelRatio;
const scale = this.screenEntity.screen.scale;

camera.worldToScreen(this.headPoint.getPosition(), position);
position.x *= pixelRatio;
position.y *= pixelRatio;

if (position.x > 0 && position.x < this.app.graphicsDevice.width &&


position.y > 0 && position.y < this.app.graphicsDevice.height && position.z > 0) {
this.labelEntity.setLocalPosition(position.x / scale,
(this.app.graphicsDevice.height - position.y) / scale, 0);
this.labelEntity.enabled = true;
} else {
this.labelEntity.enabled = false;
}
}

onTick() {
if (this.settings.aimbot) {
this.aimAtClosestPlayer();
}
}

aimAtClosestPlayer() {
if (!this.hooks.network || !this.hooks.movement) return;

let closest = null;


let closestDistance = Infinity;

const players = this.hooks.network.players || [];


const currentPosition = this.hooks.movement.entity.getPosition();

players.forEach(target => {
if (!target || target.isDeath || target.id ===
this.hooks.network.playerid) return;
const distance = this.calculateDistance(target.position,
currentPosition);
if (distance < closestDistance) {
closest = target;
closestDistance = distance;
}
});

this.adjustAim(closest, currentPosition);
}

calculateDistance(targetPosition, currentPosition) {
return Math.sqrt(
Math.pow(targetPosition.y - currentPosition.y, 2) +
Math.pow(targetPosition.x - currentPosition.x, 2) +
Math.pow(targetPosition.z - currentPosition.z, 2)
);
}

adjustAim(closest, currentPosition) {
if (!closest || !this.hooks.movement) return;

const rayCastList = pc.app.systems.rigidbody.raycastAll(currentPosition,


closest.getPosition()).map(x => x.entity.tags._list.toString());
const rayCastCheck = rayCastList.length === 1 && rayCastList[0] ===
"Player";

if (rayCastCheck) {
const aimDirection = this.lookAt(closest.position.x,
closest.position.z, currentPosition.x, currentPosition.z);
this.hooks.movement.lookX = aimDirection * 57.29577951308232 +
(Math.random() / 10 - Math.random() / 10);
this.hooks.movement.lookY = -1 * this.getXDirection(closest.position,
currentPosition) * 57.29577951308232;
this.hooks.movement.leftMouse = true;
this.hooks.movement.setShooting &&
this.hooks.movement.setShooting(this.hooks.movement.lastDelta);
} else {
this.hooks.movement.leftMouse = false;
}
}

lookAt(x1, z1, x2, z2) {


return Math.atan2(z1 - z2, x1 - x2);
}

getXDirection(targetPosition, currentPosition) {
const deltaY = Math.abs(targetPosition.y - currentPosition.y);
const distance = this.calculateDistance(targetPosition, currentPosition);
return Math.asin(deltaY / distance) * (targetPosition.y > currentPosition.y
? -1 : 1);
}

getPlayerById(id) {
if (!this.hooks.network || !this.hooks.network.players) return null;
return this.hooks.network.players.find(p => p.id === id) || null;
}
}

window.VengeHackInstance = new VengeHack();

You might also like