Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- m = peripheral.wrap("monitor_2")
- m.setBackgroundColor(colors.black)
- m.clear()
- local bloodBool = false
- local botaniaBool= false
- local farmBool = false
- local bool = false
- local i = 0
- local i2 = 0
- --BloodMagic
- function buttons()
- if bloodBool == false then
- m.setBackgroundColor(colors.red)
- elseif bloodBool == true then
- m.setBackgroundColor(colors.green)
- end
- i = 3
- repeat
- m.setCursorPos(5,i)
- m.write(" ")
- i = i+1
- term.write(i)
- until i == 7
- if botaniaBool == false then
- m.setBackgroundColor(colors.red)
- elseif botaniaBool == true then
- m.setBackgroundColor(colors.green)
- end
- i = 3
- repeat
- m.setCursorPos(32,i)
- m.write(" ")
- i = i+1
- until i == 7
- end
- while true do
- event,side,x,y = os.pullEvent("monitor_touch")
- if x >= 5 and x <= 18 and y >= 3 and y <= 7 then
- if bloodBool == false then
- bloodBool = true
- elseif bloodBool == true then
- bloodBool = false
- end
- buttons()
- elseif x >= 32 and x <= 44 and y >= 3 and y <= 7 then
- if botaniaBool == false then
- botaniaBool = true
- elseif botaniaBool == true then
- botaniaBool = false
- end
- buttons()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement