Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("btn")
- m = peripheral.wrap("left")
- m.setTextScale(0.5)
- while true do
- m.setBackgroundColor(colors.black)
- m.clear()
- m.setCursorPos(1,1)
- m.setTextColor(colors.lime)
- m.write("Enter Password")
- term.redirect(m)
- paintutils.drawLine(4,2,12,2,colors.red)
- paintutils.drawLine(4,2,4,8,colors.red)
- paintutils.drawLine(12,2,12,8,colors.red)
- paintutils.drawLine(4,9,12,9,colors.red)
- m.setBackgroundColor(colors.red)
- m.setTextColor(colors.white)
- function fillTable()
- btn.setTable("1", one, 6,6,4,4)
- btn.setTable("2", two, 8,8,4,4)
- btn.setTable("3", tre, 10,10,4,4)
- btn.setTable("4", four, 6,6,5,5)
- btn.setTable("5", five, 8,8,5,5)
- btn.setTable("6", six, 10,10,5,5)
- btn.setTable("7", sev, 6,6,6,6)
- btn.setTable("8", eit, 8,8,6,6)
- btn.setTable("9", nin, 10,10,6,6)
- btn.setTable("Reset", Reset, 5,11,8,8)
- btn.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- btn.checkxy(x,y)
- end
- function one()
- btn.flash("1")
- num1 = 1
- end
- function two()
- btn.flash("2")
- num1 = 2
- end
- function tre()
- btn.flash("3")
- num1 = 3
- end
- function four()
- btn.flash("4")
- num1 = 4
- end
- function five()
- btn.flash("5")
- num1 = 5
- end
- function six()
- btn.flash("6")
- num1 = 6
- end
- function sev()
- btn.flash("7")
- num1 = 7
- end
- function eit()
- btn.flash("8")
- num1 = 8
- end
- function nin()
- btn.flash("9")
- num1 = 9
- end
- function Reset()
- btn.flash("Reset")
- os.reboot()
- end
- fillTable()
- getClick()
- function one()
- btn.flash("1")
- num2 = 1
- end
- function two()
- btn.flash("2")
- num2 = 2
- end
- function tre()
- btn.flash("3")
- num2 = 3
- end
- function four()
- btn.flash("4")
- num2 = 4
- end
- function five()
- btn.flash("5")
- num2 = 5
- end
- function six()
- btn.flash("6")
- num2 = 6
- end
- function sev()
- btn.flash("7")
- num2 = 7
- end
- function eit()
- btn.flash("8")
- num2 = 8
- end
- function nin()
- btn.flash("9")
- num2 = 9
- end
- function Reset()
- btn.flash("Reset")
- os.reboot()
- end
- fillTable()
- getClick()
- function one()
- btn.flash("1")
- num3 = 1
- end
- function two()
- btn.flash("2")
- num3 = 2
- end
- function tre()
- btn.flash("3")
- num3 = 3
- end
- function four()
- btn.flash("4")
- num3 = 4
- end
- function five()
- btn.flash("5")
- num3 = 5
- end
- function six()
- btn.flash("6")
- num3 = 6
- end
- function sev()
- btn.flash("7")
- num3 = 7
- end
- function eit()
- btn.flash("8")
- num3 = 8
- end
- function nin()
- btn.flash("9")
- num3 = 9
- end
- function Reset()
- btn.flash("Reset")
- os.reboot()
- end
- fillTable()
- getClick()
- function one()
- btn.flash("1")
- num4 = 1
- end
- function two()
- btn.flash("2")
- num4 = 2
- end
- function tre()
- btn.flash("3")
- num4 = 3
- end
- function four()
- btn.flash("4")
- num4 = 4
- end
- function five()
- btn.flash("5")
- num4 = 5
- end
- function six()
- btn.flash("6")
- num4 = 6
- end
- function sev()
- btn.flash("7")
- num4 = 7
- end
- function eit()
- btn.flash("8")
- num4 = 8
- end
- function nin()
- btn.flash("9")
- num4 = 9
- end
- function Reset()
- btn.flash("Reset")
- os.reboot()
- end
- fillTable()
- getClick()
- if num1 == 1 and num2 == 2 and num3 == 3 and num4 == 4 then -- change your password here
- rs.setOutput("bottom", true)
- sleep(4)
- rs.setOutput("bottom", false)
- else
- rs.setOutput("top", true)
- sleep(0.1)
- rs.setOutput("top", false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement