Wallhack

Join https://discord.gg/E3z883VjKB for unreleased hacks and client hacks

  1. // ==UserScript==
  2. // @name Wallhack
  3. // @namespace http://tampermonkey.net/
  4. // @version 3.0
  5. // @description Join https://discord.gg/E3z883VjKB for unreleased hacks and client hacks
  6. // @author Graphicardeater
  7. // @match *://kour.io/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12. ( function() {
  13. 'use strict';
  14. const WebGL = WebGL2RenderingContext.prototype;
  15. HTMLCanvasElement.prototype.getContext = new Proxy( HTMLCanvasElement.prototype.getContext, {
  16. apply( target, thisArgs, args ) {
  17. return Reflect.apply( ...arguments );
  18. }
  19. } );
  20. if( window.observer != undefined ) {
  21. window.observer.disconnect();
  22. }
  23. window.MutationObserver = {
  24. observe : function() {
  25. console.log( "Observed" );
  26. }
  27. };
  28. if( window.location.href.indexOf( "/a" ) != -1 ) {
  29. window.location.href = "https://kour.io";
  30. }
  31. var gl = null;
  32. const handler = {
  33. apply( target, thisArgs, args ) {
  34. const program = thisArgs.getParameter( thisArgs.CURRENT_PROGRAM );
  35. if( !program.uniforms ) {
  36. program.uniforms = {
  37. enabled: thisArgs.getUniformLocation( program, 'enabled' ),
  38. threshold: thisArgs.getUniformLocation( program, 'threshold' )
  39. };
  40. }
  41. var couldBePlayer = true;
  42. var threshold = 4.6;
  43. program.uniforms.enabled && thisArgs.uniform1i( program.uniforms.enabled, couldBePlayer );
  44. program.uniforms.threshold && thisArgs.uniform1f( program.uniforms.threshold, threshold );
  45. if( couldBePlayer ) {
  46. gl = thisArgs;
  47. }
  48. Reflect.apply( ...arguments );
  49. }
  50. };
  51. WebGL.drawElements = new Proxy( WebGL.drawElements, handler );
  52. WebGL.drawElementsInstanced = new Proxy( WebGL.drawElementsInstanced, handler );
  53. WebGL.shaderSource = new Proxy( WebGL.shaderSource, {
  54. apply( target, thisArgs, args ) {
  55. let [ shader, src ] = args;
  56. if( src.indexOf( 'gl_Position' ) > - 1 ) {
  57. if ( src.indexOf( 'OutlineEnabled' ) > - 1 ) {
  58. shader.isPlayerShader = true;
  59. }
  60. src = src.replace( `void main()
  61. {`, `
  62. out float vDepth;
  63. out float enabled;
  64. uniform float threshold;
  65. void main() {
  66. enabled = 0.1;
  67. ` );
  68. if( src.indexOf( "hlslcc_mtx4x4unity_WorldToObject" ) != -1 && src.indexOf( "_MaskSoftnessX" ) == -1
  69. && src.indexOf( "vs_TEXCOORD5.xyz = unity_SHC.xyz * vec3(u_xlat16_2) + u_xlat16_3.xyz;" ) != -1
  70. && src.indexOf( "_DetailAlbedoMap_ST" ) != -1
  71. && src.indexOf( "vs_TEXCOORD1.w = 0.0;" ) != -1
  72. ) {
  73. src = src.replace( "enabled = 0.0", `enabled = 1.0;
  74. if( in_POSITION0.y > 10.0 ) {
  75. //enabled = 2.0;
  76. }` );
  77. src = src.replace( /return;/, `
  78. gl_Position.z = 0.01 + gl_Position.z * 0.1;
  79. ` );
  80. }
  81. } else if ( src.indexOf( 'SV_Target0' ) > - 1 ) {
  82. src = src.replace( 'void main', `
  83. in float vDepth;
  84. in float enabled;
  85. void main
  86. ` ).replace( /return;/, `
  87. if( enabled > 0.5 && SV_Target0.a == 1.0 ) {
  88. SV_Target0 = mix( SV_Target0 * 0.8, vec4( 1.0, 0.0, 0.0, 1.0 ), 0.4 );
  89. if( enabled > 0.5 ) {
  90. //SV_Target0.xyz = vec3( 1.0, 0.0, 0.0 );
  91. }
  92. SV_Target0.a = 1.0;
  93. }
  94. ` );
  95. }
  96. args[ 1 ] = src;
  97. return Reflect.apply( ...arguments );
  98. }
  99. } );
  100. } )();