Need help with predicates, and 1.21 enchants

Hello! my issue is that mc won't let me load in the enchants cause i need to reload the world, but when i do it says to enter in safe mode and i was just trying to change one single enchant json file. 1.21 has added the function to create custom enchants but this enchant is suppose to run 3 different functions depending on enchant level. i thought that this might be because of the predicates but thats not the case, i will send both a sample predicate and the enchant code down below too. If anyone knows an easier way to make custom enchants that run different functions with different levels that would be really nice!

Code pasted below ;D

Continue to help post