Advertisement
Jousway

shit code

Nov 19th, 2016
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.05 KB | None | 0 0
  1. -- beatlenght, (240/bpm/4)
  2.             local bl = (240/140/4)
  3.            
  4.             --shortplayernumber making commands shorter since 2016! - jousway
  5.             local function spn(com,b1,b2,b3,b4)
  6.                 for pn=1,2 do
  7.                     local a = _G['P'..pn]
  8.                     if a then
  9.                         if b4 then
  10.                             a[com](a,b1,b2,b3,b4)
  11.                         elseif b3 then
  12.                             a[com](a,b1,b2,b3)
  13.                         elseif b2 then
  14.                             a[com](a,b1,b2)
  15.                         elseif b1 then
  16.                             a[com](a,b1)
  17.                         else
  18.                             a[com](a)
  19.                         end
  20.                     end
  21.                 end
  22.             end
  23.            
  24.             --spinning the playerfield
  25.             local function spin(direction,speed)
  26.                 if direction == 'Left' then
  27.                     spn('linear',(bl*4)/speed)
  28.                     spn('rotationy',360)
  29.                     spn('linear',0.00001)
  30.                     spn('rotationy',0)
  31.                 elseif direction == 'Right' then
  32.                     spn('linear',(bl*4)/speed)
  33.                     spn('rotationy',-360)
  34.                     spn('linear',0.00001)
  35.                     spn('rotationy',0)
  36.                 elseif direction == 'Up' then
  37.                     spn('linear',(bl*4)/speed)
  38.                     spn('rotationx',-360)
  39.                     spn('linear',0.00001)
  40.                     spn('rotationx',0)
  41.                 elseif direction == 'Down' then
  42.                     spn('linear',(bl*4)/speed)
  43.                     spn('rotationx',360)
  44.                     spn('linear',0.00001)
  45.                     spn('rotationx',0)
  46.                 elseif direction == 'Clock' then
  47.                     spn('linear',(bl*4)/speed)
  48.                     spn('rotationz',360)
  49.                     spn('linear',0.00001)
  50.                     spn('rotationz',0)
  51.                 elseif direction == 'CounterClock' then
  52.                     spn('linear',(bl*4)/speed)
  53.                     spn('rotationz',-360)
  54.                     spn('linear',0.00001)
  55.                     spn('rotationz',0)
  56.                 end
  57.             end
  58.            
  59.             local function zoom(direction,speed)
  60.                 if direction == 'Left' or direction == 'Right' then
  61.                     spn('linear',((bl/2)*4)/speed)
  62.                     spn('zoomx',0.5)
  63.                     spn('linear',((bl/2)*4)/speed)
  64.                     spn('zoomx',1)
  65.                 elseif direction == 'Up' or direction == 'Down' then
  66.                     spn('linear',((bl/2)*4)/speed)
  67.                     spn('zoomy',0.5)
  68.                     spn('linear',((bl/2)*4)/speed)
  69.                     spn('zoomy',1)
  70.                 elseif direction == 'Clock' or direction == 'CounterClock' then
  71.                     spn('linear',((bl/2)*4)/speed)
  72.                     spn('zoom',0.5)
  73.                     spn('linear',((bl/2)*4)/speed)
  74.                     spn('zoom',1)
  75.                 end
  76.             end
  77.                    
  78.             --twitching attack (I dont know a better name)
  79.             local function ImExposed(ry)
  80.                 spn('stoptweening')
  81.                 spn('rotationy',0)
  82.                 spn('linear',bl/5)
  83.                 spn('rotationy',ry)
  84.                 spn('linear',0.00001)
  85.                 spn('rotationy',0)                     
  86.             end
  87.            
  88.             --move field
  89.             local function fuckexeisntpublic(rz,ry)
  90.                 spn('linear',bl*4)
  91.                 spn('rotationz',rz)
  92.                 spn('rotationy',ry)
  93.             end
  94.            
  95.             --vibrate field
  96.             local function SHAKEDAWORLD(ef)
  97.                 spn('vibrate')
  98.                 spn('effectmagnitude',bl*ef,0,0)
  99.             end
  100.            
  101.             --borrowing this from ya taro
  102.             local diffs = {0,0}
  103.            
  104.             local twitch,move,shakeef,spinorzoom
  105.            
  106.             for pn=1,2 do
  107.                
  108.                 if GAMESTATE:GetCurrentSteps(pn-1) then
  109.                     diffs[pn] = GAMESTATE:GetCurrentSteps(pn-1):GetDifficulty()
  110.                 end
  111.                 if diffs[pn] == 3 then
  112.                     twitch = 22.5
  113.                     move = 22.5
  114.                     shakeef = 16
  115.                     spinorzoom = function(direction,speed) zoom(direction,speed) end
  116.                 else
  117.                     twitch = 67.5
  118.                     move = 45
  119.                     shakeef = 32
  120.                     spinorzoom = function(direction,speed) spin(direction,speed) end
  121.                 end                
  122.             end
  123.            
  124.            
  125.            
  126.             --this is both a message broadcaster and a function runner
  127.             --if you put {beat,'String'}, then 'String' is broadcast as a message on that beat
  128.             --if you put {beat,function() somecode end}, then function() is run at that beat
  129.            
  130.             curaction = 1;
  131.             --{beat,thing,persists}
  132.             mod_actions = {
  133.                 {0,function()
  134.                     spn('zoom',0.1)
  135.                     spn('accelerate',bl*28)
  136.                     spn('zoom',1)
  137.                 end},
  138.                 {28,function() SHAKEDAWORLD(shakeef) end},
  139.                 {32,function()
  140.                     spn('stopeffect')
  141.                     fuckexeisntpublic(-16,-move)
  142.                     fuckexeisntpublic(16,move)
  143.                     fuckexeisntpublic(-move,-move)
  144.                     fuckexeisntpublic(move,move)
  145.                     fuckexeisntpublic(-16,-move)
  146.                     fuckexeisntpublic(16,move)
  147.                     fuckexeisntpublic(-move,-move)
  148.                     fuckexeisntpublic(move,move)
  149.                     fuckexeisntpublic(-16,-move)
  150.                     fuckexeisntpublic(16,move)
  151.                     fuckexeisntpublic(-move,-move)
  152.                     fuckexeisntpublic(move,move)
  153.                     fuckexeisntpublic(-16,-move)
  154.                     fuckexeisntpublic(16,move)
  155.                     spn('decelerate',bl*3)
  156.                     spn('rotationy',0)
  157.                     spn('zoom',0.2)
  158.                     spn('rotationz',45);
  159.                     spn('accelerate',bl*3)
  160.                     spn('zoom',1)
  161.                     spn('rotationz',0);    
  162.                 end},  
  163.                
  164.                 {94,function() SHAKEDAWORLD(shakeef) end},
  165.                 {96,function() spn('stopeffect') end},
  166.                 {98,function() spinorzoom('Down',6) end},
  167.                 {99,function() ImExposed(twitch) end},
  168.                 {99.25,function() ImExposed(twitch) end},
  169.                 {99.44,function() ImExposed(twitch) end},
  170.                 {99.56,function() ImExposed(twitch) end},
  171.                 {99.44,function() ImExposed(twitch) end},
  172.                 {99.75,function() ImExposed(twitch) end},
  173.                 {100.17,function() ImExposed(twitch) end},
  174.                 {100.50,function() ImExposed(twitch) end},
  175.                 {100.81,function() ImExposed(twitch) end},
  176.                 {101.17,function() ImExposed(twitch) end},
  177.                 {101.50,function() ImExposed(twitch) end},
  178.                 {102,function() ImExposed(-twitch) end},
  179.                 {102.50,function() ImExposed(-twitch) end},
  180.                 {103,function() ImExposed(-twitch) end},
  181.                 {103.50,function() ImExposed(-twitch) end},
  182.                 {104,function() ImExposed(-twitch) end},
  183.                 {104.25,function() ImExposed(-twitch) end},
  184.                 {104.50,function() ImExposed(-twitch) end},
  185.                 {105,function() ImExposed(-twitch) end},
  186.                 {105.50,function() ImExposed(-twitch) end},
  187.                 {106.17,function() ImExposed(twitch) end},
  188.                 {106.50,function() ImExposed(twitch) end},
  189.                 {106.83,function() ImExposed(twitch) end},
  190.                 {107.17,function() ImExposed(twitch) end},
  191.                 {107.50,function() ImExposed(twitch) end},
  192.                 {107.83,function() ImExposed(twitch) end},
  193.                 {108,function() spinorzoom('Left',6) end},
  194.                 {109,function() spinorzoom('Down',6) end},
  195.                 {110,function() spinorzoom('Up',6) end},
  196.                 {111,function() spinorzoom('Right',6) end},
  197.                 {112,function() spinorzoom('Left',6) end},
  198.                 {113,function() spinorzoom('Up',6) end},
  199.                 {114,function() SHAKEDAWORLD(shakeef) end},
  200.                 {115,function() spn('stopeffect') ImExposed(twitch) end},
  201.                 {115.25,function() ImExposed(twitch) end},
  202.                 {115.44,function() ImExposed(twitch) end},
  203.                 {115.56,function() ImExposed(twitch) end},
  204.                 {115.44,function() ImExposed(twitch) end},
  205.                 {115.75,function() ImExposed(twitch) end},
  206.                 {116.17,function() ImExposed(twitch) end},
  207.                 {116.50,function() ImExposed(twitch) end},
  208.                 {116.81,function() ImExposed(twitch) end},
  209.                 {117.17,function() ImExposed(twitch) end},
  210.                 {117.50,function() ImExposed(twitch) end},
  211.                 {118,function() ImExposed(-twitch) end},
  212.                 {118.50,function() ImExposed(-twitch) end},
  213.                 {119,function() ImExposed(-twitch) end},
  214.                 {119.50,function() ImExposed(-twitch) end},
  215.                 {120,function() ImExposed(-twitch) end},
  216.                 {120.25,function() ImExposed(-twitch) end},
  217.                 {120.50,function() ImExposed(-twitch) end},
  218.                 {121,function() ImExposed(-twitch) end},
  219.                 {121.50,function() ImExposed(-twitch) end},
  220.                 {122.17,function() ImExposed(twitch) end},
  221.                 {122.50,function() ImExposed(twitch) end},
  222.                 {122.83,function() ImExposed(twitch) end},
  223.                 {123.17,function() ImExposed(twitch) end},
  224.                 {123.50,function() ImExposed(twitch) end},
  225.                 {123.83,function() ImExposed(twitch) end},
  226.                 {124.50,function() spinorzoom('Right',2) end},
  227.                 {128,function() spinorzoom('Down',6) end},
  228.                 {129,function() spinorzoom('Up',6) end},   
  229.                 {131,function() ImExposed(twitch) end},
  230.                 {131.25,function() ImExposed(twitch) end},
  231.                 {131.44,function() ImExposed(twitch) end},
  232.                 {131.56,function() ImExposed(twitch) end},
  233.                 {132.13,function() ImExposed(twitch) end},
  234.                 {132.44,function() ImExposed(twitch) end},
  235.                 {132.75,function() ImExposed(twitch) end},
  236.                 {133.17,function() ImExposed(twitch) end},
  237.                 {133.50,function() ImExposed(twitch) end},
  238.                 {134,function() ImExposed(-twitch) end},
  239.                 {134.50,function() ImExposed(-twitch) end},
  240.                 {135,function() ImExposed(-twitch) end},
  241.                 {135.50,function() ImExposed(-twitch) end},
  242.                 {136,function() ImExposed(-twitch) end},
  243.                 {136.31,function() ImExposed(-twitch) end},
  244.                 {136.50,function() ImExposed(-twitch) end},    
  245.                 {137.33,function() spinorzoom('Left',8) end},
  246.                 {138.13,function() ImExposed(twitch) end},
  247.                 {138.38,function() ImExposed(twitch) end},
  248.                 {138.58,function() ImExposed(twitch) end},
  249.                 {138.88,function() ImExposed(twitch) end},
  250.                 {139.13,function() ImExposed(twitch) end},
  251.                 {139.38,function() ImExposed(twitch) end},
  252.                 {139.58,function() ImExposed(twitch) end},
  253.                 {140.50,function()
  254.                     spn('decelerate',bl/1.5)
  255.                     spn('rotationy',0)
  256.                     spn('zoom',0.2)
  257.                     spn('rotationz',-45);
  258.                     spn('accelerate',bl/1.5)
  259.                     spn('zoom',1)
  260.                     spn('rotationz',0);    
  261.                 end},  
  262.                 {142.25,function() ImExposed(-twitch) end},
  263.                 {142.72,function() ImExposed(-twitch) end},
  264.                 {143.56,function() ImExposed(-twitch) end},
  265.                 {144.25,function() ImExposed(-twitch) end},
  266.                 {144.75,function() ImExposed(-twitch) end},
  267.                 {145.50,function() ImExposed(-twitch) end},
  268.                 {146,function() spinorzoom('Right',8) end},
  269.                 {147,function() ImExposed(twitch) end},
  270.                 {147.25,function() ImExposed(twitch) end}, 
  271.                 {147.44,function() ImExposed(twitch) end}, 
  272.                 {147.58,function() ImExposed(twitch) end}, 
  273.                 {147.83,function() ImExposed(twitch) end}, 
  274.                 {148.17,function() ImExposed(twitch) end}, 
  275.                 {148.50,function() ImExposed(twitch) end}, 
  276.                 {148.83,function() ImExposed(twitch) end}, 
  277.                 {149.25,function() ImExposed(twitch) end}, 
  278.                 {149.50,function() ImExposed(twitch) end}, 
  279.                 {150,function() ImExposed(-twitch) end},
  280.                 {150.50,function() ImExposed(-twitch) end},    
  281.                 {151,function() ImExposed(-twitch) end},
  282.                 {151.50,function() ImExposed(-twitch) end},
  283.                 {152,function() ImExposed(twitch) end},
  284.                 {152.25,function() ImExposed(twitch) end},
  285.                 {152.50,function() ImExposed(twitch) end},
  286.                 {153,function() ImExposed(twitch) end},
  287.                 {153.50,function() ImExposed(twitch) end},     
  288.                 {154,function() spinorzoom('Right',4) end},
  289.                 {156,function() spinorzoom('Down',4) end},
  290.                 {158,function() spinorzoom('CounterClock',1) end},
  291.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement