Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function static()
- term.clear()
- x,y = term.getSize()
- for i=1,x do
- posx = i
- for i=1,y do
- posy = i
- chance = math.random(0,1)
- if chance == 1 then
- term.setCursorPos(posx,posy)
- write("#")
- end
- end
- end
- end
- function slowStatic()
- while true do
- static()
- sleep(0.75)
- end
- end
- function fastStatic()
- while true do
- static()
- sleep(0.02)
- end
- end
- term.clear()
- print("slow or fast?")
- answer = read()
- if answer == "slow" then
- slowStatic()
- elseif answer == "fast" then
- fastStatic()
- end
- function otherFastStatic()
- while true do
- term.clear()
- x,y = term.getSize()
- for i=1,x do
- posx = i
- for i=1,y do
- posy = i
- chance = math.random(0,1)
- if chance == 1 then
- term.setCursorPos(posx,posy)
- write("#")
- end
- end
- end
- sleep(0.02)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement