Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Variables
- local ex = peripheral.wrap("left")
- bel = 1
- ora = 2
- mag = 4
- lblu = 8
- yel = 16
- lim = 32
- pin = 64
- gre = 128
- lgre = 256
- local steps = {bel,ora,mag,lblu,yel,lim,pin,gre,lgre}
- --Functions
- --Code
- term.clear()
- term.setCursorPos(1,1)
- ex.setOutput(0)
- term.setTextColor(colors.lime)
- print("Working")
- while true do
- ev, p1 = os.pullEvent()
- if ev =="redstone" then
- while true do
- r = math.random(1,9)
- m = math.random(1,9)
- k = math.random(1,9)
- t = math.random(1,9)
- ex.setOutput(steps[r]+steps[m]+steps[k]+steps[t])
- sleep(1.0)
- ex.setOutput(0)
- sleep(1.0)
- end
- end
- if (ev == "key") and (p1 == 16) then
- ex.setOutput(0)
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement