-- Simple check difference of simulation
local PreviousSimulationTime = 0
local DifferenceOfSimulation = 0
function SimulationDifference()
local LocalPlayer = entity_list.get_client_entity(engine.get_local_player())
local CurrentSimulationTime = TimeToTicks(LocalPlayer:get_prop("DT_BaseAnimating", "m_flSimulationTime"):get_int())
local Difference = CurrentSimulationTime - (PreviousSimulationTime + 0.75)
PreviousSimulationTime = CurrentSimulationTime
DifferenceOfSimulation = Difference
return DifferenceOfSimulation
end
local function DeffensivePitch()
-- Pitch exploit
if Lua.Antiaim.PitchExploit:get() then
if Lua.Antiaim.PitchExploitKey:get_key() == true and (Menu.Exploits.Doubletap:get_key() or Menu.Exploits.HideShots:get_key()) then
if SimulationDifference() <= -1 then
Menu.Antiaim.Pitch:set(2)
else
if math.floor(global_vars.curtime * 26) % 16 == 0 and client.choked_commands() < 2 then
Menu.Antiaim.Pitch:set(2)
else
Menu.Antiaim.Pitch:set(1)
end
end
else
Menu.Antiaim.Pitch:set(1)
end
end
end
callbacks.register("paint", DeffensivePitch);