Guest User

Untitled

a guest
May 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. local function aimbot()
  2.     local ply = LocalPlayer()
  3.     local trace = util.GetPlayerTrace( ply )
  4.     local traceRes = util.TraceLine( trace )
  5.     local target = traceRes.Entity
  6.     if target:IsPlayer() and ply:KeyPressed( IN_ATTACK2 ) or target:IsNPC() and ply:KeyPressed( IN_ATTACK2 ) then
  7.         local head = target:LookupBone( "ValveBiped.Bip01_Head1" )
  8.         local targetheadpos, targetheadang = target:GetBonePosition( head )
  9.         ply:SetEyeAngles( ( targetheadpos - ply:GetShootPos() ):Angle() )
  10.     else return nil
  11.     end
  12. end
  13.  
  14. hook.Add("KeyPress","attack2",aimbot)
Add Comment
Please, Sign In to add comment