Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tape = {}
- sel = 1
- function onTick()
- if input.getBool(1) then
- tape[#tape+1] = 1
- elseif input.getBool(2) then
- tape[#tape+1] = 2
- elseif input.getBool(3) then
- tape[#tape+1] = 3
- elseif input.getBool(4) then
- tape[#tape+1] = 4
- elseif input.getBool(5) then
- tape[#tape+1] = 5
- elseif input.getBool(6) then
- tape[#tape+1] = 6
- elseif input.getBool(7) then
- tape[#tape+1] = 7
- elseif input.getBool(8) then
- tape[#tape+1] = 8
- elseif input.getBool(9) then
- tape = {}
- sel = 1
- end
- sel = input.getNumber(1)
- if tape[sel] == nil then
- tape[sel] = 0
- else
- output.setNumber(1,tape[sel])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment