Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- calculator = function()
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setCursorPos(1,1)
- print(name..",")
- sleep(1.5)
- term.setCursorPos(12,7)
- print("Your percentage of life is:")
- sleep(2)
- percentage = math.random(1,100)
- term.setCursorPos(24,8)
- if percentage >= 10 then
- print(percentage.."%")
- else
- print("0"..percentage.."%")
- end
- sleep(1)
- term.setCursorPos(13,9)
- if percentage == 0 then
- print("How are you even playing?")
- end
- if percentage >= 1 then
- if percentage <= 20 then
- print("You need to get a life...")
- end
- end
- if percentage >= 21 then
- if percentage <= 50 then
- print("Not good but also not bad")
- end
- end
- if percentage >= 51 then
- if percentage <= 80 then
- print("Wow that's pretty good!!!")
- end
- end
- if percentage >= 81 then
- if percentage <= 99 then
- print(" I envy you... ")
- end
- end
- if percentage == 100 then
- print("Why are you even playing?")
- end
- sleep(5)
- end
- typename = function()
- term.clear()
- term.setCursorPos(18,7)
- print("Insert your name")
- term.setCursorPos(13,10)
- term.setBackgroundColor(colors.black)
- print(" ")
- term.setCursorPos(13,10)
- while true do
- name = read()
- if name == "aleroqu" then
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- print("holy shit nibba you're me gtfo")
- sleep(1)
- os.shutdown()
- else
- return
- end
- end
- end
- term.setBackgroundColor(colors.red)
- term.clear()
- term.setCursorPos(19,8)
- print("Life Calculator")
- term.setCursorPos(13.5,9)
- print("Click anywhere to continue")
- x,y = term.getSize()
- term.setCursorPos(1,y)
- print("Made by aleroqu")
- while true do
- if os.pullEvent("mouse_click") then
- typename()
- calculator()
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- return
- else
- sleep(.01)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement