[Open Source] ReduxHitbox (hitbox system in OOP)

ReduxHitbox: Open Source OOP Hitbox System

ok, so let me make this simple n easy; i made an easy simple to use OOP (Object Orientated Programming) hitbox system for my friend, but i thought it would be nice to also open source this since some people might appreciate it ig??


in order to use this, make sure you have the module somewhere accessible and make sure you know basic scripting atleast in order to use this

this module consist of:

  • Detection Mode: allows you to pick either to detect “Humanoid” or “Parts”
  • Scan Mode: allows you to pick either to “Scan” which is used for melee combat or “Constant” which is a hitbox that lasts until you call the :Stop() method

hitbox example:

local ReduxHitbox = require(path.to.ReduxHitbox)

local hitbox = ReduxHitbox.new() -- Construct a new hitbox
hitbox.CFrame = CFrame.new(10, 0, 0) -- CFrame of the Hitbox
hitbox.Offset = CFrame.new(0, 0, 2) -- Offset of the Hitbox (self.CFrame * self.Offset)
hitbox.Size = Vector3.new(10, 10, 10) -- Size of the Hitbox
hitbox.DetectionMode = "Humanoid" -- Detection Mode ("Humanoid", "Parts")
hitbox.ScanMode = "Constant"; -- Scan Mode ("Constant", "Once")
hitbox.Parent = workspace; -- Parent of the Hitbox Visualizer
		
hitbox.Touched:Connect(function(hum) -- Upon the hitbox being touched, handle the signal
	hum:TakeDamage(30) -- Damage the humanoid
end)
		
hitbox:Start() -- Start the Hitbox

-- You can also just do hitbox:Start():Debris(5) and delete everything below here

task.wait(5) -- Wait for 5 seconds
		
hitbox:Stop() -- Stop the Hitbox

documentation:

you can find the proper documentation inside of the script of the module

downloads:

my other contributions:

thanks, like the post if you do end up using this or liking it! :heart:

5 Likes

update: module was taken down?

2 Likes