Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Just some badly made Batch OS that I ported to CC Lua.
- --Original: https://youtu.be/EmiGL60OGtc
- os.pullEvent = os.pullEventRaw
- term.setBackgroundColor(colors.blue)
- function anykey()
- print "Press any key to continue . . ."
- os.pullEvent("key")
- end
- --Clears the screen
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function boot()
- clear()
- print "Dem bois OS System Disk found!"
- print "Starting up... 1%"
- print "Starting up... 7%"
- print "Starting up... 50%"
- print "Starting up... 93%"
- print "Starting up... 100%"
- print "Loading complete!"
- anykey()
- begin()
- end
- function begin()
- clear()
- print "What is your first name?"
- local fname = read()
- print "What is your last name?"
- local lname = read()
- print("Hello " ..fname.. " " ..lname.. "!")
- anykey()
- home()
- end
- function home()
- clear()
- print "Here are a few programs that you can use."
- print "(1) System Information"
- print "(2) Notepad"
- print "(3) Zombie Attack"
- print "(4) Calculator"
- print "(5) Browser"
- write "Choose-"
- local input = read()
- if input == "1" then
- specs()
- elseif input == "2" then
- notepad()
- elseif input == "3" then
- zombie()
- elseif input == "4" then
- -- this in intended, it's a bug in the real dem bois os
- man()
- else
- home()
- end
- end
- function specs()
- clear()
- print "4GB of RAM, Intel(R) Pentium(R) CPU G630 @ 2.70GHz 2.70 GHz"
- print "222GB SSD."
- anykey()
- home()
- end
- function notepad()
- clear()
- print "Are you ready to open Notepad?"
- anykey()
- if settings.get("shutdownos.password") then
- shell.run "shutdownedit goto YSOS.txt"
- else
- shell.run "edit goto YSOS.txt"
- end
- home()
- end
- function zombie()
- clear()
- print "Welcome to Zombie Atttack"
- print "In this game you fight zombies."
- print "(1) Begin"
- print "(2) Exit"
- write "Choose-"
- local input = read()
- if input == "1" then
- fight()
- elseif input == "2" then
- home()
- else
- zombie()
- end
- end
- function man()
- clear()
- print "You find a strange man in the woods,"
- print "you think he is just a man, but really, he's a zombie!"
- print "Entering Battle 1..."
- anykey()
- fight()
- end
- function fight()
- clear()
- print "Zombie used Bite!"
- print "Your health fell by -5hp!"
- print "You have 3 attacks."
- print "(1) Punch"
- print "(2) Slap"
- print "(3) Kick in the butt"
- write "Choose-"
- local input = read()
- if input == "1" then
- done()
- else
- fight()
- end
- end
- function done()
- clear()
- print "You used Punch!"
- print "Congrafulations!"
- print "You beat the Zombie!"
- print "Thanks for playing!"
- anykey()
- home()
- end
- boot()
Advertisement
Add Comment
Please, Sign In to add comment