Advertisement
Guest User

Untitled

a guest
Nov 30th, 2023
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. blue = require "Libraries/bluesoul"
  2. require "gaster_blasters"
  3. blue.Initialize()
  4. blue.enableFakePlayer = true
  5. timer = 0
  6. spawntimmer = 0
  7. piont = 0
  8.  
  9. bones = {}
  10. boness = {}
  11. function Update()
  12. spawntimmer = spawntimmer + 1
  13. timer = timer + 1
  14. for k,v in pairs(bones) do
  15. if v.isactive then
  16. v.Move(v.GetVar("speed"), 0)
  17. end
  18. end
  19. for k,v in pairs(boness) do
  20. if v.isactive then
  21. v.Move(v.GetVar("movex"), ("movey"))
  22. end
  23. end
  24. if spawntimmer < 400 then
  25. if timer == 40 then
  26. local bone = CreateProjectile("spr_s_bonewall_tall_hole_3", 300, 30)
  27. bone.ppcollision = true
  28. bone.SetVar("speed", -2.05)
  29. table.insert(bones, bone)
  30. local bone2 = CreateProjectile("spr_s_bonewall_tall_hole_3", -300, 30)
  31. bone2.ppcollision = true
  32. bone2.SetVar("speed", 2.05)
  33. table.insert(bones, bone2)
  34. timer = 0
  35. end
  36. end
  37. if spawntimmer < 700 then
  38. blue.Update()
  39. end
  40. if spawntimmer == 450 then
  41. warn = CreateProjectile("spr_s_bonestab_h_wide_warn_0", 0, -90)
  42. warn2 = CreateProjectile("spr_s_bonestab_h_wide_warn_0", 0, 90)
  43. warn.SetVar("safe", true)
  44. warn2.SetVar("safe", true)
  45. end
  46. if spawntimmer == 500 then
  47. bonefloor = CreateProjectile("spr_s_bonestab_v_wide_0", 0, -500)
  48. bonefloor2 = CreateProjectile("spr_s_bonestab_v_wide_0", 0, 500)
  49. end
  50. if spawntimmer > 500 and bonefloor.y < -90 and spawntimmer < 600 then
  51. bonefloor.Move(0, 10)
  52. bonefloor2.Move(0, -10)
  53. end
  54. if spawntimmer > 500 and bonefloor.y == warn.y then
  55. warn.MoveTo(999999, 999999)
  56. warn2.MoveTo(999999, 999999)
  57. end
  58. if spawntimmer == 550 then
  59. blasters.New(-1000, 130, 70, 130 , 90)
  60. end
  61. if spawntimmer == 600 then
  62. blasters.New(-1000, 130, 250, 280 , 0)
  63. blasters.New(-1000, 130, 450, 280 , 0)
  64. end
  65. if spawntimmer > 600 then
  66. bonefloor.Move(0, -10)
  67. bonefloor2.Move(0, 10)
  68. end
  69. if spawntimmer == 620 then
  70. blue = require "Libraries/bluesoulup"
  71. end
  72. if Player.sprite.rotation < 180 and spawntimmer > 600 and spawntimmer < 700 then
  73. Player.sprite.rotation = Player.sprite.rotation + 10
  74. end
  75. if spawntimmer == 700 then
  76. timer = 0
  77. Player.sprite.rotation = 0
  78. Player.sprite.color = {1,0,0}
  79. end
  80. if spawntimmer > 700 then
  81. timer = timer + 1
  82. blue.enableFakePlayer = true
  83. if Input.Right > 0 then
  84. Player.MoveToAbs(Player.absx + 2,Player.absy,false)
  85. end
  86. if Input.Left > 0 then
  87. Player.MoveToAbs(Player.absx - 2,Player.absy,false)
  88. end
  89. if Input.Up> 0 then
  90. Player.MoveToAbs(Player.absx,Player.absy + 2,false)
  91. end
  92. if Input.Down> 0 then
  93. Player.MoveToAbs(Player.absx,Player.absy - 2,false)
  94. end
  95. if timer == 40 then
  96. local bone3 = CreateProjectile("spr_s_bonewall_0", -65 + math.random(150), 200)
  97. local angle = math.deg(math.atan2(Player.y - bone3.y, Player.x - bone3.x)) + 270
  98. local movex = bulletspeed*math.cos(angle)
  99. local movey = bulletspeed*math.sin(angle)
  100. bone3.sprite.rotation = angle
  101. bone3.SetVar("movex", movex)
  102. bone3.SetVar("movey", movey)
  103. bone3.ppcollision = true
  104. table.insert(boness, bone3)
  105. timer = 0
  106. end
  107. end
  108. blasters.Update()
  109. end
  110. function OnHit(bullet)
  111. if not bullet.GetVar("safe") then
  112. Player.Hurt(1, 0)
  113. end
  114. end
  115. blasters = require ("Libraries/gaster_blasters")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement