Advertisement
lunarcleint

JELLY BEAN MODCHART

Apr 3rd, 2022
1,081
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.00 KB | None | 0 0
  1.  
  2. local downscrolly = 570
  3. local upscrolly = 50
  4.  
  5. local autoscroll = true
  6.  
  7. local curSection = 0
  8.  
  9. local modulis = 7;
  10.  
  11. local middlepostions = {
  12.     ["xcoords"] = {412,524,636,748},
  13.     ["ycoords"] = 290
  14. }
  15.  
  16. local spin = false
  17.  
  18. local infinity = false
  19.  
  20. local bounce = false
  21.  
  22. local scroll = {
  23.     ["doingscroll"] = false,
  24.     ["isDownscroll"] = {false,false} --(bf.dad)
  25. }
  26.  
  27. local starttime = 0
  28.  
  29. local cameraspeed = 4
  30. local cameramulti = 1
  31.  
  32. function onCreatePost()
  33.     setProperty('healthBar.alpha', 0.3)
  34.     setProperty('healthBarBG.alpha', 0.3)
  35.     setProperty('iconP1.alpha', 0.3)
  36.     setProperty('iconP2.alpha', 0.3)
  37. end
  38.  
  39. function onStepHit()
  40.  
  41.     if curStep % 16 == 0 then
  42.         curSection = math.floor(curStep / 16)
  43.     end
  44.  
  45.     stepfunctions = {
  46.         ["96"] = function()
  47.             cameraspeed = 2
  48.             cameramulti = 1.25
  49.         end,
  50.         ["105"] = function()
  51.             cameraspeed = 1
  52.             cameramulti = 1.5
  53.         end,
  54.         ["111"] = function()
  55.             cameraspeed = 0
  56.             cameramulti = 3
  57.         end,
  58.         ["117"] = function()
  59.             triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
  60.             cameraFlash("camHUD", "ffffff", stepCrochet/1000, true)
  61.             for note = 0,getProperty('strumLineNotes.length')-1 do
  62.                 if getPropertyFromGroup('strumLineNotes', note, 'noteData') == 0 then
  63.                     setPropertyFromGroup('strumLineNotes', note, 'x', middlepostions["xcoords"][(note % 4) + 1])
  64.                     setPropertyFromGroup('strumLineNotes', note, 'y', middlepostions["ycoords"])
  65.                 end
  66.             end
  67.         end,
  68.         ["121"] = function()
  69.             triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
  70.             cameraFlash("camHUD", "ffffff", stepCrochet/1000, true)
  71.             for note = 0,getProperty('strumLineNotes.length')-1 do
  72.                 if getPropertyFromGroup('strumLineNotes', note, 'noteData') == 3 then
  73.                     setPropertyFromGroup('strumLineNotes', note, 'x', middlepostions["xcoords"][(note % 4) + 1])
  74.                     setPropertyFromGroup('strumLineNotes', note, 'y', middlepostions["ycoords"])
  75.                 end
  76.             end
  77.         end,
  78.         ["125"] = function()
  79.             triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
  80.             cameraFlash("camHUD", "ffffff", stepCrochet/1000, true)
  81.             for note = 0,getProperty('strumLineNotes.length')-1 do
  82.                 if getPropertyFromGroup('strumLineNotes', note, 'noteData') == 1 or getPropertyFromGroup('strumLineNotes', note, 'noteData') == 2 then
  83.                     setPropertyFromGroup('strumLineNotes', note, 'x', middlepostions["xcoords"][(note % 4) + 1])
  84.                     setPropertyFromGroup('strumLineNotes', note, 'y', middlepostions["ycoords"])
  85.                 end
  86.             end
  87.         end,
  88.         ["129"] = function()
  89.             cameraspeed = 4
  90.             cameramulti = 1.75
  91.             cameraFlash("camHUD", "ffffff", (stepCrochet/1000) * 4, true)
  92.  
  93.             infinity = true
  94.             autoscroll = false
  95.  
  96.             scroll["isDownscroll"] = {true,false}
  97.             scroll["doingscroll"] = true
  98.  
  99.             for note = 0,getProperty('opponentStrums.length')-1 do
  100.                 setPropertyFromGroup('opponentStrums', note, 'alpha', 0.4)
  101.             end
  102.         end,
  103.         ["257"] = function()
  104.             cameraFlash("camHUD", "ffffff", (stepCrochet/1000) * 4, true)
  105.  
  106.             infinity = false
  107.             autoscroll = false
  108.  
  109.             scroll["isDownscroll"] = {false,true}
  110.             scroll["doingscroll"] = true
  111.  
  112.             for note = 0,getProperty('opponentStrums.length')-1 do
  113.                 setPropertyFromGroup('opponentStrums', note, 'alpha', 0.4)
  114.             end
  115.  
  116.             starttime = getPropertyFromClass('Conductor', 'songPosition')
  117.  
  118.             bounce = true
  119.         end
  120.     }
  121.  
  122.     if stepfunctions[tostring(curStep)] then
  123.         stepfunctions[tostring(curStep)]()
  124.     end
  125.  
  126.     if curStep % cameraspeed == 0 then
  127.         triggerEvent("Add Camera Zoom", 0.015 * cameramulti, 0.03 * cameramulti)
  128.     end
  129.  
  130.     --EFFECTS AT START
  131.     if curSection >= 0 and curSection <= 6 then
  132.         if curStep % 16 == modulis or curStep % 16 == (modulis * 2) then
  133.             bounceArrows(curStep % 16)
  134.         end
  135.  
  136.         if curStep % 16 == 0 then
  137.             local angle = 360
  138.  
  139.             if curStep % 32 == 0 then angle = -360 end
  140.  
  141.             spinArrows(angle)
  142.         end
  143.     end
  144. end
  145.  
  146. --FUNCTIONS
  147.  
  148. function spinArrows(angle)
  149.     for note = 0,getProperty('strumLineNotes.length')-1 do
  150.         noteTweenAngle("movementAngle " .. note, note, angle, stepCrochet/1000 * 2, "circInOut")
  151.     end
  152.  
  153.     function onTweenCompleted(tag)
  154.         for notetween = 0,getProperty('strumLineNotes.length')-1 do
  155.             if angle == 360 or angle == -360 and tag == "movementAngle " .. notetween then
  156.                 setPropertyFromGroup('strumLineNotes', notetween, 'angle', 0)
  157.             end
  158.         end
  159.     end
  160. end
  161.  
  162. function bounceArrows(stepmodulis)
  163.     local comp = 0
  164.  
  165.     if stepmodulis == (modulis * 2) then
  166.         comp = 1
  167.     end
  168.  
  169.     for note = 0,getProperty('strumLineNotes.length')-1 do
  170.         local nexty = downscrolly
  171.  
  172.         if getPropertyFromGroup('strumLineNotes', note, 'y') == downscrolly then nexty = upscrolly end
  173.  
  174.         if note % 2 == comp then
  175.             noteTweenY('notey' .. tostring(note), note, nexty, stepCrochet/1000 * 4, 'bounceOut')
  176.         end
  177.     end
  178. end
  179.    
  180. function onUpdatePost(elapsed)
  181.     if inGameOver then return end
  182.  
  183.     --EFFECTS SHIT
  184.  
  185.     if spin then
  186.         currentBeat = (getPropertyFromClass('Conductor', 'songPosition') / 1000) * (bpm / 60)
  187.        
  188.         for note = 0,getProperty('strumLineNotes.length')-1 do
  189.             setPropertyFromGroup('strumLineNotes', note, 'x', (430 + ((note % 4) * 112)) + 250 * math.sin((currentBeat + -10 * 0.05) * math.pi))
  190.             setPropertyFromGroup('strumLineNotes', note, 'y', 304 + 250 * math.cos((currentBeat + -10 * 0.05) * math.pi))
  191.         end
  192.     elseif infinity then
  193.         currentBeat = (getPropertyFromClass('Conductor', 'songPosition') / 1000) * (bpm / 60)
  194.    
  195.         for note = 0,getProperty('strumLineNotes.length')-1 do
  196.             setPropertyFromGroup('strumLineNotes', note, 'x', (430 + ((note % 4) * 112)) + 350 * math.sin(((currentBeat/1.25) + 1 * 0.05) * math.pi/2))
  197.             setPropertyFromGroup('strumLineNotes', note, 'y', 304 + 200 * math.cos(((currentBeat/1.25) + -10 * 0.05) * math.pi))
  198.         end
  199.     elseif bounce then
  200.         for note = 0,getProperty('strumLineNotes.length')-1 do
  201.             if (getPropertyFromClass('Conductor', 'songPosition')-starttime)%((crochet*2)*2) < (crochet*2) then
  202.                 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)
  203.                 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)))
  204.             else
  205.                 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)
  206.                 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)))
  207.             end
  208.         end
  209.     end
  210.  
  211.     --DOWNSCROLL SHIT
  212.  
  213.     if autoscroll then
  214.         for note = 0,getProperty('notes.length')-1 do
  215.             local direction = getPropertyFromGroup('notes', note, 'noteData')
  216.  
  217.             if getPropertyFromGroup('notes', note, 'mustPress') then direction = direction + 4 end
  218.  
  219.             if getPropertyFromGroup('strumLineNotes', direction, 'y') >= ((getPropertyFromClass('flixel.FlxG', 'height')/2) - getPropertyFromGroup('strumLineNotes', direction, 'height')) then
  220.                 setPropertyFromGroup('strumLineNotes', direction, 'downScroll' , true)
  221.                 if getPropertyFromGroup('notes', note, 'isSustainNote') then
  222.                     setPropertyFromGroup('notes', note, 'flipY', true)
  223.                 end
  224.             else
  225.                 setPropertyFromGroup('strumLineNotes',  direction, 'downScroll' , false)
  226.                 if getPropertyFromGroup('notes', note, 'isSustainNote') then
  227.                     setPropertyFromGroup('notes', note, 'flipY', false)
  228.                 end
  229.             end
  230.         end
  231.     end
  232.  
  233.     if scroll["doingscroll"] then
  234.         for note = 0,getProperty('notes.length')-1 do
  235.             local direction = getPropertyFromGroup('notes', note, 'noteData')
  236.  
  237.             if getPropertyFromGroup('notes', note, 'mustPress') then direction = direction + 4 end
  238.  
  239.             local downscroll = false
  240.  
  241.             if getPropertyFromGroup('notes', note, 'mustPress') then
  242.                 downscroll = scroll["isDownscroll"][1]
  243.             else
  244.                 downscroll = scroll["isDownscroll"][2]
  245.             end
  246.  
  247.             setPropertyFromGroup('strumLineNotes', direction, 'downScroll' ,downscroll)
  248.             if getPropertyFromGroup('notes', note, 'isSustainNote') then
  249.                 setPropertyFromGroup('notes', note, 'flipY', downscroll)
  250.             end
  251.  
  252.         end
  253.     end
  254. end
  255.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement