Advertisement
captmicro

Unknown

Oct 15th, 2010
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. hook.Add("CreateMove", "lolwut", function(u)
  2.     if input.IsKeyDown(KEY_B) then
  3.         if input.IsKeyDown(KEY_DELETE) then hook.Remove("CreateMove", "lolwut") end
  4.         for k,v in pairs(ents.FindInSphere(LocalPlayer():GetShootPos(), 1024*5)) do
  5.             if (v:IsPlayer() and v ~= LocalPlayer() and v:Alive()) then
  6.                 if (v:Team() ~= LocalPlayer():Team()) then
  7.                     local bpos,bang = v:GetBonePosition(v:LookupBone("ValveBiped.Bip01_Head1"))
  8.                     u:SetViewAngles((bpos - LocalPlayer():GetShootPos()):Angle())
  9.                     RunConsoleCommand("+attack")
  10.                     timer.Simple(0.1, RunConsoleCommand, "-attack")
  11.                 end
  12.             end
  13.         end
  14.     end
  15. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement