Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --библиотека многопоточия
- --os.execute("pastebin get E0SzJcCx /lib/thread.lua")
- local holo = require('component').hologram
- local thread = require("thread")
- local sleep = 0.1
- holo.clear()
- thread.init()
- local function rain(col)
- os.sleep(0.7)
- local x = math.random(2,47)
- local z = math.random(2,47)
- local xx = x
- for y = 32, 1, -1 do
- if xx == x then
- x=x+1
- holo.set(x, y, z, col)
- else
- x=x-1
- holo.set(x, y, z, col)
- end
- os.sleep(sleep)
- if y <= 29 then
- holo.set(x, y+6, z,0)
- end
- end
- holo.fill(x,z,6,0)
- holo.fill(x+1,z,6,0)
- end
- while true do
- local col = math.random(1,3)
- for i=1, 10 do
- thread.create(rain,col)
- os.sleep(0.5)
- end
- --thread.waitForAll()
- end
Advertisement
Add Comment
Please, Sign In to add comment