Advertisement
ThaWade

sevenDaysScoreCounter

Jan 3rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. --7 Days to Die Score Counter programmed in Lua by ThaWade
  2.  
  3. print("How many zombies have you killed?")
  4. kills = io.read()
  5.  
  6. print("How many times have you died?")
  7. deaths = io.read()
  8.  
  9. local reducedTheScore = 0
  10. local counter = 1
  11. for i = 1, deaths do
  12.     reducedTheScore = reducedTheScore + 5
  13.     print(counter..") "..reducedTheScore)
  14.     counter = counter + 1
  15. end
  16. print("Your starting score was "..kills)
  17. print("Your score penalty for deaths was "..reducedTheScore)
  18. finalScore = kills - reducedTheScore
  19. print("Your final score is "..finalScore)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement