Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local downscrolly = 570
- local upscrolly = 50
- local autoscroll = true
- local curSection = 0
- local modulis = 7;
- local middlepostions = {
- ["xcoords"] = {412,524,636,748},
- ["ycoords"] = 290
- }
- local spin = false
- local infinity = false
- local bounce = false
- local scroll = {
- ["doingscroll"] = false,
- ["isDownscroll"] = {false,false} --(bf.dad)
- }
- local starttime = 0
- local cameraspeed = 4
- local cameramulti = 1
- function onCreatePost()
- setProperty('healthBar.alpha', 0.3)
- setProperty('healthBarBG.alpha', 0.3)
- setProperty('iconP1.alpha', 0.3)
- setProperty('iconP2.alpha', 0.3)
- end
- function onStepHit()
- if curStep % 16 == 0 then
- curSection = math.floor(curStep / 16)
- end
- stepfunctions = {
- ["96"] = function()
- cameraspeed = 2
- cameramulti = 1.25
- end,
- ["105"] = function()
- cameraspeed = 1
- cameramulti = 1.5
- end,
- ["111"] = function()
- cameraspeed = 0
- cameramulti = 3
- end,
- ["117"] = function()
- triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
- cameraFlash("camHUD", "ffffff", stepCrochet/1000, true)
- for note = 0,getProperty('strumLineNotes.length')-1 do
- if getPropertyFromGroup('strumLineNotes', note, 'noteData') == 0 then
- setPropertyFromGroup('strumLineNotes', note, 'x', middlepostions["xcoords"][(note % 4) + 1])
- setPropertyFromGroup('strumLineNotes', note, 'y', middlepostions["ycoords"])
- end
- end
- end,
- ["121"] = function()
- triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
- cameraFlash("camHUD", "ffffff", stepCrochet/1000, true)
- for note = 0,getProperty('strumLineNotes.length')-1 do
- if getPropertyFromGroup('strumLineNotes', note, 'noteData') == 3 then
- setPropertyFromGroup('strumLineNotes', note, 'x', middlepostions["xcoords"][(note % 4) + 1])
- setPropertyFromGroup('strumLineNotes', note, 'y', middlepostions["ycoords"])
- end
- end
- end,
- ["125"] = function()
- triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
- cameraFlash("camHUD", "ffffff", stepCrochet/1000, true)
- for note = 0,getProperty('strumLineNotes.length')-1 do
- if getPropertyFromGroup('strumLineNotes', note, 'noteData') == 1 or getPropertyFromGroup('strumLineNotes', note, 'noteData') == 2 then
- setPropertyFromGroup('strumLineNotes', note, 'x', middlepostions["xcoords"][(note % 4) + 1])
- setPropertyFromGroup('strumLineNotes', note, 'y', middlepostions["ycoords"])
- end
- end
- end,
- ["129"] = function()
- cameraspeed = 4
- cameramulti = 1.75
- cameraFlash("camHUD", "ffffff", (stepCrochet/1000) * 4, true)
- infinity = true
- autoscroll = false
- scroll["isDownscroll"] = {true,false}
- scroll["doingscroll"] = true
- for note = 0,getProperty('opponentStrums.length')-1 do
- setPropertyFromGroup('opponentStrums', note, 'alpha', 0.4)
- end
- end,
- ["257"] = function()
- cameraFlash("camHUD", "ffffff", (stepCrochet/1000) * 4, true)
- infinity = false
- autoscroll = false
- scroll["isDownscroll"] = {false,true}
- scroll["doingscroll"] = true
- for note = 0,getProperty('opponentStrums.length')-1 do
- setPropertyFromGroup('opponentStrums', note, 'alpha', 0.4)
- end
- starttime = getPropertyFromClass('Conductor', 'songPosition')
- bounce = true
- end
- }
- if stepfunctions[tostring(curStep)] then
- stepfunctions[tostring(curStep)]()
- end
- if curStep % cameraspeed == 0 then
- triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
- end
- --EFFECTS AT START
- if curSection >= 0 and curSection <= 6 then
- if curStep % 16 == modulis or curStep % 16 == (modulis * 2) then
- bounceArrows(curStep % 16)
- end
- if curStep % 16 == 0 then
- local angle = 360
- if curStep % 32 == 0 then angle = -360 end
- spinArrows(angle)
- end
- end
- end
- --FUNCTIONS
- function spinArrows(angle)
- for note = 0,getProperty('strumLineNotes.length')-1 do
- noteTweenAngle("movementAngle " .. note, note, angle, stepCrochet/1000 * 2, "circInOut")
- end
- function onTweenCompleted(tag)
- for notetween = 0,getProperty('strumLineNotes.length')-1 do
- if angle == 360 or angle == -360 and tag == "movementAngle " .. notetween then
- setPropertyFromGroup('strumLineNotes', notetween, 'angle', 0)
- end
- end
- end
- end
- function bounceArrows(stepmodulis)
- local comp = 0
- if stepmodulis == (modulis * 2) then
- comp = 1
- end
- for note = 0,getProperty('strumLineNotes.length')-1 do
- local nexty = downscrolly
- if getPropertyFromGroup('strumLineNotes', note, 'y') == downscrolly then nexty = upscrolly end
- if note % 2 == comp then
- noteTweenY('notey' .. tostring(note), note, nexty, stepCrochet/1000 * 4, 'bounceOut')
- end
- end
- end
- function onUpdatePost(elapsed)
- if inGameOver then return end
- --EFFECTS SHIT
- if spin then
- currentBeat = (getPropertyFromClass('Conductor', 'songPosition') / 1000) * (bpm / 60)
- for note = 0,getProperty('strumLineNotes.length')-1 do
- setPropertyFromGroup('strumLineNotes', note, 'x', (430 + ((note % 4) * 112)) + 250 * math.sin((currentBeat + -10 * 0.05) * math.pi))
- setPropertyFromGroup('strumLineNotes', note, 'y', 304 + 250 * math.cos((currentBeat + -10 * 0.05) * math.pi))
- end
- elseif infinity then
- currentBeat = (getPropertyFromClass('Conductor', 'songPosition') / 1000) * (bpm / 60)
- for note = 0,getProperty('strumLineNotes.length')-1 do
- setPropertyFromGroup('strumLineNotes', note, 'x', (430 + ((note % 4) * 112)) + 350 * math.sin(((currentBeat/1.25) + 1 * 0.05) * math.pi/2))
- setPropertyFromGroup('strumLineNotes', note, 'y', 304 + 200 * math.cos(((currentBeat/1.25) + -10 * 0.05) * math.pi))
- end
- elseif bounce then
- for note = 0,getProperty('strumLineNotes.length')-1 do
- if (getPropertyFromClass('Conductor', 'songPosition')-starttime)%((crochet*2)*2) < (crochet*2) then
- setPropertyFromGroup('strumLineNotes', note, 'x', (420 + ((note % 4) * 112)) + ((math.floor(getPropertyFromClass('flixel.FlxG', 'width') * 4 / 10 + (((getPropertyFromClass('Conductor', 'songPosition') - starttime) % (crochet * 2)) / (crochet * 2))*getPropertyFromClass('flixel.FlxG', 'width') / 5 - (1280 / 2)))) * 2.5)
- setPropertyFromGroup('strumLineNotes', note, 'y', 604 + (math.floor(getPropertyFromClass('flixel.FlxG', 'height') / 10 - math.abs(math.sin(((getPropertyFromClass('Conductor', 'songPosition') - starttime) % (crochet * 2)) / (crochet * 2) * 3.1415926)) * getPropertyFromClass('flixel.FlxG', 'height') / 1.5- 100)))
- else
- setPropertyFromGroup('strumLineNotes', note, 'x', (420 + ((note % 4) * 112)) + ((math.floor(getPropertyFromClass('flixel.FlxG', 'width') * 6 / 10 - (((getPropertyFromClass('Conductor', 'songPosition') - starttime) % (crochet * 2)) / (crochet * 2))*getPropertyFromClass('flixel.FlxG', 'width') / 5 - (1280 / 2)))) * 2.5)
- setPropertyFromGroup('strumLineNotes', note, 'y', 604 + (math.floor(getPropertyFromClass('flixel.FlxG', 'height') / 10 - math.abs(math.sin(((getPropertyFromClass('Conductor', 'songPosition') - starttime) % (crochet * 2)) / (crochet * 2) * 3.1415926)) * getPropertyFromClass('flixel.FlxG', 'height') / 1.5- 100)))
- end
- end
- end
- --DOWNSCROLL SHIT
- if autoscroll then
- for note = 0,getProperty('notes.length')-1 do
- local direction = getPropertyFromGroup('notes', note, 'noteData')
- if getPropertyFromGroup('notes', note, 'mustPress') then direction = direction + 4 end
- if getPropertyFromGroup('strumLineNotes', direction, 'y') >= ((getPropertyFromClass('flixel.FlxG', 'height')/2) - getPropertyFromGroup('strumLineNotes', direction, 'height')) then
- setPropertyFromGroup('strumLineNotes', direction, 'downScroll' , true)
- if getPropertyFromGroup('notes', note, 'isSustainNote') then
- setPropertyFromGroup('notes', note, 'flipY', true)
- end
- else
- setPropertyFromGroup('strumLineNotes', direction, 'downScroll' , false)
- if getPropertyFromGroup('notes', note, 'isSustainNote') then
- setPropertyFromGroup('notes', note, 'flipY', false)
- end
- end
- end
- end
- if scroll["doingscroll"] then
- for note = 0,getProperty('notes.length')-1 do
- local direction = getPropertyFromGroup('notes', note, 'noteData')
- if getPropertyFromGroup('notes', note, 'mustPress') then direction = direction + 4 end
- local downscroll = false
- if getPropertyFromGroup('notes', note, 'mustPress') then
- downscroll = scroll["isDownscroll"][1]
- else
- downscroll = scroll["isDownscroll"][2]
- end
- setPropertyFromGroup('strumLineNotes', direction, 'downScroll' ,downscroll)
- if getPropertyFromGroup('notes', note, 'isSustainNote') then
- setPropertyFromGroup('notes', note, 'flipY', downscroll)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement