The movie takes place in some alternate universe where "luck" is scientifically proved to exist. Furthermore, every child (I think) needs to take a test that checks their luck. The two main protagonists take the exam at the start of the movie, and it is discovered that the girl protagonist has an enormous amount of luck, while the guy protagonist almost has negative luck (I think).
Then later in the movie we get a timeskip, and the guy protagonist discovers magic somehow which allows him to up his luck (?) and starts dating the woman protagonist. In the end, it is discovered that the magic manipulated her feelings and she leaves him.
The movie is a live action American (I believe, but might be from some other English-speaking country) movie, which I watched 7~10 years ago.