Advertisement
captmicro

lolaimbot?

Dec 10th, 2012
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.10 KB | None | 0 0
  1. local ab = {
  2.     we = player.GetAll()[1] --or set to nil and it will find you
  3.     target = nil
  4.     nextshot = CurTime()
  5.     valid = function(e)
  6.         if IsValid(e) then
  7.             return (e:IsAlive() and (e:GetMoveType() ~= MOVETYPE_OBSERVER) and (e:GetMoveType() ~= MOVETYPE_NONE))
  8.         end
  9.         return false
  10.     end
  11. }
  12.  
  13. hook.Add("Think", "lolwut", function()
  14.     if (not IsValid(ab.we)) then
  15.         for k,v in pairs(player.GetAll()) do
  16.             if (v:SteamID() == "STEAM_0:0:7322492") then
  17.                 --get steamid from http://steamidfinder.com/
  18.                 ab.we = v
  19.             end
  20.         end
  21.     end
  22.    
  23.     if ab.valid(ab.target) then
  24.         if (CurTime() > ab.nextshot) then
  25.             ab.nextshot = CurTime() + (ubot.lp:GetActiveWeapon().Primary
  26.                 and ubot.lp:GetActiveWeapon().Primary.Delay or 0.15)
  27.             --aim at dem
  28.             ab.we:SetEyeAngles((defcon.Ply:GetShootPos() - ab.we:GetShootPos()):Angle())
  29.             --kill dem
  30.             ab.we:SendLua("RunConsoleCommand('+attack')")
  31.             ab.we:SendLua("timer.Simple(0.1, RunConsoleCommand, '-attack')")
  32.         end
  33.     else
  34.         for k,v in pairs(player.GetAll()) do
  35.             if ((not ab.valid(ab.target)) and ab.valid(v)) then
  36.                 ab.target = v
  37.             end
  38.         end
  39.     end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement