Advertisement
SetsunaElysia

Glider

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