Advertisement
Guest User

Wave

a guest
Aug 4th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. spawntimer = 0
  2. bones = {}
  3. blue = require "Libraries/bluesoul"
  4. blue.Initialize()
  5.  
  6. local spawnx = 75
  7. local spawny1 = 30
  8. local spawny2 = -30
  9.  
  10. function Update()
  11.  
  12. blue.Update()
  13. spawntimer = spawntimer + 1
  14.  
  15. if spawntimer%60 == 0 then
  16. local sbone1 = CreateProjectile('blank', spawnx, spawny1)
  17. local sbone2 = CreateProjectile('blank', spawnx, spawny2)
  18. table.insert(bones,sbone1)
  19. table.insert(bones,sbone2)
  20. end
  21.  
  22. for i=1, #bones do
  23. local sbone1 = bones[i]
  24. local sbone2 = bones[i]
  25. bones[i].sprite.SetAnimation({"spinb1", "spinb2"}, 0.10)
  26. if bones[i].isactive then
  27. bones[i].Move(-2,0)
  28. if bones[i].x <= -77 then
  29. bones[i].Remove()
  30. end
  31. end
  32.  
  33. end
  34. end
  35.  
  36. function OnHit()
  37. Player.hurt(1,0.4)
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement