function aimkey()
if input.IsKeyDown(KEY_F) then
local ply = LocalPlayer()
local trace = util.GetPlayerTrace( ply )
local traceRes = util.TraceLine( trace )
if traceRes.HitNonWorld then
local target = traceRes.
if target:IsPlayer() then
local targethead = target:LookupBone("ValveBiped.Bip01_Head1")
local targetheadpos,targetheadang = target:GetBonePosition(targethead)
ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle())
end
end
end
end
end
hook.Add("Think","aimbot",aimbot)
local function aimkeyON()
print("Hold F for Aimbot")
chat.AddText( Color( 255, 127, 0), "Hold F for Aimbot")
hook.Add("Think","ak",aimKey)
end
concommand.Add("trekt_aimkey_enable",aimkeyON)
local function aimkeyOFF()
print("AimKey Disabled"
chat.AddText( Color( 255, 127, 0), "AimKey Disabled"
hook.Remove("Think","ak")
end
concommand.Add("trekt_aimkey_disable",aimkeyOFF)
local aimkey = CreateClientConVar("aimkey", 0, true, false)
function aimkey()
if input.IsKeyDown(KEY_F) then
local ply = LocalPlayer()
local trace = util.GetPlayerTrace( ply )
local traceRes = util.TraceLine( trace )
if traceRes.HitNonWorld then
local target = traceRes.Entity
if target:IsPlayer() then
local targethead = target:LookupBone("ValveBiped.Bip01_Head1")
local targetheadpos,targetheadang = target:GetBonePosition(targethead)
ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle())
end
end
end
end
hook.Add("Think","ak",aimkey)
local function aimkeyON()
print("Hold F for Aimbot")
chat.AddText( Color( 255, 127, 0), "Hold F for Aimbot")
hook.Add("Think","ak",aimKey)
end
concommand.Add("trekt_aimkey_enable",aimkeyON)
local function aimkeyOFF()
print("AimKey Disabled")
chat.AddText( Color( 255, 127, 0), "AimKey Disabled")
hook.Remove("Think","ak")
end
concommand.Add("trekt_aimkey_disable",aimkeyOFF)