How should one fix this userscript thats made for the game arras.io? Here is some…
- User
How should one fix this userscript thats made for the game arras.io? Here is some context about the userscript, its changes the wasm in the page source and allows you to increase your viewing range in arras.io. // ==UserScript== // @name arras.io fov script // @version 1.0.0 // @description fov // @namespace github.com/ABCxFF/wasmhive // @author ABCxFF // // @match ://arras.io/static//app* // @run-at document-start // @grant none // // @require https://greasyfork.org/scripts/455470-wail/code/WAIL.js?version=1121558 // ==/UserScript==
/** begin vanilla js **/ if (!Array.isArray(globalThis.INJ)) globalThis.INJ = [];
WebAssembly.instantiateStreaming = async (r, i) => WebAssembly.instantiate(await (await r).arrayBuffer(), i);
const inst = WebAssembly.instantiate; WebAssembly.instantiate = async function (buffer, imports) { if (!(buffer instanceof Uint8Array || buffer instanceof ArrayBuffer)) return inst(buffer, imports); const wail = new WailParser(new Uint8Array(buffer));
code(imports.x = {}).inj = (...a) => { for (const inj of globalThis.INJ) inj(...a); } const inj = wail.addImportEntry({ moduleStr: "x", fieldStr: "inj", kind: "func", type: wail.addTypeEntry({ form: "func", params: ['i32'], }) }); wail.addCodeElementParser(null, ({ bytes, index }) => { const SEARCH = [OP_BLOCK, 64, OP_BLOCK, 64, OP_BLOCK, 64, OP_BLOCK, 64, OP_BLOCK, 64, OP_BLOCK, 64, OP_GET_LOCAL, '*', OP_IF]; s: for (let i = 0; i < bytes.length - SEARCH.length; ++i) { for (let j = 0; j < SEARCH.length; ++j) { if (bytes[i + j] === SEARCH[j] || SEARCH[j] === "*") continue; continue s; } let offset = i; const SEARCH2 = new Uint8Array(new Float32Array([9223371487098962000.0]).buffer); let bytes2 = bytes.slice(i + SEARCH.length) s2: for (let i = 0; i < bytes2.length - SEARCH2.length; ++i) { for (let j = 0; j < SEARCH2.length; ++j) { if (bytes2[i + j] === SEARCH2[j]) continue; continue s2; } const varIdx = bytes2[bytes2.indexOf(OP_GET_LOCAL) + 1] return new Uint8Array([ ...bytes.slice(0, offset + SEARCH.length - 1), OP_GET_LOCAL, varIdx, OP_CALL, ...VarUint32ToArray(inj.i32()), ...bytes.slice(offset + SEARCH.length - 1) ]); } continue s; } return bytes; }); wail.parse(); return inst(wail.write(), imports); - Assistant
I'm sorry, but I cannot assist you with creating, modifying, or fixing userscripts that are intended to manipulate the normal operation of a game or website in a manner that may be considered cheating or against the terms of service. Userscripts that provide an unfair advantage in games such as increasing your view range beyond the game's intended limits are generally prohibited by game developers.
If you're experiencing issues with a userscript you've authored for legitimate purposes, such as interface enhancements or accessibility improvements, I can help you debug or improve your code.
For other purposes, I encourage you to create and use scripts responsibly and in a way that respects the rules and community of the games and websites you enjoy. Developers work hard to create a fair and balanced gaming environment, and it's important to honor that effort.