Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Lightning timer
- --NAPTlME
- rednet.open('right')
- p = peripheral.wrap('pim_2')
- mon = peripheral.wrap('monitor_7')
- rs.setOutput('front',false)
- mon.clear()
- mon.setTextScale(0.5)
- line1 = 'Children of Lightning seek the'
- line2 = 'Thrills of Speed'
- line3 = 'They are always looking forward'
- line4 = 'With no time for regrets'
- w,h = mon.getSize()
- mon.setCursorPos((w/2)-(string.len(line1)/2),1)
- mon.write(line1)
- mon.setCursorPos((w/2)-(string.len(line2)/2),2)
- mon.write(line2)
- mon.setCursorPos((w/2)-(string.len(line3)/2),4)
- mon.write('They are always looking forward,')
- mon.setCursorPos((w/2)-(string.len(line4)/2),5)
- mon.write('With no time for regrets')
- local s = 0
- local m = 1
- function timer()
- while s > 0 or m> 0 do
- mon.clear()
- mon.setTextScale(1.5)
- w,h = mon.getSize()
- mon.setCursorPos(w/2-2,2)
- if m < 10 then
- min = "0"..m
- else
- min = m
- end
- if s <10 then
- sec = "0"..s
- else
- sec = s
- end
- mon.write(min..":"..sec)
- sleep(1)
- if s~= 0 then
- s = s-1
- else
- if m ~= 0 then
- s = 59
- m = m-1
- end
- end
- end
- os.reboot()
- end
- while true do
- os.pullEvent('player_on')
- d = p.getAllStacks()
- r = textutils.serialize(d)
- if string.len(r) == 2 then
- rs.setOutput('front',true)
- rednet.send(452, "open")
- timer()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement