Can I apply for UCL, when I will have excellent grades in Maturitni zkouska (A-levels alternative in my country), but I used to have very bad grades all years at high school?

Is there a chance they would accept me?

According to the web, they only consider A-levels. Then the bad grades should not have any impact on it, but I will apply when I will not have done A-levels yet, I would only have expected grades (my teacher will write A's).

Best to look at UCL's website or contact them directly. Most universities will look at A-levels but some may have requirements for earlier qualifications, such as GCSEs. The best way to find out is to talk to admissions.