Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local redspawner = "right"
- local redlaser = "back"
- local input = "left"
- ps = "a"
- local spawner = 5
- local laser = 1
- while true do
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- write(" Skriv a og trykk ENTER for å starte greia ")
- local input = read()
- if input == ps
- then term.clear()
- term.setCursorPos(1,1)
- print("Venter på laser...")
- os.pullEvent("redstone")
- if
- rs.getInput("left") then
- term.clear()
- term.setCursorPos(1,1)
- print("laser klar!")
- sleep(2)
- term.clear()
- print("Aktiverer om...")
- sleep(2)
- term.clear()
- print("3")
- sleep(1)
- print("2")
- sleep(1)
- print("1")
- sleep(1)
- term.clear()
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setCursorPos(1,1)
- print("AKTIV!")
- rs.setOutput(redspawner,true)
- sleep(spawner)
- rs.setOutput(redspawner, false)
- rs.setOutput(redlaser, true)
- sleep(laser)
- rs.setOutput(redlaser, false)
- else
- print("ERROR")
- sleep(3)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement