Advertisement
Mister_Stefan

thereality.script (OT)

Jun 13th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UI.AddHotkey(["Config", "Scripts", "Keys", "JS Keybinds"], "Menu Key", "Menu")
  2. UI.AddSubTab(["Config", "SUBTAB_MGR"], "R3ality Check")
  3. UI.AddSliderInt(["Config", "R3ality Check", "R3ality Check"], "posx", 0, 10000)
  4. UI.AddSliderInt(["Config", "R3ality Check", "R3ality Check"], "posy", 0, 10000)
  5. UI.AddSliderInt(["Config", "R3ality Check", "R3ality Check"], "width", 0, 10000)
  6. UI.AddSliderInt(["Config", "R3ality Check", "R3ality Check"], "height", 0, 10000)
  7. UI.AddSliderInt(["Config", "R3ality Check", "R3ality Check"], "Antiaim", 0, 1)
  8. UI.AddSliderInt(["Config", "R3ality Check", "R3ality Check"], "tag", 0, 2)
  9. UI.AddCheckbox(["Config", "R3ality Check", "R3ality Check"], "Indicators")
  10. var posx = 100, posy = 100, width = 300, height = 300, font, textSize;
  11. var showMenu, dontSize, sizing, dontMove, moving, sizeOffsetFromCursor = [0,0], cursorPos = [0,0], moveOffsetFromCursor = [0,0], configLoaded = 0;
  12. var feature = [1,0,0,0,1], dontFeature = [0, 0, 0], clanmode = 0, jitter = false;
  13. var screen = Render.GetScreenSize();
  14.  
  15.  
  16.  
  17.  
  18. function loadConfig(){
  19.     if (configLoaded != 1 && UI.GetValue(["Config", "R3ality Check", "R3ality Check", "posx"]) > 0 && posx != UI.GetValue(["Config", "R3ality Check", "R3ality Check", "posx"]))
  20.     {
  21.  
  22.         posx = UI.GetValue(["Config", "R3ality Check", "R3ality Check", "posx"])
  23.         posy = UI.GetValue(["Config", "R3ality Check", "R3ality Check", "posy"])
  24.         width = UI.GetValue(["Config", "R3ality Check", "R3ality Check", "width"])
  25.         height = UI.GetValue(["Config", "R3ality Check", "R3ality Check", "height"])
  26.  
  27.  
  28.         //feature[0] = UI.GetValue(["Config", "R3ality Check", "R3ality Check", "Antiaim"])
  29.         //feature[1] = UI.GetValue(["Config", "R3ality Check", "R3ality Check", "tag"])
  30.         //feature[2] = UI.GetValue(["Config", "R3ality Check", "R3ality Check", "Indicators"])
  31.  
  32.  
  33.         configLoaded = 1;
  34.     }
  35. }
  36.  
  37. function drawMenu(){
  38.     loadConfig();
  39.    
  40.  
  41.  
  42.     UI.SetEnabled(["Config", "R3ality Check", "R3ality Check", "posx"], 0)
  43.     UI.SetEnabled(["Config", "R3ality Check", "R3ality Check", "posy"], 0)
  44.     UI.SetEnabled(["Config", "R3ality Check", "R3ality Check", "width"], 0)
  45.     UI.SetEnabled(["Config", "R3ality Check", "R3ality Check", "height"], 0)
  46.     UI.SetEnabled(["Config", "R3ality Check", "R3ality Check", "Antiaim"], 0)
  47.     UI.SetEnabled(["Config", "R3ality Check", "R3ality Check", "tag"], 0)
  48.     UI.SetEnabled(["Config", "R3ality Check", "R3ality Check", "Indicators"], 0)
  49.  
  50.    
  51.  
  52.     bigfont = Render.GetFont("Smallest_Pixel-7.ttf", 24,true)
  53.     font = Render.GetFont("Smallest_Pixel-7.ttf", 18,true)
  54.     textSize = Render.TextSize("R3ality Check", bigfont)
  55.  
  56.     if (!feature[4]){
  57.         showMenu = UI.GetValue(["Config", "Scripts", "Keys", "JS Keybinds", "Menu Key"])
  58.     } else if (UI.IsMenuOpen()){
  59.         showMenu = true;
  60.     } else {
  61.         showMenu = false;
  62.     }
  63.  
  64.     if (showMenu == true)
  65.     {
  66.         Input.ForceCursor(1);
  67.  
  68.         Render.FilledRect(posx, posy, width, height, [25,25,25,255])
  69.         Render.FilledRect(posx + 8, posy + 8, width - 16, height - 16, [50,50,50,255])
  70.         Render.FilledRect(posx + 9, posy + 9, width - 18, height - 17, [17,17,17,255])
  71.         Render.GradientRect(posx + 9, posy + 9, (width - 18) / 2, 3, 1, HSVtoRGB(Globals.Realtime()/2,1,1,255), HSVtoRGB(Globals.Realtime()/2 + 0.2,1,1,255))
  72.         Render.GradientRect(posx + 9 + (width - 18) / 2, posy + 9, (width - 18) / 2, 3, 1, HSVtoRGB(Globals.Realtime()/2 + 0.2,1,1,255), HSVtoRGB(Globals.Realtime()/2 + 0.4,1,1,255))
  73.         Render.Line(posx + 3, posy + 3, posx + width - 5, posy + 3, [75,75,75,255])
  74.         Render.Line(posx + width - 12, posy + height - 3, posx + width - 3, posy + height - 12, [150,150,150,255])
  75.         Render.Line(posx + width - 8, posy + height - 3, posx + width - 3, posy + height - 8, [150,150,150,255])
  76.         Render.Line(posx + width - 4, posy + height - 3, posx + width - 3, posy + height - 4, [150,150,150,255])
  77.  
  78.         Render.Rect(posx + width / 8, posy + height / 10 + textSize[1] / 2, width - width / 8 * 2, height - height / 10 * 2 - textSize[1] / 2, [200,200,200,255])
  79.        
  80.         Render.FilledRect(posx + width / 5 - 10, posy + height / 10, textSize[0] + 20, textSize[1], [17,17,17,255])
  81.         Render.String(posx + width / 5, posy + height / 10, 0, "R3ality Check", [200,200,200,255], bigfont)
  82.  
  83.         if (feature[0] == true){
  84.             Render.GradientRect(posx + width / 6, posy + height / 4, 10, 10, 0, [150,230,50,255], [90,110,30,255])
  85.         } else {
  86.             Render.GradientRect(posx + width / 6, posy + height / 4, 10, 10, 0, [50,50,50,255], [25,25,25,255])
  87.         }
  88.         Render.String(posx + width / 6 + 20, posy + height / 4 - 5, 0, "AntiAim", [200,200,200,255], font)
  89.  
  90.         if (feature[1] == true){
  91.             Render.GradientRect(posx + width / 6, posy + height / 4 + 30, 10, 10, 0, [150,230,50,255], [90,110,30,255])
  92.         } else {
  93.             Render.GradientRect(posx + width / 6, posy + height / 4 + 30, 10, 10, 0, [50,50,50,255], [25,25,25,255])
  94.  
  95.         }
  96.         Render.String(posx + width / 6 + 20, posy + height / 4 - 5 + 30, 0, "Clantag", [200,200,200,255], font)
  97.        
  98.         if (feature[2] == true){
  99.             Render.GradientRect(posx + width / 6, posy + height / 4 + 60, 10, 10, 0, [150,230,50,255], [90,110,30,255])
  100.         } else {
  101.             Render.GradientRect(posx + width / 6, posy + height / 4 + 60, 10, 10, 0, [50,50,50,255], [25,25,25,255])
  102.  
  103.         }
  104.         Render.String(posx + width / 6 + 20, posy + height / 4 - 5 + 60, 0, "Indicators", [200,200,200,255], font)
  105.  
  106.         if (feature[3] == true){
  107.             Render.GradientRect(posx + width / 6, posy + height / 4 + 90, 10, 10, 0, [150,230,50,255], [90,110,30,255])
  108.         } else {
  109.             Render.GradientRect(posx + width / 6, posy + height / 4 + 90, 10, 10, 0, [50,50,50,255], [25,25,25,255])
  110.  
  111.         }
  112.         Render.String(posx + width / 6 + 20, posy + height / 4 - 5 + 90, 0, "Circle Names", [200,200,200,255], font)
  113.        
  114.         if (feature[4] == true){
  115.             Render.GradientRect(posx + width / 6, posy + height / 4 + 120, 10, 10, 0, [150,230,50,255], [90,110,30,255])
  116.         } else {
  117.             Render.GradientRect(posx + width / 6, posy + height / 4 + 120, 10, 10, 0, [50,50,50,255], [25,25,25,255])
  118.  
  119.         }
  120.         Render.String(posx + width / 6 + 20, posy + height / 4 - 5 + 120, 0, "Open With Menu", [200,200,200,255], font)
  121.  
  122.  
  123.         for (i in feature){
  124.             if (!Input.IsKeyPressed(0x01))
  125.             {
  126.                 dontFeature[i] = false;
  127.             }
  128.             if (cursorPos[0] < posx + width / 6
  129.                 || cursorPos[1] < posy + height / 4 + 30 * i
  130.                 || cursorPos[0] > posx + width / 6 + 10
  131.                 || cursorPos[1] > posy + height / 4 + 10 + 30 * i)
  132.             {  
  133.                 if (Input.IsKeyPressed(0x01))
  134.                 {
  135.                     dontFeature[i] = true;
  136.                 }
  137.             }
  138.             if (!dontFeature[i]){
  139.                 if (cursorPos[0] > posx + width / 6
  140.                     && cursorPos[1] > posy + height / 4 + 30 * i
  141.                     && cursorPos[0] < posx + width / 6 + 10
  142.                     && cursorPos[1] < posy + height / 4 + 10 + 30 * i
  143.                     && Input.IsKeyPressed(0x01))
  144.                 {
  145.                     feature[i] = !feature[i];
  146.                     dontFeature[i] = true;
  147.                 }
  148.             }
  149.         }
  150.  
  151.  
  152.  
  153.     } else {
  154.         Input.ForceCursor(0);
  155.     }
  156.  
  157. }
  158. Cheat.RegisterCallback("Draw", "drawMenu");
  159.  
  160. function Indicators(){
  161.     if (!feature[2]) return;
  162.  
  163.     var desyncSize = Math.abs(Math.round(Math.abs(Local.GetFakeYaw()) - Math.abs(Local.GetRealYaw())))
  164.     Render.GradientRect(screen[0]/2, screen[1]/2 + screen[1]/20, desyncSize, 10, 1, HSVtoRGB(Globals.Tickcount()/250, 1, 1, 255), HSVtoRGB(Globals.Tickcount()/250, 1, 1, 0))
  165.     Render.GradientRect(screen[0]/2 - desyncSize, screen[1]/2 + screen[1]/20, desyncSize, 10, 1, HSVtoRGB(Globals.Tickcount()/250, 1, 1, 0), HSVtoRGB(Globals.Tickcount()/250, 1, 1, 255))
  166.    
  167.     Render.String(screen[0]/2, screen[1]/2 + screen[1]/30, 1, desyncSize.toString() + "*", [255,255,255,255], bigfont)
  168. }
  169. Cheat.RegisterCallback("Draw", "Indicators");
  170.  
  171. function moveMenu(){
  172.     cursorPos = Input.GetCursorPosition();
  173.     if (!Input.IsKeyPressed(0x01))
  174.     {
  175.         dontMove = false;
  176.         moving = false;
  177.     }
  178.     if (!moving){
  179.         moveOffsetFromCursor[0] = posx - cursorPos[0]
  180.         moveOffsetFromCursor[1] = posy - cursorPos[1]
  181.         if (cursorPos[0] < posx - 1
  182.             || cursorPos[1] < posy - 1
  183.             || cursorPos[0] > posx + width + 1
  184.             || cursorPos[1] > posy + 10)
  185.         {  
  186.             if (Input.IsKeyPressed(0x01))
  187.             {
  188.                 dontMove = true;
  189.             }
  190.  
  191.         }
  192.     }
  193.     if (!dontMove){
  194.         if (cursorPos[0] > posx - 1
  195.             && cursorPos[1] > posy - 1
  196.             && cursorPos[0] < posx + width + 1
  197.             && cursorPos[1] < posy + 10
  198.             && Input.IsKeyPressed(0x01))
  199.         {
  200.             moving = true;
  201.         }
  202.     }
  203.     if (moving)
  204.     {
  205.         posx = cursorPos[0] + moveOffsetFromCursor[0];
  206.         posy = cursorPos[1] + moveOffsetFromCursor[1];
  207.         UI.SetValue(["Config", "R3ality Check", "R3ality Check", "posx"], posx)
  208.         UI.SetValue(["Config", "R3ality Check", "R3ality Check", "posy"], posy)
  209.     }
  210. }
  211.  
  212. Cheat.RegisterCallback("Draw", "moveMenu");
  213.  
  214. function sizeMenu(){
  215.     cursorPos = Input.GetCursorPosition();
  216.  
  217.     if (!Input.IsKeyPressed(0x01))
  218.     {
  219.         dontSize = false;
  220.         sizing = false;
  221.     }
  222.  
  223.     if (!sizing){
  224.  
  225.         sizeOffsetFromCursor[0] = width - cursorPos[0]
  226.         sizeOffsetFromCursor[1] = height - cursorPos[1]
  227.  
  228.    
  229.         if (cursorPos[0] < posx + width - 14
  230.             || cursorPos[1] < posy + height - 14
  231.             || cursorPos[1] > posy + height + 1
  232.             || cursorPos[0] > posx + width + 1)
  233.         {  
  234.             if (Input.IsKeyPressed(0x01))
  235.             {
  236.                 dontSize = true;
  237.             }
  238.  
  239.         }
  240.        
  241.     }
  242.    
  243.    
  244.  
  245.  
  246.     if (!dontSize){
  247.         if (cursorPos[0] > posx + width - 14
  248.             && cursorPos[1] > posy + height - 14
  249.             && cursorPos[1] < posy + height + 1
  250.             && cursorPos[0] < posx + width + 1
  251.             && Input.IsKeyPressed(0x01))
  252.         {
  253.             sizing = true;
  254.            
  255.         }
  256.     }
  257.  
  258.    
  259.  
  260.     if (sizing)
  261.     {
  262.  
  263.         if (cursorPos[0] + sizeOffsetFromCursor[0] >= 250){
  264.             width = cursorPos[0] + sizeOffsetFromCursor[0];
  265.         } else {
  266.             width = 250
  267.         }
  268.         if (cursorPos[1] + sizeOffsetFromCursor[1] >= 250){
  269.             height = cursorPos[1] + sizeOffsetFromCursor[1];
  270.         } else {
  271.             height = 250;
  272.         }
  273.         UI.SetValue(["Config", "R3ality Check", "R3ality Check", "width"], width)
  274.         UI.SetValue(["Config", "R3ality Check", "R3ality Check", "height"], height)
  275.  
  276.  
  277.     }
  278.  
  279. }
  280.  
  281. Cheat.RegisterCallback("Draw", "sizeMenu");
  282.  
  283. function HSVtoRGB(h, s, v, a) {
  284.     var r, g, b, i, f, p, q, t;
  285.     if (arguments.length === 1) {
  286.         s = h.s, v = h.v, h = h.h;
  287.     }
  288.     i = Math.floor(h * 6);
  289.     f = h * 6 - i;
  290.     p = v * (1 - s);
  291.     q = v * (1 - f * s);
  292.     t = v * (1 - (1 - f) * s);
  293.     switch (i % 6) {
  294.         case 0: r = v, g = t, b = p; break;
  295.         case 1: r = q, g = v, b = p; break;
  296.         case 2: r = p, g = v, b = t; break;
  297.         case 3: r = p, g = q, b = v; break;
  298.         case 4: r = t, g = p, b = v; break;
  299.         case 5: r = v, g = p, b = q; break;
  300.     }
  301.     var color = [Math.round(r * 255),Math.round(g * 255),Math.round(b * 255), a]
  302.     return color;
  303. }
  304.  
  305. function wtrMark(){
  306.     var wtrfont = Render.GetFont("Smallest_pixel-7.ttf", 24, true);
  307.     if (!wtrfont) return;
  308.  
  309.  
  310.     var wtrsize = [0,0];
  311.    
  312.     fontFound = 1;
  313.     var wtrsize1 = Render.TextSize("R", wtrfont)
  314.     var wtrsize2 = Render.TextSize("3", wtrfont)
  315.     var wtrsize3 = Render.TextSize("ality Check.", wtrfont)
  316.     var wtrsize4 = Render.TextSize("JS", wtrfont)
  317.     wtrsize[0] = wtrsize1[0] + wtrsize2[0] + wtrsize3[0] + wtrsize4[0];
  318.     wtrsize[1] = wtrsize1[1] + wtrsize2[1] + wtrsize3[1] + wtrsize4[1];
  319.  
  320.     Render.GradientRect(0,0,wtrsize[0] + 20,wtrsize1[1],1,[0,0,0,255],[0,0,0,0]);
  321.     Render.String(5,0,0,"R",[255,255,255,255], wtrfont)
  322.     Render.String(5 + wtrsize1[0],0,0,"3",[255,0,255,255], wtrfont)
  323.     Render.String(5 + wtrsize1[0] + wtrsize2[0],0,0,"ality Check.",[255,255,255,255], wtrfont)
  324.     Render.String(5 + wtrsize1[0] + wtrsize2[0] + wtrsize3[0],0,0,"JS",[255,0,255,255], wtrfont)
  325.  
  326. }
  327. Cheat.RegisterCallback("Draw", "wtrMark");
  328.  
  329. var real, fake, lby, oldtick = 0, flipper = 0, aa = [], decay, oldflipper, onceflipper = false;
  330. function r3Yaw(){
  331.     var onceaa = 0;  
  332.     if (!feature[0]){
  333.         UI.SetValue(["Config", "R3ality Check", "R3ality Check", "Antiaim"], 0)
  334.         if (!onceaa){
  335.             AntiAim.SetOverride(0);
  336.             onceaa = 1;
  337.             onceflipper = false;
  338.         }
  339.  
  340.         return;
  341.     } else if (feature[0]){
  342.         if (!onceflipper){
  343.             flipper = 0;
  344.         }
  345.         onceflipper = true;
  346.         onceaa = 0;
  347.         UI.SetValue(["Config", "R3ality Check", "R3ality Check", "Antiaim"], 1)  
  348.         AntiAim.SetOverride(1);
  349.        
  350.     }
  351.    
  352.  
  353.    
  354.     if (oldtick > Globals.Tickcount()) return;
  355.     oldtick = Globals.Tickcount() + 3;
  356.  
  357.     decay -= 1;
  358.  
  359.     if (decay < 1){
  360.         flipper = 0;
  361.     }
  362.  
  363.  
  364.  
  365.     switch (flipper){
  366.         case 0:
  367.             aa = [-15, 10, -90];
  368.             decay = 51;
  369.             break;
  370.         case 1:
  371.             aa = [-20, -10, 90];
  372.             break;
  373.         case 2:
  374.             aa = [20, 10, -90];
  375.             break;
  376.         case 3:
  377.             aa = [30, -30, 90];
  378.             break;
  379.         default:
  380.             break;
  381.     }
  382.  
  383.  
  384.     AntiAim.SetFakeOffset(aa[1]);
  385.     AntiAim.SetRealOffset(aa[0]);
  386.     AntiAim.SetLBYOffset(aa[2]);
  387.  
  388. }
  389. Cheat.RegisterCallback("CreateMove", "r3Yaw");
  390.  
  391. function doFlip() {
  392.     flipper += 1;
  393.     flipper %= 4;
  394. }
  395. Cheat.RegisterCallback("bullet_impact", "doFlip");
  396.  
  397. function unloadAA(){
  398.     AntiAim.SetOverride(0);
  399. }
  400. Cheat.RegisterCallback("Unload", "unloadAA");
  401.  
  402.  
  403. var str = ['R3ality Check\n', 'R3ality Check\n',
  404. '♛ . ♛\n',
  405. "♛ ' ♛\n",
  406. '♛ . ♛\n',
  407. "♛ ' ♛\n",
  408. '♛ . ♛\n',
  409. "♛ ' ♛\n",
  410. '♛ T ♛\n',
  411. '♛ Th ♛\n',
  412. '♛ Th3 ♛\n',
  413. '♛ Th3R ♛\n',
  414. '♛ Th3R3 ♛\n',
  415. '♛ Th3R3a ♛\n',
  416. '♛ h3R3al ♛\n',
  417. '♛ 3R3ali ♛\n',
  418. '♛ R3alit ♛\n',
  419. '♛ 3ality ♛\n',
  420. '♛ ality# ♛\n',
  421. '♛ lity#0 ♛\n',
  422. '♛ ity#00 ♛\n',
  423. '♛ ty#000 ♛\n',
  424. '♛ y#0001 ♛\n',
  425. '♛ #0001 ♛\n',
  426. '♛ #0001 ♛\n',
  427. '♛ #0001 ♛\n',
  428. ];
  429. var currStr = 0;
  430. var once = false;
  431. function tag(){
  432.     if (feature[1]){
  433.         if (Globals.Tickcount() % Math.ceil(Globals.Tickrate()/4) == 0){
  434.             currStr = (currStr + 1) % str.length;
  435.             Local.SetClanTag(str[currStr].toString());
  436.             once = false;
  437.         }
  438.     } else {
  439.         if (!once){
  440.             Local.SetClanTag("");
  441.             once = true;
  442.         }
  443.     }
  444. }
  445. Cheat.RegisterCallback("CreateMove", "tag")
  446.  
  447.  
  448. var str, radius, distance, x1, y1, x2, y2, screen, playerName, enemyList, enemyAlive, eye2D = [0,0], eye3D = [0,0];
  449.  
  450.  
  451. function Circle_Names(){
  452.     if (!feature[3]) return;
  453.     var font = Render.GetFont("Comic.ttf", 18, true);
  454.     screen = Render.GetScreenSize();
  455.     x1 = screen[0] / 2;
  456.     y1 = screen[1] / 2;
  457.  
  458.     enemyAlive = [];
  459.     enemyList = [];
  460.  
  461.     enemyList = Entity.GetEnemies();
  462.     for (var i = 0; i < enemyList.length; i++){
  463.         if (!enemyList[i]) continue;
  464.         if (Entity.IsDormant( enemyList[i] )) continue;
  465.         if (!Entity.IsAlive(enemyList[i])) continue;
  466.  
  467.         if (Entity.IsBot(enemyList[i])){
  468.             str = "bot"
  469.         } else {
  470.             str = Entity.GetName(enemyList[i])
  471.         }
  472.  
  473.  
  474.  
  475.         eye3D = Entity.GetHitboxPosition(enemyList[i], 0);
  476.  
  477.         eye2D = Render.WorldToScreen(eye3D);
  478.  
  479.         if (eye2D[2] == 0) continue;
  480.  
  481.         x1 = eye2D[0];
  482.         y1 = eye2D[1];
  483.  
  484.        
  485.         str = str.split("");
  486.  
  487.         radius = 50;
  488.         angle = 360 / 16;
  489.  
  490.  
  491.  
  492.         for (var o = 0; o < str.length; o++){
  493.  
  494.             var realangle = Math.sin(Globals.Realtime()) + Globals.Realtime() - angle * o / 360 * 2 * Math.PI
  495.  
  496.             opposite = y1 + radius * Math.sin(realangle)
  497.             adjacent = x1 + radius * Math.cos(realangle)
  498.  
  499.             y2 = opposite;
  500.             x2 = adjacent;
  501.  
  502.             Render.String(x2, y2 - Render.TextSize(str[o], font)[1] / 2, 1, str[o], HSVtoRGB(Globals.Realtime()/2 - o/20,1,1,150), font)
  503.         }
  504.     }
  505. }
  506. Cheat.RegisterCallback("Draw", "Circle_Names")
  507.  
  508. function onUnload() {
  509.     Local.SetClanTag("\n");
  510.     Input.ForceCursor(0);
  511. }
  512. Cheat.RegisterCallback("Unload", "onUnload");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement