Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local w,h = term.getSize()
- local health = 20
- local happyTama = {"O O",
- " O O "
- " O O "
- " OOO "}
- local mehTama = {"O O",
- " O O "
- " O O "
- " OOO "}
- local sadTama = {" OOOOOOO ",
- "O O"}
- local madTama = {"O O",
- " O O "
- " O O "
- " OOO "}
- local tamaEyes = {" O O "," X X "," v v "}
- term.clear()
- term.setCursorPos(1,1)
- print("Health:")
- while true do
- if health > 15 then
- --Happy
- term.setTextColor(colors.lime)
- term.setCursorPos(21,5)
- term.clearLine()
- print(tamaEyes[1])
- term.setCursorPos(21,7)
- term.clearLine()
- print(happyTama[1])
- term.setCursorPos(21,8)
- term.clearLine()
- print(happyTama[2])
- term.setCursorPos(1,2)
- elseif health > 10 and health < 15 then
- --Meh
- term.setTextColor(colors.yellow)
- term.setCursorPos(21,5)
- term.clearLine()
- print(tamaEyes[1])
- term.setCursorPos(21,7)
- term.clearLine()
- print(mehTama[1])
- term.setCursorPos(21,8)
- term.clearLine()
- term.setCursorPos(1,2)
- elseif health > 5 and health < 10 then
- --Sad
- term.setTextColor(colors.orange)
- term.setCursorPos(21,5)
- term.clearLine()
- print(tamaEyes[1])
- term.setCursorPos(21,7)
- term.clearLine()
- print(sadTama[1])
- term.setCursorPos(21,8)
- term.clearLine()
- print(sadTama[2])
- term.setCursorPos(1,2)
- elseif health > 1 and health < 5 then
- --Mad
- term.setTextColor(colors.red)
- term.setCursorPos(21,5)
- term.clearLine()
- print(tamaEyes[3])
- term.setCursorPos(21,7)
- term.clearLine()
- print(sadTama[1])
- term.setCursorPos(21,8)
- term.clearLine()
- print(sadTama[2])
- term.setCursorPos(1,2)
- end
- print(string.rep("|",health))
- event,button=os.pullEvent("mouse_click")
- if sleep (500) then
- health = health - 1
- if button == 1 and health > 1 then
- health = health + 1
- term.setCursorPos(1,2)
- term.clearLine()
- print (\n \n\n\n\n\n\n Dodo?)
- else
- --Dead
- term.setCursorPos(21,5)
- term.clearLine()
- print(tamaEyes[2])
- term.setCursorPos(21,7)
- term.clearLine()
- print(mehTama[1])
- term.setCursorPos(21,8)
- term.clearLine()
- sleep(3)
- term.clear()
- term.setCursorPos(1,1)
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement