Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- password = "4960"
- sideq = "back"
- side = "left"
- orange = colors.orange
- black = colors.gray
- function drawtext(tx,ty,txt,colorwee)
- term.setBackgroundColor(colorwee)
- term.setCursorPos(tx,ty)
- term.write(txt)
- end
- input=""
- function drawgui()
- drawtext(1,4,"1",orange)
- drawtext(2,4,"2",black)
- drawtext(3,4,"3",orange)
- drawtext(4,4,"4",black)
- drawtext(5,4,"5",orange)
- drawtext(1,5,"6",black)
- drawtext(2,5,"7",orange)
- drawtext(3,5,"8",black)
- drawtext(4,5,"9",orange)
- drawtext(5,5,"0",black)
- drawtext(1,2,">",colors.black)
- end
- function ifcall(xc,yc,num)
- if x==xc and y==yc then
- input=input..num
- term.write("*")
- end
- end
- term.redirect(peripheral.wrap(side))
- paintutils.drawImage(paintutils.loadImage("bg"),1,1)
- drawgui()
- while true do
- event,disp,x,y = os.pullEvent()
- ifcall(1,4,"1")
- ifcall(2,4,"2")
- ifcall(3,4,"3")
- ifcall(4,4,"4")
- ifcall(5,4,"5")
- ifcall(1,5,"6")
- ifcall(2,5,"7")
- ifcall(3,5,"8")
- ifcall(4,5,"9")
- ifcall(5,5,"0")
- if x==7 and y==4 then
- term.setCursorPos(2,1)
- if input==password then
- rs.setOutput(sideq, true)
- sleep(2)
- os.reboot()
- else os.reboot() end
- end
- if x==7 and y==5 then
- os.reboot()
- end
- sleep(0.2)
- end
- term.restore()
Advertisement
Add Comment
Please, Sign In to add comment