Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function aimbot()
- local ply = LocalPlayer()
- local trace = util.GetPlayerTrace( ply )
- local traceRes = util.TraceLine( trace )
- local target = traceRes.Entity
- if target:IsPlayer() and ply:KeyPressed( IN_ATTACK2 ) or target:IsNPC() and ply:KeyPressed( IN_ATTACK2 ) then
- local head = target:LookupBone( "ValveBiped.Bip01_Head1" )
- local targetheadpos, targetheadang = target:GetBonePosition( head )
- ply:SetEyeAngles( ( targetheadpos - ply:GetShootPos() ):Angle() )
- else return nil
- end
- end
- hook.Add("KeyPress","attack2",aimbot)
Add Comment
Please, Sign In to add comment