Dark_EccentricYT

Untitled

Sep 12th, 2018
43,117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.59 KB | None | 0 0
  1. --[[ To fly jump 2 times -ulti55]]
  2. --[[ To go down press q ]]
  3.  
  4. script.Parent = nil
  5.  
  6. function fly()
  7.  
  8. for i,v in pairs(script:GetChildren()) do
  9.  
  10. pcall(function() v.Value = "" end)
  11.  
  12. game:GetService("Debris"):AddItem(v,.1)
  13.  
  14. end
  15.  
  16. function weld(p0,p1,c0,c1,par)
  17.  
  18. local w = Instance.new("Weld",p0 or par)
  19.  
  20. w.Part0 = p0
  21.  
  22. w.Part1 = p1
  23.  
  24. w.C0 = c0 or CFrame.new()
  25.  
  26. w.C1 = c1 or CFrame.new()
  27.  
  28. return w
  29.  
  30. end
  31.  
  32. local motors = {}
  33.  
  34. function motor(p0,p1,c0,c1,des,vel,par)
  35.  
  36. local w = Instance.new("Motor6D",p0 or par)
  37.  
  38. w.Part0 = p0
  39.  
  40. w.Part1 = p1
  41.  
  42. w.C0 = c0 or CFrame.new()
  43.  
  44. w.C1 = c1 or CFrame.new()
  45.  
  46. w.MaxVelocity = tonumber(vel) or .05
  47.  
  48. w.DesiredAngle = tonumber(des) or 0
  49.  
  50. return w
  51.  
  52. end
  53.  
  54. function lerp(a,b,c)
  55.  
  56. return a+(b-a)*c
  57.  
  58. end
  59.  
  60. function clerp(c1,c2,al)
  61.  
  62. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  63.  
  64. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  65.  
  66. for i,v in pairs(com1) do
  67.  
  68. com1[i] = lerp(v,com2[i],al)
  69.  
  70. end
  71.  
  72. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  73.  
  74. end
  75.  
  76. function ccomplerp(c1,c2,al)
  77.  
  78. local com1 = {c1:components()}
  79.  
  80. local com2 = {c2:components()}
  81.  
  82. for i,v in pairs(com1) do
  83.  
  84. com1[i] = lerp(v,com2[i],al)
  85.  
  86. end
  87.  
  88. return CFrame.new(unpack(com1))
  89.  
  90. end
  91.  
  92. function tickwave(time,length,offset)
  93.  
  94. return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length
  95.  
  96. end
  97.  
  98. function invcol(c)
  99.  
  100. c = c.Color
  101.  
  102. return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r))
  103.  
  104. end
  105.  
  106. local oc = oc or function(...) return ... end
  107.  
  108. local plr = game.Players.LocalPlayer
  109.  
  110. local char = plr.Character
  111.  
  112. local tor = char.Torso
  113.  
  114. local hum = char.Humanoid
  115.  
  116. hum.PlatformStand = false
  117.  
  118. pcall(function()
  119.  
  120. char.Wings:Destroy()
  121.  
  122. end)
  123.  
  124. pcall(function()
  125.  
  126. char.Angel:Destroy() -- hat
  127.  
  128. end)
  129.  
  130. local mod = Instance.new("Model",char)
  131.  
  132. mod.Name = "Wings"
  133.  
  134. local special = {
  135.  
  136. --antiboomz0r = {"Really black","Institutional white",0,0,false,Color3.new(1,1,.95),Color3.new(1,1,.6)},
  137.  
  138. antiboomz0r = {"New Yeller",nil,0.4,0.7,true,Color3.new(1,1,.95),Color3.new(1,1,.6)},
  139.  
  140. --antiboomz0r = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  141.  
  142. taart = {"Royal purple",nil,.4,.4,true},
  143.  
  144. mitta = {"Black",nil,0,0,false},
  145.  
  146. penjuin3 = {"White",nil,0,0,false},
  147.  
  148. thepc8110 = {"Black","Bright red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  149.  
  150. nonspeaker = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  151.  
  152. littleau999 = {"Reddish brown",1030,0,0,false},
  153.  
  154. unscripter = {"Really black","Really black",.2,0,true,Color3.new(0,0,0),Color3.new(0,0,0)},
  155.  
  156. oxcool1 = {"Really black","White",.2,0,false,Color3.new(0,0,0),Color3.new(0,0,0)},
  157.  
  158. krodmiss = {"Really black",nil,0,0,false},
  159.  
  160. }
  161.  
  162. local topcolor = invcol(char.Torso.BrickColor)
  163.  
  164. local feacolor = char.Torso.BrickColor
  165.  
  166. local ptrans = 0
  167.  
  168. local pref = 0
  169.  
  170. local fire = false
  171.  
  172. local fmcol = Color3.new()
  173.  
  174. local fscol = Color3.new()
  175.  
  176. local spec = special[plr.Name:lower()]
  177.  
  178. if spec then
  179.  
  180. topcolor,feacolor,ptrans,pref,fire,fmcol,fscol = spec[1] and BrickColor.new(spec[1]) or topcolor,spec[2] and BrickColor.new(spec[2]) or feacolor,spec[3],spec[4],spec[5],spec[6],spec[7]
  181.  
  182. end
  183.  
  184. local part = Instance.new("Part")
  185.  
  186. part.FormFactor = "Custom"
  187.  
  188. part.Size = Vector3.new(.2,.2,.2)
  189.  
  190. part.TopSurface,part.BottomSurface = 0,0
  191.  
  192. part.CanCollide = false
  193.  
  194. part.BrickColor = topcolor
  195.  
  196. part.Transparency = ptrans
  197.  
  198. part.Reflectance = pref
  199.  
  200. local ef = Instance.new("Fire",fire and part or nil)
  201.  
  202. ef.Size = .15
  203.  
  204. ef.Color = fmcol or Color3.new()
  205.  
  206. ef.SecondaryColor = fscol or Color3.new()
  207.  
  208. part:BreakJoints()
  209.  
  210.  
  211. function newpart()
  212.  
  213. local clone = part:Clone()
  214.  
  215. clone.Parent = mod
  216.  
  217. clone:BreakJoints()
  218.  
  219. return clone
  220.  
  221. end
  222.  
  223. local feath = newpart()
  224.  
  225. feath.BrickColor = feacolor
  226.  
  227. feath.Transparency = 0
  228.  
  229. Instance.new("SpecialMesh",feath).MeshType = "Sphere"
  230.  
  231. function newfeather()
  232.  
  233. local clone = feath:Clone()
  234.  
  235. clone.Parent = mod
  236.  
  237. clone:BreakJoints()
  238.  
  239. return clone
  240.  
  241. end
  242.  
  243.  
  244. ---------- RIGHT WING
  245.  
  246. local r1 = newpart()
  247.  
  248. r1.Size = Vector3.new(.3,1.5,.3)*1.2
  249.  
  250. local rm1 = motor(tor,r1,CFrame.new(.35,.6,.4) * CFrame.Angles(0,0,math.rad(-60)) * CFrame.Angles(math.rad(30),math.rad(-25),0),CFrame.new(0,-.8,0),.1)
  251.  
  252. local r2 = newpart()
  253.  
  254. r2.Size = Vector3.new(.4,1.8,.4)*1.2
  255.  
  256. local rm2 = motor(r1,r2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(-30),math.rad(15),0),CFrame.new(0,-.9,0),.1)
  257.  
  258. local r3 = newpart()
  259.  
  260. r3.Size = Vector3.new(.3,2.2,.3)*1.2
  261.  
  262. local rm3 = motor(r2,r3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-1.1,0),.1)
  263.  
  264. local r4 = newpart()
  265.  
  266. r4.Size = Vector3.new(.25,1.2,.25)*1.2
  267.  
  268. local rm4 = motor(r3,r4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-.6,0),.1)
  269.  
  270. local feather = newfeather()
  271.  
  272. feather.Mesh.Scale = Vector3.new(1,1,1)
  273.  
  274. feather.Size = Vector3.new(.4,3,.3)
  275.  
  276. weld(r4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  277.  
  278. feather = newfeather()
  279.  
  280. feather.Mesh.Scale = Vector3.new(1,1,1)
  281.  
  282. feather.Size = Vector3.new(.4,2.3,.3)
  283.  
  284. weld(r4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  285.  
  286. feather = newfeather()
  287.  
  288. feather.Mesh.Scale = Vector3.new(1,1,1)
  289.  
  290. feather.Size = Vector3.new(.35,2.2,.25)
  291.  
  292. weld(r4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  293.  
  294. local rf3 = {}
  295.  
  296. for i=0,7 do
  297.  
  298. feather = newfeather()
  299.  
  300. feather.Mesh.Scale = Vector3.new(1,1,1)
  301.  
  302. feather.Size = Vector3.new(.45,2.2,.35)
  303.  
  304. table.insert(rf3,motor(r3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  305.  
  306. end
  307.  
  308. local rf2 = {}
  309.  
  310. for i=0,6 do
  311.  
  312. feather = newfeather()
  313.  
  314. feather.Mesh.Scale = Vector3.new(1,1,1)
  315.  
  316. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  317.  
  318. table.insert(rf2,motor(r2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  319.  
  320. end
  321.  
  322. local rf1 = {}
  323.  
  324. for i=0,6 do
  325.  
  326. feather = newfeather()
  327.  
  328. feather.Mesh.Scale = Vector3.new(1,1,1)
  329.  
  330. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  331.  
  332. table.insert(rf1,motor(r1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  333.  
  334. end
  335.  
  336. ---------- LEFT WING
  337.  
  338. local l1 = newpart()
  339.  
  340. l1.Size = Vector3.new(.3,1.5,.3)*1.2
  341.  
  342. local lm1 = motor(tor,l1,CFrame.new(-.35,.6,.4) * CFrame.Angles(0,0,math.rad(60)) * CFrame.Angles(math.rad(30),math.rad(25),0) * CFrame.Angles(0,-math.pi,0),CFrame.new(0,-.8,0) ,.1)
  343.  
  344. local l2 = newpart()
  345.  
  346. l2.Size = Vector3.new(.4,1.8,.4)*1.2
  347.  
  348. local lm2 = motor(l1,l2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(30),math.rad(-15),0),CFrame.new(0,-.9,0),.1)
  349.  
  350. local l3 = newpart()
  351.  
  352. l3.Size = Vector3.new(.3,2.2,.3)*1.2
  353.  
  354. local lm3 = motor(l2,l3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-1.1,0),.1)
  355.  
  356. local l4 = newpart()
  357.  
  358. l4.Size = Vector3.new(.25,1.2,.25)*1.2
  359.  
  360. local lm4 = motor(l3,l4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-.6,0),.1)
  361.  
  362. local feather = newfeather()
  363.  
  364. feather.Mesh.Scale = Vector3.new(1,1,1)
  365.  
  366. feather.Size = Vector3.new(.4,3,.3)
  367.  
  368. weld(l4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  369.  
  370. feather = newfeather()
  371.  
  372. feather.Mesh.Scale = Vector3.new(1,1,1)
  373.  
  374. feather.Size = Vector3.new(.4,2.3,.3)
  375.  
  376. weld(l4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  377.  
  378. feather = newfeather()
  379.  
  380. feather.Mesh.Scale = Vector3.new(1,1,1)
  381.  
  382. feather.Size = Vector3.new(.35,2.2,.25)
  383.  
  384. weld(l4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  385.  
  386. local lf3 = {}
  387.  
  388. for i=0,7 do
  389.  
  390. feather = newfeather()
  391.  
  392. feather.Mesh.Scale = Vector3.new(1,1,1)
  393.  
  394. feather.Size = Vector3.new(.45,2.2,.35)
  395.  
  396. table.insert(lf3,motor(l3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  397.  
  398. end
  399.  
  400. local lf2 = {}
  401.  
  402. for i=0,6 do
  403.  
  404. feather = newfeather()
  405.  
  406. feather.Mesh.Scale = Vector3.new(1,1,1)
  407.  
  408. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  409.  
  410. table.insert(lf2,motor(l2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  411.  
  412. end
  413.  
  414. local lf1 = {}
  415.  
  416. for i=0,6 do
  417.  
  418. feather = newfeather()
  419.  
  420. feather.Mesh.Scale = Vector3.new(1,1,1)
  421.  
  422. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  423.  
  424. table.insert(lf1,motor(l1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  425.  
  426. end
  427.  
  428. local rwing = {rm1,rm2,rm3,rm4}
  429.  
  430. local lwing = {lm1,lm2,lm3,lm4}
  431.  
  432. local oc0 = {}
  433.  
  434. for i,v in pairs(rwing) do
  435.  
  436. oc0[v] = v.C0
  437.  
  438. end
  439.  
  440. for i,v in pairs(lwing) do
  441.  
  442. oc0[v] = v.C0
  443.  
  444. end
  445.  
  446. function gotResized()
  447.  
  448. if lastsize then
  449.  
  450. if tor.Size == lastsize then return end -- This shouldn't happen?
  451.  
  452. local scaleVec = tor.Size/lastsize
  453.  
  454. for i,v in pairs(oc0) do
  455.  
  456. oc0[i] = v-v.p+scaleVec*v.p
  457.  
  458. end
  459.  
  460. lastsize = tor.Size
  461.  
  462. end
  463.  
  464. lastsize = tor.Size
  465.  
  466. end
  467.  
  468. tor.Changed:connect(function(p)
  469.  
  470. if p == "Size" then
  471.  
  472. gotResized()
  473.  
  474. end
  475.  
  476. end)
  477.  
  478. gotResized()
  479.  
  480. local idle = {0,0.5,-.2,0; .05,.05,.1,.05; -.6,-1.5,.1,0;}--0,.3,0,0
  481.  
  482. local outlow = {-.7,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  483.  
  484. local outhigh = {.5,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  485.  
  486. local veryhigh = {.9,-.3,1.9,0; .3,.05,.1,.05; .2,0,0,0}
  487.  
  488. local flap1 = {-.3,.3,1.1,-.2; .3,.05,.1,.05; .2,-.6,0,0}
  489.  
  490. local divebomb = {0,.2,.4,-.7; .3,.05,.1,.05; 0,-.5,-.6,0}
  491.  
  492.  
  493. function setwings(tab,time)
  494.  
  495. time = time or 10
  496.  
  497. for i=1,4 do
  498.  
  499. rwing[i].DesiredAngle = tab[i]
  500.  
  501. lwing[i].DesiredAngle = tab[i]
  502.  
  503. rwing[i].MaxVelocity = math.abs(tab[i]-rwing[i].CurrentAngle)/time
  504.  
  505. lwing[i].MaxVelocity = math.abs(tab[i]-lwing[i].CurrentAngle)/time
  506.  
  507. local rcf = oc0[rwing[i]] * (tab[12+i] or CFrame.new())
  508.  
  509. local lcf = oc0[lwing[i]] * (tab[12+i] or CFrame.new())
  510.  
  511. end
  512.  
  513. for i,v in pairs(rf1) do
  514.  
  515. v.DesiredAngle = tab[9]
  516.  
  517. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  518.  
  519. end
  520.  
  521. for i,v in pairs(lf1) do
  522.  
  523. v.DesiredAngle = tab[9]
  524.  
  525. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  526.  
  527. end
  528.  
  529. for i,v in pairs(rf2) do
  530.  
  531. v.DesiredAngle = tab[10]
  532.  
  533. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  534.  
  535. end
  536.  
  537. for i,v in pairs(lf2) do
  538.  
  539. v.DesiredAngle = tab[10]
  540.  
  541. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  542.  
  543. end
  544.  
  545. for i,v in pairs(rf3) do
  546.  
  547. v.DesiredAngle = tab[11]
  548.  
  549. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  550.  
  551. end
  552.  
  553. for i,v in pairs(lf3) do
  554.  
  555. v.DesiredAngle = tab[11]
  556.  
  557. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  558.  
  559. end
  560.  
  561. end
  562.  
  563. setwings(outhigh,1)
  564.  
  565. flying = false
  566.  
  567. moving = false
  568.  
  569. for i,v in pairs(tor:GetChildren()) do
  570.  
  571. if v.ClassName:lower():match("body") then
  572.  
  573. v:Destroy()
  574.  
  575. end
  576.  
  577. end
  578.  
  579. local ctor = tor:Clone()
  580.  
  581. ctor:ClearAllChildren()
  582.  
  583. ctor.Name = "cTorso"
  584.  
  585. ctor.Transparency = 1
  586.  
  587. ctor.CanCollide = false
  588.  
  589. ctor.FormFactor = "Custom"
  590.  
  591. ctor.Size = Vector3.new(.2,.2,.2)
  592.  
  593. ctor.Parent = mod
  594.  
  595. weld(tor,ctor)
  596.  
  597. local bg = Instance.new("BodyGyro",ctor)
  598.  
  599. bg.maxTorque = Vector3.new()
  600.  
  601. bg.P = 15000
  602.  
  603. bg.D = 1000
  604.  
  605. local bv = Instance.new("BodyVelocity",ctor)
  606.  
  607. bv.maxForce = Vector3.new()
  608.  
  609. bv.P = 15000
  610.  
  611. vel = Vector3.new()
  612.  
  613. cf = CFrame.new()
  614.  
  615. flspd = 0
  616.  
  617.  
  618. keysdown = {}
  619.  
  620. keypressed = {}
  621.  
  622. ktime = {}
  623.  
  624. descendtimer = 0
  625.  
  626. jumptime = tick()
  627.  
  628. hum.Jumping:connect(function()
  629.  
  630. jumptime = tick()
  631.  
  632. end)
  633.  
  634. cam = workspace.CurrentCamera
  635.  
  636. kd = plr:GetMouse().KeyDown:connect(oc(function(key)
  637.  
  638. keysdown[key] = true
  639.  
  640. keypressed[key] = true
  641.  
  642. if key == "q" then
  643.  
  644. descendtimer = tick()
  645.  
  646. elseif key == " " and not hum.Jump then
  647.  
  648. jumptime = tick()
  649.  
  650. elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then
  651.  
  652. reqrotx = key == "a" and math.pi*2 or -math.pi*2
  653.  
  654. end
  655.  
  656. ktime[key] = tick()
  657.  
  658. end))
  659.  
  660. ku = plr:GetMouse().KeyUp:connect(function(key)
  661.  
  662. keysdown[key] = false
  663.  
  664. if key == " " then
  665.  
  666. descendtimer = tick()
  667.  
  668. end
  669.  
  670. end)
  671.  
  672. function mid(a,b,c)
  673.  
  674. return math.max(a,math.min(b,c or -a))
  675.  
  676. end
  677.  
  678. function bn(a)
  679.  
  680. return a and 1 or 0
  681.  
  682. end
  683.  
  684. function gm(tar)
  685.  
  686. local m = 0
  687.  
  688. for i,v in pairs(tar:GetChildren()) do
  689.  
  690. if v:IsA("BasePart") then
  691.  
  692. m = m + v:GetMass()
  693.  
  694. end
  695.  
  696. m = m + gm(v)
  697.  
  698. end
  699.  
  700. return m
  701.  
  702. end
  703.  
  704. reqrotx = 0
  705.  
  706. local grav = 196.2
  707.  
  708. local con
  709.  
  710. con = game:GetService("RunService").Stepped:connect(oc(function()
  711.  
  712. --[[if not mod:IsDescendantOf(workspace) then
  713.  
  714. pcall(function() kd:disconnect() end)
  715.  
  716. pcall(function() ku:disconnect() end)
  717.  
  718. bg:Destroy()
  719.  
  720. bv:Destroy()
  721.  
  722. con:disconnect()
  723.  
  724. script:Destroy()
  725.  
  726. return
  727.  
  728. end]]
  729.  
  730. local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity)
  731.  
  732. local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z
  733.  
  734. if flying then
  735.  
  736. local lfldir = fldir
  737.  
  738. fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit
  739.  
  740. local lmoving = moving
  741.  
  742. moving = fldir.magnitude > .1
  743.  
  744. if lmoving and not moving then
  745.  
  746. idledir = lfldir*Vector3.new(1,0,1)
  747.  
  748. descendtimer = tick()
  749.  
  750. end
  751.  
  752. local dbomb = fldir.Y < -.6 or (moving and keysdown["1"])
  753.  
  754. if moving and keysdown["0"] and lmoving then
  755.  
  756. fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit
  757.  
  758. end
  759.  
  760. local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0))
  761.  
  762. local descending = (not moving and keysdown["q"] and not keysdown[" "])
  763.  
  764. cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07)
  765.  
  766. local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05
  767.  
  768. hum.PlatformStand = true
  769.  
  770. bg.maxTorque = Vector3.new(1,1,1)*9e5
  771.  
  772. local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector
  773.  
  774. bg.cframe = cf * CFrame.Angles(not moving and -.1 or -math.pi/2+.2,moving and mid(-2.5,rotvel.X/1.5) + reqrotx or 0,0)
  775.  
  776. reqrotx = reqrotx - reqrotx/10
  777.  
  778. bv.maxForce = Vector3.new(1,1,1)*9e4*.5
  779.  
  780. local anioff =(bn(keysdown[" "])-bn(keysdown["q"]))/2
  781.  
  782. local ani = tickwave(1.5-anioff,1)
  783.  
  784. bv.velocity = bv.velocity:Lerp(Vector3.new(0,bn(not moving)*-ani*15+(descending and math.min(20,tick()-descendtimer)*-8 or bn(keysdown[" "])-bn(keysdown["q"]))*15,0)+vel,.6)
  785.  
  786. vel = moving and cf.lookVector*flspd or Vector3.new()
  787.  
  788. flspd = math.min(120,lerp(flspd,moving and (fldir.Y<0 and flspd+(-fldir.Y)*grav/60 or math.max(50,flspd-fldir.Y*grav/300)) or 60,.4))
  789.  
  790. setwings(moving and (gdown and outlow or dbomb and divebomb) or (descending and veryhigh or flap1),15)
  791.  
  792. for i=1,4 do
  793.  
  794. --CFrame.Angles(-.5+bn(i==3)*2.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1)
  795.  
  796. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-.5+bn(i==3)*.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1) or descending and CFrame.Angles(.3,0,0) or CFrame.Angles((i*.1+1.5)*ani,ani*-.5,1*ani)),descending and .8 or .2)
  797.  
  798. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-(-.5+bn(i==3)*.4+bn(i==4)*.5),-(.1+bn(i==2)*.5-bn(i==3)*1.1),bn(i==3)*.1) or descending and CFrame.Angles(-.3,0,0) or CFrame.Angles(-(i*.1+1.5)*ani,ani*.5,1*ani)),descending and .8 or .2)
  799.  
  800. end
  801.  
  802. local hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),{char})
  803.  
  804. if hit and down.Y < -.85 and tick()-flystart > 1 then
  805.  
  806. flying = false
  807.  
  808. hum.PlatformStand = false
  809.  
  810. tor.Velocity = Vector3.new()
  811.  
  812. end
  813.  
  814. else
  815.  
  816. bg.maxTorque = Vector3.new()
  817.  
  818. bv.maxForce = Vector3.new()
  819.  
  820. local ani = tickwave(walking and .8 or 4.5,1)
  821.  
  822. setwings(idle,10)
  823.  
  824. local x,y,z = fspd/160,uspd/700,sspd/900
  825.  
  826. for i=1,4 do
  827.  
  828. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * CFrame.Angles(ani*.1 + -mid(-.1,x),0 + -mid(-.1,y) + bn(i==2)*.6,ani*.02 + -mid(-.1,z)),.2)
  829.  
  830. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * CFrame.Angles(ani*-.05 + mid(-.1,x),0 + mid(-.1,y) + -bn(i==2)*.6,ani*.02 + mid(-.1,z)),.2)
  831.  
  832. end
  833.  
  834. if keypressed[" "] and not flying and (tick()-jumptime > .05 and (tick()-jumptime < 3 or hum.Jump)) then
  835.  
  836. vel = Vector3.new(0,50,0)
  837.  
  838. bv.velocity = vel
  839.  
  840. idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)
  841.  
  842. cf = tor.CFrame * CFrame.Angles(-.01,0,0)
  843.  
  844. tor.CFrame = cf
  845.  
  846. bg.cframe = cf
  847.  
  848. flystart = tick()
  849.  
  850. flying = true
  851.  
  852. end
  853.  
  854. end
  855.  
  856. keypressed = {}
  857.  
  858. end))
  859.  
  860.  
  861.  
  862. end fly()
  863.  
  864. --Bird Wings By Rosemarijohn2
Add Comment
Please, Sign In to add comment