Um, no, I can't afford chatgpt and I only have a old desktop computer with 4 cpu ^^
ChatGPT is free to use on lower tiers which are more than enough to generate code.
But if you could give me your linear in that case, share it and I'll show you, based on your code, that linear is crap in a box

You can simply update your own script doing something like this (Did not test it, but you should be able to understand the change required) :
# Decode address target to hex
ADDRESS_TARGET = b58decode(ADDRESS_TARGET)
# Compare with hex version of target instead of B58
def linear_scan(start: int, end: int, target: str):
ops = 0
for x in range(start, end+1):
ops += 1
if hash160_pubkey(x) == target:
return x, ops
return None, ops