I think I'm planning to leave my job for a new one while promising to stay
Why are you leaving your job before getting promoted?
I want to leave anyway because my boss is always making fun of me.
You are expected to notify your boss when you are leaving a job. You could get a bad reputation if you do not do this.
I'll be fine when everyone sees how good I am at my new job.
It's great you are having a better job where you will be happy, but you still have to follow company protocol. What would your employers and co-workers think if they see you doing things on your own? Maybe just follow the rules for just a little longer and tell you are leaving so you leave a good impression.