Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UI.AddSubTab(["Visuals", "SUBTAB_MGR"], "Keybinds indicators");
- UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],">>- Indicators -<<", 0, 0);
- UI.AddMultiDropdown(["Visuals","Keybinds indicators","Keybinds indicators"], "Windows", [ "Hotkeys", "Spectator list", "Watermark" ] );
- UI.AddCheckbox(["Visuals","Keybinds indicators","Keybinds indicators"],"Show windows only with information");
- UI.AddColorPicker(["Visuals","Keybinds indicators","Keybinds indicators"],"Gradient color 1");
- UI.AddColorPicker(["Visuals","Keybinds indicators","Keybinds indicators"],"Gradient color 2");
- UI.AddCheckbox(["Visuals","Keybinds indicators","Keybinds indicators"],"Render test container");
- var keybinds = [];
- keybinds.push({path: [["Rage", "Exploits", "Keys", "Key assignment", "Hide shots"]], name: "Hide-shots"});
- keybinds.push({path: [["Rage", "Exploits", "Keys", "Key assignment", "Double tap"]], name: "Double-tap"});
- keybinds.push({path: [["Rage", "General", "General", "Key assignment",'Force body aim']], name: "Body-aim"});
- keybinds.push({path: [["Rage", "Anti Aim", "General", "Key assignment", "AA Direction inverter"]], name: "Angle Inverter"});
- keybinds.push({path: [["Rage", "General", "General", "Key assignment","Force safe point"]], name: "Force Safepoint"});
- keybinds.push({path: [["Misc.", "Keys", "General", "Key assignment", "Auto peek"]], name: "Auto Peek"});
- keybinds.push({path: [["Rage", "Anti Aim", "General", "Key assignment", "Slow walk"]], name: "Slow Walk"});
- keybinds.push({path: [["Rage", "Anti Aim", "General", "Key assignment", "Fake duck"]], name: "Fake Duck"});
- const print = function(text, color){
- if(color == undefined)
- Cheat.Print(text.toString() + "\n");
- else
- Cheat.PrintColor(color, text.toString() + "\n");
- }
- const getval = function(name){
- return UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators", name]);
- }
- const setval = function(name, value){
- return UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators", name], value);
- }
- const getcol = function(name){
- return UI.GetColor(["Visuals","Keybinds indicators","Keybinds indicators", name]);
- }
- const get_active_keybinds = function(){
- var ret = [];
- for(var i in keybinds){
- if(UI.GetValue.apply(null,keybinds[i].path))
- ret.push(keybinds[i].name);
- }
- return ret;
- }
- const get_spectators = function()
- {
- const players = Entity.GetPlayers();
- var spectators = [];
- for (var i = 0; i < players.length; i++)
- {
- const m_hObserverTarget = Entity.GetProp(players[i], "CBasePlayer", "m_hObserverTarget");
- if (m_hObserverTarget !== "m_hObserverTarget") {
- if (m_hObserverTarget === Entity.GetLocalPlayer())
- {
- const name = Entity.GetName(players[i]);
- spectators.push(name.length >= 22 ? name.substr(0, 20) + "..." : name);
- }
- }
- }
- return spectators;
- }
- const point_in_rect = function(pos, min, max, debug) {
- if(debug) {
- if(pos[0] > min[0] && pos[1] > min[1] && pos[0] < max[0] && pos[1] < max[1])
- Render.Rect(min[0], min[1], max[0] - min[0], max[1] - min[1], [0, 255, 0, 255])
- else Render.Rect(min[0], min[1], max[0] - min[0], max[1] - min[1], [255, 0, 0, 255])
- }
- return pos[0] > min[0]
- && pos[1] > min[1]
- && pos[0] < max[0]
- && pos[1] < max[1];
- }
- const get_dropdown_value = function(value, index)
- {
- const mask = 1 << index;
- return value & mask ? true : false;
- }
- Cheat.Print("\nLoaded ");
- Cheat.PrintColor([255,0,0,255], keybinds.length + " ");
- print("keybinds!\n");
- print("You may add yours by using:");
- Cheat.PrintColor([255,255,0,255], 'keybinds.push({path: ["Legit", "Triggerbot", "Enabled"], name: "Trigger bot"}); ');
- print("for example.");
- const screen_size = Global.GetScreenSize();
- function render_container(x1, y1, w, h, name, color1, color2, font, to_write, state, custom){
- if(!UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"])){
- UI.AddCheckbox(["Visuals","Keybinds indicators","Keybinds indicators"],name+" stored");
- UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_x", 1, screen_size[0]);
- UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_y", 1, screen_size[0]);
- UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_x_off", 1, screen_size[0]);
- UI.AddSliderInt(["Visuals","Keybinds indicators","Keybinds indicators"],name+"_y_off", 1, screen_size[0]);
- UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x"], x1);
- UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y"], y1);
- UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+" stored"], 0);
- UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x"], 0);
- UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y"], 0);
- UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x_off"], 0);
- UI.SetEnabled(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y_off"], 0);
- }
- const cursor_pos = Input.GetCursorPosition();
- if(UI.IsMenuOpen() && Input.IsKeyPressed(0x1)){
- 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])){
- if(UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored"]) == 0){
- UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name +"_x_off"], cursor_pos[0] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"]));
- UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name +"_y_off"], cursor_pos[1] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y"]));
- UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored",], 1);
- }
- UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_x"], cursor_pos[0] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x_off"]));
- UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name+"_y"], cursor_pos[1] - UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y_off"]));
- }
- } else if(UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored"])) UI.SetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + " stored"], 0);
- x = UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_x"]);
- y = UI.GetValue(["Visuals","Keybinds indicators","Keybinds indicators",name + "_y"]);
- Render.GradientRect(x, y, w, 2, 1, color1, color2);
- Render.GradientRect(x + 1, y + 2, w - 2, h, 0, [0,0,0,125], [0,0,0,0]);
- Render.String(x + 13, y + 6, 0, name, [255,255,255,255], font);
- Render.String(x + w - 27, y + 6, 0, "<", [255,255,255,255], font);
- Render.FilledCircle(x + w - 14, y + 12, 6, [20,20,20,100]);
- Render.String(x + w - 16, y + 5, 0, "x", [255,255,255,255], font);
- const text_size_state = Render.TextSize(state, font);
- for(var i in to_write){
- if(custom != null){
- const text_size_state = Render.TextSize(custom[i], font);
- state = custom[i];
- }
- Render.String(x + 10, y + 25 + (i * 13), 0, to_write[i], [255,255,255,255], font);
- Render.String(x + w - text_size_state[0] - 15, y + 25 + (i * 13), 0, "[" + state + "]", [255,255,255,255], font);
- }
- }
- const watermark_custom = ["user", "server", "latency", "tickrate"];
- const for_test = ["Idet negr", "vidit dom stoit", "konec prikola"];
- const main = function(){
- var watermark = [
- Cheat.GetUsername().length > 14 ? Cheat.GetUsername().substr(0,14) + "..." : Cheat.GetUsername(),
- World.GetServerString()!= "" ? World.GetServerString() : "unknown",
- Math.round(Local.Latency() * 1000 - 16).toString(),
- Globals.Tickrate().toString()
- ];
- const font = Render.GetFont("Verdana.ttf", 10, true);
- if(get_dropdown_value(getval("Windows"), 0)){
- const active_binds = get_active_keybinds();
- if(!(active_binds.length <= 0 && getval("Show windows only with information")))
- render_container(300, 300, 150, 25, "Hotkey", getcol("Gradient color 1"), getcol("Gradient color 2"), font, active_binds, "on")
- }
- if(get_dropdown_value(getval("Windows"), 1)){
- const spectators = get_spectators();
- if(!(spectators.length <= 0 && getval("Show windows only with information")))
- render_container(300, 450, 200, 25, "Spectators", getcol("Gradient color 1"), getcol("Gradient color 2"), font, spectators, "watching")
- }
- if(get_dropdown_value(getval("Windows"), 2))
- render_container(300, 700, 200, 25, "onetap.com", getcol("Gradient color 1"), getcol("Gradient color 2"), font, watermark_custom, "", watermark)
- if(getval("Render test container"))
- render_container(300, 100, 150, 25, "Test Container", getcol("Gradient color 1"), getcol("Gradient color 2"), font, for_test, "funny")
- }
- Cheat.RegisterCallback("Draw", "main");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement