Advertisement
Guest User

textGame

a guest
Feb 10th, 2012
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $name = read-host "WHATS UR NAME???"
  2. write-host "$name, MILORD! THE ENEMY HAS ARRIVED. WHAT WILL YOU DO?"
  3. $alive = $true
  4. $defeated = 0
  5. while ($alive) {
  6.     $response = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
  7.     switch ($response.character) {
  8.         "s" {write-host "YOU SHOOT AN ARROW BUT MISSED!"}
  9.         "r" {
  10.             write-host "YOU RUN INTO A WINDOW"
  11.             $alive = $false}
  12.         "a" {
  13.             write-host "YOU SWING YOUR SWORD"
  14.             $defeated ++
  15.             write-host "ENEMY NUMBER $defeated DOWN"}
  16.         default {write-host "WTF ARE YOU DOING"}
  17.     }
  18. }
  19. write-host "YOU DIE"
  20. write-host "BUT YOU HAVE KILLED $defeated ENEMIES THIS GLORIOUS DAY"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement