Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ui_get, ui_set, ui_set_visible, ui_ref = ui.get, ui.set, ui.set_visible, ui.reference
- local ui_desynctype = ui.new_combobox
- local client_draw_text = client.draw_text
- local client_screensize = client.screen_size
- local client_set_event_callback = client.set_event_callback
- -- Anti-aim references
- local pitch = ui_ref("AA", "Anti-aimbot angles", "Pitch")
- local base = ui_ref("AA", "Anti-aimbot angles", "Yaw base")
- local yaw, yaw_slider = ui_ref("AA", "Anti-aimbot angles", "Yaw")
- local yawjitter, yawjitter_slider = ui_ref("AA", "Anti-aimbot angles", "Yaw jitter")
- local bodyyaw, bodyyaw_slider = ui_ref("AA", "Anti-aimbot angles", "Body yaw")
- local limit = ui_ref("AA", "Anti-aimbot angles", "Fake yaw limit")
- local edgeyaw = ui_ref("AA", "Anti-aimbot angles", "Edge yaw")
- local freestanding = ui_ref("AA", "Anti-aimbot angles", "Freestanding")
- local twist = ui_ref("AA", "Anti-aimbot angles", "Twist")
- local lby = ui_ref("AA", "Anti-aimbot angles", "Lower body yaw")
- -- UI Elements
- local ui_desync = ui.new_checkbox("AA", "Fake lag", "Mad's Jitter Desync")
- local ui_indicator_color_picker = ui.new_color_picker("AA", "Fake lag", "Indicator color", "0", "255", "255", "255")
- local ui_desynctype = ui.new_combobox("AA", "Fake Lag", "Desync Type", {"1"})
- local ui_indicatortype = ui.new_combobox("AA", "Fake Lag", "Indicator Type", {"Default", "Triangle", "Fatality"})
- local ui_left_hotkey = ui.new_hotkey("AA", "Fake lag", "Manual-Desync Left")
- local ui_right_hotkey = ui.new_hotkey("AA", "Fake lag", "Manual-Desync Right")
- local ui_back_hotkey = ui.new_hotkey("AA", "Fake lag", "Manual-Desync Back")
- local ui_rainbow = ui.new_checkbox("AA", "Fake Lag", "Rainbow")
- local ui_rainbowspeed = ui.new_slider("AA", "Fake Lag", "Rainbow Speed", 1, 10, 3, true)
- local ui_prevent_leaks = ui.new_checkbox("AA", "Fake lag", "Prevent Leaks")
- --Entity setup
- local entity_get_local_player = entity.get_local_player
- local entity_get_all = entity.get_all
- local entity_get_players = entity.get_players
- local entity_get_classname = entity.get_classname
- local entity_set_prop = entity.set_prop
- local entity_is_alive = entity.is_alive
- local entity_get_prop = entity.get_prop
- local entity_is_enemy = entity.is_enemy
- local entity_get_player_name = entity.get_player_name
- local entity_get_player_weapon = entity.get_player_weapon
- local entity_hitbox_position = entity.hitbox_position
- local globals_realtime = globals.realtime
- local globals_curtime = globals.curtime
- local globals_frametime = globals.frametime
- local globals_absolute_frametime = globals.absoluteframetime
- local globals_maxplayers = globals.maxplayers
- local globals_tickcount = globals.tickcount
- local globals_tickinterval = globals.tickinterval
- local globals_mapname = globals.mapname
- local isLeft, isRight, isBack = false
- local function get_antiaim_dir()
- if ui_get(ui_left_hotkey) then
- isLeft = true
- isRight = false
- isBack = false
- elseif ui_get(ui_right_hotkey) then
- isRight = true
- isLeft = false
- isBack = false
- elseif ui_get(ui_back_hotkey) then
- isRight = false
- isLeft = false
- isBack = true
- end
- end
- local function setLeft()
- if ui_get(ui_desynctype) == "1" then
- ui_set(pitch, "Default")
- ui_set(base, "Local view")
- ui_set(yaw, "180")
- ui_set(yaw_slider, -90)
- ui_set(yawjitter, "Center")
- ui_set(yawjitter_slider, "100")
- ui_set(bodyyaw, "Opposite")
- ui_set(limit, "60")
- ui_set(edgeyaw, "Off")
- ui_set(freestanding, "-")
- end
- end
- local function setRight()
- if ui_get(ui_desynctype) == "1" then
- ui_set(pitch, "Default")
- ui_set(base, "Local view")
- ui_set(yaw, "180")
- ui_set(yaw_slider, 90)
- ui_set(yawjitter, "Center")
- ui_set(yawjitter_slider, "-100")
- ui_set(bodyyaw, "Opposite")
- ui_set(limit, "60")
- ui_set(edgeyaw, "Off")
- ui_set(freestanding, "-")
- end
- end
- local function setBack()
- ui_set(yaw, "180")
- ui_set(yaw_slider, 6)
- ui_set(bodyyaw, "Off")
- ui_set(yawjitter, "Off")
- end
- local function hsv_to_rgb(h, s, v, a)
- local r, g, b
- local i = math.floor(h * 6);
- local f = h * 6 - i;
- local p = v * (1 - s);
- local q = v * (1 - f * s);
- local t = v * (1 - (1 - f) * s);
- i = i % 6
- if i == 0 then r, g, b = v, t, p
- elseif i == 1 then r, g, b = q, v, p
- elseif i == 2 then r, g, b = p, v, t
- elseif i == 3 then r, g, b = p, q, v
- elseif i == 4 then r, g, b = t, p, v
- elseif i == 5 then r, g, b = v, p, q
- end
- return r * 255, g * 255, b * 255, a * 255
- end
- local function func_rgb_rainbowize(frequency, rgb_split_ratio)
- if ui_get(ui_rainbow) then
- local r, g, b, a = hsv_to_rgb(globals.realtime() * frequency, 1, 1, 1)
- r = r * rgb_split_ratio
- g = g * rgb_split_ratio
- b = b * rgb_split_ratio
- return r, g, b
- end
- end
- local function on_paint(c)
- if not ui_get(ui_desync) then
- return
- end
- local scrsize_x, scrsize_y = client_screensize()
- local center_x, center_y = scrsize_x / 2, scrsize_y / 2
- if ui_get(ui_indicatortype) == "Default" then
- client.draw_text(c, center_x + 50, center_y, 255, 255, 255, 155, "c+", 0, ">")
- client.draw_text(c, center_x - 50, center_y, 255, 255, 255, 155, "c+", 0, "<")
- client_draw_text(c, center_x, center_y + 40, 255, 255, 255, 155, "c+", 0, "v")
- else if ui_get(ui_indicatortype) == "Triangle" then
- client.draw_text(c, center_x + 50, center_y, 255, 255, 255, 155, "c+", 0, "►")
- client.draw_text(c, center_x - 50, center_y, 255, 255, 255, 155, "c+", 0, "◄")
- client_draw_text(c, center_x, center_y + 40, 255, 255, 255, 155, "c+", 0, "▼")
- else if ui_get(ui_indicatortype) == "Fatality" then
- client.draw_text(c, center_x + 50, center_y, 255, 255, 255, 155, "c+", 0, "⮞")
- client.draw_text(c, center_x - 50, center_y, 255, 255, 255, 155, "c+", 0, "⮜")
- client_draw_text(c, center_x, center_y + 40, 255, 255, 255, 155, "c+", 0, "⮟")
- end
- end
- end
- local indicator_r, indicator_g, indicator_b, indicator_a = ui_get(ui_indicator_color_picker)
- get_antiaim_dir()
- local r, g, b = func_rgb_rainbowize(0. + ui_get(ui_rainbowspeed) / 8, 1)
- if ui_get(ui_rainbow) then
- ui_set(ui_indicator_color_picker, r, g, b, 160)
- ui_set_visible(ui_rainbowspeed, true)
- else ui_set_visible(ui_rainbowspeed, false)
- end
- if isLeft then
- if ui_get(ui_indicatortype) == "Default" then
- client.draw_text(c, center_x - 50, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "<")
- else if ui_get(ui_indicatortype) == "Triangle" then
- client.draw_text(c, center_x - 50, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "◄")
- else if ui_get(ui_indicatortype) == "Fatality" then
- client.draw_text(c, center_x - 50, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "⮜")
- end
- end
- end
- elseif isRight then
- if ui_get(ui_indicatortype) == "Default" then
- client.draw_text(c, center_x + 50, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, ">")
- else if ui_get(ui_indicatortype) == "Triangle" then
- client.draw_text(c, center_x + 50, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "►")
- else if ui_get(ui_indicatortype) == "Fatality" then
- client.draw_text(c, center_x + 50, center_y, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "⮞")
- end
- end
- end
- elseif isBack then
- if ui_get(ui_indicatortype) == "Default" then
- client_draw_text(c, center_x, center_y + 40, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "v")
- else if ui_get(ui_indicatortype) == "Triangle" then
- client_draw_text(c, center_x, center_y + 40, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "▼")
- else if ui_get(ui_indicatortype) == "Fatality" then
- client_draw_text(c, center_x, center_y + 40, indicator_r, indicator_g, indicator_b, indicator_a, "c+", 0, "⮟")
- end
- end
- end
- end
- end
- local function on_setup_command(cmd)
- if entity_get_local_player() == nil or entity_get_prop(entity_get_local_player(), "m_lifeState") ~= 0 then
- return
- end
- if isLeft then
- setLeft()
- end
- if isRight then
- setRight()
- end
- if isBack then
- setBack()
- end
- if ui_get(ui_prevent_leaks) then
- if cmd.chokedcommands > 0 then
- if cmd.forwardmove == 0 and cmd.in_jump == 0 and cmd.in_attack == 0 then
- cmd.forwardmove = globals_tickcount() % 2 < 1 and -1.01 or 1.01
- end
- end
- end
- end
- client_set_event_callback('setup_command', on_setup_command)
- client_set_event_callback("paint", on_paint)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement