I really think you want the knockback to be part of the if statement, there seems to be very little reason to ever be outside of the if statement. Did you try my sample?
Again I don’t know what you changed exactly so it’s really hard for me to understand why you would be getting those errors, making it impossible to help without the changed code pasted. Indent errors mean you need to add tabs to some of the lines, you probably deleted too many tabs since elif in class body means there is an elif without any indentation.