Advertisement
Guest User

rainbow esp, updated

a guest
Apr 23rd, 2019
725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.45 KB | None | 0 0
  1. --local variables for API
  2. local client_latency, client_set_clan_tag, client_log, client_draw_rectangle, client_draw_circle_outline, client_timestamp, client_draw_indicator, client_userid_to_entindex, client_world_to_screen, client_draw_gradient, client_set_event_callback = client.latency, client.set_clan_tag, client.log, client.draw_rectangle, client.draw_circle_outline, client.timestamp, client.draw_indicator, client.userid_to_entindex, client.world_to_screen, client.draw_gradient, client.set_event_callback
  3. local client_screen_size, client_draw_circle, client_trace_line, client_color_log, client_draw_text, client_delay_call, client_visible, client_exec, client_system_time = client.screen_size, client.draw_circle, client.trace_line, client.color_log, client.draw_text, client.delay_call, client.visible, client.exec, client.system_time
  4. local client_set_cvar, client_eye_position, client_draw_hitboxes, client_get_cvar, client_draw_line, client_camera_angles, client_draw_debug_text, client_random_int, client_random_float = client.set_cvar, client.eye_position, client.draw_hitboxes, client.get_cvar, client.draw_line, client.camera_angles, client.draw_debug_text, client.random_int, client.random_float
  5. local entity_get_local_player, entity_is_enemy, entity_is_dormant, entity_hitbox_position, entity_get_player_name, entity_get_steam64, entity_get_bounding_box, entity_get_all, entity_set_prop = entity.get_local_player, entity.is_enemy, entity.is_dormant, entity.hitbox_position, entity.get_player_name, entity.get_steam64, entity.get_bounding_box, entity.get_all, entity.set_prop
  6. local entity_is_alive, entity_get_player_weapon, entity_get_prop, entity_get_players, entity_get_classname = entity.is_alive, entity.get_player_weapon, entity.get_prop, entity.get_players, entity.get_classname
  7. local globals_realtime, globals_absoluteframetime, globals_tickcount, globals_lastoutgoingcommand, globals_curtime, globals_mapname, globals_tickinterval, globals_framecount, globals_frametime, globals_maxplayers = globals.realtime, globals.absoluteframetime, globals.tickcount, globals.lastoutgoingcommand, globals.curtime, globals.mapname, globals.tickinterval, globals.framecount, globals.frametime, globals.maxplayers
  8. local ui_new_slider, ui_new_combobox, ui_reference, ui_set_visible, ui_is_menu_open, ui_new_color_picker, ui_set_callback, ui_set, ui_new_checkbox, ui_new_hotkey, ui_new_button, ui_new_multiselect, ui_get = ui.new_slider, ui.new_combobox, ui.reference, ui.set_visible, ui.is_menu_open, ui.new_color_picker, ui.set_callback, ui.set, ui.new_checkbox, ui.new_hotkey, ui.new_button, ui.new_multiselect, ui.get
  9. local math_ceil, math_tan, math_log10, math_randomseed, math_cos, math_sinh, math_random, math_huge, math_pi, math_max, math_atan2, math_ldexp, math_floor, math_sqrt, math_deg, math_atan, math_fmod = math.ceil, math.tan, math.log10, math.randomseed, math.cos, math.sinh, math.random, math.huge, math.pi, math.max, math.atan2, math.ldexp, math.floor, math.sqrt, math.deg, math.atan, math.fmod
  10. local math_acos, math_pow, math_abs, math_min, math_sin, math_frexp, math_log, math_tanh, math_exp, math_modf, math_cosh, math_asin, math_rad = math.acos, math.pow, math.abs, math.min, math.sin, math.frexp, math.log, math.tanh, math.exp, math.modf, math.cosh, math.asin, math.rad
  11. local table_maxn, table_foreach, table_sort, table_remove, table_foreachi, table_move, table_getn, table_concat, table_insert = table.maxn, table.foreach, table.sort, table.remove, table.foreachi, table.move, table.getn, table.concat, table.insert
  12. local string_find, string_format, string_rep, string_gsub, string_len, string_gmatch, string_dump, string_match, string_reverse, string_byte, string_char, string_upper, string_lower, string_sub = string.find, string.format, string.rep, string.gsub, string.len, string.gmatch, string.dump, string.match, string.reverse, string.byte, string.char, string.upper, string.lower, string.sub
  13. --end of local variables
  14.  
  15. -- start of references
  16. local player, player_glow = ui_reference("VISUALS", "Colored models", "Player")
  17. local localshadow, localshadow_glow = ui_reference("VISUALS", "Colored models", "Local fake Shadow")
  18. local shadow, shadow_glow = ui_reference("VISUALS", "Colored models", "Shadow")
  19. local hands_ref, hands_color_ref, hands_type, hands_type_color = ui_reference("VISUALS", "Colored models", "Hands")
  20. local glow_ref, glow_color_ref = ui.reference("VISUALS", "Player ESP", "Glow")
  21. local show_mates, show_mates_color = ui.reference("VISUALS", "Colored models", "Show teammates")
  22. local oofova, oofova_color = ui.reference("VISUALS", "Player ESP", "Out of FOV arrow")
  23. local player_behind_wall_ref, player_behind_wall_color_ref, player_type, player_type_color = ui.reference("VISUALS", "Colored models", "Player behind wall")
  24. -- end of references
  25.  
  26. local rainbow_toggle = ui_new_checkbox("VISUALS", "Effects", "Enable Rainbow Color")
  27. local rainbow_speed = ui.new_slider("VISUALS", "Effects", "Rainbow Speed", 0, 100, 6, true)
  28.  
  29. local rainbow_player_glow = ui_new_checkbox("VISUALS", "Effects", "Player Glow ( buggy, idk why actually )")
  30. local rainbow_player_model = ui_new_checkbox("VISUALS", "Effects", "Player Model")
  31. local rainbow_player_model_type = ui_new_checkbox("VISUALS", "Effects", "Player Type")
  32. local rainbow_hands = ui_new_checkbox("VISUALS", "Effects", "Hands")
  33. local rainbow_hands_type = ui_new_checkbox("VISUALS", "Effects", "Hands Type")
  34. local rainbow_shadow = ui_new_checkbox("VISUALS", "Effects", "Shadow")
  35. local rainbow_local_shadow = ui_new_checkbox("VISUALS", "Effects", "Local fake Shadow")
  36. local rainbow_local_shadow_alpha = ui.new_slider("VISUALS", "Effects", "Local fake Shadow alpha", 0, 255, 255,true)
  37. local rainbow_teammate = ui_new_checkbox("VISUALS", "Effects", "Teammates Model")
  38. local rainbow_player_behind_wall = ui_new_checkbox("VISUALS", "Effects", "Player behind wall")
  39. local rainbow_player_behind_wall_alpha = ui.new_slider("VISUALS", "Effects", "Player behind wall alpha", 0, 255, 255,true)
  40. local rainbow_out_of_fov_arrows = ui_new_checkbox("VISUALS", "Effects", "Out of FOV arrows")
  41. local rainbow_out_of_fov_arrows_alpha = ui.new_slider("VISUALS", "Effects", "Out of FOV arrows alpha", 0, 255, 255,true)
  42.  
  43.  
  44.  
  45. local function visibility()
  46.     local k = ui_get(rainbow_toggle)
  47.     ui_set_visible(rainbow_speed, k)
  48.     ui_set_visible(rainbow_player_glow, k)
  49.     ui_set_visible(rainbow_player_model, k)
  50.     ui_set_visible(rainbow_player_model_type, k)
  51.     ui_set_visible(rainbow_hands, k)
  52.     ui_set_visible(rainbow_hands_type, k)
  53.     ui_set_visible(rainbow_shadow, k)
  54.     ui_set_visible(rainbow_teammate, k)
  55.     ui_set_visible(rainbow_local_shadow, k)
  56.     ui_set_visible(rainbow_player_behind_wall, k)
  57.     ui_set_visible(rainbow_out_of_fov_arrows, k)
  58.  
  59.     local l = ui_get(rainbow_player_behind_wall)
  60.     ui_set_visible(rainbow_player_behind_wall_alpha, l)
  61.  
  62.     local a = ui_get(rainbow_local_shadow)
  63.     ui_set_visible(rainbow_local_shadow_alpha, a)
  64.  
  65.     local b = ui_get(rainbow_out_of_fov_arrows)
  66.     ui_set_visible(rainbow_out_of_fov_arrows_alpha, b)
  67. end
  68.  
  69. local function on_paint(e)
  70.  
  71.     local speed = ui.get(rainbow_speed)
  72.     local r = math.floor(math.sin(globals.realtime() * speed) * 127.5 + 127.5)
  73.     local g = math.floor(math.sin(globals.realtime() * speed + 2) * 127.5 + 127.5)
  74.     local b = math.floor(math.sin(globals.realtime() * speed + 4) * 127.5 + 127.5)
  75.     local a = 255
  76.  
  77.     if ui.get(rainbow_player_glow) then
  78.         ui.set(glow_color_ref, r,g,b,a )
  79.     end
  80.  
  81.     if ui.get(rainbow_player_model) then
  82.         ui.set(player_glow, r,g,b,a )
  83.     end
  84.  
  85.     if ui.get(rainbow_player_model_type) then
  86.         ui.set(player_type_color, r,g,b,a )
  87.     end
  88.  
  89.     if ui.get(rainbow_hands) then
  90.         ui.set(hands_color_ref, r,g,b,a )
  91.     end
  92.  
  93.     if ui.get(rainbow_hands_type) then
  94.         ui.set(hands_type_color, r,g,b,a )
  95.     end
  96.  
  97.     if ui.get(rainbow_teammate) then
  98.         ui.set(show_mates_color, r,g,b,a )
  99.     end
  100.  
  101.     if ui.get(rainbow_shadow) then
  102.         ui.set(shadow_glow, r,g,b,a )
  103.     end
  104.  
  105.     if ui.get(rainbow_local_shadow) then
  106.         ui.set(localshadow_glow, r,g,b,ui.get(rainbow_local_shadow_alpha))
  107.     end
  108.  
  109.     if ui.get(rainbow_player_behind_wall) then
  110.         ui.set(player_behind_wall_color_ref, r,g,b,ui.get(rainbow_player_behind_wall_alpha))
  111.     end
  112.  
  113.     if ui.get(rainbow_out_of_fov_arrows) then
  114.         ui.set(oofova_color, r,g,b,ui.get(rainbow_out_of_fov_arrows_alpha))
  115.     end
  116.  
  117. end
  118.  
  119. client_set_event_callback("run_command", visibility)
  120. client_set_event_callback("paint", on_paint)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement