Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blasterL = require ("sans_gaster_blasters")
- blasterS = require ("sans_gaster_blasters_small")
- blue = require "Libraries/bluesoul"
- spawntimer = 0
- spawntimer2 = 0
- pos = 0
- bonesize = 0
- bonesize2 = 0
- bullets = {}
- box = CreateSprite("box", "Top")
- box.Mask("box")
- box.Scale(6.2, 6.2)
- box.MoveTo(320, 170)
- box.alpha = 0
- bone1 = CreateProjectile("spr_s_bonestab_v_wide_0", 0, -127)
- bone1.SetParent(box)
- function Update()
- spawntimer = spawntimer + 1
- Encounter.call("fightstart")
- if spawntimer == 1 then
- Encounter.call("FlashingEyes")
- black = CreateSprite("button_bg", "Top")
- black.scale(100, 100)
- Audio.PlaySound("flicker")
- end
- if spawntimer == 20 then
- black.alpha = 0
- Audio.PlaySound("flicker")
- Encounter.call("SlamDown")
- warning = CreateSprite("warning", "BelowPlayer")
- warning.SetParent(box)
- warning.scale(1.5, 1)
- warning.move(0, -140)
- Audio.PlaySound("warning")
- blue.Initialize()
- blue.enableFakePlayer = true
- blue.PlaySoundWhenHitWall = true
- blue.Dir("down")
- blue.SetJump(-6)
- end
- if spawntimer == 60 then
- Encounter.call("Pocket")
- end
- for k,v in pairs(bullets) do
- if v.isactive then
- v.Move(v.GetVar("speed"), v.GetVar("Vspeed"))
- end
- end
- if spawntimer > 40 and spawntimer < 55 then
- bone1.move(0, 5)
- end
- if spawntimer == 55 then
- warning.alpha = 0
- end
- if spawntimer > 55 then
- bone1.move(0, -5)
- end
- if spawntimer == 80 then
- blue.Off()
- Encounter.call("SlamRight")
- end
- if spawntimer == 300 then
- Encounter.call("RightPocket")
- end
- if spawntimer > 80 and spawntimer < 260 then
- spawntimer2 = spawntimer2 + 1
- pos = 0
- bonesize = 7 + math.sin(Time.time * 8) * 4
- bonesize2 = -7 + math.sin(Time.time * 8) * 4
- if spawntimer % 3 == 0 then
- local bonemid = CreateProjectile("bonepart/mid_bone", -300 + pos, -65)
- bonemid.ppcollision = true
- bonemid.sprite.SetPivot(0.5, 0)
- bonemid.sprite.scale(1, bonesize)
- bonemid.SetVar("speed", 6)
- bonemid.SetVar("Vspeed", 0)
- local bonetop = CreateProjectile("bonepart/top_bone", -300 + pos, -65 + bonesize * 6)
- bonetop.ppcollision = true
- bonetop.sprite.SetPivot(0.5, 0)
- bonetop.SetVar("speed", 6)
- bonetop.SetVar("Vspeed", 0)
- table.insert(bullets, bonemid)
- table.insert(bullets, bonetop)
- local topbonemid = CreateProjectile("bonepart/mid_bone", -300 + pos, 65)
- topbonemid.ppcollision = true
- topbonemid.sprite.SetPivot(0.5, 0)
- topbonemid.sprite.scale(1, bonesize2)
- topbonemid.SetVar("speed", 6)
- topbonemid.SetVar("Vspeed", 0)
- local topbonetop = CreateProjectile("bonepart/top_bone", -300 + pos, 65 + bonesize2 * 6)
- topbonetop.ppcollision = true
- topbonetop.sprite.SetPivot(0.5, 0)
- topbonetop.SetVar("speed", 6)
- topbonetop.SetVar("Vspeed", 0)
- topbonetop.sprite.rotation = 180
- table.insert(bullets, topbonemid)
- table.insert(bullets, topbonetop)
- end
- end
- if spawntimer == 300 then
- blasterL.New(1000, 0, 380, 280, 0, 180)
- blasterL.New(1000, 0, 260, 20, 180, 0)
- blasterL.New(1000, 0, 180, 230, 90, 270)
- blasterL.New(1000, 0, 460, 110, 270, 90)
- end
- if spawntimer == 360 then
- blasterL.New(1000, 0, 450, 300, -45, 45)
- blasterL.New(1000, 0, 190, 300, 45, -45)
- end
- if spawntimer == 420 then
- blasterL.New(1000, 0, 380, 280, 0, 180)
- blasterL.New(1000, 0, 260, 20, 180, 0)
- blasterL.New(1000, 0, 180, 230, 90, 270)
- blasterL.New(1000, 0, 460, 110, 270, 90)
- end
- if spawntimer == 480 then
- blasterL.New(1000, 0, 180, 170, 90, 270)
- blasterL.New(1000, 0, 460, 170, 270, 90)
- end
- if spawntimer == 540 then
- blue.Initialize()
- blue.Dir("down")
- blue.SetJump(-6)
- Encounter.call("SlamDown")
- end
- if spawntimer > 500 and spawntimer < 680 then
- if spawntimer % 30 == 0 then
- local jump = CreateProjectile("spr_s_bonestab_v_gap_bottom", 200, 0)
- local jump2 = CreateProjectile("spr_s_bonestab_v_gap_bottom", -200, 0)
- jump.ppcollision = true
- jump2.ppcollision = true
- jump.sprite.SetParent(box)
- jump2.sprite.SetParent(box)
- jump.SetVar("speed", -3)
- jump2.SetVar("speed", 3)
- jump.SetVar("Vspeed", 0)
- jump2.SetVar("Vspeed", 0)
- table.insert(bullets, jump)
- table.insert(bullets, jump2)
- end
- end
- if spawntimer == 740 then
- blue.Dir("up")
- blue.SetJump(-6)
- Encounter.call("SlamUp")
- end
- if spawntimer > 700 and spawntimer < 880 then
- if spawntimer % 30 == 0 then
- local jump = CreateProjectile("spr_s_bonestab_v_gap_top", 200, 0)
- local jump2 = CreateProjectile("spr_s_bonestab_v_gap_top", -200, 0)
- jump.ppcollision = true
- jump2.ppcollision = true
- jump.sprite.SetParent(box)
- jump2.sprite.SetParent(box)
- jump.SetVar("speed", -3)
- jump2.SetVar("speed", 3)
- jump.SetVar("Vspeed", 0)
- jump2.SetVar("Vspeed", 0)
- table.insert(bullets, jump)
- table.insert(bullets, jump2)
- end
- end
- if spawntimer == 980 then
- blue.Dir("left")
- blue.SetJump(-6)
- Encounter.call("RightPocket")
- end
- if spawntimer == 1000 then
- Arena.resize(1000, 150)
- end
- if spawntimer == 1000 then
- blue.Dir("right")
- blue.SetJump(-6)
- Encounter.call("SlamRight")
- end
- if spawntimer > 1030 then
- if Input.Up > 0 and not Input.GetKey("X") > 0 then
- Player.move(0, 2)
- end
- if Input.down > 0 and not Input.GetKey("X") > 0 then -- this is where the problem is
- Player.move(0, -2)
- end
- if Input.Up > 0 and Input.GetKey("X") > 0 then
- Player.move(0, 1)
- end
- if Input.Down > 0 and Input.GetKey("X") > 0 then
- Player.move(0, -1)
- end
- end
- if spawntimer > 20 and spawntimer < 80 then
- blue.Update()
- end
- if spawntimer > 540 and spawntimer < 1030 then
- blue.Update()
- end
- blasterS.Update()
- blasterL.Update()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement