Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = 0
- print("Anzahl Monitore [Horizontal]:")
- anzahlMon = tonumber(read())
- print("Anzuzeigender Text:")
- text = read()
- print("Geschwindigkeit [1-5]")
- gesch = tonumber(read())
- geschTab = {0.5, 0.4, 0.3, 0.2, 0.1}
- farbTab = {1, 256, 8, 8192, 16384, 16, 1024}
- print("Welche Hintergrundfarbe? [entsprechende Taste]")
- print("[1] Grau")
- print("[2] Blau")
- print("[3] Grün")
- print("[4] Rot")
- print("[5] Gelb")
- print("[6] Lila")
- event, key = os.pullEvent("key")
- print("Durchlaufend: [x]")
- print("Abprallend: [x]")
- event, side, x, y = os.pullEvent("mouse_click")
- print(x,y)
- if event and x == 25 and y == 16 then
- p = 1
- elseif event and x==25 and y==17 then
- p = 2
- end
- mon = peripheral.wrap("right")
- pos = 2 * anzahlMon
- mon.clear()
- mon.setBackgroundColor(farbTab[key])
- mon.setTextColor(colors.white)
- mon.setTextScale(5)
- while true do
- mon.clear()
- mon.setCursorPos(pos, 1)
- mon.write(text)
- pos = pos - 1
- os.sleep(geschTab[gesch])
- if pos == 1 and p ==2 then
- repeat
- pos = pos + 1
- mon.clear()
- mon.setCursorPos(pos, 1)
- mon.write(text)
- until pos == 2 * anzahlMon
- elseif(pos == -#text and p ==1) then
- pos = 2 * anzahlMon
- end
- if(redstone.getInput("front")) then -- hier Seite redstone
- mon.clear()
- mon.setBackgroundColor(colors.black)
- mon.setTextScale(1)
- os.shutdown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement