Advertisement
Mister_Stefan

Skeet Watermark (Onetap)

Feb 9th, 2021
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UI.AddSubTab(["Visuals", "SUBTAB_MGR"], "Skeet Watermark");
  2. UI.AddColorPicker(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Color 'tap'");
  3. UI.SetColor(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Color 'tap'"], [255, 255, 255, 255])
  4. UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Rainbow 'tap'");
  5. UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Mark_X", 0, Render.GetScreenSize()[0]);
  6. UI.AddSliderInt(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Mark_Y", 0, Render.GetScreenSize()[1]);
  7. UI.AddMultiDropdown(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Watermark", [ "Custom Text", "Fps", "Ping", "Kdr", "Time","Map name", "Tickrate", "Velocity", "Duck amount", "Enemies", "Server ip", "Forum username", "Time + seconds" ], -1);
  8.  
  9. UI.AddTextbox(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Custom text");
  10.  
  11. UI.AddCheckbox(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Watermark rainbow header");
  12. UI.AddSliderFloat(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark"], "Watermark Rainbow Speed", 0.01, 1.0);
  13.  
  14. UI.SetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Watermark Rainbow Speed"], 0.10)
  15. UI.SetEnabled(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Watermark Rainbow Speed"], 0);
  16.  
  17. var current_map;
  18.  
  19. function HSVtoRGB(h, s, v)
  20. {
  21.     var r, g, b, i, f, p, q, t;
  22.  
  23.     i = Math.floor(h * 6);
  24.     f = h * 6 - i;
  25.     p = v * (1 - s);
  26.     q = v * (1 - f * s);
  27.     t = v * (1 - (1 - f) * s);
  28.  
  29.     switch (i % 6)
  30.     {
  31.         case 0: r = v, g = t, b = p; break;
  32.         case 1: r = q, g = v, b = p; break;
  33.         case 2: r = p, g = v, b = t; break;
  34.         case 3: r = p, g = q, b = v; break;
  35.         case 4: r = t, g = p, b = v; break;
  36.         case 5: r = v, g = p, b = q; break;
  37.     }
  38.  
  39.     return { r: Math.round(r * 255), g: Math.round(g * 255), b: Math.round(b * 255) };
  40. }
  41.  
  42. var get = {
  43.     state(state) {
  44.         return UI.GetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", state]);
  45.     },
  46.     string(string) {
  47.         return UI.GetString(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", string]);
  48.     }
  49. }
  50.  
  51. function getVelocity(index)
  52. {
  53.     players = Entity.GetPlayers();
  54.     for (i=0; i < players.length; i++);
  55.     {
  56.         var velocity = Entity.GetProp( index, "CBasePlayer", "m_vecVelocity[0]" );
  57.         var speed = Math.sqrt( velocity[0] * velocity[0] + velocity[1] * velocity[1] );
  58.     }
  59.    
  60.     return speed;
  61. }
  62.  
  63. function watermark() {
  64.     var settings = UI.GetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Watermark"]);
  65.  
  66.     const ping = Math.floor(Global.Latency() * 1000 / 1.5);
  67.     var colors = HSVtoRGB(Global.Realtime() * UI.GetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Watermark Rainbow Speed"]), 1, 1);
  68.     current_map = World.GetMapName();
  69.  
  70.     var screensize = Render.GetScreenSize();
  71.     var today = new Date();
  72.     var hours1 = today.getHours();
  73.     var minutes1 = today.getMinutes();
  74.     var seconds1 = today.getSeconds();
  75.     var hours = hours1 <= 9 ? "0" + today.getHours() + ":" : today.getHours()+ ":";
  76.     var minutes = minutes1 <= 9 ? "0" + today.getMinutes() + "" : today.getMinutes();
  77.     var seconds = seconds1 <= 9 ? "0" + today.getSeconds() : today.getSeconds();
  78.  
  79.     var rate = 1 / Globals.Tickrate()
  80.     var tickrate = Math.floor(rate)
  81.  
  82.     const server = World.GetServerString();
  83.     const usernamea = Cheat.GetUsername();
  84.  
  85.     localEnt = Entity.GetLocalPlayer();
  86.  
  87.     const fps = Math.floor( 1 / Global.Frametime() );
  88.  
  89.     var tickrate = Global.Tickrate()
  90.     var ip = World.GetServerString();
  91.  
  92.     var velocity = Math.round(getVelocity(localEnt));
  93.     var velstr = velocity.toString();
  94.  
  95.     color4 = UI.GetColor(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Color 'tap'"])
  96.  
  97.     var get_kills = Entity.GetProp(localEnt, "CPlayerResource", "m_iKills");
  98.     var get_deaths = Entity.GetProp(localEnt, "CPlayerResource", "m_iDeaths");
  99.     var get_kd = get_kills/get_deaths
  100.     if (Entity.GetProp(localEnt, "CPlayerResource", "m_iDeaths") != 0) {
  101.         var unfixed = Entity.GetProp(localEnt, "CPlayerResource", "m_iKills") / Entity.GetProp(localEnt, "CPlayerResource", "m_iDeaths");
  102.         var get_kd = unfixed.toFixed(2)
  103.     }
  104.     else {
  105.         get_kd = get_kills
  106.     }
  107.  
  108.     duckAmount = Entity.GetProp(localEnt, "CBasePlayer", "m_flDuckAmount");
  109.     duckAmountStr =Math.abs(duckAmount.toString()).toFixed(1);
  110.     if (Math.abs(duckAmount.toString()).length > 4) duckAmountStr = Math.abs(duckAmount.toString()).toFixed(1);
  111.  
  112.     enemies = Entity.GetEnemies();
  113.     enemyCount = enemies.length;
  114.     enemyCountStr = enemyCount.toString();
  115.  
  116.     var one = "ske"
  117.     var tap = "et"
  118.  
  119.     var text = ( one+"   ");
  120.     var text1 = ("  "+tap);
  121.  
  122.     if (settings & (1 << 0))
  123.     {
  124.          text  += (" | " +get.string("Custom text"));
  125.     }
  126.  
  127.     if (settings & (1 << 11))
  128.     {
  129.          text  += (" | " +usernamea);
  130.     }
  131.  
  132.     if (settings & (1 << 1))
  133.     {
  134.          text  += ( " | "+fps+ " fps");
  135.     }
  136.  
  137.     if (settings & (1 << 2))
  138.     {
  139.          text  += (" | " +ping+"ms ");
  140.     }
  141.  
  142.     if (settings & (1 << 5))
  143.     {
  144.          text  += (" | " +current_map+"");
  145.     }
  146.  
  147.     if (settings & (1 << 6))
  148.     {
  149.          text  += (" | delay: " +tickrate+" ");
  150.     }
  151.  
  152.     if (settings & (1 << 7))
  153.     {
  154.          text  += (" | speed: " +velstr+"");
  155.     }
  156.  
  157.     if (settings & (1 << 10))
  158.     {
  159.          text  += (" | server ip: " +server+"");
  160.     }
  161.  
  162.     if (settings & (1 << 8))
  163.     {
  164.          text  += (" | duck amount: " +duckAmountStr+"");
  165.     }
  166.  
  167.     if (settings & (1 << 9))
  168.     {
  169.          text  += (" | enemies: " +enemyCountStr+"");
  170.     }
  171.  
  172.     if (settings & (1 << 3))
  173.     {
  174.          text  += (" | "+get_kd+ " kdr ");
  175.     }
  176.  
  177.     if (settings & (1 << 4))
  178.     {
  179.          text  += ( "| "+hours + minutes);
  180.     }
  181.  
  182.     if (settings & (1 << 12))
  183.     {
  184.          text  += ( "| "+ hours + minutes + ":" + seconds);
  185.     }
  186.  
  187.     var font = Render.GetFont( "Verdana.ttf", 10, true);
  188.  
  189.     var h = 18;
  190.     var w = Render.TextSize(text, font)[0] + 8;
  191.     var w1 = Render.TextSize(text1, font)[0] + 8;
  192.     var x = UI.GetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Mark_X"]);
  193.     var y = UI.GetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Mark_Y"]);
  194.     x = x - w - 10;
  195.  
  196.     UI.SetEnabled(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Mark_X"], 1)
  197.     UI.SetEnabled(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Mark_Y"], 1)
  198.     Render.FilledRect(x - 6, y - 6, w + 13, h + 14, [0, 0, 0, 255]);
  199.     Render.FilledRect(x - 5, y - 5, w + 11, h + 12, [34, 34, 34, 255]);
  200.     Render.FilledRect(x + 1, y, w, h + 1, [0, 0, 0, 255]);
  201.     Render.Rect(x - 1, y - 1, w + 3, h + 3, [56, 56, 56, 255]);
  202.     Render.Rect(x - 5, y - 5, w + 11, h + 12, [56, 56, 56, 255]);
  203.  
  204.     Render.GradientRect(x + 2, y + 2, (w / 2)-1, 1, 1, [ 59, 175, 222, 255], [202, 70, 205, 255]);
  205.     Render.GradientRect(x + 1 + (w / 2), y + 2, (w / 2)-2, 1, 1, [202, 70, 205, 255], [201, 227, 58, 255]);
  206.     Render.GradientRect(x + 2, y + 3, (w / 2)-1, 1, 1, [ 59, 175, 222, 130], [202, 70, 205, 130]);
  207.     Render.GradientRect(x + 1 + (w / 2), y + 3, (w / 2)-2, 1, 1, [202, 70, 205, 130], [201, 227, 58, 130]);
  208.  
  209.     Render.String( x + 4, y + 5, 0, text, [0,0,0,180], font);
  210.     Render.String( x + 4, y + 4, 0, text, [255,255,255,255], font);
  211.  
  212.     Render.String( x + 16, y + 5, 0, text1, [0,0,0,180], font);
  213.  
  214.     if (UI.GetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Rainbow 'tap'"]) == 1)
  215.     {
  216.         Render.String( x + 14, y + 4, 0, text1, [colors.r, colors.g, colors.b, 255], font);
  217.     } else  {
  218.         Render.String( x + 14, y + 4, 0, text1, [color4[0], color4[1], color4[2], 255], font);
  219.     }
  220.  
  221.     if (UI.GetValue(["Visuals", "SUBTAB_MGR", "Skeet Watermark", "SHEET_MGR", "Skeet Watermark", "Watermark rainbow header"]) == 1)
  222.     {
  223.         Render.GradientRect(x + 2, y + 2, (w / 2)-1, 1, 1, [colors.g, colors.b, colors.r, 255], [colors.r, colors.g, colors.b, 255]);
  224.         Render.GradientRect(x + 1 + (w / 2), y + 2, (w / 2)-2, 1, 1, [colors.r, colors.g, colors.b, 255], [colors.b, colors.r, colors.g, 255]);
  225.         Render.GradientRect(x + 2, y + 3, (w / 2)-1, 1, 1, [colors.g, colors.b, colors.r, 130], [colors.r, colors.g, colors.b, 130]);
  226.         Render.GradientRect(x + 1 + (w / 2), y + 3, (w / 2)-2, 1, 1, [colors.r, colors.g, colors.b, 130], [colors.b, colors.r, colors.g, 130]);
  227.     }
  228.  
  229.  
  230. }
  231. Cheat.RegisterCallback( "Draw", "watermark")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement