Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.66 KB | None | 0 0
  1. local client, ui, client_set_event_callback, client_get_cvar, client_draw_indicator, client_draw_text, client_screensize = client, ui, client.set_event_callback, client.get_cvar, client.draw_indicator, client.draw_text, client.screen_size
  2. local ui_get, ui_set, ui_ref = ui.get, ui.set, ui.reference
  3. local entity_get_local_player, entity_get_prop, entity_is_alive = entity.get_local_player, entity.get_prop, entity.is_alive
  4.  
  5. -- Anti-aim references
  6. local pitch = ui_ref("AA", "Anti-aimbot angles", "Pitch")
  7. local base = ui_ref("AA", "Anti-aimbot angles", "Yaw base")
  8. local yaw, yaw_slider = ui_ref("AA", "Anti-aimbot angles", "Yaw")
  9. local yawjitter, yawjitter_slider = ui_ref("AA", "Anti-aimbot angles", "Yaw jitter")
  10. local bodyyaw, bodyyaw_slider = ui_ref("AA", "Anti-aimbot angles", "Body yaw")
  11. local limit = ui_ref("AA", "Anti-aimbot angles", "Fake yaw limit")
  12. local edgeyaw = ui_ref("AA", "Anti-aimbot angles", "Edge yaw")
  13. local freestanding = ui_ref("AA", "Anti-aimbot angles", "Freestanding")
  14. local lby = ui_ref("AA", "Anti-aimbot angles", "Lower body yaw")
  15.  
  16. -- New UI elements
  17. local desync = ui.new_checkbox("AA", "Anti-aimbot angles", "Manual Desync")
  18. local color = ui.new_color_picker("AA", "Anti-aimbot angles", "Arrow color", 124, 195, 13, 220)
  19. local desyncstyle = ui.new_combobox("AA", "Anti-aimbot angles", "Manual desync style", "Off", "superiorStatic", "superiorLegit")
  20. local desynckey1 = ui.new_hotkey("AA", "Anti-aimbot angles", "Swap hotkey")
  21. local ind = ui.new_combobox("AA", "Anti-aimbot angles", "Anti-aim angle indicator", "Off", "Text", "Arrows", "Text & Arrows")
  22. local isLeft, isRight = false
  23. -- End of local variables
  24.  
  25. local function aadir()
  26. isLeft = ui_get(desynckey1)
  27. isRight = not isLeft
  28. end
  29.  
  30. local function left()
  31. if ui_get(desyncstyle) == "superiorStatic" then
  32. ui_set(pitch, "Default")
  33. ui_set(base, "At Targets")
  34. ui_set(yaw, "180")
  35. ui_set(yaw_slider, "-20")
  36. ui_set(yawjitter, "Offset")
  37. ui_set(yawjitter_slider, "0")
  38. ui_set(bodyyaw, "Static")
  39. ui_set(bodyyaw_slider, "-180")
  40. ui_set(limit, "58")
  41. ui_set(edgeyaw, "Static")
  42. ui_set(freestanding, "Edge")
  43. ui_set(lby, false)
  44. else if ui_get(desyncstyle) == "superiorLegit" then
  45. ui_set(pitch, "Off")
  46. ui_set(base, "Local view")
  47. ui_set(yaw, "180")
  48. ui_set(yaw_slider, "180")
  49. ui_set(yawjitter, "Off")
  50. ui_set(yawjitter_slider, "0")
  51. ui_set(bodyyaw, "Static")
  52. ui_set(bodyyaw_slider, "-85")
  53. ui_set(limit, "58")
  54. ui_set(edgeyaw, "Off")
  55. ui_set(freestanding, "-")
  56. ui_set(lby, false)
  57. end
  58. end
  59. end
  60.  
  61. local function right()
  62. if ui_get(desyncstyle) == "superiorStatic" then
  63. ui_set(pitch, "Default")
  64. ui_set(base, "At Targets")
  65. ui_set(yaw, "180")
  66. ui_set(yaw_slider, "20")
  67. ui_set(yawjitter, "Offset")
  68. ui_set(yawjitter_slider, "0")
  69. ui_set(bodyyaw, "Static")
  70. ui_set(bodyyaw_slider, "180")
  71. ui_set(limit, "58")
  72. ui_set(edgeyaw, "Static")
  73. ui_set(freestanding, "Edge")
  74. ui_set(lby, false)
  75. else if ui_get(desyncstyle) == "superiorLegit" then
  76. ui_set(pitch, "Off")
  77. ui_set(base, "Local view")
  78. ui_set(yaw, "180")
  79. ui_set(yaw_slider, "-180")
  80. ui_set(yawjitter, "Off")
  81. ui_set(yawjitter_slider, "0")
  82. ui_set(bodyyaw, "Static")
  83. ui_set(bodyyaw_slider, "85")
  84. ui_set(limit, "58")
  85. ui_set(edgeyaw, "Off")
  86. ui_set(lby, false)
  87. end
  88. end
  89. end
  90.  
  91. local function on_paint(c)
  92. if not ui_get(desync) then
  93. return
  94. end
  95.  
  96. local local_player = entity_get_local_player()
  97. if local_player == nil or entity_get_prop(local_player, "m_lifeState") ~= 0 then
  98. return
  99. end
  100.  
  101. local scrsize_x, scrsize_y = client_screensize()
  102. local center_x, center_y = scrsize_x / 2, scrsize_y / 2
  103. local indcombo = ui_get(ind)
  104.  
  105. if indcombo == "Text" then
  106. else if indcombo == "Arrows" then
  107. client_draw_text(c, center_x - 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬖")
  108. client_draw_text(c, center_x + 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬗")
  109. else if indcombo == "Text & Arrows" then
  110. client_draw_text(c, center_x - 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬖")
  111. client_draw_text(c, center_x + 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬗")
  112. end
  113. end
  114. end
  115.  
  116. local ind_r, ind_g, ind_b, ind_a = ui_get(color)
  117. aadir()
  118.  
  119. if isLeft then
  120. left()
  121. if indcombo == "Text" then
  122. client_draw_indicator(ctx, 124, 195, 13, 237, "LEFT")
  123. else if indcombo == "Arrows" then
  124. client_draw_text(c, center_x - 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬖")
  125. else if indcombo == "Text & Arrows" then
  126. client_draw_indicator(ctx, 124, 195, 13, 237, "LEFT")
  127. client_draw_text(c, center_x - 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬖")
  128. end
  129. end
  130. end
  131. elseif isRight then
  132. right()
  133. if indcombo == "Text" then
  134. client_draw_indicator(ctx, 124, 195, 13, 237, "RIGHT")
  135. else if indcombo == "Arrows" then
  136. client_draw_text(c, center_x + 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬗")
  137. else if indcombo == "Text & Arrows" then
  138. client_draw_indicator(ctx, 124, 195, 13, 237, "RIGHT")
  139. client_draw_text(c, center_x + 40, center_y, ind_r, ind_g, ind_b, ind_a, "c+", 0, "⬗")
  140. end
  141. end
  142. end
  143. end
  144. end
  145. client_set_event_callback("paint", on_paint)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement