Advertisement
aidanthescriptor101

password to run this

Oct 2nd, 2016
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.23 KB | None | 0 0
  1. --[[Gliding Ferrow]]--
  2. -- Local Script --
  3. -- A rocket...jetpack..yeah a jetpack --
  4.  
  5. --- Made by DoogleFox, Full credit given
  6. local player = game:service("Players").LocalPlayer
  7. local char = player.Character
  8. local cam = workspace.CurrentCamera
  9. local Torsoz = char:findFirstChild("Torso")
  10. local RA = char:findFirstChild("Right Arm")
  11. local LA = char:findFirstChild("Left Arm")
  12. local RL = char:findFirstChild("Right Leg")
  13. local LL = char:findFirstChild("Left Leg")
  14. local H = char:findFirstChild("Head")
  15. local RS = Torsoz:findFirstChild("Right Shoulder")
  16. local LS = Torsoz:findFirstChild("Left Shoulder")
  17. local RH = Torsoz:findFirstChild("Right Hip")
  18. local LH = Torsoz:findFirstChild("Left Hip")
  19. local N = Torsoz:findFirstChild("Neck")
  20. local hu = char:findFirstChild("Humanoid")
  21. local mouse = player:GetMouse()
  22. local Lights = {}
  23. local JetFlames = {}
  24. local LightChangeSpeed = 0.02
  25. local LeftWing
  26. local RightWing
  27. local WingParts = {}
  28. local Flying = false
  29. local JetActive = false
  30. local idle = false
  31. local velo = 0
  32.  
  33. local bp = Instance.new("BodyPosition")
  34. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  35. bp.D = 100
  36. local bg = Instance.new("BodyGyro")
  37. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  38. bg.D = 320
  39. local bv = Instance.new("BodyVelocity")
  40. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  41.  
  42. local P = Instance.new("Part")
  43. P.Anchored = false
  44. P.CanCollide = false
  45. P.Name = "Part"
  46. P.formFactor = "Custom"
  47. P.Size = Vector3.new(0.5,0.5,0.5)
  48. P.Locked = true
  49. P.TopSurface = 0
  50. P.BottomSurface = 0
  51. P.BrickColor = BrickColor.new("Dark stone grey")
  52. P.Transparency = 0
  53.  
  54. local bp = Instance.new("BodyPosition")
  55. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  56. local bv = Instance.new("BodyVelocity")
  57. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  58. local bg = Instance.new("BodyGyro")
  59. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  60. bg.D = 300
  61.  
  62. local wingcolor = "Really black"
  63. local maxvelo = 60
  64. local acceleration = 1
  65.  
  66. ---------------------------------- Design ------------------------------------------
  67. for i, v in pairs(char:children()) do
  68. if v.className == "Model" and v.Name == "Pack" then
  69. v:remove()
  70. end
  71. end
  72. local m = Instance.new("Model", char)
  73. m.Name = "Pack"
  74.  
  75. local b = P:Clone()
  76. b.Parent = m
  77. local mesh = Instance.new("SpecialMesh", b)
  78. mesh.MeshType = "Head"
  79. mesh.Scale = Vector3.new(2.6,1.2,2.6)
  80. local w = Instance.new("Motor", b)
  81. w.Part0 = Torsoz
  82. w.Part1 = b
  83. w.C0 = CFrame.new(0,0.2,0.35) * CFrame.Angles(math.pi/2,0,0)
  84. local p = P:Clone()
  85. p.Parent = m
  86. local mesh = Instance.new("SpecialMesh", p)
  87. mesh.MeshType = "Head"
  88. mesh.Scale = Vector3.new(2,1.2,2)
  89. local w = Instance.new("Motor", p)
  90. w.Part0 = Torsoz
  91. w.Part1 = p
  92. w.C0 = CFrame.new(0,0.2,0.45) * CFrame.Angles(math.pi/2,0,0)
  93.  
  94. local p = P:Clone()
  95. p.Parent = m
  96. local mesh = Instance.new("SpecialMesh", p)
  97. mesh.MeshType = "Head"
  98. mesh.Scale = Vector3.new(2.02,1.2,2.02)
  99. local w = Instance.new("Motor", p)
  100. w.Part0 = Torsoz
  101. w.Part1 = p
  102. w.C0 = CFrame.new(0,0.2,0.445) * CFrame.Angles(math.pi/2,0,0)
  103. table.insert(Lights, p)
  104.  
  105. for i = 1, 3 do
  106. local p = P:Clone()
  107. p.Parent = m
  108. local mesh = Instance.new("CylinderMesh", p)
  109. if i == 2 then
  110. mesh.Scale = Vector3.new(0.4,1.2,0.4)
  111. else
  112. mesh.Scale = Vector3.new(0.35,1,0.35)
  113. end
  114. local w = Instance.new("Motor", p)
  115. w.Part0 = Torsoz
  116. w.Part1 = p
  117. w.C0 = CFrame.new(-0.3+(0.15*i),-0.25,0.55)
  118. if i == 2 then
  119. CenterJet = p
  120. end
  121. local l = P:Clone()
  122. l.Parent = m
  123. local mesh = Instance.new("CylinderMesh", l)
  124. local w = Instance.new("Motor", l)
  125. w.Part0 = p
  126. w.Part1 = l
  127. if i == 2 then
  128. mesh.Scale = Vector3.new(0.405,0.12,0.405)
  129. w.C0 = CFrame.new(0,-0.2,0)
  130. else
  131. mesh.Scale = Vector3.new(0.355,0.12,0.355)
  132. w.C0 = CFrame.new(0,-0.15,0)
  133. end
  134. table.insert(Lights, l)
  135. end
  136.  
  137. for i = 1, 3 do
  138. local l = P:Clone()
  139. l.Parent = m
  140. local mesh = Instance.new("CylinderMesh", l)
  141. mesh.Scale = Vector3.new(0.12,0.1,0.12)
  142. local w = Instance.new("Motor", l)
  143. w.Part0 = Torsoz
  144. w.Part1 = l
  145. w.C0 = CFrame.new(0.3-(0.15*i),0.3,0.73) * CFrame.Angles(math.pi/2,0,0)
  146. table.insert(Lights, l)
  147. end
  148.  
  149. ------- wings ------
  150. for i = 0, 1 do
  151. local p = P:Clone()
  152. p.Parent = m
  153. local mesh = Instance.new("SpecialMesh", p)
  154. mesh.MeshType = "Sphere"
  155. mesh.Scale = Vector3.new(1,1,1)
  156. local w = Instance.new("Motor", p)
  157. w.Part0 = Torsoz
  158. w.Part1 = p
  159. w.C0 = CFrame.new(0,0.55,0.55) * CFrame.Angles(0,math.pi*i,0)
  160. w.C1 = CFrame.new(0.425,0,0)
  161.  
  162. local c = P:Clone()
  163. c.Parent = m
  164. c.BrickColor = BrickColor.new(wingcolor)
  165. c.Name = "WingSpine"..i+1
  166. local mesh = Instance.new("BlockMesh", c)
  167. mesh.Scale = Vector3.new(0.26,6,0.2)
  168. local w = Instance.new("Motor", c)
  169. w.Part0 = p
  170. w.Part1 = c
  171. w.C0 = CFrame.Angles(0,0,-math.pi/7)
  172. w.C1 = CFrame.new(0,1.5,0)
  173. w.MaxVelocity = 0.15
  174. if i == 0 then
  175. LeftWing = w
  176. else
  177. RightWing = w
  178. end
  179. table.insert(WingParts, c)
  180. local p = P:Clone()
  181. p.Parent = m
  182. p.BrickColor = BrickColor.new(wingcolor)
  183. local mesh = Instance.new("SpecialMesh", p)
  184. mesh.MeshType = "Wedge"
  185. mesh.Scale = Vector3.new(0.2,4,2.2)
  186. local w = Instance.new("Motor", p)
  187. w.Part0 = c
  188. w.Part1 = p
  189. w.C0 = CFrame.new(0.485,-0.85,0) * CFrame.Angles(math.pi,-math.pi/2,0)
  190. table.insert(WingParts, p)
  191. local p = P:Clone()
  192. p.Parent = m
  193. p.BrickColor = BrickColor.new(wingcolor)
  194. local mesh = Instance.new("BlockMesh", p)
  195. mesh.Scale = Vector3.new(2,0.5,0.2)
  196. local w = Instance.new("Motor", p)
  197. w.Part0 = c
  198. w.Part1 = p
  199. w.C0 = CFrame.new(0.535,0.275,0)
  200. table.insert(WingParts, p)
  201. local p = P:Clone()
  202. p.Parent = m
  203. p.BrickColor = BrickColor.new(wingcolor)
  204. local mesh = Instance.new("SpecialMesh", p)
  205. mesh.MeshType = "Wedge"
  206. mesh.Scale = Vector3.new(0.2,1.5,1)
  207. local w = Instance.new("Motor", p)
  208. w.Part0 = c
  209. w.Part1 = p
  210. w.C0 = CFrame.new(0.785,0.77,0) * CFrame.Angles(0,-math.pi/2,0)
  211. table.insert(WingParts, p)
  212. local p = P:Clone()
  213. p.Parent = m
  214. p.BrickColor = BrickColor.new(wingcolor)
  215. local mesh = Instance.new("BlockMesh", p)
  216. mesh.Scale = Vector3.new(0.94,1.5,0.2)
  217. local w = Instance.new("Motor", p)
  218. w.Part0 = c
  219. w.Part1 = p
  220. w.C0 = CFrame.new(0.3,0.77,0)
  221. table.insert(WingParts, p)
  222. local p = P:Clone()
  223. p.Parent = m
  224. p.BrickColor = BrickColor.new(wingcolor)
  225. local mesh = Instance.new("SpecialMesh", p)
  226. mesh.MeshType = "Wedge"
  227. mesh.Scale = Vector3.new(0.2,1,0.977)
  228. local w = Instance.new("Motor", p)
  229. w.Part0 = c
  230. w.Part1 = p
  231. w.C0 = CFrame.new(0.3,1.385,0) * CFrame.Angles(0,-math.pi/2,0)
  232. table.insert(WingParts, p)
  233.  
  234. end
  235.  
  236. local spacedet = 0
  237. local KEYS = {false, false, false, false}
  238. mouse.KeyDown:connect(function(key)
  239. if key == string.char(32) then
  240. if (tick() - spacedet) < 0.3 then
  241. Flying = not Flying
  242. end
  243. spacedet = tick()
  244. end
  245. if key == "w" then
  246. KEYS[1] = true
  247. end
  248. if key == "a" then
  249. KEYS[2] = true
  250. end
  251. if key == "s" then
  252. KEYS[3] = true
  253. end
  254. if key == "d" then
  255. KEYS[4] = true
  256. end
  257. end)
  258.  
  259. mouse.KeyUp:connect(function(key)
  260. if key == "w" then
  261. KEYS[1] = false
  262. end
  263. if key == "a" then
  264. KEYS[2] = false
  265. end
  266. if key == "s" then
  267. KEYS[3] = false
  268. end
  269. if key == "d" then
  270. KEYS[4] = false
  271. end
  272. end)
  273.  
  274. local LTrailParts = {}
  275. for i = 1, 21 do
  276. local p = P:Clone()
  277. p.Name = "TrailLine"
  278. p.Anchored = true
  279. p.BrickColor = BrickColor.new(wingcolor)
  280. local mesh = Instance.new("CylinderMesh", p)
  281. mesh.Name = "Mesh"
  282. table.insert(LTrailParts, p)
  283. end
  284. local RTrailParts = {}
  285. for i = 1, 21 do
  286. local p = P:Clone()
  287. p.Name = "TrailLine"
  288. p.Anchored = true
  289. p.BrickColor = BrickColor.new(wingcolor)
  290. local mesh = Instance.new("CylinderMesh", p)
  291. mesh.Name = "Mesh"
  292. table.insert(RTrailParts, p)
  293. end
  294. local Loldpos
  295. local Roldpos
  296.  
  297. local lightval = {0.1, true}
  298. local refval = 0.1
  299. local firecolors = {"Bright red", "Bright orange"}
  300. local firespeed = 2
  301. local trailnum = 0
  302. local num = 0
  303. local lastflyaction = false
  304. local lastidleaction = false
  305. local idlebp = {0, 0, Torsoz.Position, true}
  306.  
  307. while true do
  308. num = num + 1
  309. trailnum = trailnum + 1
  310.  
  311. local unitz = (Torsoz.Position - cam.CoordinateFrame.p).unit
  312. local camsight = Torsoz.Position + (unitz*90)
  313. local diff = camsight.y - Torsoz.Position.y
  314.  
  315. ---------------------- Velocity Changes ----------------------------
  316.  
  317. ----------- W key --------------
  318. if KEYS[1] == true then
  319. velo = velo + acceleration
  320. else
  321. if velo > 0 then
  322. local UP = velo - (acceleration/1.5)
  323. if velo > 0 and UP < 0 then
  324. velo = velo + UP
  325. end
  326. velo = velo - (acceleration/1.5)
  327. end
  328. end
  329. ------------ S key -------------
  330. if KEYS[3] == true then
  331. if velo > 0 then
  332. velo = velo - acceleration*1.2
  333. else
  334. velo = velo - (acceleration/1.5)
  335. end
  336. else
  337. if velo < 0 then
  338. local DOWN = velo + acceleration
  339. if velo < 0 and DOWN > 0 then
  340. velo = velo - DOWN
  341. end
  342. velo = velo + acceleration
  343. end
  344. end
  345.  
  346. local maxvelocalc = maxvelo
  347. if diff < -35 then
  348. if velo > 0 then
  349. maxvelocalc = maxvelo + (maxvelo * -(((diff+35)/110)))
  350. end
  351. elseif diff > 35 then
  352. if velo < 0 then
  353. maxvelocalc = maxvelo + (maxvelo * -((((-diff)+35)/110)))
  354. end
  355. end
  356.  
  357. if velo >= maxvelocalc then
  358. velo = maxvelocalc
  359. elseif velo <= -maxvelocalc/2 then
  360. velo = -maxvelocalc/2
  361. end
  362.  
  363. ------------------------- Lights ----------------------
  364. if lightval[1] < 0.15 then
  365. lightval[2] = true
  366. elseif lightval[1] > 0.76 then
  367. lightval[2] = false
  368. end
  369. if lightval[2] == true then
  370. lightval[1] = lightval[1] + LightChangeSpeed
  371. else
  372. lightval[1] = lightval[1] - LightChangeSpeed
  373. end
  374. for i, v in pairs(Lights) do
  375. v.Transparency = lightval[1]
  376. if LightChangeSpeed > 0.15 then
  377. v.BrickColor = BrickColor.new("Bright red")
  378. elseif LightChangeSpeed > 0.08 then
  379. v.BrickColor = BrickColor.new("Bright orange")
  380. else
  381. v.BrickColor = BrickColor.new("Bright green")
  382. end
  383. end
  384. --------------------------------------------------------
  385.  
  386. --------------------- Wing Shines -------------------------
  387. for i, v in pairs(WingParts) do
  388. if Flying == true then
  389. if v.Reflectance > 0.19 then
  390. v.Reflectance = v.Reflectance - 0.035
  391. else
  392. v.Reflectance = 0.19
  393. end
  394. else
  395. if v.Reflectance < 0.43 then
  396. v.Reflectance = v.Reflectance + 0.035
  397. else
  398. v.Reflectance = 0.43
  399. end
  400. end
  401. end
  402. ----------------------------------------------------
  403.  
  404. ------------------------ Jet Boost Flames --------------------------------
  405. if num%firespeed == 0 and JetActive == true then
  406. local f = P:Clone()
  407. f.Parent = m
  408. f.Name = "JetFire"
  409. f.BrickColor = BrickColor.new(firecolors[math.random(1, #firecolors)])
  410. f.Transparency = 0.15
  411. f.Anchored = true
  412. f.CFrame = CenterJet.CFrame * CFrame.new(0,-0.3,0)
  413. local mesh = Instance.new("BlockMesh", f)
  414. mesh.Scale = Vector3.new(0.6,0.6,0.6)
  415. table.insert(JetFlames, {mesh, (f.Position - CenterJet.Position).unit})
  416. end
  417.  
  418. for i, v in pairs(JetFlames) do
  419. if v[1].Parent.Transparency < 0.9 then
  420. v[1].Parent.Transparency = v[1].Parent.Transparency + 0.03
  421. v[1].Scale = v[1].Scale + Vector3.new(0.08,0.08,0.08)
  422. v[1].Parent.CFrame = v[1].Parent.CFrame * CFrame.Angles(math.random(-180,180)/360,math.random(-180,180)/360,math.random(-180,180)/360)
  423. if idle == false then
  424. v[1].Parent.CFrame = v[1].Parent.CFrame + (v[2]*0.1)
  425. else
  426. v[1].Parent.CFrame = v[1].Parent.CFrame + (v[2]*0.24)
  427. end
  428. else
  429. v[1].Parent:remove()
  430. table.remove(JetFlames, i)
  431. end
  432. end
  433. --------------------------------------------------
  434.  
  435. ------------------------------ Flying --------------------------------
  436.  
  437. if Flying == true then
  438.  
  439. if lastflyaction == false then
  440. bg = Instance.new("BodyGyro", Torsoz)
  441. bg.maxTorque = Vector3.new(1/0,1/0,1/0)
  442. bg.D = 350
  443. end
  444.  
  445.  
  446. --------- idle checker --------
  447. if (velo > -0.5 and velo < 0.5) and (KEYS[1] == false and KEYS[3] == false) then
  448. idle = true
  449. if lastidleaction == false then
  450. idlebp[3] = Torsoz.Position
  451. end
  452. else
  453. idle = false
  454. end
  455.  
  456. --------- idle float anim -----------
  457. if idle == true then
  458. if lastidleaction == false then
  459. idlebp = {0, 0, Torsoz.Position, true}
  460. end
  461. if idlebp[2] >= 0.3 then
  462. idlebp[4] = false
  463. elseif idlebp[2] <= -0.3 then
  464. idlebp[4] = true
  465. end
  466. if idlebp[4] == false then
  467. idlebp[2] = idlebp[2] - 0.02
  468. elseif idlebp[4] == true then
  469. idlebp[2] = idlebp[2] + 0.02
  470. end
  471. idlebp[1] = idlebp[1] + idlebp[2]
  472. end
  473.  
  474. ---------------- Body Objects ----------------------
  475.  
  476. if idle == true then
  477. if lastidleaction == false then
  478. bv:remove()
  479. bp:remove()
  480. bp = Instance.new("BodyPosition")
  481. end
  482. hu.PlatformStand = true
  483. bp.Parent = Torsoz
  484. bp.maxForce = Vector3.new(1/0,1/0,1/0)
  485. bp.D = 100
  486. bp.position = idlebp[3] + Vector3.new(0,idlebp[1],0)
  487. bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position + cam.CoordinateFrame.lookVector)
  488. else
  489. if lastidleaction == true then
  490. bp:remove()
  491. bv:remove()
  492. bv = Instance.new("BodyVelocity")
  493. end
  494. hu.PlatformStand = true
  495. bv.Parent = Torsoz
  496. bv.maxForce = Vector3.new(1/0,1/0,1/0)
  497. local torpos = Torsoz.Position + (cam.CoordinateFrame.lookVector * 10)
  498. bv.velocity = CFrame.new(Torsoz.Position+Vector3.new(0,-2,0), torpos).lookVector*velo
  499. local cvelo = velo
  500. if velo > maxvelo then
  501. cvelo = maxvelo
  502. end
  503. bg.cframe = CFrame.new(Torsoz.Position, Torsoz.Position + cam.CoordinateFrame.lookVector) * CFrame.Angles((-math.pi/2.3)*(cvelo/maxvelo),0,0)
  504.  
  505. end
  506.  
  507. elseif Flying == false then
  508. if lastflyaction == true then
  509. hu.PlatformStand = false
  510. bp.Parent = nil
  511. bg.Parent = nil
  512. bv.Parent = nil
  513. idle = false
  514. end
  515.  
  516. end --- if flying == true
  517.  
  518. -----------------------------------------
  519.  
  520. ----------------------- Auto Anims -----------------------
  521. if Flying == true then
  522. if diff > 40 then
  523. LeftWing.DesiredAngle = -0.3
  524. RightWing.DesiredAngle = -0.3
  525. LightChangeSpeed = 0.24
  526. JetActive = true
  527. ActiveTrails = true
  528. firespeed = 1
  529. elseif diff > -22 and diff < 40 then
  530. LeftWing.DesiredAngle = -math.pi/2.5
  531. RightWing.DesiredAngle = -math.pi/2.5
  532. LightChangeSpeed = 0.09
  533. JetActive = true
  534. ActiveTrails = true
  535. firespeed = 2
  536. elseif diff > -60 and diff < -22 then
  537. LeftWing.DesiredAngle = -math.pi/2.5
  538. RightWing.DesiredAngle = -math.pi/2.5
  539. LightChangeSpeed = 0.04
  540. JetActive = false
  541. ActiveTrails = true
  542. elseif diff < -60 then
  543. LeftWing.DesiredAngle = -0.1
  544. RightWing.DesiredAngle = -0.1
  545. LightChangeSpeed = 0.04
  546. JetActive = false
  547. ActiveTrails = true
  548. end
  549. if idle == true then
  550. LeftWing.DesiredAngle = -math.pi/2.2
  551. RightWing.DesiredAngle = -math.pi/2.2
  552. LightChangeSpeed = 0.09
  553. JetActive = true
  554. ActiveTrails = false
  555. firespeed = 1
  556. end
  557. if diff < -40 and velo < 0 then
  558. LeftWing.DesiredAngle = -0.3
  559. RightWing.DesiredAngle = -0.3
  560. LightChangeSpeed = 0.24
  561. JetActive = true
  562. ActiveTrails = true
  563. firespeed = 1
  564. elseif (diff < -22 and diff > -40) and velo < 0 then
  565. LeftWing.DesiredAngle = -math.pi/2.5
  566. RightWing.DesiredAngle = -math.pi/2.5
  567. LightChangeSpeed = 0.09
  568. JetActive = true
  569. ActiveTrails = true
  570. firespeed = 2
  571. end
  572. else
  573. LeftWing.DesiredAngle = 0
  574. RightWing.DesiredAngle = 0
  575. JetActive = false
  576. ActiveTrails = false
  577. LightChangeSpeed = 0.02
  578. end
  579. -----------------------------------------
  580.  
  581. ------------------------ Trail lines ------------------------------
  582. if num%2 == 0 then
  583.  
  584. if Flying == true and ActiveTrails == true then
  585. if velo > 0 then
  586. if velo < acceleration*7 then
  587. Loldpos = nil
  588. Roldpos = nil
  589. end
  590. elseif velo < 0 then
  591. if velo > -acceleration*7 then
  592. Loldpos = nil
  593. Roldpos = nil
  594. end
  595. end
  596.  
  597. if Loldpos ~= nil then
  598. local newpos = (LeftWing.Parent.CFrame * CFrame.new(0,-1.7,0)).p
  599. local t = LTrailParts[trailnum]
  600. t.Parent = m
  601. t.Anchored = true
  602. t.BrickColor = BrickColor.new(wingcolor)
  603. t.CFrame = CFrame.new((Loldpos+newpos)/2,Loldpos) * CFrame.Angles(math.pi/2,0,0)
  604. local mesh = Instance.new("CylinderMesh", t)
  605. mesh.Name = "Mesh"
  606. mesh.Scale = Vector3.new(0.2,(Loldpos - newpos).magnitude*2,0.2)
  607. end
  608. if Roldpos ~= nil then
  609. local newpos = (RightWing.Parent.CFrame * CFrame.new(0,-1.7,0)).p
  610. local t = RTrailParts[trailnum]
  611. t.Parent = m
  612. t.Anchored = true
  613. t.BrickColor = BrickColor.new(wingcolor)
  614. t.CFrame = CFrame.new((Roldpos+newpos)/2,Roldpos) * CFrame.Angles(math.pi/2,0,0)
  615. local mesh = Instance.new("CylinderMesh", t)
  616. mesh.Name = "Mesh"
  617. mesh.Scale = Vector3.new(0.2,(Roldpos - newpos).magnitude*2,0.2)
  618. end
  619. Loldpos = (LeftWing.Parent.CFrame * CFrame.new(0,-1.7,0)).p
  620. Roldpos = (RightWing.Parent.CFrame * CFrame.new(0,-1.7,0)).p
  621.  
  622. else
  623. LTrailParts[trailnum].Parent = nil
  624. RTrailParts[trailnum].Parent = nil
  625. Loldpos = (LeftWing.Parent.CFrame * CFrame.new(0,-1.7,0)).p
  626. Roldpos = (RightWing.Parent.CFrame * CFrame.new(0,-1.7,0)).p
  627. end
  628.  
  629. end
  630.  
  631. if trailnum == #LTrailParts-1 then
  632. trailnum = 0
  633. end
  634.  
  635. if num%800 == 0 then
  636. for i, v in pairs(LTrailParts) do
  637. game:service("Debris"):AddItem(v, 0.7)
  638. end
  639. for i, v in pairs(RTrailParts) do
  640. game:service("Debris"):AddItem(v, 0.7)
  641. end
  642. LTrailParts = {}
  643. for i = 1, 21 do
  644. local p = P:Clone()
  645. p.Name = "LTrailLine"
  646. p.Anchored = true
  647. p.BrickColor = BrickColor.new(wingcolor)
  648. local mesh = Instance.new("CylinderMesh", p)
  649. mesh.Name = "Mesh"
  650. table.insert(LTrailParts, p)
  651. end
  652. RTrailParts = {}
  653. for i = 1, 21 do
  654. local p = P:Clone()
  655. p.Name = "RTrailLine"
  656. p.Anchored = true
  657. p.BrickColor = BrickColor.new(wingcolor)
  658. local mesh = Instance.new("CylinderMesh", p)
  659. mesh.Name = "Mesh"
  660. table.insert(RTrailParts, p)
  661. end
  662. end
  663.  
  664. ----------------------------------------------
  665.  
  666. lastflyaction = Flying
  667. lastidleaction = idle
  668. wait(0.03)
  669. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement