Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Eggcracker 2013
- Made by Hellkid98
- Category: GAME
- NOTE: This is not working anymore( atleast not for me ) and I don't plan on fixing it!
- - Hellkid98, 2014-02-12
- ]]--
- local num
- rPath = shell.path()
- --HypeGames info
- if runFromHypeGames then
- file = fs.open(".HypeGames_Data/.temp-loggedInUser","r")
- local fileData = {}
- local line = file.readLine()
- repeat
- table.insert(fileData,line)
- line = file.readLine()
- until line == nil
- file.close()
- hUsername = fileData[1]
- else
- shell.setPath(rPath)
- end
- --Loading
- if not fs.exists(shell.path()..".01100101 01100111 01100111 01100011 01110010 01100001 01100011 01101011 01100101 01110010/save") then
- num = 1000000
- elseif fs.exists(shell.path()..".01100101 01100111 01100111 01100011 01110010 01100001 01100011 01101011 01100101 01110010/save") then
- file = fs.open(shell.path()..".01100101 01100111 01100111 01100011 01110010 01100001 01100011 01101011 01100101 01110010/save","r")
- local fileData = {}
- local line = file.readLine()
- repeat
- table.insert(fileData,line)
- line = file.readLine()
- until line == nil
- file.close()
- num = fileData[1]
- file.close()
- tonumber(num)
- num = math.ceil(num)
- end
- --Screen/Drawing functions
- -----------------------------
- w,h = term.getSize()
- hW = w/2
- hH = h/2
- function centerPrint(y,text)
- term.setCursorPos(w/2 - #text/2, y)
- term.write(text)
- end
- function drawAt(x,y,text)
- term.setCursorPos(x,y)
- write(text)
- end
- function cleanScreen()
- term.clear()
- term.setCursorPos(1,1)
- end
- --Pre Screen
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- cleanScreen()
- centerPrint(hH - 4,"[CC]Eggcracker 2013")
- centerPrint(hH - 2,"By Hellkid98")
- term.setTextColor(colors.cyan)
- centerPrint(hH + 2,"+-Objective-+")
- centerPrint(hH + 3,"Click the egg")
- term.setTextColor(colors.black)
- centerPrint(hH + 6,"Click to continue")
- os.pullEvent("mouse_click")
- function drawArt()
- term.setBackgroundColor(colors.black)
- cleanScreen()
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- --EGG
- if num == 1000000 then
- centerPrint(hH - 3, " ")
- centerPrint(hH - 2, " ")
- centerPrint(hH - 1, " ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," ")
- centerPrint(hH + 2," ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 950000 and
- num < 1000000 then
- centerPrint(hH - 3, "\\ ")
- centerPrint(hH - 2, " ")
- centerPrint(hH - 1, " ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," ")
- centerPrint(hH + 2," ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 900000 and
- num < 950000 then
- centerPrint(hH - 3, "\\ ")
- centerPrint(hH - 2, " \\_ ")
- centerPrint(hH - 1, " ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," ")
- centerPrint(hH + 2," ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 850000 and
- num < 900000 then
- centerPrint(hH - 3, "\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," ")
- centerPrint(hH + 2," ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 800000 and
- num < 850000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," ")
- centerPrint(hH + 2,"/ ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 750000 and
- num < 800000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," _ ")
- centerPrint(hH + 2,"/ ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 700000 and
- num < 750000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," _/ ")
- centerPrint(hH + 2,"/ ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 650000 and
- num < 700000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," _/ _")
- centerPrint(hH + 2,"/ ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 600000 and
- num < 650000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " ")
- centerPrint(hH + 1," _/ _")
- centerPrint(hH + 2,"/ / ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 550000 and
- num < 600000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " _ ")
- centerPrint(hH + 1," _/ _")
- centerPrint(hH + 2,"/ / ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 500000 and
- num < 550000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ ")
- centerPrint(hH - 1, " \\ ")
- centerPrint(hH, " _ ")
- centerPrint(hH + 1," _/ \\ _")
- centerPrint(hH + 2,"/ / ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 450000 and
- num < 500000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ /")
- centerPrint(hH - 1, " \\ | ")
- centerPrint(hH, " _ ")
- centerPrint(hH + 1," _/ \\ _")
- centerPrint(hH + 2,"/ / ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " ")
- centerPrint(hH + 5, " ")
- end
- if num >= 400000 and
- num < 450000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ /")
- centerPrint(hH - 1, " \\ | ")
- centerPrint(hH, " _ / ")
- centerPrint(hH + 1," _/ \\_ _")
- centerPrint(hH + 2,"/ / ")
- centerPrint(hH + 3, " ")
- centerPrint(hH + 4, " \\")
- centerPrint(hH + 5, " ")
- end
- if num >= 300000 and
- num < 400000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ /")
- centerPrint(hH - 1, " \\ | ")
- centerPrint(hH, " _ / ")
- centerPrint(hH + 1," _/ \\_ _")
- centerPrint(hH + 2,"/ / ")
- centerPrint(hH + 3, " _/ ")
- centerPrint(hH + 4, "/ \\")
- centerPrint(hH + 5, " ")
- end
- if num >= 200000 and
- num < 300000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ /")
- centerPrint(hH - 1, " \\ | ")
- centerPrint(hH, " _ / ")
- centerPrint(hH + 1," _/ \\_ _")
- centerPrint(hH + 2,"/ \\ / ")
- centerPrint(hH + 3, " _/_ ")
- centerPrint(hH + 4, "/ \\")
- centerPrint(hH + 5, " ")
- end
- if num >= 100000 and
- num < 200000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ /")
- centerPrint(hH - 1, " _/\\ | ")
- centerPrint(hH, " /_ / ")
- centerPrint(hH + 1," _/ \\_ _")
- centerPrint(hH + 2,"/ _/ \\ / ")
- centerPrint(hH + 3, " _/_ ")
- centerPrint(hH + 4, "/ \\")
- centerPrint(hH + 5, " ")
- end
- if num >= 1 and
- num < 50000 then
- centerPrint(hH - 3,"\\ ")
- centerPrint(hH - 2, " \\__ /")
- centerPrint(hH - 1, " _/\\ | ")
- centerPrint(hH, " /_ _/ ")
- centerPrint(hH + 1," _/ \\_ \\ _")
- centerPrint(hH + 2,"/ _/ \\ / ")
- centerPrint(hH + 3, " _/_ ")
- centerPrint(hH + 4, "/ \\")
- centerPrint(hH + 5, " ")
- end
- if num == 0 then
- term.setTextColor(colors.red)
- term.setBackgroundColor(colors.black)
- centerPrint(hH - 1,"So What?")
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- centerPrint(hH + 1," _/ \\_ \\ _")
- centerPrint(hH + 2,"/ _/ \\ / ")
- centerPrint(hH + 3, " _/_ ")
- centerPrint(hH + 4, "/ \\")
- centerPrint(hH + 5, " ")
- end
- term.setBackgroundColor(colors.gray)
- term.setTextColor(colors.lime)
- centerPrint(2," "..num.." ")
- term.setTextColor(colors.yellow)
- centerPrint(h - 1," [SPACE] Save and exit ")
- end
- function events()
- --Egg Position
- --Width
- minPosX = w/2 - 5
- maxPosX = w/2 + 5
- --Heigth
- minPosY = h/2 - 4
- maxPosY = h/2 + 4
- evt, but, xPos, yPos = os.pullEvent()
- if evt == "key" then
- if but == 57 then
- if not fs.exists(shell.path()..".01100101 01100111 01100111 01100011 01110010 01100001 01100011 01101011 01100101 01110010") then
- fs.makeDir(shell.path()..".01100101 01100111 01100111 01100011 01110010 01100001 01100011 01101011 01100101 01110010")
- end
- file = fs.open(shell.path()..".01100101 01100111 01100111 01100011 01110010 01100001 01100011 01101011 01100101 01110010/save","w")
- file.writeLine(num)
- file.close()
- term.setBackgroundColor(colors.black)
- cleanScreen()
- centerPrint(hH,"Saved!")
- sleep(0.5)
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.white)
- cleanScreen()
- print("Thanks For Playing!")
- error()
- end
- elseif evt == "mouse_click" then
- if but == 1 then
- if xPos >=minPosX and
- xPos <= maxPosX then
- if yPos > minPosY and
- yPos < maxPosY then
- num = num - 1
- if num < 0 then
- num = 0
- end
- end
- end
- elseif but == 2 then
- term.setBackgroundColor(colors.black)
- term.setTextColor(colors.yellow)
- cleanScreen()
- centerPrint(2,"[CC]Eggcracker 2013")
- term.setTextColor(colors.white)
- centerPrint(hH - 1,"Credits")
- centerPrint(hH,"+---------+")
- centerPrint(hH + 1,"Hellkid98")
- centerPrint(18,"Press any key to continue")
- os.pullEvent("key")
- end
- end
- end
- function main()
- while true do
- drawArt()
- if runFromHypeGames then
- if num < 1000000 then
- achievement.unlock("I migh as well get started..", 10)
- end
- drawArt()
- if num <= 500000 then
- achievement.unlock("Halfway there!", 500)
- end
- drawArt()
- if num <= 0 then
- achievement.unlock("All this for nothing!?!", 1000)
- end
- drawArt()
- end
- events()
- end
- end
- main()
Add Comment
Please, Sign In to add comment