Advertisement
Guest User

Untitled

a guest
Sep 15th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. Module Module1
  4.     Dim Name As String
  5.     Dim Health As Integer
  6.     Dim hasLightsaber As Boolean
  7.     Dim hasSpaceshipkey As Boolean
  8.     Dim hasPart1 As Boolean
  9.     Dim hasPart2 As Boolean
  10.     Dim haspart3 As Boolean
  11.     Dim hasFullpart As Boolean
  12.     Dim hasHelmet As Boolean
  13.     Dim c As Char
  14.     Dim Names As String
  15.     Dim userinput As String
  16.  
  17.     Sub Main()
  18.  
  19.  
  20.  
  21.         'Varibles
  22.  
  23.         Health = 50
  24.         Name = Nothing
  25.         hasLightsaber = False
  26.         hasLightsaber = False
  27.         hasSpaceshipkey = False
  28.         hasPart1 = False
  29.         hasPart2 = False
  30.         haspart3 = False
  31.         hasFullpart = False
  32.         hasHelmet = False
  33.  
  34.  
  35.  
  36.         Console.Write("Name: ")
  37.         Name = Console.ReadLine()
  38.         Console.WriteLine("Narrator: Hello young Jedi. You have been knocked out by a couple of Ewoks.")
  39.         Console.WriteLine("Narrator: While you have been on unconscious they have attepted to steal and ransack your ship.")
  40.         Console.WriteLine("Narrator: However, luckly for you they were scared off by a Gorax.")
  41.         Console.WriteLine(" ")
  42.         Console.WriteLine("Narrator: You awake from your blackout with your Spaceship key, Lightsaber")
  43.         Console.WriteLine("and Helmet scattered around your spaceship with the door wide open.")
  44.         Console.WriteLine(" ")
  45.         Console.Write("Press Enter to open your eyes and look around...")
  46.  
  47.         Dim c As Char = Convert.ToChar(Console.Read())
  48.  
  49.         If c = vbCr Then
  50.             Console.Read()
  51.             Console.Clear()
  52.  
  53.         End If
  54.         Console.ForegroundColor = ConsoleColor.Red
  55.         Console.WriteLine("To your left is your Lightsaber.")
  56.         Console.WriteLine(" ")
  57.         Console.ForegroundColor = ConsoleColor.Blue
  58.         Console.WriteLine("To your left is your helment")
  59.         Console.WriteLine(" ")
  60.         Console.ResetColor()
  61.  
  62.         Console.WriteLine("*Options:")
  63.         Console.WriteLine(" ")
  64.  
  65.         Console.ForegroundColor = ConsoleColor.Red
  66.         Console.WriteLine("To pick up the lightsaber press A")
  67.         Console.ForegroundColor = ConsoleColor.Blue
  68.         Console.WriteLine("To pick up the helment press D")
  69.         Console.WriteLine(" ")
  70.  
  71.         Console.Write("Option: ")
  72.         userinput = Console.Read()
  73.  
  74.         If userinput = "A" & "a" Then hasLightsaber = True
  75.         If userinput = "D" & "d" Then hasHelmet = True
  76.  
  77.  
  78.         Console.ResetColor()
  79.         If hasHelmet = True Then Console.WriteLine("You pick up the helmet and underneath is a key to your spaceship.")
  80.         If hasLightsaber = True Then Console.WriteLine("You picked up the lightsaber.")
  81.  
  82.  
  83.         Console.WriteLine("Option: ")
  84.         Console.WriteLine(" ")
  85.         Console.ForegroundColor = ConsoleColor.Red
  86.         Console.WriteLine("To pick up the spaceship key press A")
  87.         Console.ForegroundColor = ConsoleColor.Blue
  88.         Console.WriteLine("To pick up the lightsaber key press D")
  89.  
  90.         userinput = Console.ReadLine()
  91.  
  92.         If userinput = "A" & "a" Then hasSpaceshipkey = True
  93.         If userinput = "D" & "d" Then hasLightsaber = True
  94.  
  95.         Console.ResetColor()
  96.         If hasLightsaber = True Then Console.WriteLine("You picked up your lightsaber, you look around and all you see left is your spaceship key.")
  97.         If hasSpaceshipkey = True Then Console.WriteLine("You picked up your spaceship key, you look around and all you see left is your lightsaber.")
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.         Console.WriteLine("End")
  117.         Names = Console.ReadLine
  118.  
  119.  
  120.  
  121.     End Sub
  122.  
  123. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement