Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --snow generator
- local snowflake, maxx, maxy, bShifted = "%", term.getSize()
- local snowWin = window.create( term.current(), 1, 1, maxx + 1, maxy )
- snowWin.setBackgroundColor( colors.lightBlue )
- snowWin.clear()
- while true do
- snowWin.setVisible( false )
- snowWin.setCursorPos( math.random( 1, maxx ), 1 )
- snowWin.write( snowflake )
- snowWin.scroll( -1 )
- snowWin.reposition( bShifted and 1 or 0, 1 )
- bShifted = not bShifted
- snowWin.setVisible( true )
- sleep( 0.1 )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement