Mister_Stefan

Better_LagSync_V1

Aug 26th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // feel free to edit the values as much as u want
  2. //Also JITTER/JITTERsync isnt the best i recommend you use switch
  3. var screen_size = Render.GetScreenSize( );
  4. function fake_indicator( ) {
  5.     if( !Entity.GetLocalPlayer( ) || !Entity.IsAlive( Entity.GetLocalPlayer( ) ) || !Entity.IsValid( Entity.GetLocalPlayer( ) ) )
  6.         return;
  7.     var difference = Math.abs( Local.GetRealYaw( ) - Local.GetFakeYaw( ) );
  8.    
  9.     Render.String( 5, screen_size[1] - 54, 0, "LAGSYNC", [ difference * 24/ 58, 250 - ( difference * 25/158 ), 0, 255 ], 4 );
  10. }
  11. Cheat.RegisterCallback( "Draw", "fake_indicator" )
  12.  
  13. // Lagsync edit by yuh
  14. function addtomenu(){
  15.     UI.AddLabel("              YUH'S LAGSYNC");
  16.     UI.AddDropdown( "Lagsync", [ "Enable", "Disable"] );
  17.     UI.AddDropdown( "Method", [ "Off", "RESOLVER BREAKER" ] );
  18.     UI.AddSliderFloat("SWITCH delay",0, 1);
  19.     UI.AddLabel("                     v1");
  20.    
  21. }
  22. var aa=1;
  23. var aad=1;
  24. var lasttime = Global.Realtime();
  25. var realtime = Global.Realtime();
  26. var yawoffset =UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset");
  27. var jitteroffset =UI.GetValue("Anti-Aim", "Rage Anti-Aim", "Jitter offset");
  28. var de=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay");
  29. var status=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH Way");
  30. var yawnewoffset;
  31.  
  32. function randomIntFrom(min,max) // Get a random integer from [min] to [max]
  33. {
  34.     return Math.floor(Math.random()*(max-min+1)+min);
  35. }
  36.  
  37. //ls part 1
  38.  
  39. function V1(){
  40.     // Disable Breaker
  41.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Breaker", 0);
  42.    
  43.     // Fake Angles
  44.    
  45.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", -87);
  46.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  47.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  48.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 1);
  49.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", true);
  50.    
  51.     // Fake Lag
  52.    
  53.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 3);
  54.    
  55. }
  56. function V2(){
  57.    
  58.     // Fake Angles
  59.    
  60.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", -85);
  61.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 4);
  62.    
  63.     // Fake Lag
  64.    
  65.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 6);
  66.    
  67. }
  68. function V3(){
  69.    
  70.     // Fake Angles
  71.    
  72. //  UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 1);
  73.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 2);
  74.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  75.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  76.    
  77.     // Fake Lag
  78.    
  79.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 3);
  80.    
  81. }
  82.  
  83. //ls part 2
  84.  
  85. function S1(){
  86.     // Disable Breaker
  87.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Breaker", 0);
  88.  
  89.     yawnewoffset = randomIntFrom(5, -53);
  90.    
  91.     // Fake Angles
  92.    
  93.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  94.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  95.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 2);
  96.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", true);
  97.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  98.    
  99. }
  100. function S2(){
  101.     // Disable Breaker
  102.  
  103.     yawnewoffset = randomIntFrom(-30, 24);
  104.  
  105.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Breaker", 0);
  106.         UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  107.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 2);
  108.    
  109.     // Fake Angles
  110.    
  111.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  112.    
  113. }
  114.  
  115. //ls part 3
  116.  
  117. function A1(){
  118.     // Disable Breaker
  119.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Breaker", 0);
  120.    
  121.     yawnewoffset = randomIntFrom(20, -30);
  122.    
  123.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  124.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  125.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 2);
  126.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", true);
  127.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  128.    
  129.     // Fake Lag
  130.    
  131.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit",5);
  132.    
  133. }
  134. function A2(){
  135.     // Disable Breaker
  136.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Breaker", 0);
  137.    
  138.     yawnewoffset = randomIntFrom(-20, 20);
  139.    
  140.     // Fake Angles
  141.    
  142.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  143.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", false);
  144.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 1);
  145.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  146.    
  147.     // Fake Lag
  148.    
  149.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 5);
  150.    
  151. }
  152. function A3(){
  153.     // Disable Breaker
  154.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Breaker", 0);
  155.    
  156.     yawnewoffset = randomIntFrom(-20, 20);
  157.    
  158.     // Fake Angles
  159.    
  160.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  161.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 2);
  162.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  163.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  164.    
  165.     // Fake Lag
  166.    
  167.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 9);
  168.    
  169. }
  170.  
  171. // ----------------------------------------------------------------------------------------------------------------------------------------------------
  172.  
  173. //choker1
  174. function BR1(){
  175.     // Disable Lagsync
  176.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync mode", 1);
  177.    
  178.     yawnewoffset = randomIntFrom(-40, 8);
  179.    
  180.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  181.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", true);
  182.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 1);
  183.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", true);
  184.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", false);
  185.    
  186.     // Fake Lag
  187.    
  188.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 14);
  189.    
  190. }
  191. function BR2(){
  192.     // Disable Lagsync
  193.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync mode", 0);
  194.    
  195.     yawnewoffset = randomIntFrom(-71, 71);
  196.    
  197.     // Fake Angles
  198.    
  199.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  200.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  201.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 1);
  202.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  203.    
  204.     // Fake Lag
  205.    
  206.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 9);
  207.    
  208. }
  209. function BR3(){
  210.     // Disable Lagsync
  211.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync mode", 0);
  212.  
  213.     yawnewoffset = randomIntFrom(-70, -5);
  214.    
  215.     // Fake Angles
  216.    
  217.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  218.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 2);
  219.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  220.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  221.    
  222.     // Fake Lag
  223.    
  224.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 11);
  225.    
  226. }
  227.  
  228. // ----------------------------------------------------------------------------------------------------------------------------------------------------
  229.  
  230. //choker2
  231.  
  232. function BRR1(){
  233.     // Disable Lagsync
  234.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync mode", 1);
  235.    
  236.     yawnewoffset = randomIntFrom(-34, 0);
  237.    
  238.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  239.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", true);
  240.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 1);
  241.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "At targets", true);
  242.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  243.    
  244.     // Fake Lag
  245.    
  246.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 12);
  247.    
  248. }
  249. function BRR2(){
  250.     // Disable Lagsync
  251.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync mode", 0);
  252.    
  253.     yawnewoffset = randomIntFrom(-75, 75);
  254.    
  255.     // Fake Angles
  256.    
  257.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  258.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", false);
  259.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 1);
  260.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  261.    
  262.     // Fake Lag
  263.    
  264.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 7);
  265.    
  266. }
  267. function BRR3(){
  268.     // Disable Lagsync
  269.     UI.SetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync mode", 0);
  270.    
  271.     yawnewoffset = randomIntFrom(12, -24);
  272.    
  273.     // Fake Angles
  274.    
  275.     UI.SetValue("Anti-Aim", "Rage Anti-Aim", "Yaw offset", yawnewoffset);
  276.     UI.SetValue("Anti-Aim", "Fake angles", "LBY mode", 2);
  277.     UI.SetValue("Anti-Aim", "Fake angles", "Fake desync", false);
  278.     UI.SetValue("Anti-Aim", "Fake angles", "Avoid overlap", true);
  279.    
  280.     // Fake Lag
  281.    
  282.     UI.SetValue("Anti-Aim", "Fake-Lag", "Limit", 4);
  283.    
  284. }
  285.  
  286. //Math and stuff for the ls(left most of this the same besides a few slight changes)"
  287.  
  288. function lagsyncmain() {
  289.     mode=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync");
  290.     breakermenu=UI.GetValue("Misc", "JAVASCRIPT", "Script Items", "Method");
  291.    
  292.     if (mode==0) { lagsyncdisable(); }
  293.     if (mode==1) { lagsyncv2(); }
  294.     if (mode==2) { lagsyncv1(); }
  295.     if (mode==3) { lagsyncv3(); }
  296.    
  297.     if (breakermenu==0) { breakerdisable(); }
  298.     if (breakermenu==1) { breakerv1(); }
  299.     if (breakermenu==2) { breakerv2(); }
  300. }
  301.  
  302. function breakerv1() {
  303.     status=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync");
  304.     de=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay");
  305.     realtime = Global.Realtime();
  306. //    Global.Print(String(realtime-lasttime));
  307.     if(realtime-lasttime>=de){
  308. //        Global.Print(String(realtime-lasttime));
  309.         if(status==1){
  310.             aad=aa+1;
  311.             if(aad>3){
  312.                 aad=1;
  313.             }
  314.             aa=aad;
  315.         }
  316.         if(aa==1){
  317.            BR1();
  318.         }
  319.         if(aa==2){
  320.             BR2();
  321.         }
  322.         if(aa==3){
  323.             BR3();
  324.         }
  325.         lasttime = realtime;
  326.     }
  327.     if(realtime<lasttime){
  328.         lasttime = Global.Realtime();
  329.         realtime = Global.Realtime();
  330.     }
  331. }
  332.  
  333. function lagsyncdisable() {
  334.    
  335. }
  336.  
  337. function breakerv2() {
  338.     status=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync");
  339.     de=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay");
  340.     realtime = Global.Realtime();
  341. //    Global.Print(String(realtime-lasttime));
  342.     if(realtime-lasttime>=de){
  343. //        Global.Print(String(realtime-lasttime));
  344.         if(status==1){
  345.             aad=1+Math.floor(Math.random()*3);
  346.             aa=aad;
  347. //            Global.Print(String(aad));
  348.         }
  349.         if(status==2){
  350.             aad=aa+1;
  351.             if(aad>3){
  352.                 aad=1;
  353.             }
  354.             aa=aad;
  355. //            Global.Print(String(aad));
  356.         }
  357.         if(aa==1){
  358.            BRR1();
  359.         }
  360.         if(aa==2){
  361.             BRR2();
  362.         }
  363.         if(aa==3){
  364.             BRR3();
  365.         }
  366.         lasttime = realtime;
  367.     }
  368.     if(realtime<lasttime){
  369.         lasttime = Global.Realtime();
  370.         realtime = Global.Realtime();
  371.     }
  372. }
  373.  
  374. function breakerdisable() {
  375.    
  376. }
  377.  
  378. // --- THIS IS LAGSYNC V2 ---
  379.  
  380. function lagsyncv1() {
  381.     status=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync");
  382.     de=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay");
  383.     realtime = Global.Realtime();
  384. //    Global.Print(String(realtime-lasttime));
  385.     if(realtime-lasttime>=de){
  386. //        Global.Print(String(realtime-lasttime));
  387.         if(status==1){
  388.             aad=aa+1;
  389.             if(aad>2){
  390.                 aad=1;
  391.             }
  392.             aa=aad;
  393. //            Global.Print(String(aad));
  394.         }
  395.         if(aa==1){
  396.            S1();
  397.         }
  398.         if(aa==2){
  399.             S2();
  400.         }
  401.         lasttime = realtime;
  402.     }
  403.     if(realtime<lasttime){
  404.         lasttime = Global.Realtime();
  405.         realtime = Global.Realtime();
  406.     }
  407. }
  408.  
  409. // --- THIS IS LAGSYNC V1 ---
  410.  
  411. function lagsyncv2() {
  412.     status=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync");
  413.     de=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay");
  414.     realtime = Global.Realtime();
  415. //    Global.Print(String(realtime-lasttime));
  416.     if(realtime-lasttime>=de){
  417. //        Global.Print(String(realtime-lasttime));
  418.        
  419.         if(status==1){
  420.             aad=aa+1;
  421.             if(aad>3){
  422.                 aad=1;
  423.             }
  424.             aa=aad;
  425. //            Global.Print(String(aad));
  426.         }
  427.         if(aa==1){
  428.             V1();
  429.         }
  430.         if(aa==2){
  431.             V2();
  432.         }
  433.         if(aa==3){
  434.             V3();
  435.         }
  436.         lasttime = realtime;
  437.     }
  438.     if(realtime<lasttime){
  439.         lasttime = Global.Realtime();
  440.         realtime = Global.Realtime();
  441.     }
  442. }
  443.  
  444. // --- THIS IS LAGSYNC V3 ---
  445.  
  446. function lagsyncv3() {
  447.     status=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync");
  448.     de=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay");
  449.     realtime = Global.Realtime();
  450. //    Global.Print(String(realtime-lasttime));
  451.     if(realtime-lasttime>=de){
  452. //        Global.Print(String(realtime-lasttime));
  453.         if(status==1){
  454.             aad=1+Math.floor(Math.random()*3);
  455.             aa=aad;
  456. //            Global.Print(String(aad));
  457.         }
  458.         if(status==2){
  459.             aad=aa+1;
  460.             if(aad>3){
  461.                 aad=1;
  462.             }
  463.             aa=aad;
  464. //            Global.Print(String(aad));
  465.         }
  466.         if(aa==1){
  467.             A1();
  468.         }
  469.         if(aa==2){
  470.             A2();
  471.         }
  472.         if(aa==3){
  473.             A3();
  474.         }
  475.         lasttime = realtime;
  476.     }
  477.     if(realtime<lasttime){
  478.         lasttime = Global.Realtime();
  479.         realtime = Global.Realtime();
  480.     }
  481. }
  482.  
  483. function main(){
  484.     status=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","Lagsync");
  485.     de=UI.GetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay");
  486.     realtime = Global.Realtime();
  487. //    Global.Print(String(realtime-lasttime));
  488.     if(realtime-lasttime>=de){
  489. //        Global.Print(String(realtime-lasttime));
  490.         if(status==1){
  491.             aad=1+Math.floor(Math.random()*3);
  492.             aa=aad;
  493. //            Global.Print(String(aad));
  494.         }
  495.         if(status==2){
  496.             aad=aa+1;
  497.             if(aad>3){
  498.                 aad=1;
  499.             }
  500.             aa=aad;
  501. //            Global.Print(String(aad));
  502.         }
  503.         if(aa==1){
  504.             S1();
  505.         }
  506.         if(aa==2){
  507.             S2();
  508.         }
  509.         if(aa==3){
  510.             S3();
  511.         }
  512.         lasttime = realtime;
  513.     }
  514.     if(realtime<lasttime){
  515.         lasttime = Global.Realtime();
  516.         realtime = Global.Realtime();
  517.     }
  518.    
  519. }
  520.  
  521. addtomenu();
  522. UI.SetValue("Misc", "JAVASCRIPT", "Script Items","YAW Offset #1",yawoffset);
  523. UI.SetValue("Misc", "JAVASCRIPT", "Script Items","JITTER Offset #1",jitteroffset);
  524. //UI.SetValue("Misc", "JAVASCRIPT", "Script Items","YAW Offset #2",yawoffset);
  525. //UI.SetValue("Misc", "JAVASCRIPT", "Script Items","JITTER Offset #2",jitteroffset);
  526. //UI.SetValue("Misc", "JAVASCRIPT", "Script Items","YAW Offset #3",yawoffset);
  527. //UI.SetValue("Misc", "JAVASCRIPT", "Script Items","JITTER Offset #3",jitteroffset);
  528. //UI.SetValue("Misc", "JAVASCRIPT", "Script Items","SWITCH delay",de);
  529. //Global.RegisterCallback("Draw", "main")
  530. Global.RegisterCallback("Draw", "lagsyncmain")
  531.  
  532. //ui widgets
  533.  
  534.  
  535. //settings and stuff
  536. var circle_radius       = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Circle Radius");
  537. var arc_length          = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Arc Length");
  538. var arc_thickness       = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Arc Thickness");
  539. var arc_precision       = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Arc Precision (Use less for more fps)");
  540. var circle_color        = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Circle Color");
  541. var real_color          = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Real Color");
  542. var fake_color          = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Fake Color");
  543. var text_color          = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Text Color");
  544. var text_active_color   = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Text Active Color");
  545.  
  546. function update_settings()
  547. {
  548.     circle_radius       = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Circle Radius");
  549.     arc_length          = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Arc Length");
  550.     arc_thickness       = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Arc Thickness");
  551.     arc_precision       = UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Arc Precision (Use less for more fps)");
  552.     circle_color        = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Circle Color");
  553.     real_color          = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Real Color");
  554.     fake_color          = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Fake Color");
  555.     text_color          = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Text Color");
  556.     text_active_color   = UI.GetColor("Misc", "JAVASCRIPT", "Script items", "Text Active Color");
  557.  
  558.     if(arc_thickness > circle_radius)
  559.         UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Arc Thickness", circle_radius);
  560.  
  561.     if(UI.GetValue("Misc", "JAVASCRIPT", "Script items", "Reset Indicator Colors"))
  562.     {
  563.         UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Circle Color", [120, 120, 120, 192]);
  564.         UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Real Color", [255, 0, 196, 255]);
  565.         UI.SetColor("Misc", "JAVASCRIPT", "Script items", "Fake Color", [170, 128, 255, 255]);
  566.         UI.SetValue("Misc", "JAVASCRIPT", "Script items", "Reset Indicator Colors", false)
  567.     }
  568.    
  569. }
  570. //circle indicators that was originally built in, but i descided to remove it just because it was so nasty looking.
  571. function draw_circle(x, y, radius, thickness, color)
  572. {
  573.     var inner = radius - thickness;
  574.  
  575.     for(; radius > inner; --radius)
  576.     {
  577.         Render.Circle(x, y, radius, color);
  578.     }
  579. }
  580.  
  581. function draw_arc(x, y, radius, start_angle, percent, thickness, color)
  582. {
  583.     var precision   = (2 * Math.PI) / arc_precision;
  584.     var step        = Math.PI / 180;
  585.     var inner       = radius - thickness;
  586.     var end_angle   = (start_angle + percent) * step;
  587.     var start_angle = (start_angle * Math.PI) / 180;
  588.  
  589.     for(; radius > inner; --radius)
  590.     {
  591.         for(var angle = start_angle; angle < end_angle; angle += precision)
  592.         {
  593.             var cx = Math.round(x + radius * Math.cos(angle));
  594.             var cy = Math.round(y + radius * Math.sin(angle));
  595.  
  596.             var cx2 = Math.round(x + radius * Math.cos(angle + precision));
  597.             var cy2 = Math.round(y + radius * Math.sin(angle + precision));
  598.  
  599.             Render.Line(cx, cy, cx2, cy2, color);
  600.         }
  601.     }
  602. }
  603.  
  604. function adjust_angle(angle)
  605. {
  606.     if(angle < 0)
  607.     {
  608.         angle = (90 + angle * (-1));
  609.     }
  610.     else if(angle > 0)
  611.     {
  612.         angle = (90 - angle);
  613.     }
  614.  
  615.     return angle;
  616. }
  617.  
  618. function main()
  619. {
  620.     var local_player = Entity.GetLocalPlayer();
  621.  
  622.     if(!Entity.IsAlive(local_player))
  623.         return;
  624.  
  625.     update_settings();
  626.  
  627.     var screen_size     = Render.GetScreenSize();
  628.     var screen_middle_x = screen_size[0] * 0.5;
  629.     var screen_middle_y = screen_size[1] * 0.5;
  630.  
  631.     var view_angles = Local.GetViewAngles();
  632.  
  633.     var real_yaw = Local.GetRealYaw();
  634.     var fake_yaw = Local.GetFakeYaw();
  635.     var view_yaw = view_angles[1] - 180;
  636.  
  637.     var real = adjust_angle(real_yaw - view_yaw);
  638.     var fake = adjust_angle(fake_yaw - view_yaw);
  639.  
  640.     draw_circle(screen_middle_x, screen_middle_y, circle_radius, arc_thickness, circle_color);
  641.     draw_arc(screen_middle_x, screen_middle_y, circle_radius, fake - (arc_length * 0.5), arc_length, arc_thickness, fake_color);
  642.     draw_arc(screen_middle_x, screen_middle_y, circle_radius, real - (arc_length * 0.5), arc_length, arc_thickness, real_color);
  643.  
  644.     var double_tap_color = UI.IsHotkeyActive( "Rage", "GENERAL", "Exploits", "Doubletap" ) ? real_color : circle_color;
  645.     var hide_shots_color = UI.IsHotkeyActive( "Rage", "GENERAL", "Exploits", "Hide shots" ) ? real_color : circle_color;
  646.     var safe_point_color = UI.IsHotkeyActive( "Rage", "GENERAL", "General", "Force safe point" ) ? real_color : circle_color;
  647.  
  648.     var text_offset = screen_middle_y + circle_radius;
  649.     var text_spacing = screen_size[1] * 0.0185185185;
  650. // where the indicators were
  651. }
  652.  
  653. Cheat.RegisterCallback("Draw", "main");
Add Comment
Please, Sign In to add comment