Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- theres no public one afaik
- was easy to make
- enjoy
- ]]
- 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 function openmenu()
- 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
- end
- concommand.Add("hitbox", openmenu);
- hook.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);
Advertisement
Add Comment
Please, Sign In to add comment