Advertisement
tabnation

can you 1

Jan 7th, 2023
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1.  
  2. total=0
  3. moves=0
  4. tries=0
  5.  
  6. Gui, Font, s12
  7. Gui, Add, Text, x12 y9 w70 h20 , 121004
  8. Gui, Add, Edit, x11 y29 w80 h22 vtotal, 0
  9. Gui, Add, Button, x12 y59 w70 h30 gA29, +29
  10. Gui, Add, Button, x92 y59 w70 h30 gD3, /3
  11. Gui, Add, Button, x12 y99 w70 h30 gT4, *4
  12. Gui, Add, Button, x92 y99 w70 h30 gM58, -58
  13. Gui, Add, Button, x12 y139 w70 h30 gM12, -12
  14. Gui, Add, Button, x92 y139 w70 h30 gA92, +92
  15. Gui, Add, Button, x42 y199 w100 h30 greset, Reset
  16. Gui, Add, Text, x102 y9 w80 h20 vmoves %moves%,Moves 0
  17. Gui, Add, Text, x102 y29 w80 h20 vtries %tries%,Tries 0
  18. Gui, Show, x733 y365 h244 w180, Math Puzzel 1
  19. Return
  20.  
  21. GuiClose:
  22. ExitApp
  23.  
  24. A29:
  25. total+=29
  26. GuiControl,, total, %total%
  27. moves++
  28. GuiControl,, moves,Moves %moves%
  29. goto wincheck
  30. Return
  31.  
  32. D3:
  33. if total = 0
  34. {
  35. msgbox, Do you know how math works lol
  36. }
  37. total/=3
  38. GuiControl,, total, %total%
  39. moves++
  40. GuiControl,, moves,Moves %moves%
  41. goto wincheck
  42. Return
  43.  
  44. T4:
  45. if total = 0
  46. {
  47. msgbox, Do you know how math works lol
  48. }
  49. total*=4
  50. GuiControl,, total, %total%
  51. moves++
  52. GuiControl,, moves,Moves %moves%
  53. goto wincheck
  54. Return
  55.  
  56. M58:
  57. total-=58
  58. GuiControl,, total, %total%
  59. moves++
  60. GuiControl,, moves,Moves %moves%
  61. goto wincheck
  62. Return
  63.  
  64. M12:
  65. total-=12
  66. GuiControl,, total, %total%
  67. moves++
  68. GuiControl,, moves,Moves %moves%
  69. goto wincheck
  70. Return
  71.  
  72. A92:
  73. total+=92
  74. GuiControl,, total, %total%
  75. moves++
  76. GuiControl,, moves,Moves %moves%
  77. goto wincheck
  78. Return
  79.  
  80. reset:
  81. tries++
  82. total=0
  83. moves=0
  84. GuiControl,, moves,Moves 0
  85. GuiControl,, total,0
  86. GuiControl,, tries,tries %tries%
  87. Return
  88.  
  89. wincheck:
  90. score:=tries / moves
  91. if total = 121004
  92. {
  93. Msgbox, YOU GOT IT!!!`n`nTRIES=%tries%`n`nMOVES=%moves%`n`nSCORE=%score%
  94. if moves = 17
  95. {
  96. msgbox, Greats you got the least amount of moves possible
  97. }
  98. else
  99. {
  100. msgbox, FYI there is a smaller amount of moves to win!!
  101. }
  102. }
  103. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement