Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local monitorLast = os.clock()
- local alarm = false
- while true do
- for _, name in pairs(peripheral.getNames()) do
- local type = peripheral.getType(name)
- --local curTime = os.clock()
- if type == "speaker" and alarm == true then
- peripheral.wrap(name).playSound("minecraft:entity.player.levelup")
- elseif type == "monitor" then
- local monitor = peripheral.wrap(name)
- monitor.setTextColor(colors.white)
- monitor.setBackgroundColor(colors.black)
- monitor.write("Testing")
- end
- end
- sleep(0.25)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement