Advertisement
MuChT007

Floor crafting table

Dec 16th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. function wood()
  2.                 redstone.setOutput("back",false)
  3.                 sleep(1)
  4.                 redstone.setOutput("left",true)
  5.                 sleep(0.5)
  6.                 redstone.setOutput("left",false)
  7.                 sleep(1)
  8.                 redstone.setOutput("back",true)
  9.                
  10. end
  11.  
  12. function crafting()
  13.                 redstone.setOutput("back",false)
  14.                 sleep(1)
  15.                 redstone.setOutput("right",true)
  16.                 sleep(0.5)
  17.                 redstone.setOutput("right",false)
  18.                 sleep(1)
  19.                 redstone.setOutput("back",true)
  20.                
  21. end
  22.  
  23. wood()
  24. statut=wood
  25.  
  26. while true do
  27.  
  28. event = os.pullEvent("redstone")
  29.  
  30.        if redstone.getInput("front") and statut == wood then
  31.                 crafting()
  32.                 statut=craft
  33.         end
  34.  
  35.        if redstone.getInput("front") and statut == craft then
  36.                 wood()
  37.                 statut=wood
  38.         end
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement