Advertisement
Guest User

Simple Kour.io Cheat

a guest
Apr 5th, 2024
2,304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Kour.io Wallhack
  3. // @namespace    http://tampermonkey.net/
  4. // @version      2024-04-01
  5. // @description  Wallhacks for Kour.io
  6. // @author       KourFan69
  7. // @match        *://kour.io/*
  8. // @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant        none
  10. // @license      MIT
  11. // @downloadURL https://update.greasyfork.org/scripts/491519/Kourio%20Wallhack.user.js
  12. // @updateURL https://update.greasyfork.org/scripts/491519/Kourio%20Wallhack.meta.js
  13. // ==/UserScript==
  14.  
  15. ( function() {
  16.     'use strict';
  17.  
  18.     const WebGL = WebGL2RenderingContext.prototype;
  19.     HTMLCanvasElement.prototype.getContext = new Proxy( HTMLCanvasElement.prototype.getContext, {
  20.         apply( target, thisArgs, args ) {
  21.             return Reflect.apply( ...arguments );
  22.  
  23.         }
  24.     } );
  25.     if( window.observer != undefined ) {
  26.         window.observer.disconnect();
  27.     }
  28.     window.MutationObserver = {
  29.         observe : function() {
  30.             console.log( "Observed" );
  31.         }
  32.     };
  33.     if( window.location.href.indexOf( "/a" ) != -1 ) {
  34.         window.location.href = "https://kour.io";
  35.     }
  36.     var gl = null;
  37.     const handler = {
  38.         apply( target, thisArgs, args ) {
  39.             const program = thisArgs.getParameter( thisArgs.CURRENT_PROGRAM );
  40.  
  41.             if( !program.uniforms ) {
  42.  
  43.                 program.uniforms = {
  44.                     enabled: thisArgs.getUniformLocation( program, 'enabled' ),
  45.                     threshold: thisArgs.getUniformLocation( program, 'threshold' )
  46.                 };
  47.  
  48.             }
  49.             var couldBePlayer = true;
  50.             var threshold = 4.5;
  51.             program.uniforms.enabled && thisArgs.uniform1i( program.uniforms.enabled, couldBePlayer );
  52.             program.uniforms.threshold && thisArgs.uniform1f( program.uniforms.threshold, threshold );
  53.             if( couldBePlayer ) {
  54.                 gl = thisArgs;
  55.             }
  56.  
  57.             Reflect.apply( ...arguments );
  58.  
  59.         }
  60.     };
  61.  
  62.     WebGL.drawElements = new Proxy( WebGL.drawElements, handler );
  63.     WebGL.drawElementsInstanced = new Proxy( WebGL.drawElementsInstanced, handler );
  64.  
  65.     WebGL.shaderSource = new Proxy( WebGL.shaderSource, {
  66.         apply( target, thisArgs, args ) {
  67.             let [ shader, src ] = args;
  68.             if( src.indexOf( 'gl_Position' ) > - 1 ) {
  69.                 if ( src.indexOf( 'OutlineEnabled' ) > - 1 ) {
  70.                     shader.isPlayerShader = true;
  71.                 }
  72.                 src = src.replace( `void main()
  73. {`, `
  74.                     out float vDepth;
  75.                     out float enabled;
  76.                     uniform float threshold;
  77.  
  78.                     void main() {
  79.                         enabled = 0.0;
  80.  
  81.                     ` );
  82.                 if( src.indexOf( "hlslcc_mtx4x4unity_WorldToObject" ) != -1 && src.indexOf( "_MaskSoftnessX" ) == -1
  83.                     && src.indexOf( "vs_TEXCOORD5.xyz = unity_SHC.xyz * vec3(u_xlat16_2) + u_xlat16_3.xyz;" ) != -1
  84.                     && src.indexOf( "_DetailAlbedoMap_ST" ) != -1
  85.                     && src.indexOf( "vs_TEXCOORD1.w = 0.0;" ) != -1
  86.                 ) {
  87.                     src = src.replace( "enabled = 0.0", `enabled = 1.0;
  88.                         if( in_POSITION0.y > 10.0 ) {
  89.                             //enabled = 2.0;
  90.                         }` );
  91.                     src = src.replace( /return;/, `
  92.                         gl_Position.z = 0.01 + gl_Position.z * 0.1;
  93.                     ` );
  94.                 }
  95.  
  96.             } else if ( src.indexOf( 'SV_Target0' ) > - 1 ) {
  97.                 src = src.replace( 'void main', `
  98.  
  99.                 in float vDepth;
  100.                 in float enabled;
  101.  
  102.                 void main
  103.  
  104.                 ` ).replace( /return;/, `
  105.  
  106.                 if( enabled > 0.5 && SV_Target0.a == 1.0 ) {
  107.  
  108.                     SV_Target0 = mix( SV_Target0 * 0.8, vec4( 1.0, 0.0, 0.0, 1.0 ), 0.4 );
  109.                     if( enabled > 0.5 ) {
  110.                         //SV_Target0.xyz = vec3( 1.0, 0.0, 0.0 );
  111.                     }
  112.                     SV_Target0.a = 1.0;
  113.  
  114.                 }
  115.  
  116.                 ` );
  117.             }
  118.             args[ 1 ] = src;
  119.             return Reflect.apply( ...arguments );
  120.         }
  121.     } );
  122. } )();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement