Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Magic Strings
- -- os.date("%H:%M",realtime.time())
- local component = require("component")
- local sides = require("sides")
- local realtime = require("realtime")
- local rs = component.redstone
- component.redstone.setOutput(sides.top,0)
- repeat
- if os.date("%H",realtime.time()) == "11" then
- if string.match(os.date("%M",realtime.time()), "5%d") then
- print("07")
- component.redstone.setOutput(sides.top,15)
- os.sleep(150)
- end
- else
- os.sleep(150)
- end
- if os.date("%H",realtime.time()) == "12" then
- if string.match(os.date("%M",realtime.time()), "1%d") then
- print("07")
- component.redstone.setOutput(sides.top,0)
- os.sleep(150)
- end
- else
- os.sleep(150)
- end
- if os.date("%H",realtime.time()) == "23" then
- if string.match(os.date("%M",realtime.time()), "5%d") then
- print("07")
- component.redstone.setOutput(sides.top,15)
- os.sleep(150)
- end
- else
- os.sleep(150)
- end
- if os.date("%H",realtime.time()) == "24" then
- if string.match(os.date("%M",realtime.time()), "1%d") then
- print("07")
- component.redstone.setOutput(sides.top,0)
- os.sleep(150)
- end
- else
- os.sleep(150)
- end
- os.sleep(150)
- until i == 5
- print(os.date("%H:%M",realtime.time()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement