Guest User

Untitled

a guest
Dec 13th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1.  
  2. mon = peripheral.wrap("right")
  3. term.redirect(mon)
  4.  
  5.  
  6. while true do
  7.   term.clear()
  8.   term.setCursorPos(1,1)
  9.   --    "|------------------------|")
  10.   print("   Welcome to mstiles92's")
  11.   print("       Trading Post!")
  12.   print("")
  13.   print("  Uranium greatly needed!")
  14.   print(" Trade it in for diamonds,")
  15.   print("   or sell it to me here")
  16.   print("")
  17.   print("  Trade items on back wall")
  18.   print("   Sell on the right wall")
  19.   print("    Buy on the left wall")
  20.  
  21.   local sEvent, param = os.pullEvent("key")
  22.   if param == 61 then    -- pressing F3 terminates
  23.     term.restore()
  24.     print("Exiting...")
  25.     sleep(1)
  26.     mon.clear()
  27.     break
  28.   end
  29. end
Add Comment
Please, Sign In to add comment