negative_seven's lua script links from #4641: negative_seven's NES Flappy Bird "maximum score" in 5:19:36.02
local sRAM=0x0037 -- game glitches around 680, 1360, 2048, 2731, 3414, 4096, 4780, 5460, 6xxx, 6826, 7502
local yRAM=0x003F
local pRAM=0x003B
local r = {0, 0, 0}
local w = {0, 0}
local s, y, p, h
while true do
s = memory.readbyte(sRAM)
y = memory.readbyte(yRAM)
p = memory.readbyte(pRAM)
t = joypad.get(1)
if w[1] > 0 then
w[1] = w[1]-1
end
if w[2] > 0 then
w[2] = w[2]-1
end
if p ~= r[1] then
w[1] = 110
r[1] = p
end
if w[1] == 0 and r[2] ~= r[1] then
r[2] = r[1]
w[2] = 20
end
if w[2] == 0 and r[3] ~= r[2] then
r[3] = r[2]
end
h = 85+15*r[3]
if y > h and s ~= 255 then
t["A"] = true
joypad.set(1, t)
end
gui.text(10,9, "Pipe height: " .. h)
emu.frameadvance()
end