Advertisement
Guest User

myFirstProgram.lua

a guest
Apr 6th, 2020
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. print("What would you like me to do?")
  2. print("I can turn on lights for you!")
  3. repeat
  4.     print("Type 1, 2, 3, or 4 to select which light you would like to turn on")
  5.  
  6.     light = read()
  7.  
  8.     if light == "1" then
  9.         redstone.setOutput("left" ,true)
  10.     end
  11.  
  12.     if light == "2" then
  13.         redstone.setOutput("back", true)
  14.     end
  15.  
  16.     if light == "3" then
  17.         redstone.setOutput("right", true)
  18.     end
  19.  
  20.     if light == "4" then
  21.         redstone.setOutput("front", true)
  22.     end
  23.  
  24.     if light == "off" then
  25.         redstone.setOutput("front", false)
  26.         redstone.setOutput("left", false)
  27.         redstone.setOutput("right", false)
  28.         redstone.setOutput("back", false)
  29.     end
  30.  
  31. until light == "5"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement