I can open the menu and select a hitbox but when the triggerbot is shooting it gets detected by cac
Is there a way to make it cac undetected I'm an idiot in lua and stuff
Triggerbot by spinquad:
http://pastebin.com/aqkDFaqt
Code:
local util = util;
local me = LocalPlayer();
local hook = hook;
local vgui = vgui;
local concommand = concommand;
local bit = bit;
local hitboxes = {
[HITGROUP_HEAD] = {false, "Head"},
[HITGROUP_CHEST] = {false, "Chest"},
[HITGROUP_STOMACH] = {false, "Stomach"},
[HITGROUP_LEFTARM] = {false, "Left Arm"},
[HITGROUP_RIGHTARM] = {false, "Right Arm"},
[HITGROUP_LEFTLEG] = {false, "Left Leg"},
[HITGROUP_RIGHTLEG] = {false, "Right Leg"},
[HITGROUP_GEAR] = {false, "Gear"},
};
local frame = vgui.Create("DFrame");
frame:SetSize(150, 200);
frame:SetTitle("");
frame:Center();
frame:MakePopup();
local hh = 25;
local function createcheckbox(hitbox)
local checkbox = vgui.Create("DCheckBoxLabel", frame);
checkbox:SetPos(5, hh);
checkbox:SetText(hitboxes[hitbox][2]);
checkbox:SetChecked(hitboxes[hitbox][1]);
checkbox:SizeToContents();
function checkbox:OnChange(newbool)
hitboxes[hitbox][1] = newbool;
end
hh = hh + 20;
end
for k,v in next, hitboxes do
createcheckbox(k);
end
local h = {
hooks = {},
};
local null = function() end
function h.detour(typ)
h.hooks[typ] = {};
local ofunc = GAMEMODE[typ] || null;
GAMEMODE[typ] = function(self, ...)
ofunc(self, ...);
for k,v in next, h.hooks[typ] do
local ret1, ret2, ret3, ret4 = v(...);
if(ret1) then return ret1, ret2, ret3, ret4; end
end
end
end
function h.Add(typ, func)
if(!h.hooks[typ]) then
h.detour(typ);
end
h.hooks[typ][ #h.hooks[typ] + 1 ] = func;
end
--example:
h.Add("CreateMove", function(ucmd)
local trace = me:GetEyeTrace();
local hitbox, entity = trace.HitGroup, trace.Entity;
if (!entity:IsValid() || entity:IsDormant() || !entity:IsPlayer() || entity:Health() < 1) then return; end
if (!hitboxes[hitbox][1]) then return; end
ucmd:SetButtons(bit.bor(ucmd:GetButtons(), IN_ATTACK));
end);