So imagine we have a 50% chance of loosing or winning a bet

Loosing 30 bets in a row is a 1 in a billion chance ~~ so here is my question, you are at bet 29 and you are about to make your bet nr 30, what are your odds here 50%? But at the same time you lost 29 bets and loosing 30 is a 1 in a billion chance so you have 50% or 1/billion chance of loosing the next bet? I know you will probably say 50% but it is just so counter intuitive that i would like a better explanation

It is 50%.

The probability of getting 20 heads then 1 tail, and the probability of getting 20 heads then another head are both 1 in 2,097,152. Therefore, it is equally likely to flip 21 heads as it is to flip 20 heads and then 1 tail when flipping a fair coin 21 times.

The gambler's fallacy, also known as the Monte Carlo fallacy or the fallacy of the maturity of chances, is the mistaken belief that, if something happens more frequently than normal during some period, it will happen less frequently in the future, or that, if something happens less frequently than normal during some period, it will happen more frequently in the future (presumably as a means of balancing nature). In situations where what is being observed is truly random (i.e., independent trials of a random process), this belief, though appealing to the human mind, is false. This fallacy can arise in many practical situations although it is most strongly associated with gambling where such mistakes are common among players.

Now suppose that we have just tossed four heads in a row, so that if the next coin toss were also to come up heads, it would complete a run of five successive heads. Since the probability of a run of five successive heads is only 1⁄32 (one in thirty-two), a person subject to the gambler's fallacy might believe that this next flip was less likely to be heads than to be tails. However, this is not correct, and is a manifestation of the gambler's fallacy; the event of 5 heads in a row and the event of "first 4 heads, then a tails" are equally likely, each having probability 1⁄32. Given that the first four rolls turn up heads, the probability that the next toss is a head is in fact,

While a run of five heads is only 1⁄32 = 0.03125, it is only that before the coin is first tossed. After the first four tosses the results are no longer unknown, so their probabilities are 1. Reasoning that it is more likely that the next toss will be a tail than a head due to the past tosses, that a run of luck in the past somehow influences the odds in the future, is the fallacy.