Skip to content

Instantly share code, notes, and snippets.

Created March 23, 2014 01:56
Show Gist options
  • Save anonymous/9717442 to your computer and use it in GitHub Desktop.
Save anonymous/9717442 to your computer and use it in GitHub Desktop.
math.randomseed(os.time())
function randkey()
local keys = { "A", "B", "start", "select", "up", "down", "left", "right" }
return keys[math.random(1,8)]
end
for key in randkey do
joypad.set(0, { [key] = true })
vba.frameadvance()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment