Need help optimising enchantment file
I'm implementing an enchantment that deals damage based on the enemy's score on the scoreboard (ranges from 0 to 10). However, right now it is very bloated and slow, with a lot of repeated conditions and effects. I need help finding a way to improve its implementation.