Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- People I want to thank:
- theoriginalbit for helping me with general code errors and variable declarations
- Alissa: helping me with bunches of code, not even just this program
- ]]--
- --os.pullEvent() os.pullEventRaw()
- term.clear()
- local selector = 0
- local selecting = 0
- local secrets = 0
- --Centering Text
- print("Centering text")
- local function centerText(text)
- local x,y = term.getSize()
- local x2,y2 = term.getCursorPos()
- term.setCursorPos(math.ceil((x/2) - (text:len() / 2)), y2)
- print(text)
- end
- function yN()
- local n = 1
- while true do
- local x,y = term.getCursorPos()
- term.clearLine()
- if(n== 1) then centerText(">Start Game< Secrets ") else centerText(" Start Game >Secrets<") end
- term.setCursorPos(x, y)
- a, b = os.pullEvent()
- while a ~="key" do a, b=os.pullEvent() end
- if b == 203 and n == 2 then n= 1 end
- if b == 205 and n == 1 then n = 2 end
- if b == 28 then print("") break end
- end
- if n == 1 then selector = 1 end
- if n == 2 then selector = 2 end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement