If you choose a random value between numbers 0 and 100, and then choose any value lower than 50, that is effectively a 50% chance that the number is anywhere between 0 and 50 (almost, depending on how rounding works). If you go higher or lower than 50 than it should be a higher or lower chance. It's not a coin flip.
What you can do is create a variable called "hit chance" and it can change to any number you want. If it is accuracy, and you put it at 70 accuracy, you can use this accuracy variable to check against the random variable, so the code would look like this: "If round(random(0,100)) is less than accuracy" and that will give you a 70% chance to hit, and you can change accuracy whenever you want for a player or whatever.