Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $name = read-host "WHATS UR NAME???"
- write-host "$name, MILORD! THE ENEMY HAS ARRIVED. WHAT WILL YOU DO?"
- $alive = $true
- $defeated = 0
- while ($alive) {
- $response = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
- switch ($response.character) {
- "s" {write-host "YOU SHOOT AN ARROW BUT MISSED!"}
- "r" {
- write-host "YOU RUN INTO A WINDOW"
- $alive = $false}
- "a" {
- write-host "YOU SWING YOUR SWORD"
- $defeated ++
- write-host "ENEMY NUMBER $defeated DOWN"}
- default {write-host "WTF ARE YOU DOING"}
- }
- }
- write-host "YOU DIE"
- write-host "BUT YOU HAVE KILLED $defeated ENEMIES THIS GLORIOUS DAY"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement