MastaC729

CC Clock

Dec 12th, 2015
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. side = "left"               -- Specify this based on where the clock is needed
  2. rsCheck = redstone.getInput("top")  -- For a lever on the top to disable the clock
  3.  
  4. while true do
  5.     while rsCheck == "false" do
  6.         redstone.setOutput(side, true)
  7.         sleep(0.1)
  8.         redstone.setOutput(side, false)
  9.         sleep(0.1)
  10.         if redstone.getInput("top") == "true" then rsCheck = "true" end
  11.     end
  12.    
  13.     if redstone.getInput("top") == "false" then rsCheck = "false" end
  14.     sleep(0.5)  -- Prevents the computer from quitting the program due to too fast of a loop repeat
  15. end
Advertisement
Add Comment
Please, Sign In to add comment