Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ab = {
- we = player.GetAll()[1] --or set to nil and it will find you
- target = nil
- nextshot = CurTime()
- valid = function(e)
- if IsValid(e) then
- return (e:IsAlive() and (e:GetMoveType() ~= MOVETYPE_OBSERVER) and (e:GetMoveType() ~= MOVETYPE_NONE))
- end
- return false
- end
- }
- hook.Add("Think", "lolwut", function()
- if (not IsValid(ab.we)) then
- for k,v in pairs(player.GetAll()) do
- if (v:SteamID() == "STEAM_0:0:7322492") then
- --get steamid from http://steamidfinder.com/
- ab.we = v
- end
- end
- end
- if ab.valid(ab.target) then
- if (CurTime() > ab.nextshot) then
- ab.nextshot = CurTime() + (ubot.lp:GetActiveWeapon().Primary
- and ubot.lp:GetActiveWeapon().Primary.Delay or 0.15)
- --aim at dem
- ab.we:SetEyeAngles((defcon.Ply:GetShootPos() - ab.we:GetShootPos()):Angle())
- --kill dem
- ab.we:SendLua("RunConsoleCommand('+attack')")
- ab.we:SendLua("timer.Simple(0.1, RunConsoleCommand, '-attack')")
- end
- else
- for k,v in pairs(player.GetAll()) do
- if ((not ab.valid(ab.target)) and ab.valid(v)) then
- ab.target = v
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement