Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local last_goto = 0
- hook.Add("CreateMove", "follow", function(cmd)
- local ply = LocalPlayer()
- local target = player.GetByUniqueID(--[[KpK.Y0uM]] "3231181953") or NULL
- if target:IsValid() then
- local apos = ply:EyePos()
- local bpos = target:EyePos()
- local offset = bpos - apos
- local length = offset:Length()
- local ang = offset:Angle()
- ang.p = math.NormalizeAngle(ang.p)
- if not target:Alive() and ply:Alive() then
- RunConsoleCommand("aowl", "kill")
- elseif target:Alive() and not ply:Alive() then
- RunConsoleCommand("aowl", "revive")
- end
- if last_goto < SysTime() and target:Alive() and ply:Alive() and util.TraceLine({start = apos, endpos = bpos, filter = {ply, target}}).Fraction ~= 1 then
- RunConsoleCommand("aowl", "goto", target:UniqueID())
- last_goto = SysTime() + 1
- end
- if length > 100 then
- cmd:SetForwardMove(1000)
- end
- cmd:SetViewAngles(ang)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement