Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local xpos = 12
- local ypos = 10
- local flashtime = 0.2
- mon_main = peripheral.wrap("monitor_0")
- mon_info = peripheral.wrap("monitor_1")
- function flashred()
- local a = 0
- for i = 10,1,-1
- do
- mon_main.setBackgroundColor(colors.red)
- mon_main.clear()
- mon_main.setCursorPos(xpos,ypos)
- mon_main.write("-= YOU LOSE! =-")
- sleep(flashtime)
- mon_main.setBackgroundColor(colors.black)
- mon_main.clear()
- mon_main.setCursorPos(xpos,ypos)
- mon_main.write("-= YOU LOSE! =-")
- sleep(flashtime)
- end
- end
- function flashgreen()
- local a = 0
- for i = 10,1,-1
- do
- mon_main.setBackgroundColor(colors.green)
- mon_main.clear()
- mon_main.setCursorPos(xpos,ypos)
- mon_main.write("-= YOU WIN! =-")
- sleep(flashtime)
- mon_main.setBackgroundColor(colors.black)
- mon_main.clear()
- mon_main.setCursorPos(xpos,ypos)
- mon_main.write("-= YOU WIN! =-")
- sleep(flashtime)
- end
- end
- function clearall()
- mon_main.clear()
- mon_info.clear()
- end
- clearall()
- mon_main.setCursorPos(1,ypos)
- mon_info.setCursorPos(1,1)
- mon_info.write("Slots W.I.P")
- mon_main.setCursorPos(xpos,ypos)
- mon_main.write("-= [0] [0] [0] =-")
- sleep(3)
- flashred()
- flashgreen()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement