Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.11 KB | None | 0 0
  1. 'Program which asks for username and password
  2.  
  3. 'Change Username Name And Passwords
  4. user1Username = "Niklas"
  5. user2Username = "Banana"
  6. user1Password = "Apples"
  7. user2Password = "pwd"
  8.  
  9. 'Select Username
  10. start:
  11. loggedOnBefore = "false"
  12. TextWindow.ForegroundColor = "Yellow"
  13. TextWindow.WriteLine("What user do you want to log on with?")
  14. TextWindow.ForegroundColor = "Gray"
  15. TextWindow.WriteLine("[1] " + user1Username)
  16. Program.Delay(150)
  17. TextWindow.WriteLine("[2] " + user2Username)
  18. Program.Delay(150)
  19. TextWindow.WriteLine("[3] Guest")
  20. username = TextWindow.Read()
  21. TextWindow.ForegroundColor = "Yellow"
  22.  
  23. If username = "1" or username = user1Username Then
  24. Goto user1Logon
  25. EndIf
  26.  
  27. If username = "2" Or username = user2Username Then
  28. Goto user2Logon
  29. EndIf
  30.  
  31. If username = "3" Then
  32. Goto guestLogon
  33. EndIf
  34. TextWindow.Clear()
  35. selectedWrongUsername = "true"
  36. Goto start
  37. 'Checks To See If Password Is Correct
  38.  
  39. user1Logon:
  40. TextWindow.Write("Enter your password: ")
  41. password = TextWindow.Read()
  42.  
  43. If password = user1Password Then
  44. user1LoggedOn = "true"
  45. Goto logon
  46. EndIf
  47.  
  48.  
  49.  
  50. user2Logon:
  51. TextWindow.Write("Enter your password: ")
  52. password = TextWindow.Read()
  53.  
  54. If password = user2Password Then
  55. user2LoggedOn = "true"
  56. Goto logon
  57. EndIf
  58.  
  59. guestLogon:
  60. TextWindow.ForegroundColor = "Green"
  61. TextWindow.WriteLine("As you are logging on to Guest, you do not need to enter a password")
  62. Program.Delay(750)
  63.  
  64. 'Logon Screen
  65.  
  66. logon:
  67. selectedWrongUsername = "true"
  68. TextWindow.ForegroundColor = "Yellow"
  69. TextWindow.Write(".")
  70. Program.Delay("400")
  71. TextWindow.Write(".")
  72. Program.Delay("400")
  73. TextWindow.Write(".")
  74. Program.Delay("400")
  75. TextWindow.Write(".")
  76. Program.Delay("400")
  77. TextWindow.Write(".")
  78. Program.Delay("650")
  79. Goto loggedOn
  80.  
  81. loggedOn:
  82. TextWindow.Clear()
  83. TextWindow.ForegroundColor = "Green"
  84. If loggedOnBefore = "false" Then
  85. TextWindow.WriteLine("Hello, you have logged on!")
  86. EndIf
  87. Program.Delay(500)
  88. TextWindow.WriteLine("What would you like to do now?")
  89. Program.Delay(750)
  90. TextWindow.ForegroundColor = "Gray"
  91. TextWindow.WriteLine("[1] Surf the Web")
  92. Program.Delay(150)
  93. TextWindow.WriteLine("[2] Sign Out")
  94. Program.Delay(150)
  95. TextWindow.WriteLine("[3] Shutdown")
  96. action = TextWindow.ReadNumber()
  97.  
  98. If action = "1" Then
  99. Goto surfWeb
  100. EndIf
  101.  
  102. If action = "2" Then
  103. Goto signOut
  104. EndIf
  105.  
  106. If action = "3" Then
  107. Goto shutdown
  108. EndIf
  109.  
  110. 'Web Search
  111.  
  112. surfWeb:
  113. If user1LoggedOn = "true" Or user2LoggedOn = "true" Then
  114. Goto surfWebAllowed
  115. Else
  116. TextWindow.ForegroundColor = "Red"
  117. TextWindow.WriteLine("You do not have permission to load NiklasChrome!")
  118. Program.Delay(1000)
  119. Goto loggedOn
  120. EndIf
  121.  
  122. surfWebAllowed:
  123. TextWindow.Clear()
  124. TextWindow.ForegroundColor = "White"
  125. TextWindow.WriteLine("NiklasChrome is loading")
  126. Program.Delay("400")
  127. TextWindow.Write(".")
  128. Program.Delay("400")
  129. TextWindow.Write(".")
  130. Program.Delay("400")
  131. TextWindow.Write(".")
  132. Program.Delay("400")
  133. TextWindow.Write(".")
  134. Program.Delay("650")
  135. TextWindow.Clear()
  136. TextWindow.ForegroundColor = "Green"
  137. TextWindow.WriteLine("NiklasChrome has loaded.")
  138. TextWindow.ForegroundColor = "Purple"
  139. Program.Delay(1000)
  140. Goto niklasChromeLoaded
  141.  
  142. niklasChromeLoaded:
  143. TextWindow.Clear()
  144. TextWindow.ForegroundColor = "Purple"
  145. TextWindow.WriteLine("What would you like to do?")
  146. Program.Delay(750)
  147. TextWindow.ForegroundColor = "Gray"
  148. TextWindow.WriteLine("[1] Search Google")
  149. Program.Delay(150)
  150. TextWindow.WriteLine("[2] Define Word")
  151. Program.Delay(150)
  152. TextWindow.WriteLine("[3] Calculator")
  153. Program.Delay(150)
  154. TextWindow.WriteLine("[4] Close Niklas Chrome")
  155. whatWouldYouLikeToDo = TextWindow.ReadNumber()
  156.  
  157. If whatWouldYouLikeToDo = "1" Then
  158. Goto searchGoogle
  159. EndIf
  160.  
  161. If whatWouldYouLikeToDo = "2" Then
  162. Goto define
  163. EndIf
  164.  
  165. If whatWouldYouLikeToDo = "3" Then
  166. Goto calculator
  167. EndIf
  168.  
  169. If whatWouldYouLikeToDo = "4" Then
  170. Goto chromeClose
  171. EndIf
  172.  
  173.  
  174.  
  175. searchGoogle:
  176. TextWindow.Clear()
  177. TextWindow.ForegroundColor = "Purple"
  178. TextWindow.WriteLine("If you would like to search google, then open google in a normal browser..")
  179. Program.Delay(1000)
  180. TextWindow.ForegroundColor = "Purple"
  181. Goto niklasChromeLoaded
  182.  
  183. 'Define
  184.  
  185. define:
  186. TextWindow.Clear()
  187. TextWindow.ForegroundColor = "Purple"
  188. TextWindow.Write("Type the word you would like to know the definition of: ")
  189. wordToDefine = TextWindow.Read()
  190. Dictionary.GetDefinition(wordToDefine)
  191. GraphicsWindow.Title = ("Definition of "+wordToDefine+"")
  192. GraphicsWindow.FontBold = "False"
  193. GraphicsWindow.FontName = "Verdana"
  194. GraphicsWindow.FontSize = 24
  195. GraphicsWindow.BrushColor = "DarkGreen"
  196. GraphicsWindow.DrawText(10, 10, wordToDefine)
  197. definition = Dictionary.GetDefinition(wordToDefine)
  198. GraphicsWindow.FontSize = 12
  199. GraphicsWindow.BrushColor = "Black"
  200. GraphicsWindow.DrawText(10, 60, definition)
  201. Program.Delay(2500)
  202. Goto defineAnotherWord
  203.  
  204. defineAnotherWord:
  205. TextWindow.ForegroundColor = "Purple"
  206. TextWindow.WriteLine("Would you like to know the definition of another word?")
  207. TextWindow.WriteLine("[Y] Yes")
  208. TextWindow.WriteLine("[N] No")
  209. defineAnotherWord = TextWindow.Read()
  210.  
  211. If defineAnotherWord = "Y" Or defineAnotherWord = "Yes" or defineAnotherWord = "y" Then
  212. Goto define
  213. EndIf
  214.  
  215. If defineAnotherWord = "N" Or defineAnotherWord = "No" or defineAnotherWord = "n" Then
  216. Goto niklasChromeLoaded
  217. EndIf
  218. Goto defineAnotherWord
  219.  
  220.  
  221. 'Calculator
  222.  
  223. calculator:
  224. TextWindow.Clear()
  225. TextWindow.ForegroundColor = "White"
  226. TextWindow.Write("Type the first number: ")
  227. num1 = TextWindow.ReadNumber()
  228. TextWindow.Write("Would you like to do: + , - , * , / : ")
  229. mathOperation = TextWindow.Read()
  230. TextWindow.Write("Type the second number: ")
  231. num2 = TextWindow.ReadNumber()
  232.  
  233. If mathOperation = "+" Then
  234. num3 = num1 + num2
  235. EndIf
  236.  
  237. If mathOperation = "-" Then
  238. num3 = num1 - num2
  239. EndIf
  240.  
  241. If mathOperation = "*" Then
  242. num3 = num1 * num2
  243. EndIf
  244.  
  245. If mathOperation = "/" Then
  246. num3 = num1 / num2
  247. EndIf
  248.  
  249. TextWindow.ForegroundColor = "White"
  250. TextWindow.Write("The answer is: ")
  251. TextWindow.ForegroundColor = "Yellow"
  252. TextWindow.Write(num3)
  253. TextWindow.WriteLine("")
  254.  
  255. Program.Delay(2500)
  256.  
  257. TextWindow.ForegroundColor = "White"
  258. TextWindow.WriteLine("Would you like to do another equation?")
  259. TextWindow.WriteLine("[Y] Yes")
  260. TextWindow.WriteLine("[N] No")
  261. anotherEquation = TextWindow.Read()
  262.  
  263. If anotherEquation = "Yes" Or anotherEquation = "yes" Or anotherEquation = "Y" Or anotherEquation = "y" Then
  264. Goto calculator
  265. EndIf
  266.  
  267. If anotherEquation = "No" Or anotherEquation = "no" Or anotherEquation = "N" Or anotherEquation = "n" Then
  268. Goto closeCalculator
  269. EndIf
  270.  
  271. closeCalculator:
  272.  
  273. TextWindow.ForegroundColor = "Red"
  274. TextWindow.WriteLine("Are you sure you would like to close Calculator")
  275. TextWindow.ForegroundColor = "Gray"
  276. TextWindow.WriteLine("[Y] Yes")
  277. TextWindow.WriteLine("[N] No")
  278. likeToCloseCalculator = TextWindow.Read()
  279.  
  280. If likeToCloseCalculator = "Yes" Or likeToCloseCalculator = "yes" Or likeToCloseCalculator = "Y" Or likeToCloseCalculator = "y" Then
  281. Goto niklasChromeLoaded
  282. EndIf
  283.  
  284. If likeToCloseCalculator = "No" Or likeToCloseCalculator = "no" Or likeToCloseCalculator = "N" Or likeToCloseCalculator = "n" Then
  285. Goto calculator
  286. EndIf
  287.  
  288.  
  289. chromeClose:
  290. TextWindow.ForegroundColor = "Red"
  291. TextWindow.WriteLine("Are you sure you would like to close NiklasChrome?")
  292. TextWindow.ForegroundColor = "Gray"
  293. TextWindow.WriteLine("[Y] Yes")
  294. TextWindow.WriteLine("[N] No")
  295. likeToCloseChrome = TextWindow.Read()
  296.  
  297. If likeToCloseChrome = "Y" or likeToCloseChrome = "Yes" Then
  298. TextWindow.ForegroundColor = "Yellow"
  299. TextWindow.WriteLine("NiklasChrome will be closed.")
  300. Program.Delay(500)
  301. Goto loggedOn
  302. EndIf
  303.  
  304. If likeToCloseChrome = "N" Or likeToCloseChrome = "No" then
  305. TextWindow.ForegroundColor = "Yellow"
  306. TextWindow.WriteLine("NiklasChrome will not be closed")
  307. Program.Delay(1000)
  308. Goto niklasChromeLoaded
  309. EndIf
  310. Goto chromeClose
  311.  
  312. 'Signout
  313.  
  314. signOut:
  315. TextWindow.Clear()
  316. TextWindow.ForegroundColor = "Red"
  317. TextWindow.WriteLine("Are you sure you would like to logout?")
  318. TextWindow.ForegroundColor = "Gray"
  319. TextWindow.WriteLine("[Y] Yes")
  320. TextWindow.WriteLine("[N] No")
  321. likeToSignOut = TextWindow.Read()
  322.  
  323. If likeToSignOut = "Y" or likeToSignOut = "Yes" Then
  324. TextWindow.ForegroundColor = "Yellow"
  325. TextWindow.WriteLine("You will be logged off.")
  326. Program.Delay(750)
  327. TextWindow.WriteLine(" ")
  328. TextWindow.WriteLine(" ")
  329. Goto start
  330. EndIf
  331.  
  332. If likeToSignOut = "N" Or likeToSignOut = "No" then
  333. TextWindow.ForegroundColor = "Yellow"
  334. TextWindow.WriteLine("You will not be logged off.")
  335. Program.Delay(1000)
  336. Goto loggedOn
  337. EndIf
  338. Goto loggedOn
  339.  
  340. 'Shutdown Program
  341.  
  342. shutdown:
  343. TextWindow.Clear()
  344. TextWindow.ForegroundColor = "Red"
  345. TextWindow.WriteLine("Are you sure you would like to shutdown?")
  346. TextWindow.ForegroundColor = "Gray"
  347. TextWindow.WriteLine("[Y] Yes")
  348. TextWindow.WriteLine("[N] No")
  349. likeToShutDown = TextWindow.Read()
  350.  
  351. If likeToShutDown = "Y" Or likeToShutDown = "Yes" Then
  352. TextWindow.WriteLine("This Program will now shutdown.")
  353. Program.Delay(750)
  354. Program.End()
  355. EndIf
  356.  
  357. If likeToShutDown = "N" Or likeToShutDown = "No" Then
  358. Goto loggedOn
  359. EndIf
  360. Goto shutdown
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement