Advertisement
Mister_Stefan

OTV4 wt,kblst,speclst

Jun 16th, 2021
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UI.AddSubTab(["Visuals", "SUBTAB_MGR"], "Keybinds indicators");
  2. UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],">>-  Indicators  -<<", 0, 0);
  3. UI.AddMultiDropdown(["Visuals","Keybinds indicators","Keybinds indicators"], "Windows", [ "Hotkeys", "Spectator list", "Watermark" ] );
  4. UI.AddCheckbox(["Visuals","Keybinds indicators","Keybinds indicators"],"Show windows only with information");
  5. UI.AddColorPicker(["Visuals","Keybinds indicators","Keybinds indicators"],"Gradient color 1");
  6. UI.AddColorPicker(["Visuals","Keybinds indicators","Keybinds indicators"],"Gradient color 2");
  7. UI.AddCheckbox(["Visuals","Keybinds indicators","Keybinds indicators"],"Render test container");
  8.  
  9. var keybinds = [];
  10. keybinds.push({path: [["Rage", "Exploits", "Keys", "Key assignment", "Hide shots"]], name: "Hide-shots"});
  11. keybinds.push({path: [["Rage", "Exploits", "Keys", "Key assignment", "Double tap"]], name: "Double-tap"});
  12. keybinds.push({path: [["Rage", "General", "General", "Key assignment",'Force body aim']], name: "Body-aim"});
  13. keybinds.push({path: [["Rage", "Anti Aim", "General", "Key assignment", "AA Direction inverter"]], name: "Angle Inverter"});
  14. keybinds.push({path: [["Rage", "General", "General", "Key assignment","Force safe point"]], name: "Force Safepoint"});
  15. keybinds.push({path: [["Misc.", "Keys", "General", "Key assignment", "Auto peek"]], name: "Auto Peek"});
  16. keybinds.push({path: [["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"]], name: "Slow Walk"});
  17. keybinds.push({path: [["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"]], name: "Fake Duck"});
  18.  
  19. const print = function(text, color){
  20.     if(color == undefined)
  21.     Cheat.Print(text.toString() + "\n");
  22.     else
  23.     Cheat.PrintColor(color, text.toString() + "\n");
  24. }
  25.  
  26. const getval = function(name){
  27.     return UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators", name]);
  28. }
  29.  
  30. const setval = function(name, value){
  31.     return UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators", name], value);
  32. }
  33.  
  34. const getcol = function(name){
  35.     return UI.GetColor(["Visuals","Keybinds indicators","Keybinds indicators", name]);
  36. }
  37.  
  38. const get_active_keybinds = function(){
  39.     var ret = [];
  40.     for(var i in keybinds){
  41.         if(UI.GetValue.apply(null,keybinds[i].path))
  42.             ret.push(keybinds[i].name);
  43.     }
  44.     return ret;
  45. }
  46.  
  47. const get_spectators = function()
  48. {
  49.     const players = Entity.GetPlayers();
  50.     var spectators = [];
  51.     for (var i = 0; i < players.length; i++)
  52.     {
  53.         const m_hObserverTarget = Entity.GetProp(players[i], "CBasePlayer", "m_hObserverTarget");
  54.         if (m_hObserverTarget !== "m_hObserverTarget") {
  55.             if (m_hObserverTarget === Entity.GetLocalPlayer())
  56.             {
  57.                 const name = Entity.GetName(players[i]);
  58.                 spectators.push(name.length >= 22 ? name.substr(0, 20) + "..." : name);
  59.             }
  60.         }
  61.     }
  62.     return spectators;
  63. }
  64.  
  65. const point_in_rect = function(pos, min, max, debug) {
  66.     if(debug) {
  67.         if(pos[0] > min[0] && pos[1] > min[1] && pos[0] < max[0] && pos[1] < max[1])
  68.              Render.Rect(min[0], min[1], max[0] - min[0], max[1] - min[1], [0, 255, 0, 255])
  69.         else Render.Rect(min[0], min[1], max[0] - min[0], max[1] - min[1], [255, 0, 0, 255])        
  70.     }
  71.     return pos[0] > min[0]
  72.         && pos[1] > min[1]
  73.         && pos[0] < max[0]
  74.         && pos[1] < max[1];
  75. }
  76.  
  77. const get_dropdown_value = function(value, index)
  78. {
  79.     const mask = 1 << index;
  80.     return value & mask ? true : false;
  81. }
  82.  
  83. Cheat.Print("\nLoaded ");
  84. Cheat.PrintColor([255,0,0,255], keybinds.length + " ");
  85. print("keybinds!\n");
  86. print("You may add yours by using:");
  87. Cheat.PrintColor([255,255,0,255], 'keybinds.push({path: ["Legit", "Triggerbot", "Enabled"], name: "Trigger bot"}); ');
  88. print("for example.");
  89.  
  90. const screen_size = Global.GetScreenSize();
  91.  
  92. function render_container(x1, y1, w, h, name, color1, color2, font, to_write, state, custom){
  93.  
  94.     if(!UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"])){
  95.         UI.AddCheckbox(["Visuals","Keybinds indicators","Keybinds indicators"],name+" stored");
  96.         UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_x", 1, screen_size[0]);
  97.         UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_y", 1, screen_size[0]);
  98.         UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_x_off", 1, screen_size[0]);
  99.         UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_y_off", 1, screen_size[0]);
  100.         UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x"], x1);
  101.         UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y"], y1);
  102.         UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+" stored"], 0);
  103.         UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x"], 0);
  104.         UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y"], 0);
  105.         UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x_off"], 0);
  106.         UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y_off"], 0);
  107.     }
  108.  
  109.     const cursor_pos = Input.GetCursorPosition();
  110.     if(UI.IsMenuOpen() && Input.IsKeyPressed(0x1)){
  111.         if(point_in_rect(cursor_pos, [UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"]), UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y"])], [UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"]) + w,UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y"]) + h])){
  112.             if(UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored"]) == 0){
  113.                 UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name +"_x_off"], cursor_pos[0] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"]));
  114.                 UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name +"_y_off"], cursor_pos[1] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y"]));
  115.                 UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored",], 1);
  116.             }
  117.             UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x"], cursor_pos[0] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x_off"]));
  118.             UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y"], cursor_pos[1] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y_off"]));
  119.         }
  120.     } else if(UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored"])) UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored"], 0);
  121.  
  122.     x = UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"]);
  123.     y = UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y"]);
  124.  
  125.  
  126.     Render.GradientRect(x, y, w, 2, 1, color1, color2);
  127.     Render.GradientRect(x + 1, y + 2, w - 2, h, 0, [0,0,0,125], [0,0,0,0]);
  128.  
  129.     Render.String(x + 13, y + 6, 0, name, [255,255,255,255], font);
  130.     Render.String(x + w - 27, y + 6, 0, "<", [255,255,255,255], font);
  131.     Render.FilledCircle(x + w - 14, y + 12, 6, [20,20,20,100]);
  132.     Render.String(x + w - 16, y + 5, 0, "x", [255,255,255,255], font);
  133.  
  134.     const text_size_state = Render.TextSize(state, font);
  135.     for(var i in to_write){
  136.         if(custom != null){
  137.             const text_size_state = Render.TextSize(custom[i], font);
  138.             state = custom[i];
  139.         }
  140.         Render.String(x + 10, y + 25 + (i * 13), 0, to_write[i], [255,255,255,255], font);
  141.         Render.String(x + w - text_size_state[0] - 15, y + 25 + (i * 13), 0, "[" + state + "]", [255,255,255,255], font);
  142.     }
  143. }
  144. const watermark_custom = ["user", "server", "latency", "tickrate"];
  145. const for_test = ["Idet negr", "vidit dom stoit", "konec prikola"];
  146. const main = function(){
  147.  
  148.     var watermark = [
  149.         Cheat.GetUsername().length > 14 ? Cheat.GetUsername().substr(0,14) + "..." : Cheat.GetUsername(),
  150.         World.GetServerString()!= "" ? World.GetServerString() : "unknown",
  151.         Math.round(Local.Latency() * 1000 - 16).toString(),
  152.         Globals.Tickrate().toString()
  153.     ];
  154.  
  155.     const font = Render.GetFont("Verdana.ttf", 10, true);
  156.  
  157.     if(get_dropdown_value(getval("Windows"), 0)){
  158.         const active_binds = get_active_keybinds();
  159.         if(!(active_binds.length <= 0 && getval("Show windows only with information")))
  160.         render_container(300, 300, 150, 25, "Hotkey", getcol("Gradient color 1"), getcol("Gradient color 2"), font, active_binds, "on")
  161.     }
  162.  
  163.     if(get_dropdown_value(getval("Windows"), 1)){
  164.         const spectators = get_spectators();
  165.         if(!(spectators.length <= 0 && getval("Show windows only with information")))
  166.         render_container(300, 450, 200, 25, "Spectators", getcol("Gradient color 1"), getcol("Gradient color 2"), font, spectators, "watching")
  167.     }
  168.  
  169.     if(get_dropdown_value(getval("Windows"), 2))
  170.         render_container(300, 700, 200, 25, "onetap.com", getcol("Gradient color 1"), getcol("Gradient color 2"), font, watermark_custom, "", watermark)
  171.  
  172.     if(getval("Render test container"))
  173.         render_container(300, 100, 150, 25, "Test Container", getcol("Gradient color 1"), getcol("Gradient color 2"), font, for_test, "funny")
  174. }
  175. Cheat.RegisterCallback("Draw", "main");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement