Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("left")
- while true do
- os.pullEvent()
- local y
- y = os.pullEvent()
- write( "What's your order?" )
- local input = read()
- y = input
- if input == "Hearty_Breakfast" then
- local count = turtle.getItemCount( 1 )
- if count >= 16 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 16 )
- turtle.dropDown( 16 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.white )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Apple_Pie" then
- local count = turtle.getItemCount( 1 )
- if count >= 10 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 10)
- turtle.dropDown( 10 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.red )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Pancakes" then
- local count = turtle.getItemCount( 1 )
- if count >= 9 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 9)
- turtle.dropDown( 9 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.orange )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Citrus_Salad" then
- local count = turtle.getItemCount( 1 )
- if count >= 7 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 7)
- turtle.dropDown( 7 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.magenta )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Chocolate_Bacon" then
- local count = turtle.getItemCount( 1 )
- if count >= 7 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count -7 )
- turtle.dropDown( 7 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.lightblue )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Maple_Candied_Bacon" then
- local count = turtle.getItemCount( 1 )
- if count >= 7 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 7)
- turtle.dropDown( 7 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.yellow )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Sausage_in_Bread" then
- local count = turtle.getItemCount( 1 )
- if count >= 6 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 6)
- turtle.dropDown( 6 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.lime )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Maple_Syrup_Waffles" then
- local count = turtle.getItemCount( 1 )
- if count >= 6 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 6)
- turtle.dropDown( 6 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.pink )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "McPam" then
- local count = turtle.getItemCount( 1 )
- if count >= 5 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 5)
- turtle.dropDown( 5 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.Gray )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Cherry_Yogurt" then
- local count = turtle.getItemCount( 1 )
- if count >= 5 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 5)
- turtle.dropDown( 5 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.lightGray )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Strawberry_Yogurt" then
- local count = turtle.getItemCount( 1 )
- if count >= 5 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 5)
- turtle.dropDown( 5 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.cyan )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Soft_Pretzel" then
- local count = turtle.getItemCount( 1 )
- if count >= 4 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 4)
- turtle.dropDown( 4 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.purple )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Donut" then
- local count = turtle.getItemCount( 1 )
- if count >= 3 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 3)
- turtle.dropDown( 3 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.blue )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Orange_Juice" then
- local count = turtle.getItemCount( 1 )
- if count >= 3 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 3)
- turtle.dropDown( 3 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.brown )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Milk" then
- local count = turtle.getItemCount( 1 )
- if count >= 2 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 2)
- turtle.dropDown( 2 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.green )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- elseif input == "Lemonade" then
- local count = turtle.getItemCount( 1 )
- if count >= 1 then
- print( "Funds Sufficient" )
- turtle.transferTo( 2, count - 1)
- turtle.dropDown( 1 )
- turtle.select( 2 )
- turtle.dropUp()
- turtle.select( 1 )
- rs.setBundledOutput( "front", colors.black )
- sleep(3)
- rs.setBundledOutput( "front", 0 )
- else
- print( "Insufficient Funds" )
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment