View difference between Paste ID: V9ADNCMH and yaFg770F
SHOW: | | - or go back to the newest paste.
1
print("I'm working! Hopefully...")
2
local pop = 10
3
local add = redstone.getInput("right")
4
while true do
5
    function display(population)
6
        local mon = peripheral.wrap("left")
7
        mon.clear()
8
        mon.setCursorPos(1,1)
9
        mon.setTextScale(2)
10
        mon.write("Current villager population is: "..population)
11
    end
12
    print("func 1.")
13
    function light()
14
        redstone.setOutput("top", true)
15
        sleep(0.01)
16
        redstone.setOutput("top", false)
17
    end
18
    print("func 2.")
19
    if add==true then
20
        pop=pop+1
21
        print("add")
22
        light()
23
        display(pop)
24
    end
25
    print("if")
26
end