Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plastic = false
- local worldSensor = false
- if fs.exists("/ocs/apis/sensor") then
- os.loadAPI("ocs/apis/sensor")
- end
- for k,v in pairs(rs.getSides()) do
- if (peripheral.getType(v) == "openperipheral_bridge") then
- plastic = peripheral.wrap(v)
- break
- elseif (peripheral.getType(v) == "sensor") and (not worldSensor) then
- worldSensor = sensor.wrap(v)
- if not (worldSensor.getSensorName() == "worldCard") then
- worldSensor = false
- end
- end
- end
- if not plastic then print("Could not find Glass Bridge!") error() end
- local function reliableSleep(time)
- sleep(time)
- end
- local gColors = {}
- gColors.red = 0xff3333
- gColors.blue = 0x7dd2e4
- gColors.yellow = 0xffff4d
- gColors.green = 0x4dff4d
- gColors.gray = 0xe0e0e0
- gColors.textGray = 0x818181
- gColors.text = 0x5a5a5a
- gColors.rain = 0x2e679f
- while true do
- plastic.clear()
- local mainBox = plastic.addBox(20, 20, 1, 48, gColors.gray, 0.7)
- local outlineT = plastic.addBox(18,18,2,2,gColors.blue,0.7)
- local outlineB = plastic.addBox(18,68,2,2,gColors.blue,0.7)
- mainBox.setWidth(136)
- outlineT.setWidth(140)
- outlineB.setWidth(140)
- mainBox.setHeight(48)
- local header = plastic.addText(75, 25, "Wiadomosc", gColors.textGray)
- local secondText = plastic.addText(50, 40, "Szybko do domu!", gColors.blue)
- local forthText = plastic.addText(40, 55, "Bo bedzie zle", gColors.text)
- header.setZ(5)
- secondText.setZ(5)
- forthText.setZ(5)
- plastic.sync()
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement