It explicitly says in the description of the cup what you did is allowed, you won that game. "1.1.1 The worm may fire the weapon if it is standing on the box with a pixel, even if it not standing on top of it [completely]? (that means he must stay on that box, if hes touching box from the other side than top then its forbidden)." It seems like the rule sort of contradicts itself in regards to whether the worm must stay on top of a box to use a weapon, but that's not relevant in this case.
even if it not standing on top of it
if hes touching box from the other side than top then its forbidden
ehh? I guess he meant not standing on top of it completely is allowed, but standing on the side of it is not allowed.