Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---Variable---
- Gauche1 = 28
- Gauche2 = 28
- Gauche3 = 28
- Gauche4 = 28
- Gauche5 = 28
- ---Peripheral---
- m = peripheral.wrap("right")
- ---Program---
- function Affi1()
- m.setBackgroundColor(colors.black)
- m.clear()
- m.setBackgroundColor(colors.gray)
- m.setCursorPos(1,1)
- m.write(" ")
- m.setCursorPos(1,3)
- m.write(" ")
- m.setCursorPos(1,2)
- m.write(" ")
- m.setCursorPos(29,2)
- m.write(" ")
- m.setCursorPos(1,5)
- m.write(" ")
- m.setCursorPos(1,7)
- m.write(" ")
- m.setCursorPos(1,6)
- m.write(" ")
- m.setCursorPos(29,6)
- m.write(" ")
- m.setCursorPos(1,9)
- m.write(" ")
- m.setCursorPos(1,11)
- m.write(" ")
- m.setCursorPos(1,10)
- m.write(" ")
- m.setCursorPos(29,10)
- m.write(" ")
- m.setCursorPos(1,13)
- m.write(" ")
- m.setCursorPos(1,15)
- m.write(" ")
- m.setCursorPos(1,14)
- m.write(" ")
- m.setCursorPos(29,14)
- m.write(" ")
- m.setCursorPos(1,17)
- m.write(" ")
- m.setCursorPos(1,19)
- m.write(" ")
- m.setCursorPos(1,18)
- m.write(" ")
- m.setCursorPos(29,18)
- m.write(" ")
- m.setBackgroundColor(colors.blue)
- m.setCursorPos(2,2)
- m.write(" ")
- m.setCursorPos(2,6)
- m.write(" ")
- m.setCursorPos(2,10)
- m.write(" ")
- m.setCursorPos(2,14)
- m.write(" ")
- m.setCursorPos(2,18)
- m.write(" ")
- end
- function Affi2()
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(Gauche1,2)
- m.write(" ")
- Gauche1 = Gauche1 - 1
- end
- function Affi3()
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(Gauche2,6)
- m.write(" ")
- Gauche2 = Gauche2 - 1
- end
- function Affi4()
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(Gauche3,10)
- m.write(" ")
- Gauche3 = Gauche3 - 1
- end
- function Affi5()
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(Gauche4,14)
- m.write(" ")
- Gauche4 = Gauche4 - 1
- end
- function Affi6()
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(Gauche5,18)
- m.write(" ")
- Gauche5 = Gauche5 - 1
- end
- Affi1()
- while true do
- if(Gauche1 == 28)then
- Affi2()
- Gauche1 = 24
- end
- if(Gauche2 == 28)then
- Affi3()
- Gauche2 = 4
- end
- if(Gauche3 == 28)then
- Affi4()
- Gauche3 = 22
- end
- if(Gauche4 == 28)then
- Affi5()
- Gauche4 = 6
- end
- if(Gauche5 == 28)then
- Affi6()
- Gauche5 = 10
- end
- sleep(1)
- if(Gauche1 == 24)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(24,2)
- m.write(" ")
- Gauche1 = 20
- end
- if(Gauche2 == 4)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(4,6)
- m.write(" ")
- Gauche2 = 20
- end
- if(Gauche3 == 22)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(22,10)
- m.write(" ")
- Gauche3 = 20
- end
- if(Gauche4 == 6)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(6,14)
- m.write(" ")
- Gauche4 = 20
- end
- if(Gauche5 == 10)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(10,18)
- m.write(" ")
- Gauche5 = 20
- end
- sleep(1)
- if(Gauche1 == 20)then
- Affi1()
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(25,2)
- m.write(" ")
- Gauche1 = 1
- end
- if(Gauche2 == 20)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(5,6)
- m.write(" ")
- Gauche2 = 1
- end
- if(Gauche3 == 20)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(23,10)
- m.write(" ")
- Gauche3 = 1
- end
- if(Gauche4 == 20)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(7,14)
- m.write(" ")
- Gauche4 = 1
- end
- if(Gauche5 == 20)then
- m.setBackgroundColor(colors.lightBlue)
- m.setCursorPos(11,18)
- m.write(" ")
- Gauche5 = 1
- end
- sleep(1)
- if(Gauche1 == 1 and Gauche2 == 1 and Gauche3 == 1 and Gauche4 == 1 and Gauche5 == 1)then
- Affi1()
- Gauche1 = 28
- Gauche2 = 28
- Gauche3 = 28
- Gauche4 = 28
- Gauche5 = 28
- end
- end
- ----=Autor=----
- --By Zaidal86
- ----=-----=----
Advertisement
Add Comment
Please, Sign In to add comment