Advertisement
Guest User

.______.

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