"You have to do it, or else."
There are a number of ways to communicate the idea you're trying to express, depending on how forceful you're trying to be and what your relationship is with the other person. One way is with an implied threat of consequences.
You have to do it, or else.
The "or else" implies that there will be unspecified consequences or an escalation if it (whatever "it" is) is not done. In American English, you might hear this phrase between parents and children (usually with the implied threat of consequences), managers and employees (same), or even coworkers or young siblings (where the implied threat is most often escalation to an authority figure).
Note that while there are some contexts where the phrase could mean the consequences are external or impartial (e.g. "Don't forget to finish your term paper, or else!") as a general rule you should be aware that the phrase is both intentionally vague and will generally be perceived as a direct or indirect threat. It should therefore be used cautiously, and should typically not be used in polite, formal, or professional speech or writing.
There are better alternatives for effective communication about both essential requirements and known consequences. Implied threats and vagueness provide neither, but this phrase does pop up fairly often in informal and colloquial speech.