This should be extremely easy: Anti-Anti-AFK

I was looking for something that randomly sets your mouse to a certain point so you don’t get kicked by an afkkicker. Shouldn’t be too hard. Thanks in advance.

+left

+forward…
How I get by most of them.

me too…

[lua]
if !SERVER then return false; end
local PLUGIN = {}

PLUGIN.Name = “Ban Words”
PLUGIN.Author = “Andy Vincent”
PLUGIN.Date = “09th August 2007”
PLUGIN.Filename = PLUGIN_FILENAME
PLUGIN.ClientSide = false
PLUGIN.ServerSide = true
PLUGIN.APIVersion = 2
PLUGIN.Gamemodes = {}

PLUGIN.BannedWords = {};
// PLUGIN.BannedWords = {“nigger”, “white power”, “nigga”, “fag”, “queer”, “kike”, “whitepower”, “whitpower”, “nigg3r”, “niggar”, “niglet”, “niger”, “n1gger”, “n1gg3r”, “nlgger”, “nlgg3r”, “reggin”, “pineapple”, “cuntskikbut”, “cuntskickbut”, “n!gger”, “n!gg3r”, “conna”, “pine@pple”, “p1ne@pple”, “pinapple”, “pin@apple”, “p1n@pple”, “p1ne@ppl”, “p1neappl”, “k1k3”, “kik3”, “k1ke”, “furry”, “furfag”, “yiff”, “chrisaster”, “retsasirhc”};

function PLUGIN.MonitorChat ( Player, Text, Bool )
for k, v in pairs(PLUGIN.BannedWords) do
if string.find(string.lower(Text), string.lower(v)) then
if Player:GetLevel() < 4 then
Player:PrintMessage(HUD_PRINTTALK, “As an Admin, you are immune from the auto-kicker, but please watch your language as to avoid aggrivating other players.”);
elseif Player:GetLevel() < 5 then
Player:PrintMessage(HUD_PRINTTALK, “As a VIP member, you are immune from the auto-kicker, but please watch your language as to avoid aggrivating other players.”);
else
Player:Kick("’" … v … “’ is an auto-kick word.”);

			for l, j in pairs(player.GetAll()) do
				j:PrintMessage(HUD_PRINTTALK, Player:Nick() .. " was kicked for saying '" .. v .. "', which is an auto-kick word.");
			end
			
			SendLog("Auto Kicker", "AUTO_WORD_KICK", Player:Nick(), v)
			
			return "";
		end
	end
end

PLUGIN.PlayerLastChats[Player] = CurTime()

end
hook.Add(“PlayerSay”, “PLUGIN.MonitorChat”, PLUGIN.MonitorChat);

PLUGIN.PlayerPositions = {};
PLUGIN.PlayerLastChats = {};
GAMEMODE.EnableAutoKick = true;

if GAMEMODE.Name == ‘Risk’ then return false; end

function PLUGIN.MonitorPlayerMovement ( )
if !GAMEMODE.EnableAutoKick then return false; end
if game.GetMap() == ‘risk’ then return false; end

for k, v in pairs(player.GetAll()) do
	if v:GetLevel() &gt; 2 then
		PLUGIN.PlayerPositions[v] = PLUGIN.PlayerPositions[v] or Vector(0, 0, 0);
			
		local CurPos = v:GetPos();
		
		if v:InVehicle() then
			CurPos = v:GetVehicle():GetPos();
		end
			
		PLUGIN.PlayerLastChats[Player] = PLUGIN.PlayerLastChats[Player] or 0;
			
		if PLUGIN.PlayerPositions[v]:Distance(CurPos) &lt;= 2 then
			v:Kick("AFK");
				
			for l, j in pairs(player.GetAll()) do
				j:PrintMessage(HUD_PRINTTALK, v:Nick() .. " was kicked for being AFK.");
			end
				
			SendLog("Auto Kicker", "AUTO_AFK_KICK", v:Nick(), nil)
		else
			PLUGIN.PlayerPositions[v] = CurPos;
		end
	end
end

end
timer.Create(“PLUGIN.MonitorPlayerMovement”, 600, 0, PLUGIN.MonitorPlayerMovement);
[/lua]

This is how most anti afk work.

Simple console commands such as these.
+left; +moveleft; +forward

Read the OP once more mate.

REAL anti-afk which is what 99% of servers have detects mouse angle not your position in the map so it doesn’t matter. Where’s flapjack he’d know what to do.

Thats why I use +left and +forward…+left makes you spin around as if you were moving your mouse to the left…+forward is obvious.

That doesn’t change your mouseangle at all. It changes your position. Someone show me flapjack’s page so I can PM him?

Hi.

player.GetPos
player.EyeAngles
Ping/Pong gui.MousePos

For bypassing it, the reverse.

Set position by running commands (+forward, +left, whatever)
Change view angles slightly in a CreateMove hook
gui.SetMousePos

I’m sorry, but I’ve got a little too much going on right now to write it myself. Got some irl problems, taking a break from GMod and such until everything is back to normal.

FLAPJACK :slight_smile: <3 Thanks for at least helping I bet I could mess with it or get someone to write it for me. Thanks

Lua can’t track your mouse, it can only track what the mouse controls. +left pans your view to the left as if you moved your mouse. It works.

It sounds like your thinking +left is the same a pressing A, go into your control settings, if you look you will see that you can set up mouse to work with buttons…thats what +left its the same as moving your mouse to the left…trust me I know what I am talking about.

God dammit /facepalm. What don’t you understand about it’s a reverse aimbot?

A reverse aimbot would be where you don’t aim at people. What?

How did this go from Getting pass Anti-Afk to some shit about “reverse aimbots”, I tried to help you but you can’t get it that +left and +forward will get past every anti-afk script that is used… oh and to correct what Flapjack said +left does not change the player’s position, it changes your mouse angle by constantly moving it to the left…+moveleft changes the player’s position. If you don’t trust me then go in GMod and try it out yourself.

The Doctor is right.

+left is not walking to the left it’s turning in the direction left. So yes it does change your mouse angle.

Reverse aimbot=it doesn’t aim at people it aims at a random place. and god damn if I hear +left one more time I am going to find and kill you all. You people have no idea what entity angle is and yet you’re posting in the LUA forum on how you think it should be changed.

entity angle #1 entity angle #2 no difference in the angle numbnuts

entity angle #3

                           *************************  _entity angle #4_ 3-4 there is a different entity angle

If you know so much then why are you posting asking for help? +left is part of angle not pos, if you have ever actually made an entity in Lua then you would know this. When choosing pos you work with X, Y, Z for the world.
When working with Angles you use X, Y, Z but this time they represent Pitch, Roll, Yaw, Looking up adds to your pitch, looking down subtracts from your pitch, roll can be ignored for players since it will get reset if you try to set it, if you look to the right it adds yaw, if you look to the left it subtracts yaw.

Z or Yaw is what I have been talking about changing…as you can see…its an angle.

If you still wish to dispute this with me then you can shove it because I’m done trying to help you.

Just use some timers and SetEyeAngles or something of the like.
[lua]
timer.Create( “AntiAFKAim”, 29, 0, function()
LocalPlayer():SetEyeAngles(LocalPlayer():EyeAngles() + Angle(math.Rand(-20,20),math.Rand(-180,180),0))
end )
timer.Create( “AntiAFKMove”, 30, 0, function()
RunConsoleCommand("+forward")
RunConsoleCommand("-back")
end )
timer.Create( “AntiAFKMove2”, 32 + math.Rand(0.1, 0.2), 0, function()
RunConsoleCommand("-forward")
RunConsoleCommand("+back")
end )
[/lua]