-
Автор темы
- #1
code_language.lua:
--Stoyack dont cracking, Код и так открыт--
local info = {}
local text_input = ui.add_text_input("----------MAIN - INFO----------", "lua_text0START", " Sur.hum - Info ", false)
local information = { "Discord server:","https://discord.gg/5deJmHQk","", "Last Changelog","-add new menu","-upd clantag", "-upd trashtalk"," ","-Useles","Radar esp","FpsBoost","","Sur.Hum","-next upd add-molotov predict","and more"}
for i = 1, #information do
info[i] = {
text = ui.add_combo_box(information[i], "combo" .. i, {}, 0),
}
end
--antihit start
local text_input = ui.add_text_input("-----------ANTIAIM-----------", "lua_text1ANTIAIM", " Sur.hum ", false)
Sur.Hum("aa")
Sur.Hum("custom aa")
anti_aim = {
legit_aa_active = false,
in_use = false,
manual = 1,
jitter_side = 1,
jitter_waiting = 0,
should_invert = false,
targeted_player = nil,
last_target = nil,
exploiting = false,
fakeduck = false,
prevent_e_ticks = 0,
fakehead_next_tick = 0,
last_best_angle = 0,
types = {"default", "standing", "walk", "run", "air", "crouch"},
presets = {},
elements = {preset = nil},
}
do
local presets = {
{"default",{desync={false,37,37,false,37,37,false,37,37,false,37,37,false,37,37,false,37,37,},jitter={false,0,0,0,1,false,0,0,0,1,false,0,0,0,1,false,0,0,0,1,false,0,0,0,1,false,0,0,0,1,},yaw={0,0,false,0,0,false,0,0,false,0,0,false,0,0,false,0,0,},auto_invert={0,false,0,false,0,false,0,false,0,false,0,},},},
{"Sur.Hum",{desync={false,60,60,false,37,37,false,37,37,false,37,37,false,37,37,false,37,37,},jitter={false,1,0,0,1,false,0,0,0,1,false,0,0,0,1,false,0,0,0,1,false,0,0,0,1,false,0,0,0,1,},yaw={42,-42,false,0,0,false,0,0,false,0,0,true,40,-40,false,0,0,},auto_invert={1,false,0,false,0,false,0,false,0,false,0,},},},
{"tank aa",{desync={false,44,44,true,33,33,false,37,37,false,37,37,true,5,3,true,60,60,},jitter={false,1,0,70,2,true,1,0,5,2,false,0,0,0,1,false,0,0,0,1,true,1,1,70,2,true,1,0,50,1,},yaw={0,0,false,0,0,false,0,0,false,0,0,false,0,0,false,0,0,},auto_invert={1,true,2,false,0,false,0,true,1,true,0,},},},
{"c7",{desync={false,0,0,true,60,60,true,60,60,true,60,60,true,60,60,true,60,60,},jitter={false,1,0,0,1,true,1,0,45,1,true,1,0,70,1,true,1,0,66,1,false,1,1,70,2,true,1,0,50,1,},yaw={0,0,false,0,0,false,0,0,false,0,0,false,0,0,false,0,0,},auto_invert={0,true,0,false,0,false,0,true,0,true,0,},},},
{"lexx0r",{desync={false,60,30,true,60,60,true,60,30,false,37,37,true,60,30,true,60,60,},jitter={false,1,0,0,1,true,1,0,26,1,true,1,0,24,1,false,0,0,0,1,true,1,0,0,1,true,1,0,18,1,},yaw={-35,35,true,-6,6,true,-35,35,false,0,0,true,-35,35,true,-6,6,},auto_invert={1,false,2,false,0,false,0,true,1,false,16,},},},
{"eleven & vek",{desync={false,29,29,true,5,5,false,37,37,true,7,7,true,28,28,false,37,37,},jitter={false,1,1,44,1,true,1,1,70,1,true,0,1,20,1,true,1,1,35,1,true,1,0,24,1,false,0,0,0,1,},yaw={-7,7,true,0,0,true,-4,4,true,0,0,true,11,11,false,0,0,},auto_invert={0,false,0,true,1,false,0,false,0,false,0,},},},
}
local list = {"none", "custom"}
for i = 1, #presets do
local v = presets[i]
if type(v) == "function" then
if not v() then return end v = nil
else
anti_aim.presets[i] = v[2]
list[#list + 1] = v[1]
end
end
list[#list+1] = "-- click to export --"
anti_aim.elements.preset = Sur.Hum.dropdown("preset", list)
anti_aim.elements.preset:change(function(val, el)
if val + 1 == #el.dropdown.elements then return anti_aim:export() end
if anti_aim.presets[val - 1] then anti_aim:import(anti_aim.presets[val - 1]) end
end)
end
anti_aim.get_angle = function(s)
if clientstate.get_choked_commands() ~= 0 then
s.targeted_player = s.last_target
return s.last_best_angle end
local lowest_fov, best_player = 2147483647, nil
local lp = entitylist.lp()
local origin = lp:origin()
if not origin then return 0 end
local viewangles = engine.get_view_angles()
if not viewangles then return 0 end
local vecangles = viewangles:to_vec()
local best_player_pos = nil
local time = time_in_dormant:get_value()
local interval = globalvars.get_interval_per_tick()
entitylist.for_enemies(function(ent)
if ent:dormant_ticks() * interval > time then
return end
local pos = ent:origin()
if pos then
local current_fov = (origin:angle_to(pos):to_vec() - vecangles):length()
if current_fov < lowest_fov then
lowest_fov = current_fov
best_player = ent
best_player_pos = pos
end
end
end, true)
s.targeted_player = best_player
s.last_target = s.targeted_player
local angle = 0
if best_player_pos then
local difference = origin:angle_to(best_player_pos)
if difference then
angle = difference.yaw
end
end
if not best_player or not best_player_pos then
s.targeted_player = nil
angle = viewangles.yaw
end
s.last_best_angle = angle
return angle
end
anti_aim.check = function(cmd)
if not engine.is_connected()
or not engine.is_in_game() then return true end
local lp = entitylist.lp()
if not lp:can_move() then antiaim_enable:set_value(false) return true end
if anti_aim.elements.preset.val() == 0 then return true end
local move_type = lp:get_prop_int(m_.netMoveType)
if move_type == 8 or move_type == 9 or move_type == 0 then return true end
local weapon = lp:weapon().group
if weapon == "grenade" then
return lp:is_throwing() end
if hasbit(cmd.buttons, 0) then return true end
if hasbit(cmd.buttons, 11) and weapon == "knife" then
return true end
return false
end
anti_aim.manuals = function(s, cmd)
if not s.use then
cmd.viewangles.yaw = cmd.viewangles.yaw + ({[0] = 0, 180, 90, 270})[s.manual]
end
if s.elements.manual.val() then
for k, v in pairs({left = 2, right = 3, back = 1, forward = 0}) do
if client.is_key_clicked(s.elements.manual.elems[k]:get_key())
and extended:is_window_active() then
if s.manual == v then s.manual = 1
else s.manual = v end break
end
end
end
return s.manual
end
anti_aim.legit_aa = function(s, cmd)
local lp = entitylist.lp()
if not lp or not lp:is_alive() then return false end
local in_use = hasbit(cmd.buttons, 5)
s.in_use = in_use
if in_use then
local C4 = entitylist.get_entities_by_class("CPlantedC4")
local origin = lp:origin()
if lp:weapon().group == "c4" or (C4[1] and C4[1]:origin():dist_to(origin) <= 75) then return in_use end
local hostages = entitylist.get_entities_by_class("CHostage")
for i = 1, #hostages do
if hostages[i]:origin():dist_to(pos) <= 75
and lp:get_prop_int(m_.hCarriedHostage) == -1 then return in_use end
end
end
if s.legit_aa_active then cmd.buttons = bit32.band(cmd.buttons, -33) end
if s.legit_aa_active ~= in_use then s.legit_aa_active = in_use return in_use end
if in_use then
desync_roll_pitch:set_value(cmd.viewangles.pitch)
end
return in_use
end
--[[anti_aim.att = function(s, cmd)
s.targeted_player = nil
if not s.elements.att.val() or s.use or s.manual ~= 1 then return end
if s.freestanding then return end
cmd.viewangles.yaw = s:get_angle()
end]]
anti_aim.anti_backstab = function(s, cmd)
local pos = entitylist.lp():origin()
local enemy = {
distance = math.huge,
entity = nil,
}
entitylist.for_enemies(function(ent)
local origin = ent:origin()
local dist = origin:dist_to(pos)
if not ent:is_dormant()
and dist < 200
and ent:weapon().group == "knife"
then
if dist < enemy.distance then
enemy = {
distance = dist,
entity = ent,
origin = origin,
}
end
end
end, true)
if not enemy.entity then return end
table.sort(enemy, function(a, b)
return a.distance < b.distance
end)
cmd.viewangles.yaw = enemy.origin:angle_to(pos).yaw + 180
return true
end
anti_aim.prevent_e = function(s, cmd)
at_targets:set_value(false)
local exploit = extended.get_exploit() ~= false
local fakeduck = fakeduck_bind:on()
local prevent = (not exploit and s.exploiting ~= exploit)
or (fakeduck and fakeduck ~= s.fakeduck)
if prevent then
s.prevent_e_ticks = math.max(fakelag_limit:get_value(), 2)
end
local run = s.prevent_e_ticks > 0
if run then
s.prevent_e_ticks = s.prevent_e_ticks - 1
antiaim_pitch:set_value(1)
antiaim_yaw:set_value(1)
else
if anti_aim.elements.preset.val() ~= 0 then
antiaim_pitch:set_value(0)
antiaim_yaw:set_value(0)
end
end
s.exploiting = exploit
s.fakeduck = fakeduck
return run
end
anti_aim.restore_inverter = function(s)
inverter_bind:set_key(s.elements.inverter:get_key())
inverter_bind:set_type(s.elements.inverter:get_type())
end
anti_aim.get_custom = function(s, mov)
local movement = anti_aim.types[mov + 2]
local get = function(el, name)
if el.elems["override " .. movement].val() then
return el.elems[movement .. " " .. name].val()
else
return el.elems["default " .. name].val()
end
end
local custom_values = {
yaw = {"left", "right"},
desync = {"left", "right"},
jitter = {"direction", "type", "amnt", "speed"},
auto_invert = {"speed"}
}
local values = {}
for k, v in pairs(custom_values) do
values[k] = {}
local el = s.elements[k]
for _, name in ipairs(v) do
values[k][name] = get(el, name)
end
end
return values
end
anti_aim.export = function(s)
local value = s.elements.preset.val()
if value + 1 ~= #s.elements.preset.dropdown.elements then return end
s.elements.preset.dropdown.el:set_value(1)
local values = {}
local get
get = function(elements, arr)
for key, el in pairs(elements) do
arr[key] = {}
if el.options then
pcall(get, el.options.elements, arr[key])
elseif el.val then
arr[key] = el.val()
end
end
end
get(s.elements, values)
values.inverter, values.manual, values.preset, values.type, values.freestand = nil, nil, nil, nil, nil
print(tostring(table.serialize({"preset name", values}, nil, true)) .. ",")
engine.execute_client_cmd("showconsole")
end
anti_aim.import = function(s, array)
local set
set = function(elements, arr)
for key, el in pairs(arr) do
if type(el) == "table" then
--print(tostring(elements[key].name))
pcall(set, elements[key].options.elements, el)
elseif elements[key].set then
--print(" " .. elements[key].name .. " " .. tostring(key))
elements[key].set(arr[key])
end
end
end
set(s.elements, array)
end
anti_aim.modifiers = function(s, cmd)
local lp = entitylist.lp()
local invert = inverter_bind:on()
local values = anti_aim:get_custom(lp:movement_type())
local desync_amount = invert and values.desync.left or values.desync.right
if s.elements.desync.elems["anti-detect"].val() then
if lp:velocity() > 4 then
desync_amount = clamp(desync_amount, 0, 37)
if lp:get_direction().x > 66 then
desync_amount = clamp(desync_amount, 0, 25)
end
end
end
desync_length:set_value(desync_amount)
if not s.use then
cmd.viewangles.pitch = 89
end
local inverter = invert and -1 or 1
local choked = clientstate.get_choked_commands()
local type = values.jitter.type
if ((choked ~= 0 and type == 1) or type == 0) and not s.use then
local strength = values.jitter.amnt
strength = (s.jitter_side == 1 and strength or 0) * inverter
cmd.viewangles.yaw = cmd.viewangles.yaw + strength * s.jitter_side
end
local speed = values.auto_invert.speed
if speed ~= 0 and cmd.tick_count % (speed * 2) == 0 then
s.should_invert = true
end
if speed == 0 and not s.should_invert then s:restore_inverter() end
if choked > 10 and values.jitter.speed > 1 then
s.jitter_waiting = 99
end
if choked == 0 then
if s.should_invert then
inverter_bind:set_key(3)
inverter_bind:set_type(inverter_bind:get_type() == 0 and 2 or 0)
s.should_invert = false
end
elseif choked == 1 then
s.jitter_waiting = s.jitter_waiting + 1
if s.jitter_waiting >= values.jitter.speed then
s.jitter_side = s.jitter_side * -1
s.jitter_waiting = 0
end
end
if not s.use then
cmd.viewangles.yaw = cmd.viewangles.yaw + (invert and values.yaw.left or values.yaw.right)
if values.jitter.direction == 1 then
cmd.viewangles.yaw = math.normalize_yaw(cmd.viewangles.yaw - values.jitter.amnt * inverter / 2)
end
end
cmd.viewangles.yaw = math.normalize_yaw(cmd.viewangles.yaw)
end
--[[anti_aim.freestand = function(s, cmd)
if s.use then return end
s.freestanding = false
if not ((autopeek_bind:on() and m_idealpeek.val() and m_idealpeek.elems.freestand.val())
or s.elements.freestand.on()) or s.manual ~= 1 then return end
local lp, lp_index = entitylist.lp(), engine.get_local_player()
if not s.targeted_player then s:get_angle() end
if not s.targeted_player then return end
if not s.targeted_player:is_alive() then return end
if lp:hittable(s.targeted_player, 2) then return end
local strength = 30
local pos, origin = lp:predict_origin(6)
pos.z = lp:get_player_hitbox_pos(0).z
local yaw = cmd.viewangles.yaw
local fractions = {}
local player_origin = s.targeted_player:origin()
player_origin.z = s.targeted_player:get_player_hitbox_pos(0).z
for i = yaw - 90, yaw + 90, 45 do
if i ~= yaw then
local rad = math.rad(i)
local cos, sin = math.cos(rad), math.sin(rad)
local new_head_pos = pos + v(strength * cos, strength * sin, 0)
local dest = origin + v(256 * cos, 256 * sin, 0)
local trace1 = trace.line(lp_index, 0x46004003, new_head_pos, player_origin)
local trace2 = trace.line(lp_index, 0x46004003, origin, dest)
fractions[#fractions+1] = {i, trace1.fraction / 2 + trace2.fraction / 2}
end
end
table.sort(fractions, function(a, b) return a[2] > b[2] end)
if fractions[1][2] - fractions[#fractions][2] < 0.5 then return end
if fractions[1][2] < 0.1 then return end
cmd.viewangles.yaw = fractions[1][1]
s.freestanding = true
end]]
anti_aim.fakehead = function(s, cmd)
local fakehead = s.elements.fakehead
if s.use or not fakehead.val() then return end
local lp = entitylist.lp()
local conditions = fakehead.elems.conditions
local on = (conditions.val(0) and lp:velocity() < 4)
or (conditions.val(1) and lp:velocity() > 4)
or fakehead.elems.bind.on()
antiaim_enable:set_value(true)
if not on then s.fakehead_next_tick = 0 return end
if globalvars.get_tick_count() < s.fakehead_next_tick
or clientstate.get_choked_commands() == 0 then return end
s.fakehead_next_tick = globalvars.get_tick_count() + fakehead.elems.speed.max - fakehead.elems.speed.val() + 5
cmd.viewangles.yaw = cmd.viewangles.yaw + 180 + fakehead.elems.delta.val() * (s.elements.inverter.on() and -1 or 1)
cmd.viewangles.pitch = 90
cmd.send_packet = true
antiaim_enable:set_value(false)
fakelag_enable:set_value(false)
end
anti_aim.run = function(s, cmd)
performance.start("anti-aim")
if s.elements.preset.val() ~= 0 then
antiaim_enable:set_value(true)
end
if s:prevent_e(cmd) then return end
local lp = entitylist.lp()
if not lp or not lp:is_alive() then return end
if s:anti_backstab(cmd) then return end
s.use = s:legit_aa(cmd)
--s:freestand(cmd)
if s.check(cmd) then return end
--s:att(cmd)
s:modifiers(cmd)
s:fakehead(cmd)
s:manuals(cmd)
performance.stop("anti-aim")
end
create_move(function(cmd) anti_aim:run(cmd) end)
do
local aa_type = Sur.Hum.("type", anti_aim.types):master(anti_aim.elements.preset, {-1})
anti_aim.elements.type = aa_type
local create = function(elements)
for k, v in pairs(anti_aim.types) do
local override
if k > 1 then override = Sur.Hum.("override " .. v):master(aa_type, {k - 1}) end
table.map(elements(v),
function (e)
e:master(aa_type, {k - 1})
if override then e:master(override) end
end)
end
end
local aa_t = {
--att = Sur.Hum.("at targets"),
yaw = Sur.Hum.("yaw", function()
create(function(v)
return {Sur.Hum.(v .. " left", -180, 180, 0),
Sur.Hum.(v .. " right", -180, 180, 0)}
end)
end),
desync = Sur.Hum.("desync", function()
Sur.Hum.("anti-detect")
create(function(v)
return {Sur.Hum.(v .. " left", 0, 60, 37),
Sur.Hum.(v .. " right", 0, 60, 37)}
end)
end),
jitter = Sur.Hum.("jitter", function()
Sur.Hum.("stabilize")
create(function(v)
return {Sur.Hum(v .. " direction", {"offset", "center"}),
Sur.Hum(v .. " type", {"body yaw", "eye yaw"}),
Sur.Hum(v .. " amnt", -90, 90, 0),
Sur.Hum(v .. " speed", 1, 16),
}
end)
end),
auto_invert = Sur.Hum("auto invert", function()
create(function(v)
return {Sur.Hum(v .. " speed", 0, 16)}
end)
end),
inverter = Sur.Hum("inverter", 2),
}
for _, v in pairs(aa_t) do
v:master(anti_aim.elements.preset, {-1}) end
table.add(anti_aim.elements, aa_t)
end
cb("round_freeze_end", function() anti_aim.manual = 1 end)
Sur.Hum.column("misc")
--local m_freestand = Sur.Hum("freestand", 2)
--anti_aim.elements.freestand = m_freestand
local m_fakehead = Sur.Hum(Sur.Hum("fake head"), function()
Sur.Hum("conditions", {"stand", "move", "on peek"}, true)
Sur.Hum()
Sur.Hum("delta", -140, 140, 79)
Sur.Hum("speed", 1, 32, 16)
end)
anti_aim.elements.fakehead = m_fakehead
anti_aim.elements.manual = Sur.Hum.options(Sur.Hum.checkbox("manual aa"), function()
Sur.Hum("left")
Sur.Hum("back")
Sur.Hum("right")
Sur.Hum("forward")
end):change(function(on, el)
if not el.val() then
anti_aim.manual = 1
end
end)
Sur.Hum(Sur.Hum.checkbox("roll"), function()
Sur.Hum("triggers", {"stand", "move", "(fake)duck", "air"}, true)
end):cm(function(cmd, el)
if anti_aim.in_use then return end
local lp = entitylist.lp()
local air = lp:in_air()
local velocity = lp:velocity()
local triggers = el.elems.triggers
local inverter = (inverter_bind:on() and 1 or -1)
desync_roll:set_value(0)
if lp:weapon().group == "grenade" and (velocity > 5 or lp:is_throwing()) then
return
end
desync_roll_pitch:set_value(90)
if velocity > 50 and triggers.val(1) then
desync_roll:set_value(66)
end
if (velocity < 4 and triggers.val(0)) then
desync_roll:set_value(77 * inverter)
end
if air and triggers.val(3) then
desync_roll:set_value(60 * inverter)
end
if entitylist.lp():movement_type() == 4 and triggers.val(2) then
desync_roll:set_value(66 * inverter)
end
end):change(function(state, el)
if not el.val() then desync_roll:set_value(0) end
end):cb("shot_fired", function(i, el)
el.temp.shoot = true
end)
m_skeet_legs = Sur.Hum(Sur.Hum("skeet legs"), function()
Sur.Hum("only visual")
end):cm(function(cmd, el)
local lp = entitylist.lp()
if not lp or not lp:is_alive() then return end
lp:set_prop_float(m_.flPoseParameter, 1)
local choked = clientstate.get_choked_commands()
local send_packet = choked == 0
local fakelag = fakelag_limit:get_value()
local visual = el.elems["only visual"].val()
if visual then return leg_movement:set_value(2) end
if extended.get_exploit() or (not extended.get_exploit() and fakelag < 3 and fakelag > 1) then
return leg_movement:set_value(send_packet and 2 or 1)
elseif not visual then
return leg_movement:set_value((send_packet or choked == fakelag - 1 or choked % 2 ~= fakelag % 2) and 2 or 1)
end
end)
frame_stage(function()
if not engine.is_connected() then return end
if globalvars.get_frame_count() % 16 == 0 then
entitylist.for_enemies(function(e)
e:restore_poseparam()
end, true)
end
local animbreaker = m_local_player_percs.elems.animbreaker
local lp = entitylist.lp()
if not lp then return end
local alive = lp:is_alive()
local in_air = lp:in_air() or client.is_key_pressed(32)
local fakeduck = fakeduck_bind:on()
local tickcount = globalvars.get_tick_count()
if m_skeet_legs.val() and alive then
lp:set_prop_float(m_.flPoseParameter, 1)
lp:set_poseparam(0, {-180, -179})
else
lp:set_poseparam(0, {-180, 180}) end
if in_air then
animbreaker.temp.ticks = -1
elseif animbreaker.temp.ticks < 0 and animbreaker.temp.ticks > -3 then
animbreaker.temp.ticks = animbreaker.temp.ticks - 1
elseif animbreaker.temp.ticks <= -3 then
animbreaker.temp.ticks = tickcount + se.time_to_ticks(0.8)
end
if tickcount < animbreaker.temp.ticks and animbreaker.temp.ticks > 0
and not in_air and not fakeduck and animbreaker.val(1) and alive
and antiaim_enable:get_value() and not anti_aim.in_use then
lp:set_poseparam(12, {0.999, 1}) else
lp:set_poseparam(12, {-90, 90}) end
if animbreaker.val(0) and in_air and alive then
lp:set_poseparam(6, {0.9, 1}) else
lp:set_poseparam(6, {0, 1, 0}) end
end, 5)
cb("unload", function()
local lp = entitylist.lp()
if engine.is_connected() or not lp then return end
lp:restore_poseparam()
end)
[ Sur.Hum.lua ] syntax error: ...\Counter-Strike Global Offensive/nix/scripts/Sur.Hum.lua:412: '<name>' expected near '('