Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text = "Welcome to CasinoName"
- os.loadAPI("gcapi")
- mons = {peripheral.find("monitor")}
- function setCursorPos(x,y)
- for _,mon in pairs(mons) do
- mon.setCursorPos(x,y)
- end
- end
- function write(text)
- for _,mon in pairs(mons )do
- mon.write(text)
- end
- end
- function setBackgroundColor(color)
- for _,mon in pairs(mons) do
- mon.setBackgroundColor(color)
- end
- end
- function clear()
- for _,mon in pairs(mons) do
- mon.clear()
- end
- end
- max_x, max_y = mons[1].getSize()
- c = 25
- reverse = false
- while true do
- setBackgroundColor(colors.black)
- clear()
- setCursorPos(gcapi.getCenter(max_x, text), gcapi.getCenter(max_y))
- write(text)
- setBackgroundColor(colors.cyan)
- for x=1, max_x do
- for y=1, max_y do
- t = (x^2 + y^2)
- if t > (c^2) or t < (c-50)^2 or x == 1 or y == 1 or x == max_x or y == max_y then
- setCursorPos(x,y)
- write(" ")
- end
- end
- end
- if reverse then
- c = c -2
- end
- c= c + 1
- if c > 50 then
- sleep(3)
- reverse = true
- end
- if c < 22 then
- sleep(1)
- reverse = false
- end
- sleep(0.05)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement