Advertisement
Spiritualz

Untitled

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