Advertisement
gangmanstyler2

Untitled

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