Code:
hook.Add( "Think", "ThinkAboutIt", function()
	if input.IsKeyDown(KEY_B) then
		local closest = nil
		
		local hitpos = LocalPlayer():GetEyeTrace()
		
		for k, v in pairs( ents.FindInSphere(hitpos.HitPos,500) ) do
			if v:IsPlayer() and v != LocalPlayer() then
				if v:Alive() then
					closest = v
				end
			end
		end
		
		if closest and closest:IsPlayer() and closest:Alive() then
			local head = closest:LookupBone("ValveBiped.Bip01_Head1")
			local headpos, headang = closest:GetBonePosition(head)
			
			LocalPlayer():SetEyeAngles( (headpos-LocalPlayer():GetShootPos()):Angle() )
			RunConsoleCommand("+attack")
			timer.Simple(0.25,function()
				RunConsoleCommand("-attack")
			end)
		end
	end
end)
To install/use it, you need a Lua bypass, which there are plenty on the forum, and you can just put it into garrysmod/lua/autorun/ and name it mysterious.lua or something. If it doesn't start automatically when you join, type this in console: "lua_openscript_cl autorun/mysterious.lua". Happy aimbotting you lazy son of a bitch!

(No I didn't make this but you know shits and giggles).