Advertisement
Guest User

Untitled

a guest
Oct 10th, 2019
942
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.69 KB | None | 0 0
  1. -- remake lua by zel
  2. local engine_client = csgo.interface_handler:get_engine_client()
  3. local menu = fatality.menu
  4. local render = fatality.render
  5. local input = fatality.input
  6. local config = fatality.config
  7. local entity_list = csgo.interface_handler:get_entity_list()
  8. local global_vars = csgo.interface_handler:get_global_vars()
  9.  
  10. local stand_add_ref22 = menu:get_reference("RAGE", "ANTI-AIM", "Standing", "Add")
  11. local stand_add_ref = menu:get_reference("RAGE", "ANTI-AIM", "Standing", "Fake type", "Real around fake")
  12. local stand_dir_ref = menu:get_reference("RAGE", "ANTI-AIM", "Standing", "Fake amount")
  13. local move_add_ref22 = menu:get_reference("RAGE", "ANTI-AIM", "Moving", "Add")
  14. local move_add_ref = menu:get_reference("RAGE", "ANTI-AIM", "Moving", "Add")
  15. local move_dir_ref = menu:get_reference("RAGE", "ANTI-AIM", "Moving", "Fake amount")
  16.  
  17. -- added side for air
  18. local air_add_ref2 = menu:get_reference("RAGE", "ANTI-AIM", "Air", "Add")
  19. local air_add_amount_2 = menu:get_reference("RAGE", "ANTI-AIM", "Air", "Add")
  20. local air_dir_ref = menu:get_reference("RAGE", "ANTI-AIM", "Air", "Fake amount")
  21.  
  22. local size_item = config:add_item( "size_item", 18 )
  23. local size_slider = menu:add_slider( "Arrows size", "visuals", "misc", "local", size_item, 0, 23, 1 )
  24. local pos_item = config:add_item( "pos_item", 0 )
  25. local lise_slider = menu:add_slider( "Indicator", "rage", "aimbot", "misc" , pos_item, -1080, 0, 1 )
  26.  
  27.  
  28.  
  29.  
  30. local colour_item = config:add_item("C_colour_item", 19 ) -- 14
  31. local colour_slider = menu:add_slider("Arrows colour", "visuals", "misc", "local", colour_item, 0 , 20, 1)
  32.  
  33. local rainbow_item = config:add_item( "C_rainbow_item", 0 )
  34. local rainbow_item_checkbox = menu:add_checkbox( "Enable rainbow arrows", "visuals", "misc", "local", rainbow_item )
  35.  
  36. local darkmode_item = config:add_item( "C_darkmode_item", 1.0 )
  37. local darkmode_checkbox = menu:add_checkbox( "Enable dark mode for disabled arrows", "visuals", "misc", "local", darkmode_item )
  38.  
  39. local directindicator_item = config:add_item( "C_directindicator_item", 1.0 )
  40. local global_vars = csgo.interface_handler:get_global_vars( )
  41. local engine = csgo.interface_handler:get_engine_client( )
  42. local entity_list = csgo.interface_handler:get_entity_list( )
  43.  
  44.  
  45.  
  46. local side = false
  47. local side_2 = false
  48. local side_3 = false
  49. local switch_key = 0x58 -- SWITCH KEY BY DEFAULT ITS MAYBE "X" // CHANGE IT HERE https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
  50. local switch_held = false
  51. local subpos = 0
  52.  
  53.  
  54. -- draw arrows 1
  55. function draw_side_arrow(x, y, size, color, side)
  56. if(side) then
  57. for i = 0, (size - 1) do
  58. render:rect(x + i, y + (i / 2) + 1, 1, size - i, color)
  59. end
  60.  
  61. else
  62. for i = 0, (size - 1) do
  63. render:rect(x - i, y + (i / 2) + 1, 1, size - i, color)
  64. end
  65. end
  66. end
  67.  
  68.  
  69. -- draw arrows 2
  70. function draw_side_arrow_2(x, y, size_2, color, side_2)
  71. if(side_2) then
  72. for i = 0, (size_2 - 1) do
  73. render:rect(x + i, y + (i / 2) + 1, 1, size_2 - i, color)
  74. end
  75.  
  76. else
  77. for i = 0, (size_2 - 1) do
  78. render:rect(x - i, y + (i / 2) + 1, 1, size_2 - i, color)
  79. end
  80. end
  81. end
  82.  
  83. local forcebaim_item = config:add_item( "forcebaimindicator", 0 )
  84. local slidewalk_item = config:add_item( "slidewalkindicator", 0 )
  85. local silent_item = config:add_item( "silentindicator", 0 )
  86. local fake_item = config:add_item("fakeindicator", 0 )
  87. local choke_item = config:add_item("chokeindicator", 0 )
  88.  
  89.  
  90. local indicator_combobox = menu:add_multi_combo( "Indicators", "rage", "aimbot", "misc" ):add_item( "Manual desync", directindicator_item ):add_item( "Force baim", forcebaim_item ):add_item( "SLOW", slidewalk_item ):add_item( "AA ON SHOT", silent_item ):add_item( "Fake", fake_item ):add_item( "Ping", choke_item )
  91.  
  92.  
  93. local indicator_font = render:create_font('Verdana', 25, 900, true) -- 32 700
  94.  
  95. local fl_indicator = render:create_font( "Smallest Pixel-7", 11, 100, false )
  96.  
  97. fatality.callbacks:add("paint", function()
  98.  
  99. -- changing values from float to int
  100. local size_slider = size_item:get_float() * 1
  101. local colour_value = colour_item:get_float( ) * 1
  102.  
  103. -- colours
  104. local white_colour = csgo.color(100, 100, 100, 100)
  105. local black_colour = csgo.color(0, 0, 0, 100)
  106.  
  107. -- rainbow RGB
  108. local r = math.floor( math.sin( global_vars.realtime * 2) * 127 + 128 )
  109. local g = math.floor( math.sin( global_vars.realtime * 2 + 2 ) * 127 + 128 )
  110. local b = math.floor( math.sin( global_vars.realtime * 2 + 4 ) * 127 + 128 );
  111.  
  112.  
  113. -- colour changer (final version) (pasted)
  114. if colour_value == 0 then
  115. custom_colour = csgo.color(255, 255, 255, 255) --< white
  116. elseif colour_value == 1 then
  117. custom_colour = csgo.color(0, 0, 0, 255) --< black
  118. elseif colour_value == 2 then
  119. custom_colour = csgo.color(255, 0, 0, 255) --< deep-red
  120. elseif colour_value == 3 then
  121. custom_colour = csgo.color(244,67,54, 255) --< red
  122. elseif colour_value == 4 then
  123. custom_colour = csgo.color(255,87,34, 255) --< light-red
  124. elseif colour_value == 5 then
  125. custom_colour = csgo.color(255,152,0, 255) --< deep-orange
  126. elseif colour_value == 6 then
  127. custom_colour = csgo.color(255,193,7, 255) --< orange
  128. elseif colour_value == 7 then
  129. custom_colour = csgo.color(255,235,59, 255) --< yellow
  130. elseif colour_value == 8 then
  131. custom_colour = csgo.color(205,220,57, 255) --< lime
  132. elseif colour_value == 9 then
  133. custom_colour = csgo.color(139,195,74, 255) --< light-green
  134. elseif colour_value == 10 then
  135. custom_colour = csgo.color(76,175,80, 255) --< green
  136. elseif colour_value == 11 then
  137. custom_colour = csgo.color(0,150,136, 255) --< teal
  138. elseif colour_value == 12 then
  139. custom_colour = csgo.color(0,188,212, 255) --< cyan
  140. elseif colour_value == 13 then
  141. custom_colour = csgo.color(3,169,244, 255) --< ligh-blue
  142. elseif colour_value == 14 then
  143. custom_colour = csgo.color(33,150,243, 255) --< blue
  144. elseif colour_value == 15 then
  145. custom_colour = csgo.color(63,81,181, 255) --< indigo
  146. elseif colour_value == 16 then
  147. custom_colour = csgo.color(103,58,183, 255) --< deep-purple
  148. elseif colour_value == 17 then
  149. custom_colour = csgo.color(156,39,176, 255) --< purple
  150. elseif colour_value == 18 then
  151. custom_colour = csgo.color(126,87,194, 255) --< -light-purple
  152. elseif colour_value == 19 then
  153. custom_colour = csgo.color(233,30,99, 255) --< deep-pink
  154. elseif colour_value == 20 then
  155. custom_colour = csgo.color(236,64,122, 255) --< light-pink
  156. else
  157. custom_colour = csgo.color(255, 255, 255, 255) --< default
  158. end
  159.  
  160. -- chroma mode for arrows
  161. if rainbow_item:get_bool() then
  162. custom_colour = csgo.color(r, g, b, 255)
  163. end
  164.  
  165. -- dark mode for arrows
  166. if darkmode_item:get_bool() then
  167. white_colour = black_colour
  168. end
  169.  
  170.  
  171. local local_player = entity_list:get_localplayer()
  172.  
  173. local screen_size = render:screen_size()
  174.  
  175. -- check is player in game
  176. if(engine_client:is_in_game()) then
  177.  
  178. -- is local player alive,if not,then return
  179. if(local_player ~= nil and local_player:is_alive()) then
  180.  
  181.  
  182. local slide = menu:get_reference( "rage", "aimbot", "aimbot", "slide" )
  183. local forcebaim = menu:get_reference( "rage", "aimbot", "aimbot", "force fallback" )
  184. local silent = menu:get_reference( "rage", "aimbot", "aimbot", "Silent" )
  185. local fake = menu:get_reference( "rage", "anti-aim", "general", "anti-aim" )
  186. local flchoke = menu:get_reference( "rage", "anti-aim", "general", "anti-aim" )
  187. local velocity = local_player:get_var_vector( "CBasePlayer->m_vecVelocity[0]" )
  188.  
  189. local vel_2d = math.ceil( math.sqrt( math.abs( velocity.x ) * math.abs( velocity.x ) + math.abs( velocity.y ) * math.abs( velocity.y ) ) )
  190.  
  191.  
  192. local frame_rate = 0.0;
  193.  
  194. function get_fps( )
  195. frame_rate = 0.9 * frame_rate + ( 1.0 - 0.9 ) * global_vars.frametime;
  196. return math.floor( ( 1.0 / frame_rate ) + 0.5 );
  197.  
  198. end
  199. local fps = get_fps( )
  200. local clr_i = csgo.color(fps + 150, 255 - vel_2d, 0, 255)
  201. local clr_a = csgo.color(255, 255, 255, 255)
  202. local yaw = fps / 100 * 4
  203. local syaw = 255 - vel_2d
  204. local lyaw = yaw / 62
  205. local function get_ping( )
  206. if not engine:is_connected( ) then
  207. return 0 end
  208.  
  209. return math.abs( engine:get_ping( ) )
  210. end
  211. local ping = get_ping( )
  212.  
  213. if silent:get_bool() then
  214. sl = true
  215. else
  216. sl = false
  217. end
  218.  
  219. if forcebaim:get_bool() then
  220. fb = true
  221. else
  222. fb = false
  223. end
  224.  
  225. if slide:get_bool() then
  226. sw = true
  227. else
  228. sw = false
  229. end
  230.  
  231. if fake:get_bool() then
  232. fk = true
  233. else
  234. fk = false
  235. end
  236.  
  237. if flchoke:get_bool() then
  238. fl = true
  239. else
  240. fl = false
  241. end
  242. local addxx = pos_item:get_int()
  243.  
  244. if silent_item:get_bool() then
  245.  
  246. render:indicator( 9, screen_size.y - 140 + addxx , "SHOT", sl , -1)
  247. subpos = 125
  248.  
  249. end
  250.  
  251. if forcebaim_item:get_bool() then
  252.  
  253. render:indicator( 9, screen_size.y - 170 + addxx, "BAIM", fb , -1)
  254. subpos = 100
  255.  
  256. end
  257.  
  258. if fake_item:get_bool() then
  259.  
  260. render:text(indicator_font, 9, screen_size.y - 80 + addxx, "FAKE", clr_i, fk)
  261. --render:text(indicator_font, 70, screen_size.y - 80, yaw, clr_i, fk)
  262. render:text(indicator_font, 9, screen_size.y - 200 + addxx, "YAW", clr_a, fk)
  263. render:text(indicator_font, 70, screen_size.y - 200 + addxx , yaw, clr_a, fk)
  264. --render:text(indicator_font, 160, screen_size.y - 80, syaw, clr_i, fk)
  265. -- render:indicator( 9, screen_size.y - 80 , "FAKE", clr_i , fk)
  266. subpos = 0
  267.  
  268. end
  269.  
  270. if choke_item:get_bool( ) then
  271.  
  272. render:text(indicator_font, 9, screen_size.y - 230 + addxx, "PING", clr_a, fk)
  273. render:text(indicator_font, 75, screen_size.y - 230 + addxx, ping, clr_a, fk)
  274.  
  275. end
  276.  
  277. if slidewalk_item:get_bool() then
  278.  
  279. render:indicator( 10, screen_size.y - 110 + addxx , "SLOW", sw , -1) -- 440 -- 80
  280. subpos = 75
  281.  
  282. end
  283.  
  284. -- Logic
  285. if input:is_key_down(switch_key) then
  286. if not switch_held then
  287. side = not side
  288.  
  289. if side then
  290. stand_add_ref22:set_float(-52) -- STANDING YAW LEFT SIDE //
  291. stand_dir_ref:set_int(100) -- CUSTOM FAKE .. MOVING LEFT //
  292. move_add_ref:set_float(-52) -- MOVING YAW LEFT SIDE //
  293. move_dir_ref:set_int(100) -- CUSTOM FAKE // MOVING LEFT //
  294. air_dir_ref:set_int(100) -- AIR LEFT SIDE
  295. else
  296. stand_add_ref22:set_float(52) -- STANDING YAW RIGHT SIDE //
  297. stand_dir_ref:set_int(-100) -- CUSTOM FAKE // STAND RIGHT //
  298. move_add_ref:set_float(52) -- MOVING YAW RIGHT SIDE //
  299. move_dir_ref:set_int(-100) -- CUSTOM FAKE // MOVING RIGHT //
  300. air_dir_ref:set_int(-100) -- AIR RIGHT SIDE
  301. end
  302. end
  303.  
  304. switch_held = true
  305. else
  306. switch_held = false
  307. end
  308.  
  309. if directindicator_item:get_bool() then
  310. dc = true
  311. else
  312. dc = false
  313. end
  314.  
  315. local indicator_white = csgo.color(255, 255, 255, 255)
  316.  
  317. -- B1G LOGIC OF MY RENDER
  318.  
  319. if not side then
  320.  
  321.  
  322. draw_side_arrow(screen_size.x / 2 - 10 - 30 + 1, screen_size.y / 2 - 10, size_slider, custom_colour, side) --right
  323. side_2 = true;
  324. draw_side_arrow_2(screen_size.x / 2 + 10 + 30 + 1, screen_size.y / 2 - 10, size_slider, white_colour, side_2) --left disabled
  325.  
  326. if directindicator_item:get_bool() then
  327. -- render:indicator( 9, screen_size.y - 75 - subpos, "DC RIGHT", dc , -1)
  328. render:text(indicator_font, 9, screen_size.y - 260, "LEFT", indicator_white, dc)
  329. subpos = 25
  330. end
  331.  
  332. else
  333. draw_side_arrow(screen_size.x / 2 + 10 + 30 + 1, screen_size.y / 2 - 10, size_slider, custom_colour, side) --right
  334.  
  335. side_2 = false;
  336. draw_side_arrow_2(screen_size.x / 2 - 10 - 30 + 1, screen_size.y / 2 - 10, size_slider, white_colour, side_2) --left disabled
  337.  
  338. if directindicator_item:get_bool() then
  339. -- render:indicator( 9, screen_size.y - 75 - subpos, "DC LEFT", dc , -1)
  340. render:text(indicator_font, 9, screen_size.y - 260 , "RIGHT", indicator_white, dc)
  341. subpos = 25
  342. end
  343. end
  344. end
  345. end
  346. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement