But it doesn't show that the stone wasn't, 0 or 9999, it just writes [string "chunk"]: 13: attempt to call global 'Stop' (a nil value)
Damn... That's what you get for trying to type code on a mobile device! Stupid auto-capitalisation

Yeah... It should be stop(), not Stop()

Also, did you want it to specify if it was a 0 or a 9999 that hadn't shown up for 50000 rolls?
If so, that code won't do that... It'll simply stop because there has not been a 0
AND no 9999 in 50000 consecutive rolls... But it could be that there was no 9999 for 75000 rolls, but there was a couple of 0s that reset the count.
If you need it to track both numbers separately, the code will need to be modified:
chance = 98
bethigh = True
basebet = 0.00000010
nextbet = basebet
zerocount = 0
ninescount = 0
function dobet()
nextbet = basebet
zerocount = zerocount + 1
ninescount = ninescount + 1
if lastBet.Roll == 0 then
zerocount = 0
else if lastBet.Roll == 9999 then
ninescount = 0
end
if zerocount >= 50000 then
print("50000 rolls without 0")
ching()
stop()
nextbet = 0
end
if ninescount >= 50000 then
print("50000 rolls without 9999")
ching()
stop()
nextbet = 0
end
end