TheProNoob2004

Doolge Glider

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