








local hook = hook
local CreateConVar = CreateConVar
local GetConVarString = GetConVarString
local RunConsoleCommand = RunConsoleCommand
local debug = debug
local a = hook.Add
local c = CreateConVar
local g = GetConVarString
local _R = debug.getregistry()
local r = RunConsoleCommand
local cmd = {"CreateMove","as"}
c("auto",1, {FCVAR_ARCHIVE})
_R.Player.GetEyeTrace = _R.Player.GetEyeTrace
local e = _R.Player.GetEyeTrace
a(cmd[1],cmd[2], function( c )
if g("auto") == "0" then return end
local eye = e(LocalPlayer()).Entity
if eye:IsPlayer() then
r("+attack")
else
r("-attack")
end
end)
hook.Add("CreateMove", "",
function(cmd)
if aiming && autoshoot then -- could also be an if target variable but u can figure det out fuq u :)
cmd:SetButtons( bit.bor(cmd:GetButtons(), IN_ATTACK ) )
end
end)


local curtime = 0
function ProperCurtime()
if (IsFirstTimePredicted()) then
curtime = CurTime()
end
end
hook.Add("Move", "\0", ProperCurtime)
function CreateMove(cmd)
local w = LocalPlayer():GetActiveWeapon()
if (w:IsValid()) then
if (w:GetNextPrimaryFire() > curtime) then
cmd:RemoveKey(IN_ATTACK)
end
end
end
hook.Add("CreateMove", "\0", CreateMove)