Advertisement
Guest User

Untitled

a guest
Feb 17th, 2025
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.64 KB | None | 0 0
  1. blasterL = require ("sans_gaster_blasters")
  2. blasterS = require ("sans_gaster_blasters_small")
  3. blue = require "Libraries/bluesoul"
  4.  
  5. spawntimer = 0
  6. spawntimer2 = 0
  7. pos = 0
  8. bonesize = 0
  9. bonesize2 = 0
  10.  
  11. bullets = {}
  12.  
  13. box = CreateSprite("box", "Top")
  14. box.Mask("box")
  15. box.Scale(6.2, 6.2)
  16. box.MoveTo(320, 170)
  17. box.alpha = 0
  18.  
  19. bone1 = CreateProjectile("spr_s_bonestab_v_wide_0", 0, -127)
  20. bone1.SetParent(box)
  21.  
  22.  
  23. function Update()
  24. spawntimer = spawntimer + 1
  25. Encounter.call("fightstart")
  26. if spawntimer == 1 then
  27. Encounter.call("FlashingEyes")
  28. black = CreateSprite("button_bg", "Top")
  29. black.scale(100, 100)
  30. Audio.PlaySound("flicker")
  31. end
  32. if spawntimer == 20 then
  33. black.alpha = 0
  34. Audio.PlaySound("flicker")
  35. Encounter.call("SlamDown")
  36. warning = CreateSprite("warning", "BelowPlayer")
  37. warning.SetParent(box)
  38. warning.scale(1.5, 1)
  39. warning.move(0, -140)
  40. Audio.PlaySound("warning")
  41. blue.Initialize()
  42. blue.enableFakePlayer = true
  43. blue.PlaySoundWhenHitWall = true
  44. blue.Dir("down")
  45. blue.SetJump(-6)
  46. end
  47. if spawntimer == 60 then
  48. Encounter.call("Pocket")
  49. end
  50. for k,v in pairs(bullets) do
  51. if v.isactive then
  52. v.Move(v.GetVar("speed"), v.GetVar("Vspeed"))
  53. end
  54. end
  55. if spawntimer > 40 and spawntimer < 55 then
  56. bone1.move(0, 5)
  57. end
  58. if spawntimer == 55 then
  59. warning.alpha = 0
  60. end
  61. if spawntimer > 55 then
  62. bone1.move(0, -5)
  63. end
  64. if spawntimer == 80 then
  65. blue.Off()
  66. Encounter.call("SlamRight")
  67. end
  68. if spawntimer == 300 then
  69. Encounter.call("RightPocket")
  70. end
  71. if spawntimer > 80 and spawntimer < 260 then
  72. spawntimer2 = spawntimer2 + 1
  73. pos = 0
  74. bonesize = 7 + math.sin(Time.time * 8) * 4
  75. bonesize2 = -7 + math.sin(Time.time * 8) * 4
  76. if spawntimer % 3 == 0 then
  77. local bonemid = CreateProjectile("bonepart/mid_bone", -300 + pos, -65)
  78. bonemid.ppcollision = true
  79. bonemid.sprite.SetPivot(0.5, 0)
  80. bonemid.sprite.scale(1, bonesize)
  81. bonemid.SetVar("speed", 6)
  82. bonemid.SetVar("Vspeed", 0)
  83.  
  84. local bonetop = CreateProjectile("bonepart/top_bone", -300 + pos, -65 + bonesize * 6)
  85. bonetop.ppcollision = true
  86. bonetop.sprite.SetPivot(0.5, 0)
  87. bonetop.SetVar("speed", 6)
  88. bonetop.SetVar("Vspeed", 0)
  89. table.insert(bullets, bonemid)
  90. table.insert(bullets, bonetop)
  91.  
  92. local topbonemid = CreateProjectile("bonepart/mid_bone", -300 + pos, 65)
  93. topbonemid.ppcollision = true
  94. topbonemid.sprite.SetPivot(0.5, 0)
  95. topbonemid.sprite.scale(1, bonesize2)
  96. topbonemid.SetVar("speed", 6)
  97. topbonemid.SetVar("Vspeed", 0)
  98.  
  99. local topbonetop = CreateProjectile("bonepart/top_bone", -300 + pos, 65 + bonesize2 * 6)
  100. topbonetop.ppcollision = true
  101. topbonetop.sprite.SetPivot(0.5, 0)
  102. topbonetop.SetVar("speed", 6)
  103. topbonetop.SetVar("Vspeed", 0)
  104. topbonetop.sprite.rotation = 180
  105.  
  106. table.insert(bullets, topbonemid)
  107. table.insert(bullets, topbonetop)
  108. end
  109. end
  110. if spawntimer == 300 then
  111. blasterL.New(1000, 0, 380, 280, 0, 180)
  112. blasterL.New(1000, 0, 260, 20, 180, 0)
  113. blasterL.New(1000, 0, 180, 230, 90, 270)
  114. blasterL.New(1000, 0, 460, 110, 270, 90)
  115. end
  116. if spawntimer == 360 then
  117. blasterL.New(1000, 0, 450, 300, -45, 45)
  118. blasterL.New(1000, 0, 190, 300, 45, -45)
  119. end
  120. if spawntimer == 420 then
  121. blasterL.New(1000, 0, 380, 280, 0, 180)
  122. blasterL.New(1000, 0, 260, 20, 180, 0)
  123. blasterL.New(1000, 0, 180, 230, 90, 270)
  124. blasterL.New(1000, 0, 460, 110, 270, 90)
  125. end
  126. if spawntimer == 480 then
  127. blasterL.New(1000, 0, 180, 170, 90, 270)
  128. blasterL.New(1000, 0, 460, 170, 270, 90)
  129. end
  130. if spawntimer == 540 then
  131. blue.Initialize()
  132. blue.Dir("down")
  133. blue.SetJump(-6)
  134. Encounter.call("SlamDown")
  135. end
  136. if spawntimer > 500 and spawntimer < 680 then
  137. if spawntimer % 30 == 0 then
  138. local jump = CreateProjectile("spr_s_bonestab_v_gap_bottom", 200, 0)
  139. local jump2 = CreateProjectile("spr_s_bonestab_v_gap_bottom", -200, 0)
  140. jump.ppcollision = true
  141. jump2.ppcollision = true
  142. jump.sprite.SetParent(box)
  143. jump2.sprite.SetParent(box)
  144. jump.SetVar("speed", -3)
  145. jump2.SetVar("speed", 3)
  146. jump.SetVar("Vspeed", 0)
  147. jump2.SetVar("Vspeed", 0)
  148. table.insert(bullets, jump)
  149. table.insert(bullets, jump2)
  150. end
  151. end
  152. if spawntimer == 740 then
  153. blue.Dir("up")
  154. blue.SetJump(-6)
  155. Encounter.call("SlamUp")
  156. end
  157. if spawntimer > 700 and spawntimer < 880 then
  158. if spawntimer % 30 == 0 then
  159. local jump = CreateProjectile("spr_s_bonestab_v_gap_top", 200, 0)
  160. local jump2 = CreateProjectile("spr_s_bonestab_v_gap_top", -200, 0)
  161. jump.ppcollision = true
  162. jump2.ppcollision = true
  163. jump.sprite.SetParent(box)
  164. jump2.sprite.SetParent(box)
  165. jump.SetVar("speed", -3)
  166. jump2.SetVar("speed", 3)
  167. jump.SetVar("Vspeed", 0)
  168. jump2.SetVar("Vspeed", 0)
  169. table.insert(bullets, jump)
  170. table.insert(bullets, jump2)
  171. end
  172. end
  173. if spawntimer == 980 then
  174. blue.Dir("left")
  175. blue.SetJump(-6)
  176. Encounter.call("RightPocket")
  177. end
  178. if spawntimer == 1000 then
  179. Arena.resize(1000, 150)
  180. end
  181. if spawntimer == 1000 then
  182. blue.Dir("right")
  183. blue.SetJump(-6)
  184. Encounter.call("SlamRight")
  185. end
  186. if spawntimer > 1030 then
  187. if Input.Up > 0 and not Input.GetKey("X") > 0 then
  188. Player.move(0, 2)
  189. end
  190. if Input.down > 0 and not Input.GetKey("X") > 0 then -- this is where the problem is
  191. Player.move(0, -2)
  192. end
  193. if Input.Up > 0 and Input.GetKey("X") > 0 then
  194. Player.move(0, 1)
  195. end
  196. if Input.Down > 0 and Input.GetKey("X") > 0 then
  197. Player.move(0, -1)
  198. end
  199. end
  200. if spawntimer > 20 and spawntimer < 80 then
  201. blue.Update()
  202. end
  203. if spawntimer > 540 and spawntimer < 1030 then
  204. blue.Update()
  205. end
  206. blasterS.Update()
  207. blasterL.Update()
  208. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement