Hit boxes and Hurt boxes

So me and a friend are attempting to make a fighting game of sorts and I would like to know how (if possible in Lua) to make active and inactive hit boxes for the attacks and characters. If any of you would be able to help that would be greatly appreciated.

This might help, if you can figure out aabb queries that is. https://codea.io/talk/discussion/5245/aabb-function-library