Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2022
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.77 KB | None | 0 0
  1. #MaxThreads 20
  2. URLDownloadToFile, https://i.imgur.com/hn1Eo0L.png, npc1-.png
  3. URLDownloadToFile, https://i.imgur.com/gxYVLbY.png, npc2-.png
  4. URLDownloadToFile, https://i.imgur.com/iujlpMO.png, npc3-.png
  5. URLDownloadToFile, https://i.imgur.com/jjvPyLm.png, kmhm1.png
  6. URLDownloadToFile, https://i.imgur.com/3AEQjDX.png, kmhm2.png
  7. Gui, Add, Picture, x40 y110 w34 h55 vplayer, npc1-.png
  8. GuiControlGet, player, Pos
  9. Gui, Add, button, x20 y159 w200 h10 ved1,
  10. Gui, Add, button, x260 y159 w180 h10 ved2,
  11. Gui, Add, Text, x40 y40 w250 h20 vloc,
  12. SetTimer, TimerGravity, 50
  13. SetTimer, TimerMap, 100
  14. Gui, Color, 884488
  15. counting=0
  16. Gui, Show, w479 h379, Right/Left or A/D; Space to Jump; F to fire energy blast
  17. return
  18.  
  19.  
  20. TimerMap:
  21. GuiControlGet, ed1, pos
  22. GuiControlGet, ed2, pos
  23. GuiControlGet, player, Pos
  24.  
  25. far1:=ed1w+ed1x
  26. far2:=ed2w+ed2x
  27. GuiControl, Text, loc, %counting% points! ;with %ed1x% : %far1% and %ed2X% : %far2%
  28. if (ed1X<0)
  29. {
  30. SetTimer, TimerGravity, off
  31. newloc1:=ed2X+ed2W+30
  32. Guicontrol, MoveDraw, ed1, X%newloc1%, w150 h10 Y%ed1Y%
  33. GuiControlGet, ed1, pos
  34. GuiControlGet, ed2, pos
  35. counting:=counting+1000
  36. }
  37. if (ed2X<0)
  38. {
  39. SetTimer, TimerGravity, off
  40. GuiControlGet, ed1, pos
  41. GuiControlGet, ed2, pos
  42. newloc2:=ed1X+ed1W+30
  43. Guicontrol, MoveDraw, ed2, X%newloc2%, Y%ed2Y%
  44. counting:=counting+1000
  45. }
  46. if(playerX > 350)
  47. {
  48. Loop, 30
  49. {
  50. sleep, 25
  51. floor1X:=ed1X-10
  52. floor2X:=ed2X-10
  53. newX:=playerX-12
  54. newY:=playery
  55.  
  56. if (ed1X+ed1W>0)
  57. {
  58. Guicontrol, MoveDraw, ed1, X%floor1X%, Y%ed1Y%
  59. Guicontrol, MoveDraw, ed2, X%floor2X%, Y%ed2Y%
  60. GuiControl, MoveDraw, player, X%newX% Y%newY%
  61. counting:=counting+1000
  62. }
  63. }
  64. }
  65. SetTimer, TimerGravity, 50
  66. return
  67.  
  68.  
  69.  
  70.  
  71. TimerGravity:
  72. GuiControl, Text, loc, %counting% points!
  73. GuiControlGet, player, Pos
  74. GuiControlGet, ed1, Pos
  75. GuiControlGet, ed2, Pos
  76. ;~ if (playerx < ed1X or playerx > ed1W+ed1X and playerx < ed2X-15 or playerx > ed2W+ed2X)
  77. ;~ {
  78. ;~ if(playerY >=110)
  79. ;~ {
  80. ;~ SetTimer, TimerGravity, off
  81. ;~ SetTimer, TimerFall, 50
  82. ;~ }
  83. close1:=ed1x-5
  84. close2:=ed2x-5
  85. far1:=ed1w+ed1x
  86. far2:=ed2w+ed2x
  87. if playerx not between %close1% and %far1%
  88. {
  89. if playerx not between %close2% and %far2%
  90. {
  91. if(playerY >=110)
  92. {
  93. SetTimer, TimerGravity, off
  94. SetTimer, TimerFall, 50
  95. }
  96. }
  97. }
  98. return
  99.  
  100.  
  101. TimerFall:
  102. GuiControlGet, player, Pos
  103. newX:=playerX
  104. newY:=playery+15
  105. GuiControl, MoveDraw, player, X%newX% Y%newY%
  106. if (playerY > 380)
  107. {
  108. Reload
  109. }
  110. return
  111.  
  112. counter=0
  113.  
  114. timerBlast:
  115. hotkey, F, off
  116. counter++
  117. GuiControlGet, player, Pos
  118. newX:=playerX+25
  119. newY:=playery+15
  120. sameY:=playerY
  121. Gui, Add, Picture, X%newX% Y%newY% vwave%counter%, kmhm1.png
  122. sleep, 250
  123. GuiControl,, wave, kmhm2.png
  124. GuiControl, MoveDraw, wave, X%newX% Y%sameY%
  125. settimer, timerblastpath, 75
  126. settimer, timerblast, off
  127. hotkey, F, on
  128. return
  129.  
  130.  
  131. timerBlastpath:
  132. GuiControlGet, wave%counter%, Pos
  133. newX:=wave%counter%X+25
  134. sameY:=wave%counter%Y
  135. GuiControl,, wave%counter%, kmhm2.png
  136. GuiControl, MoveDraw, wave%counter%, X%newX% Y%sameY%
  137. if(wave%counter%X > 480)
  138. {
  139. settimer, timerBlastpath, off
  140. }
  141. return
  142.  
  143.  
  144. timerLeft:
  145. GuiControlGet, player, Pos
  146. newX:=playerX-5
  147. newY:=playery
  148. GuiControl, MoveDraw, player, X%newX% Y%newY%
  149. GuiControl,, player, npc1-.png
  150. GuiControl,, player, npc2-.png
  151. GuiControl,, player, npc3-.png
  152. return
  153.  
  154. F::
  155. SetTimer, TimerBlast, 49
  156. return
  157.  
  158.  
  159. timerRight:
  160. GuiControlGet, player, Pos
  161. newX:=playerX+5
  162. newY:=playery
  163. GuiControl, MoveDraw, player, X%newX% Y%newY%
  164. GuiControl,, player, npc1-.png
  165. GuiControl,, player, npc2-.png
  166. GuiControl,, player, npc3-.png
  167. return
  168.  
  169.  
  170. TimerJump:
  171. SetTimer, TimerGravity, off
  172. delay=50
  173. loop, 7
  174. {
  175. sleep, %delay%
  176. GuiControlGet, player, Pos
  177. newX:=playerX
  178. newY:=playery-4
  179. GuiControl, MoveDraw, player, X%newX% Y%newY%
  180. delay+=10
  181. }
  182. delay=50
  183. loop, 7
  184. {
  185. sleep, %delay%
  186. GuiControlGet, player, Pos
  187. newX:=playerX
  188. newY:=playery+4
  189. GuiControl, MoveDraw, player, X%newX% Y%newY%
  190. delay-=6
  191. }
  192. SetTimer, TimerGravity, 50
  193. return
  194.  
  195.  
  196. D::
  197. SetTimer, TimerRight, 49
  198. KeyWait, D
  199. SetTimer, TimerRight, Off
  200. return
  201.  
  202.  
  203. Right::
  204. SetTimer, TimerRight, 49
  205. KeyWait, Right
  206. SetTimer, TimerRight, Off
  207. return
  208.  
  209. A::
  210. SetTimer, TimerLeft, 49
  211. KeyWait, A
  212. SetTimer, TimerLeft, Off
  213. return
  214.  
  215. Left::
  216. SetTimer, TimerLeft, 49
  217. KeyWait, Left
  218. SetTimer, TimerLeft, Off
  219. return
  220.  
  221.  
  222. Space::
  223. SetTimer, TimerJump, 52
  224. KeyWait, Space
  225. SetTimer, TimerJump, Off
  226. return
  227.  
  228.  
  229. GuiClose:
  230. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement