Legendofawesomeness3

penta

Dec 16th, 2017
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.65 KB | None | 0 0
  1.  
  2. local Player = game:GetService("Players").LocalPlayer
  3. local Character = Player.Character
  4. local Mouse = Player:GetMouse()
  5. local Camera = game:GetService("Workspace").CurrentCamera
  6. local Humanoid = Character:findFirstChild("Humanoid")
  7. local Torso = Character.Torso
  8. local PlayerGui = Player.PlayerGui
  9. local Torso = Character:findFirstChild("Torso")
  10. local Head = Character:findFirstChild("Head")
  11. local RootPart = Character:findFirstChild("HumanoidRootPart")
  12. local Root = RootPart.RootJoint
  13. local Sides = {"Left","Right"}
  14. local Arms = {Character["Left Arm"],Character["Right Arm"]}
  15. local Legs = {Character["Left Leg"],Character["Right Leg"]}
  16.  
  17. local Bits = {}
  18. local Disposables = {}
  19. local Discs = {}
  20.  
  21. local DiscSpin = 0
  22. local Spread = 1.25
  23. local RateTop = 1
  24. local RateBot = 1
  25. local Distance = 0.5
  26. local ExtendTop = 1
  27. local ExtendBot = 1
  28. local CurrentFrame = 1
  29. local Lift = 0
  30. local Accel = 1
  31. local TurnAngle = 0
  32. local rofTop = 1
  33. local rofBot = 1
  34. local Flutter = 0
  35.  
  36. local Front = false
  37. local Back = false
  38. local Left = false
  39. local Right = false
  40. local AddSub = false
  41. local ChargeHeld = false
  42. local BoostHeld = false
  43. local BeamHeld = false
  44. local AbsDefHeld = false
  45. local ExtendGrowthTop = false
  46. local ExtendGrowthBot = false
  47. local UpdateAnim = true
  48.  
  49.  
  50. local CurrentAnimation = "Idle"
  51. local LastAnimation = "Idle"
  52. local MobilityType = "Float"
  53. local ColorGlobe = "White"
  54. local ColorBlades = "Black"
  55. local xmove,zmove
  56.  
  57. local LastBeam = tick()
  58.  
  59. if Torso then
  60. for _,v in pairs(Torso:children()) do
  61. if v:IsA("BodyGyro") or v:IsA("BodyVelocity") then
  62. v:Destroy();
  63. end
  64. end
  65. end
  66.  
  67. local Energy = {}
  68. local TotalEnergy = 1000
  69. local CurrentEnergy = 1000
  70.  
  71. pcall(function()
  72. PlayerGui.EnergyMeter:Destroy()
  73. end)
  74. if Player.Name == "modFrost" then
  75. ColorGlobe = "Bright orange"
  76. end
  77.  
  78. local FlapSound = Instance.new("Sound", Torso)
  79. FlapSound.Name = "Flap"
  80. FlapSound.SoundId = "http://www.roblox.com/asset/?id=257002377"
  81. FlapSound.Volume = 1
  82.  
  83. local EnergyMeter = Instance.new("ScreenGui", PlayerGui)
  84. EnergyMeter.Name = "EnergyMeter"
  85. local Bar = Instance.new("Frame", EnergyMeter)
  86. Bar.Size = UDim2.new(0,200,0,10)
  87. Bar.Position = UDim2.new(1,-205,1,-15)
  88. Bar.BorderSizePixel = 0
  89. Bar.BackgroundColor = BrickColor.new("Really black")
  90. Bar.BackgroundTransparency = 0.5
  91. local Text = Instance.new("TextLabel", Bar)
  92. Text.Text = "Energy"
  93. Text.TextColor = BrickColor.new("White")
  94. Text.BackgroundTransparency = 1
  95. Text.Size = UDim2.new(1,0,1,0)
  96. Text.Position = UDim2.new(0,0,-1,-10)
  97. Text.TextXAlignment = "Left"
  98. Text.FontSize = "Size12"
  99. local EnergyFill = Instance.new("Frame", Bar)
  100. EnergyFill.Size = UDim2.new(0,0,1,-5)
  101. EnergyFill.Position = UDim2.new(0,2.5,0,2.5)
  102. EnergyFill.BorderSizePixel = 0
  103. EnergyFill.BackgroundColor = BrickColor.new(ColorGlobe)
  104. EnergyFill.BackgroundTransparency = 0.25
  105.  
  106. local ChargeMeter = Instance.new("ScreenGui", PlayerGui)
  107. ChargeMeter.Name = "EnergyMeter"
  108. local ChargeBar = Instance.new("Frame", ChargeMeter)
  109. ChargeBar.Size = UDim2.new(0,200,0,10)
  110. ChargeBar.Position = UDim2.new(0.5,-102.5,0.8,-5)
  111. ChargeBar.BorderSizePixel = 0
  112. ChargeBar.BackgroundColor = BrickColor.new("Really black")
  113. ChargeBar.BackgroundTransparency = 0.5
  114. local ChargeFill = Instance.new("Frame", ChargeBar)
  115. ChargeFill.Size = UDim2.new(0,0,1,-5)
  116. ChargeFill.Position = UDim2.new(0,2.5,0,2.5)
  117. ChargeFill.BorderSizePixel = 0
  118. ChargeFill.BackgroundColor = BrickColor.new("Bright blue")
  119. ChargeFill.BackgroundTransparency = 0.25
  120. ChargeBar.Visible = false
  121.  
  122. local function _Part(Parent,canc,anc,tr,ref,mat,color,size, meshtype, scale)
  123. local part = Instance.new("Part", Parent)
  124. part.Transparency = tr
  125. part.Anchored = anc
  126. part.TopSurface = 10
  127. part.BottomSurface = 10
  128. part.LeftSurface = 10
  129. part.RightSurface = 10
  130. part.FrontSurface = 10
  131. part.BackSurface = 10
  132. part.Locked = true
  133. part.formFactor = 3
  134. part.Reflectance = ref
  135. part.Material = mat
  136. part.CanCollide = canc
  137. part.Size = Vector3.new(size[1],size[2],size[3])
  138. part.BrickColor = BrickColor.new(color)
  139. local mesh
  140. if meshtype == "BlockMesh" then
  141. mesh = Instance.new("BlockMesh", part)
  142. elseif meshtype == "CylinderMesh" then
  143. mesh = Instance.new("CylinderMesh", part)
  144. else
  145. mesh = Instance.new("SpecialMesh", part)
  146. mesh.MeshType = meshtype
  147. end
  148. mesh.Name = "Mesh"
  149. mesh.Scale = Vector3.new(scale[1],scale[2],scale[3])
  150. return part
  151. end
  152.  
  153. local function _Weld(Parent, p0, c1, c0)
  154. local weld = Instance.new("Motor", Parent)
  155. weld.Part1 = Parent
  156. weld.Part0 = p0
  157. weld.C1 = c1
  158. weld.C0 = c0
  159. weld.Name = "Weld"
  160. return weld
  161. end
  162.  
  163. local Main = Character:findFirstChild("Main") or Instance.new("Model", Character)
  164. Main.Name = "Main"
  165. Main:ClearAllChildren()
  166.  
  167. pcall(function() Character["Head"]["face"]:Destroy() end)
  168.  
  169. for _,Hat in pairs(Character:GetChildren()) do
  170. if Hat:IsA("Accoutrement") then
  171. Hat:Destroy()
  172. end
  173. end
  174.  
  175. for _,Part in pairs(Character:GetChildren()) do
  176. if Part:IsA("BasePart") then
  177. Part.Transparency = 1
  178. end
  179. end
  180.  
  181. local function GenF(Part, Cframe, Color)
  182. local A = _Part(Main,false,false,0,0,"SmoothPlastic",Color,{0.05,0.5,0.05},"BlockMesh",{1,1,0.5})
  183. _Weld(A, Part, CFrame.new(), Cframe)
  184. local B = _Part(Main,false,false,0,0,"SmoothPlastic",Color,{0.2,0.2,0.3},"BlockMesh",{1,0.5,1})
  185. _Weld(B, A, CFrame.new(), CFrame.new(0,-0.2,0.2))
  186. local C = _Part(Main,false,false,0,0,"SmoothPlastic",Color,{0.2,0.2,0.2},"BlockMesh",{1,0.5,1})
  187. _Weld(C, A, CFrame.new(), CFrame.new(0,-0.025,0.15))
  188. end
  189.  
  190. local Down = _Part(Main,false,false,1,1,"SmoothPlastic","Black",{1,1,1},"Brick",{1,1,1})
  191. _Weld(Down, Torso, CFrame.Angles(math.rad(90),0,0), CFrame.new())
  192.  
  193. local AnchorPart = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.8,0.8,0.8},"Sphere",{1,1,1})
  194. _Weld(AnchorPart, Character["Right Arm"], CFrame.new(0,1.5,0), CFrame.new())
  195.  
  196. local AnchorPart2 = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.8,0.8,0.8},"Sphere",{1,1,1})
  197. _Weld(AnchorPart2, Character["Left Arm"], CFrame.new(0,1.5,0), CFrame.new())
  198.  
  199. local AnchorPart3 = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.8,0.8,0.8},"Sphere",{1,1,1})
  200. _Weld(AnchorPart3, Character["Right Leg"], CFrame.new(0,1.5,0), CFrame.new())
  201.  
  202. local AnchorPart4 = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.8,0.8,0.8},"Sphere",{1,1,1})
  203. _Weld(AnchorPart4, Character["Left Leg"], CFrame.new(0,1.5,0), CFrame.new())
  204.  
  205. --Back
  206.  
  207. local AnchorPart5 = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.6,0.6,0.6},"Sphere",{1,1,1})
  208. _Weld(AnchorPart5, Character.Torso, CFrame.new(0.75,-0.5,-1), CFrame.new())
  209.  
  210. local AnchorPart6 = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.6,0.6,0.6},"Sphere",{1,1,1})
  211. _Weld(AnchorPart6, Character.Torso, CFrame.new(-0.75,-0.5,-1), CFrame.new())
  212.  
  213. local AnchorPart7 = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.4,0.4,0.4},"Sphere",{1,1,1})
  214. _Weld(AnchorPart7, Character.Torso, CFrame.new(0.5,0.25,-0.8), CFrame.new())
  215.  
  216. local AnchorPart8 = _Part(Main,false,false,0.1,0,"Neon",ColorGlobe,{0.4,0.4,0.4},"Sphere",{1,1,1})
  217. _Weld(AnchorPart8, Character.Torso, CFrame.new(-0.5,0.25,-0.8), CFrame.new())
  218.  
  219. local WingLeft = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,2,1},"Wedge",{1,1,1})
  220. local WingLeftMain = _Weld(WingLeft, AnchorPart5, CFrame.new(), CFrame.new())
  221. local WingLeftP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,2,1},"Wedge",{1,1,1})
  222. _Weld(WingLeftP1, WingLeft, CFrame.new(0,-2,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  223. local WingLeftD = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,1.8*2,0.45*2})
  224. WingLeftD.Mesh.MeshId = "rbxassetid://9756362"
  225. _Weld(WingLeftD, WingLeft, CFrame.new(0,1,-0.25) * CFrame.Angles(math.rad(-15),0,0), CFrame.new())
  226. table.insert(Bits, {Side = true; Weld = WingLeftMain; Series = 0;Type = "Wing"})
  227.  
  228. local WingRight = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,2,1},"Wedge",{1,1,1})
  229. local WingRightMain = _Weld(WingRight, AnchorPart6, CFrame.new(), CFrame.new())
  230. local WingRightP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,2,1},"Wedge",{1,1,1})
  231. _Weld(WingRightP1, WingRight, CFrame.new(0,-2,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  232. local WingRightD = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,1.8*2,0.45*2})
  233. WingRightD.Mesh.MeshId = "rbxassetid://9756362"
  234. _Weld(WingRightD, WingRight, CFrame.new(0,1,-0.25) * CFrame.Angles(math.rad(-15),0,0), CFrame.new())
  235. table.insert(Bits, {Side = false; Weld = WingRightMain; Series = 0;Type = "Wing"})
  236.  
  237. local WingLeftLower = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1.5,0.5},"Wedge",{1,1,1})
  238. local WingLeftLowerMain = _Weld(WingLeftLower, AnchorPart7, CFrame.new(), CFrame.new())
  239. local WingLeftLowerP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1.5,0.5},"Wedge",{1,1,1})
  240. _Weld(WingLeftLowerP1, WingLeftLower, CFrame.new(0,-1.5,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  241. local WingLeftLowerD = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,2.8,0.45})
  242. WingLeftLowerD.Mesh.MeshId = "rbxassetid://9756362"
  243. _Weld(WingLeftLowerD, WingLeftLower, CFrame.new(0,0.75,-0.15) * CFrame.Angles(math.rad(-10),0,0), CFrame.new())
  244. table.insert(Bits, {Side = true; Weld = WingLeftLowerMain; Series = 0;Type = "WingLow"})
  245.  
  246. local WingRightLower = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1.5,0.5},"Wedge",{1,1,1})
  247. local WingRightLowerMain = _Weld(WingRightLower, AnchorPart8, CFrame.new(), CFrame.new())
  248. local WingRightLowerP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1.5,0.5},"Wedge",{1,1,1})
  249. _Weld(WingRightLowerP1, WingRightLower, CFrame.new(0,-1.5,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  250. local WingRightLowerD = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,2.8,0.45})
  251. WingRightLowerD.Mesh.MeshId = "rbxassetid://9756362"
  252. _Weld(WingRightLowerD, WingRightLower, CFrame.new(0,0.75,-0.15) * CFrame.Angles(math.rad(-10),0,0), CFrame.new())
  253. table.insert(Bits, {Side = false; Weld = WingRightLowerMain; Series = 0;Type = "WingLow"})
  254.  
  255. for i = 1, 6, 1 do
  256. local TriP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  257. local Main = _Weld(TriP1, AnchorPart, CFrame.new(), CFrame.new())
  258. local TriP2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  259. _Weld(TriP2, TriP1, CFrame.new(0,-1,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  260. local DiamondB = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,1.8,0.45})
  261. DiamondB.Mesh.MeshId = "rbxassetid://9756362"
  262. _Weld(DiamondB, TriP1, CFrame.new(0,0.5,-0.125) * CFrame.Angles(math.rad(-15),0,0),CFrame.new())
  263. table.insert(Bits, {Side = false; Weld = Main; Series = i;Type = "Top"})
  264. end
  265.  
  266. for i = 1, 6, 1 do
  267. local TriP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  268. local Main = _Weld(TriP1, AnchorPart2, CFrame.new(), CFrame.new())
  269. local TriP2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  270. _Weld(TriP2, TriP1, CFrame.new(0,-1,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  271. local DiamondB = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,1.8,0.45})
  272. DiamondB.Mesh.MeshId = "rbxassetid://9756362"
  273. _Weld(DiamondB, TriP1, CFrame.new(0,0.5,-0.125) * CFrame.Angles(math.rad(-15),0,0),CFrame.new())
  274. table.insert(Bits, {Side = true; Weld = Main; Series = i;Type = "Top"})
  275. end
  276.  
  277. for i = 1, 6, 1 do
  278. local TriP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  279. local Main = _Weld(TriP1, AnchorPart3, CFrame.new(), CFrame.new())
  280. local TriP2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  281. _Weld(TriP2, TriP1, CFrame.new(0,-1,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  282. local DiamondB = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,1.8,0.45})
  283. DiamondB.Mesh.MeshId = "rbxassetid://9756362"
  284. _Weld(DiamondB, TriP1, CFrame.new(0,0.5,-0.125) * CFrame.Angles(math.rad(-15),0,0),CFrame.new())
  285. table.insert(Bits, {Side = false; Weld = Main; Series = i;Type = "Bot"})
  286. end
  287.  
  288. for i = 1, 6, 1 do
  289. local TriP1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  290. local Main = _Weld(TriP1, AnchorPart4, CFrame.new(), CFrame.new())
  291. local TriP2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.2,1,0.5},"Wedge",{1,1,1})
  292. _Weld(TriP2, TriP1, CFrame.new(0,-1,0) * CFrame.Angles(math.rad(180),0,0), CFrame.new())
  293. local DiamondB = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.25,1.8,0.45})
  294. DiamondB.Mesh.MeshId = "rbxassetid://9756362"
  295. _Weld(DiamondB, TriP1, CFrame.new(0,0.5,-0.125) * CFrame.Angles(math.rad(-15),0,0),CFrame.new())
  296. table.insert(Bits, {Side = true; Weld = Main; Series = i;Type = "Bot"})
  297. end
  298.  
  299. --[[local WingAnchor = _Part(Main,false,false,1,0,"SmoothPlastic",ColorBlades,{1,1,1},"BlockMesh",{1,1,1})
  300. _Weld(WingAnchor, Character.Torso, CFrame.new(0.5,-0.5,-1), CFrame.new())
  301. local LengthWing1 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.3,1.5,0.3},"BlockMesh",{1,1,1})
  302. _Weld(LengthWing1, WingAnchor, CFrame.new(0.5,-0.55,0.35) * CFrame.Angles(math.rad(290),math.rad(45),0), CFrame.new())
  303. local WingAnchor2 = _Part(Main,false,false,1,0,"SmoothPlastic",ColorBlades,{1,1,1},"BlockMesh",{1,1,1})
  304. _Weld(WingAnchor2, LengthWing1, CFrame.new(0,-0.75,0), CFrame.new())
  305. local LengthWing2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.3,1.5,0.3},"BlockMesh",{1,1,1})
  306. _Weld(LengthWing2, WingAnchor2, CFrame.new(0,-0.6,0) * CFrame.Angles(math.rad(350),0,0), CFrame.new())
  307. local WingAnchor3 = _Part(Main,false,false,1,0,"SmoothPlastic",ColorBlades,{1,1,1},"BlockMesh",{1,1,1})
  308. _Weld(WingAnchor3, LengthWing2, CFrame.new(0,-0.75,0), CFrame.new())
  309. local LengthWing3 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.3,1.5,0.3},"BlockMesh",{1,1,1})
  310. _Weld(LengthWing3, WingAnchor3, CFrame.new(0,-0.6,0) * CFrame.Angles(math.rad(-10),0,0), CFrame.new())
  311. local WingAnchor4 = _Part(Main,false,false,1,0,"SmoothPlastic",ColorBlades,{1,1,1},"BlockMesh",{1,1,1})
  312. _Weld(WingAnchor4, LengthWing3, CFrame.new(0,-0.75,0), CFrame.new())
  313. local LengthWing4 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{0.3,1.5,0.3},"BlockMesh",{1,1,1})
  314. _Weld(LengthWing4, WingAnchor4, CFrame.new(0,-0.6,0) * CFrame.Angles(math.rad(-15),0,0), CFrame.new())
  315. ]]-- Scrapped for now...
  316.  
  317. --[[Body]]--
  318.  
  319. local BHead = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"Head",{1.25,1.25,1.25})
  320. _Weld(BHead,Head,CFrame.new(),CFrame.new())
  321. local BHelm = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{1,1,1})
  322. BHelm.Mesh.MeshId = "rbxassetid://17438747"
  323. _Weld(BHelm,BHead,CFrame.new(0,-0.2,0),CFrame.new())
  324. local BHelm2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.95,0.97,0.95})
  325. BHelm2.Mesh.MeshId = "rbxassetid://17438747"
  326. _Weld(BHelm2,BHelm,CFrame.new(0,0,-0.02),CFrame.new())
  327. local EyeL = _Part(Main,false,false,0,0,"Neon",ColorGlobe,{1,1,1},"Sphere",{0.25,0.075,0.075})
  328. _Weld(EyeL,Head,CFrame.new(0.2,0.25,0.55)*CFrame.Angles(0,math.rad(40),0),CFrame.new())
  329. local EyeR = _Part(Main,false,false,0,0,"Neon",ColorGlobe,{1,1,1},"Sphere",{0.25,0.075,0.075})
  330. _Weld(EyeR,Head,CFrame.new(-0.2,0.25,0.55)*CFrame.Angles(0,math.rad(-40),0),CFrame.new())
  331. local Mouth = _Part(Main,false,false,0,0,"Neon",ColorGlobe,{1,1,1},"Sphere",{0.25,0.075,0.075})
  332. _Weld(Mouth,Head,CFrame.new(0,0.45,0.53),CFrame.new())
  333. local BTorso = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{1,0.4,1})
  334. BTorso.Mesh.MeshId = "rbxasset://fonts\\torso.mesh"
  335. _Weld(BTorso,Torso,CFrame.new(0,-0.45,0),CFrame.new())
  336. local BTorso2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.85,0.6,0.85})
  337. BTorso2.Mesh.MeshId = "rbxasset://fonts\\torso.mesh"
  338. _Weld(BTorso2,BTorso,CFrame.new(0,0.8,0),CFrame.new())
  339. local BTorsoCore = _Part(Main,false,false,0,0,"Neon",ColorGlobe,{1,1,1},"Sphere",{0.5,0.5,0.5})
  340. _Weld(BTorsoCore, Torso, CFrame.new(0,-0.5,0.4),CFrame.new())
  341. local BTorsoCoreDisc = _Part(Main,false,false,0,0,"SmoothPlastic","Medium stone grey",{1,1,1},"FileMesh",{0.525,0.525,0.2})
  342. BTorsoCoreDisc.Mesh.MeshId = "rbxassetid://3270017"
  343. _Weld(BTorsoCoreDisc, BTorsoCore, CFrame.new(0,0,0.1),CFrame.new())
  344. local BNeck = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"Head",{0.8,1,0.8})
  345. _Weld(BNeck,Head,CFrame.new(0,0.8,0),CFrame.new())
  346.  
  347. for i=1,3 do
  348. local BTorsoAb = _Part(Main,false,false,0,0,"SmoothPlastic","Medium stone grey",{1,1,1},"FileMesh",{0.2,0.075,0.2})
  349. BTorsoAb.Mesh.MeshId = "rbxasset://fonts\\torso.mesh"
  350. _Weld(BTorsoAb, Torso, CFrame.new(-0.5,-0.3 + 0.3*i,0.35)*CFrame.Angles(0,0,math.rad(15)),CFrame.new())
  351. end
  352. for i=1,3 do
  353. local BTorsoAb = _Part(Main,false,false,0,0,"SmoothPlastic","Medium stone grey",{1,1,1},"FileMesh",{0.2,0.075,0.2})
  354. BTorsoAb.Mesh.MeshId = "rbxasset://fonts\\torso.mesh"
  355. _Weld(BTorsoAb, Torso, CFrame.new(0.5,-0.3 + 0.3*i,0.35)*CFrame.Angles(0,0,math.rad(-15)),CFrame.new())
  356. end
  357.  
  358. local function Arm(bool)
  359. local Limb, Offset
  360. if bool then
  361. Limb = Character["Left Arm"]
  362. Offset = 0.52
  363. else
  364. Limb = Character["Right Arm"]
  365. Offset = -0.52
  366. end
  367.  
  368. local ShldrL = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{1,0.35,1})
  369. ShldrL.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  370. _Weld(ShldrL,Limb,CFrame.new(0,-0.6,0),CFrame.new())
  371. local ShldrL2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.85,0.5,0.85})
  372. ShldrL2.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  373. _Weld(ShldrL2,Limb,CFrame.new(0,0.2,0),CFrame.new())
  374. local ShldrL3 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.75,0.2,0.75})
  375. ShldrL3.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  376. _Weld(ShldrL3,Limb,CFrame.new(0,0.85,0),CFrame.new())
  377. local ShldrL4 = _Part(Main,false,false,0,0,"SmoothPlastic","Really black",{1,1,1},"FileMesh",{0.5,0.05,0.5})
  378. ShldrL4.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  379. _Weld(ShldrL4,ShldrL3,CFrame.new(0,0.16,0),CFrame.new())
  380. --X Pat--
  381. local ShldrLD = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{1.1,0.03,1.35})
  382. ShldrLD.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  383. _Weld(ShldrLD,Limb,CFrame.new(0,0,0),CFrame.Angles(math.rad(45),0,0))
  384. local ShldrLD2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{1.1,0.03,1.35})
  385. ShldrLD2.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  386. _Weld(ShldrLD2,Limb,CFrame.new(0,0,0),CFrame.Angles(math.rad(-45),0,0))
  387. local ShldrLDB = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{1.35,0.03,1.1})
  388. ShldrLDB.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  389. _Weld(ShldrLDB,Limb,CFrame.new(0,0,0),CFrame.Angles(0,0,math.rad(45)))
  390. local ShldrLD2B = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{1.35,0.03,1.1})
  391. ShldrLD2B.Mesh.MeshId = "rbxasset://fonts\\rightarm.mesh"
  392. _Weld(ShldrLD2B,Limb,CFrame.new(0,0,0),CFrame.Angles(0,0,math.rad(-45)))
  393.  
  394. local Disc = _Part(Main,false,false,0,0,"SmoothPlastic",ColorGlobe,{1,1,1},"FileMesh",{0.55,0.55,0.55})
  395. Disc.Mesh.MeshId = "rbxassetid://47260990"
  396. _Weld(Disc, ShldrL, CFrame.new(0,0,Offset),CFrame.Angles(0,math.rad(90),0))
  397. --3270017
  398. local DiscC = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.55,0.55,0.1})
  399. DiscC.Mesh.MeshId = "rbxassetid://3270017"
  400. _Weld(DiscC, Disc, CFrame.new(),CFrame.new())
  401.  
  402. table.insert(Discs, Disc)
  403. end
  404.  
  405. local function Leg(bool)
  406. local Limb, Offset
  407. if bool then
  408. Limb = Character["Left Leg"]
  409. Offset = 0.5
  410. else
  411. Limb = Character["Right Leg"]
  412. Offset = -0.5
  413. end
  414. local LegL = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.95,0.35,0.95})
  415. LegL.Mesh.MeshId = "rbxasset://fonts\\leftleg.mesh"
  416. _Weld(LegL,Limb,CFrame.new(0,-0.7,0),CFrame.new())
  417. local LegL2 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.85,0.5,0.85})
  418. LegL2.Mesh.MeshId = "rbxasset://fonts\\leftleg.mesh"
  419. _Weld(LegL2,Limb,CFrame.new(0,0.15,0),CFrame.new())
  420. local LegL3 = _Part(Main,false,false,0,0,"SmoothPlastic",ColorBlades,{1,1,1},"FileMesh",{0.75,0.2,0.75})
  421. LegL3.Mesh.MeshId = "rbxasset://fonts\\leftleg.mesh"
  422. _Weld(LegL3,Limb,CFrame.new(0,0.85,0),CFrame.new())
  423. local LegL4 = _Part(Main,false,false,0,0,"SmoothPlastic","Really black",{1,1,1},"FileMesh",{0.5,0.05,0.5})
  424. LegL4.Mesh.MeshId = "rbxasset://fonts\\leftleg.mesh"
  425. _Weld(LegL4,LegL3,CFrame.new(0,0.16,0),CFrame.new())
  426. local LegL5 = _Part(Main,false,false,0,0,"SmoothPlastic","Medium stone grey",{1,1,1},"FileMesh",{0.9,0.2,0.9})
  427. LegL5.Mesh.MeshId = "rbxasset://fonts\\leftleg.mesh"
  428. _Weld(LegL5,LegL2,CFrame.new(0,0,0),CFrame.new())
  429.  
  430. local MiniRocket = _Part(Main,false,false,0,0,"SmoothPlastic","Medium stone grey",{1,1,1},"FileMesh",{0.2,0.2,0.2})
  431. MiniRocket.Mesh.MeshId = "rbxasset://fonts\\leftleg.mesh"
  432. _Weld(MiniRocket,LegL5,CFrame.new(Offset,0,0),CFrame.new())
  433. local MiniRocket2 = _Part(Main,false,false,0,0,"SmoothPlastic","Really black",{1,1,1},"BlockMesh",{0.125,0.1,0.125})
  434. _Weld(MiniRocket2,LegL5,CFrame.new(Offset,0.16,0),CFrame.new())
  435. end
  436.  
  437. Arm(true)
  438. Arm(false)
  439. Leg(true)
  440. Leg(false)
  441.  
  442. --Spin Disc 22768172
  443. --[[Done]]--
  444.  
  445. local Welds = {
  446. ArmW = {
  447. Left = Instance.new("Weld",Character);
  448. Right = Instance.new("Weld",Main);
  449. };
  450. LegW = {
  451. Left = Instance.new("Weld",Main);
  452. Right = Instance.new("Weld",Main);
  453. };
  454. HeadW = {
  455. Middle = Instance.new("Weld",Main);
  456. };
  457. }
  458. local RWelds = {
  459. ArmW = {
  460. Left = Torso["Left Shoulder"];
  461. Right = Torso["Right Shoulder"];
  462. };
  463. LegW = {
  464. Left = Torso["Left Hip"];
  465. Right = Torso["Right Hip"];
  466. };
  467. HeadW = {
  468. Middle = Torso["Neck"];
  469. };
  470. }
  471.  
  472. local LA,RA = Welds.ArmW.Left,Welds.ArmW.Right
  473. local LL,LR = Welds.LegW.Left,Welds.LegW.Right
  474. local HD = Welds.HeadW.Middle
  475. local LAD = CFrame.new(-1.5,0.5,0)
  476. local RAD = CFrame.new(1.5,0.5,0)
  477. local HDD = CFrame.new(0,-1.5,0)
  478. local LLD = CFrame.new(0.5,2,0)
  479. local RLD = CFrame.new(-0.5,2,0)
  480. local RootD = CFrame.Angles(-1.57,0,-3.15)
  481. Welds.ArmW.Left.C1,Welds.ArmW.Left.C0,Welds.ArmW.Left.Part0 = CFrame.new(0, 0.5, 0),CFrame.new(-1.5, 0.5, 0),Torso
  482. Welds.ArmW.Right.C1,Welds.ArmW.Right.C0,Welds.ArmW.Right.Part0 = CFrame.new(0, 0.5, 0),CFrame.new(1.5, 0.5, 0),Torso
  483. Welds.LegW.Left.C1,Welds.LegW.Left.Part0 = LLD,Torso
  484. Welds.LegW.Right.C1,Welds.LegW.Right.Part0 = RLD,Torso
  485. Welds.HeadW.Middle.C1,Welds.HeadW.Middle.Part0 = HDD,Torso
  486.  
  487. local CurrentLeftArm = LAD
  488. local CurrentRightArm = RAD
  489. local CurrentLeftLeg = LLD
  490. local CurrentRightLeg = RLD
  491.  
  492. local function lerp(a, b, c)
  493. return a+(b-a)*c
  494. end
  495.  
  496. local function AnimLerp(c1, c2, al)
  497. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  498. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  499. for i,v in pairs(com1) do
  500. com1[i] = lerp(v,com2[i],al)
  501. end
  502. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  503. end
  504.  
  505. local _Arm = function(side,tf)
  506. local Arm = nil
  507. local Weld = nil
  508. local RWeld = nil
  509. for _,S in pairs(Sides) do
  510. if side:lower() == S:lower() then
  511. for _,A in pairs(Arms) do
  512. if A.Name:lower():find(side:lower()) then
  513. Arm = A
  514. Weld = Welds.ArmW[S]
  515. RWeld = RWelds.ArmW[S]
  516. end
  517. end
  518. end
  519. end
  520. if Arm and Weld and RWeld then
  521. if tf then
  522. Weld.Part1 = Arm
  523. RWeld.Part1 = nil
  524. elseif not tf then
  525. Weld.Part1 = nil
  526. RWeld.Part1 = Arm
  527. else
  528. print("Error")
  529. end
  530. end
  531. end
  532.  
  533. local _Leg = function(side,tf)
  534. local Leg = nil
  535. local Weld = nil
  536. local RWeld = nil
  537. for _,S in pairs(Sides) do
  538. if side:lower() == S:lower() then
  539. for _,A in pairs(Legs) do
  540. if A.Name:lower():find(side:lower()) then
  541. Leg = A
  542. Weld = Welds.LegW[S]
  543. RWeld = RWelds.LegW[S]
  544. end
  545. end
  546. end
  547. end
  548. if Leg and Weld and RWeld then
  549. if tf then
  550. Weld.Part1 = Leg
  551. RWeld.Part1 = nil
  552. elseif not tf then
  553. Weld.Part1 = nil
  554. RWeld.Part1 = Leg
  555. else
  556. print("Error")
  557. end
  558. end
  559. end
  560.  
  561. local _Head = function(tf)
  562. local Head = nil
  563. local Weld = nil
  564. local RWeld = nil
  565. Head = Character["Head"]
  566. Weld = Welds.HeadW.Middle
  567. RWeld = RWelds.HeadW.Middle
  568. if Head and Weld and RWeld then
  569. if tf then
  570. Weld.Part1 = Head
  571. RWeld.Part1 = nil
  572. elseif not tf then
  573. Weld.Part1 = nil
  574. RWeld.Part1 = Head
  575. else
  576. print("Error")
  577. end
  578. end
  579. end
  580.  
  581. pcall(function()
  582. Character.Animate.Disabled = true
  583. end)
  584. if Humanoid then
  585. Humanoid.PlatformStand = true
  586. end
  587. pcall(function()
  588. Torso.Velocity = Variables.Momentum
  589. end)
  590.  
  591. local Rotate = Instance.new("BodyGyro",Torso)
  592. Rotate.P = 10^6
  593. Rotate.maxTorque = Vector3.new(Rotate.P,Rotate.P,Rotate.P)
  594. Rotate.cframe = Torso.CFrame
  595.  
  596. local Move = Instance.new("BodyPosition",Torso)
  597. Move.maxForce = Vector3.new(1,1,1)*(10^6)
  598. Move.position = Torso.CFrame.p
  599.  
  600. local function LaserBeam()
  601. UpdateAnim = false
  602. CurrentAnimation = "DisableHandAnim"
  603. rofTop = 6
  604. for i=0,1,0.1 do
  605. RA.C0 = AnimLerp(CurrentRightArm, RAD * CFrame.Angles(math.rad(75),0,math.rad(-20)), i)
  606. LA.C0 = AnimLerp(CurrentLeftArm, LAD * CFrame.Angles(math.rad(75),0,math.rad(20)), i)
  607. wait()
  608. end
  609.  
  610. ChargeBar.Visible = true;
  611.  
  612. local Charge = 0
  613. local Downt = _Part(Main,false,true,0,0,"Neon",ColorGlobe,{1,1,1},"Sphere",{1,1,1})
  614. local Effect = Instance.new("ParticleEmitter", Downt)
  615. Effect.Texture = "rbxassetid://283631720"
  616. Effect.VelocitySpread = 0
  617. Effect.Acceleration = Vector3.new(0,0,0)
  618. Effect.Color = ColorSequence.new(Downt.BrickColor.Color,Downt.BrickColor.Color)
  619. Effect.Speed = NumberRange.new(0)
  620. Effect.Lifetime = NumberRange.new(1,1)
  621. Effect.Rate = 60
  622. Effect.Transparency = NumberSequence.new(0.5,0.8)
  623. Effect.Rotation = NumberRange.new(1,2)
  624.  
  625. while BeamHeld do
  626. Charge = Charge + 1
  627. CurrentEnergy = CurrentEnergy - 1.5
  628. Downt.Mesh.Scale = Downt.Mesh.Scale + Vector3.new(0.02,0.02,0.02)
  629. Downt.CFrame = RootPart.CFrame + (RootPart.CFrame.lookVector * 4)
  630. Effect.Size = NumberSequence.new(Downt.Mesh.Scale.X)
  631. ChargeFill.Size = UDim2.new(Charge/100,-5,1,-5)
  632. wait()
  633. if Charge >= 100 or CurrentEnergy <= 0 then
  634. CurrentEnergy = CurrentEnergy <= 0 and 0 or CurrentEnergy
  635. break
  636. end
  637. end
  638.  
  639. Downt.Anchored = false
  640. Downt.Size = Downt.Mesh.Scale
  641. Downt.Mesh.Scale = Vector3.new(1,1,1)
  642.  
  643. local Velocity = Instance.new("BodyVelocity", Downt)
  644. Velocity.maxForce = Vector3.new(1e7,1e7,1e7)
  645. Velocity.P = 1e7
  646. Velocity.Velocity = (Mouse.Hit.p - Downt.CFrame.p)
  647. --[[
  648. --CurrentEnergy = CurrentEnergy <= 0 and 0 or CurrentEnergy - (1.5*Charge)
  649. local Face = Torso.CFrame.lookVector
  650. local Ray = Ray.new(Downt.CFrame.p, (Mouse.Hit.p - Downt.CFrame.p).unit*750)
  651. local Object,Pos = game:GetService("Workspace"):findPartOnRay(Ray, Character)
  652. local Distance = (Pos - Downt.CFrame.p).magnitude
  653. local DrawRay = _Part(Main,false,true,0,0,"Neon",ColorGlobe,{1,1,1},"Cylinder",{Distance,Downt.Mesh.Scale.X,Downt.Mesh.Scale.X})
  654. DrawRay.CFrame = CFrame.new(Pos, Downt.CFrame.p) * CFrame.new(0,0,-Distance/2) * CFrame.Angles(0,math.rad(270),0)
  655.  
  656. local ExplodePart = _Part(Main,false,true,0,0,"Neon",ColorGlobe,{1,1,1},"Sphere",{1,1,1})
  657. ExplodePart.CFrame = CFrame.new(Pos.X,Pos.Y,Pos.Z)
  658.  
  659. local Ignore = {}
  660.  
  661. ExplodePart.Touched:connect(function(Object)
  662. if Object.Parent and Object.Parent:IsA("Model") then
  663. local Model = Object.Parent
  664. if Model:findFirstChild("Humanoid") and not Ignore[Model.Name] and Model.Name ~= Character.Name then
  665. Ignore[Model.Name] = true;
  666. local Humanoid = Model:findFirstChild("Humanoid")
  667. Humanoid:TakeDamage(0.75*Charge)
  668. end
  669. end
  670. end)
  671.  
  672. for i=0,1,0.1 do
  673. wait()
  674. DrawRay.Transparency = i
  675. Downt.Transparency = i
  676. ExplodePart.Size = ExplodePart.Size + Vector3.new(0.04*Charge,0.04*Charge,0.04*Charge)
  677. ExplodePart.CFrame = CFrame.new(Pos.X,Pos.Y,Pos.Z)
  678. ExplodePart.Transparency = i
  679. end
  680. Effect:Destroy()
  681. game:GetService("Debris"):AddItem(DrawRay, 1)
  682. game:GetService("Debris"):AddItem(ExplodePart, 1)]]
  683. game:GetService("Debris"):AddItem(Downt, 10)
  684. UpdateAnim = true
  685. ChargeBar.Visible = false
  686. LastBeam = tick()
  687. end
  688.  
  689. local function AbsoluteDefence()
  690. UpdateAnim = false
  691.  
  692. while AbsDefHeld do
  693.  
  694. wait()
  695. end
  696.  
  697.  
  698. UpdateAnim = true
  699. end
  700.  
  701. local function ThrowBlades()
  702. --[[local Thrown = {}
  703. for i,Bit in pairs(Bits) do
  704. if Bit.Type == "Top" then
  705. table.insert(Thrown, {Side = Bit.Side; Weld = Bit.Weld; Series = Bit.Series; Type = Bit.Type})
  706. table.remove(Bits, i)
  707. end
  708. end
  709. ]]-- *Construction*
  710. end
  711.  
  712. Mouse.KeyDown:connect(function(Key)
  713. if Key == "w" then
  714. Front = true
  715. end
  716. if Key == "a" then
  717. Left = true
  718. end
  719. if Key == "s" then
  720. Back = true
  721. end
  722. if Key == "q" then
  723. BoostHeld = not BoostHeld
  724. if BoostHeld then
  725. Accel = 3
  726. else
  727. Accel = 1
  728. end
  729. end
  730. if Key == "d" then
  731. Right = true
  732. end
  733. if Key:byte() == 50 then
  734. if MobilityType == "Float" then
  735. MobilityType = "Fly"
  736. elseif MobilityType == "Fly" then
  737. MobilityType = "Ground"
  738. elseif MobilityType == "Ground" then
  739. MobilityType = "Float"
  740. end
  741. end
  742. if Key == "h" then
  743. if CurrentEnergy <= 0 then
  744. return
  745. end
  746. AbsDefHeld = true
  747. AbsoluteDefence()
  748. end
  749. if Key == "f" then
  750. if CurrentEnergy <= 0 or tick()-LastBeam <= 1 then
  751. return
  752. end
  753. BeamHeld = true
  754. LaserBeam()
  755. end
  756. if Key == "q" then
  757. ThrowBlades()
  758. end
  759. while BoostHeld do
  760. wait()
  761. CurrentEnergy = CurrentEnergy <= 0 and 0 or CurrentEnergy - 0.5
  762. if CurrentEnergy <= 0 then
  763. break
  764. end
  765. end
  766. if Key == "g" then
  767. ChargeHeld = true
  768. UpdateAnim = false
  769. CurrentAnimation = "DisableHandAnim"
  770. rofTop = 15
  771. for i=0,1,0.1 do
  772. wait()
  773. AnchorPart.Weld.C1 = AnimLerp(AnchorPart.Weld.C1, CFrame.new(0,3,0), i)
  774. AnchorPart2.Weld.C1 = AnimLerp(AnchorPart2.Weld.C1, CFrame.new(0,3,0), i)
  775. RA.C0 = AnimLerp(RA.C0, RAD * CFrame.Angles(math.rad(160),0,math.rad(10)), i)
  776. LA.C0 = AnimLerp(LA.C0, LAD * CFrame.Angles(math.rad(160),0,math.rad(-10)), i)
  777. end
  778.  
  779. while ChargeHeld do
  780. wait()
  781. local NRG = _Part(Main,false,true,0,0,"SmoothPlastic",ColorGlobe,{0.2,0.2,0.2},"Sphere",{1,1,1})
  782. NRG.CFrame = AnchorPart.CFrame * CFrame.new(math.random(-2.5,2.5),math.random(-2.5,2.5),math.random(-2.5,2.5))
  783. local NRGB = _Part(Main,false,true,0,0,"SmoothPlastic",ColorGlobe,{0.2,0.2,0.2},"Sphere",{1,1,1})
  784. NRGB.CFrame = AnchorPart2.CFrame * CFrame.new(math.random(-2.5,2.5),math.random(-2.5,2.5),math.random(-2.5,2.5))
  785. table.insert(Energy, NRG)
  786. table.insert(Energy, NRGB)
  787. for i,nrg in pairs(Energy) do
  788. nrg.Transparency = nrg.Transparency + 0.05
  789. nrg.Mesh.Scale = nrg.Mesh.Scale + Vector3.new(0.1,0.1,0.1)
  790. nrg.CFrame = CFrame.new(nrg.CFrame.p, AnchorPart.CFrame.p) * CFrame.Angles(0,0,-math.pi/2)
  791. if nrg.Transparency >= 1 then
  792. table.remove(Energy, i)
  793. nrg:Destroy()
  794. end
  795. end
  796. CurrentEnergy = CurrentEnergy >= TotalEnergy and TotalEnergy or CurrentEnergy + 10
  797. end
  798.  
  799. for i=0,1,0.1 do
  800. wait()
  801. AnchorPart.Weld.C1 = AnimLerp(AnchorPart.Weld.C1, CFrame.new(0,1.5,0), i)
  802. AnchorPart2.Weld.C1 = AnimLerp(AnchorPart2.Weld.C1, CFrame.new(0,1.5,0), i)
  803. for x,nrg in pairs(Energy) do
  804. nrg.Transparency = nrg.Transparency + 0.15
  805. nrg.Mesh.Scale = nrg.Mesh.Scale + Vector3.new(0.2,0.2,0.2)
  806. nrg.CFrame = CFrame.new(nrg.CFrame.p, AnchorPart.CFrame.p) * CFrame.Angles(0,0,-math.pi/2)
  807. if nrg.Transparency >= 1 then
  808. table.remove(Energy, x)
  809. nrg:Destroy()
  810. end
  811. end
  812. end
  813. UpdateAnim = true
  814. end
  815. end)
  816.  
  817. Mouse.KeyUp:connect(function(Key)
  818. if Key == "w" then
  819. Front = false
  820. end
  821. if Key == "a" then
  822. Left = false
  823. end
  824. if Key == "s" then
  825. Back = false
  826. end
  827. if Key == "d" then
  828. Right = false
  829. end
  830. if Key == "f" then
  831. BeamHeld = false
  832. end
  833. if Key == "h" then
  834. AbsDefHeld = false
  835. end
  836. if Key == "g" then
  837. ChargeHeld = false
  838. end
  839. if Key == "0" then
  840. BoostHeld = false
  841. end
  842. end)
  843.  
  844. _Arm("Left", true)
  845. _Arm("Right", true)
  846. _Leg("Left", true)
  847. _Leg("Right", true)
  848. _Head(true)
  849.  
  850. game:GetService("RunService").Stepped:connect(function()
  851. EnergyFill.Size = UDim2.new(CurrentEnergy/TotalEnergy,-5,1,-5)
  852. RateTop = RateTop + rofTop
  853. if RateTop >= 360 then
  854. RateTop = 1
  855. end
  856.  
  857. RateBot = RateBot + rofBot
  858. if RateBot >= 360 then
  859. RateBot = 1
  860. end
  861.  
  862.  
  863. if AddSub == false then
  864. CurrentFrame = CurrentFrame + 0.01
  865. if CurrentFrame >= 1 then
  866. AddSub = true
  867. end
  868. elseif AddSub == true then
  869. CurrentFrame = CurrentFrame - 0.01
  870. if CurrentFrame <= 0 then
  871. AddSub = false
  872. end
  873. end
  874.  
  875. DiscSpin = DiscSpin + 0.1
  876. for _,Disc in pairs(Discs) do
  877. Disc.Weld.C0 = CFrame.Angles(0,math.rad(90),DiscSpin)
  878. end
  879.  
  880. if ExtendGrowthTop == false and CurrentAnimation == "Idle" then
  881. ExtendTop = ExtendTop + 1/2
  882. if ExtendTop >= 25 then
  883. ExtendGrowthTop = true
  884. end
  885. elseif ExtendGrowthTop == true and CurrentAnimation == "Idle" then
  886. ExtendTop = ExtendTop - 1/2
  887. if ExtendTop <= -10 then
  888. ExtendGrowthTop = false
  889. end
  890. elseif CurrentAnimation == "Forward" or CurrentAnimation == "Backward" or CurrentAnimation == "SwivelRight" or CurrentAnimation == "SwivelLeft" then
  891. ExtendTop = ExtendTop >= 40 and 40 or ExtendTop + 2
  892. elseif CurrentAnimation == "DisableHandAnim" then
  893. ExtendTop = ExtendTop >= 50 and 50 or ExtendTop + 2
  894. end
  895.  
  896. if ExtendGrowthBot == false and (CurrentAnimation == "Idle" or CurrentAnimation == "DisableHandAnim") then
  897. ExtendBot = ExtendBot + 1/2
  898. if ExtendBot >= 25 then
  899. ExtendGrowthBot = true
  900. end
  901. elseif ExtendGrowthBot == true and (CurrentAnimation == "Idle" or CurrentAnimation == "DisableHandAnim") then
  902. ExtendBot = ExtendBot - 1/2
  903. if ExtendBot <= -10 then
  904. ExtendGrowthBot = false
  905. end
  906. elseif CurrentAnimation == "Forward" or CurrentAnimation == "Backward" or CurrentAnimation == "SwivelRight" or CurrentAnimation == "SwivelLeft" then
  907. ExtendBot = ExtendBot >= 40 and 40 or ExtendBot + 2
  908. end
  909.  
  910. if Front and not Back then
  911. xmove = 3
  912. if UpdateAnim then
  913. CurrentAnimation = "Forward"
  914. end
  915. elseif Back and not Front then
  916. xmove = -3
  917. if UpdateAnim then
  918. CurrentAnimation = "Backward"
  919. end
  920. else
  921. xmove = 0
  922. if UpdateAnim then
  923. CurrentAnimation = "Idle"
  924. end
  925. end
  926.  
  927. if Left and not Right then
  928. if xmove == 0 and UpdateAnim then
  929. CurrentAnimation = "SwivelLeft"
  930. end
  931. ymove = 3
  932. elseif Right and not Left then
  933. if xmove == 0 and UpdateAnim then
  934. CurrentAnimation = "SwivelRight"
  935. end
  936. ymove = -3
  937. else
  938. ymove = 0
  939. if xmove == 0 and UpdateAnim then
  940. CurrentAnimation = "Idle"
  941. end
  942. end
  943.  
  944. if LastAnimation ~= CurrentAnimation then
  945. CurrentFrame = 0
  946. AddSub = false
  947. end
  948.  
  949. for _,Info in pairs(Bits) do
  950. local Side = Info.Side
  951. local Series = Info.Series
  952. local Weld = Info.Weld
  953. local Type = Info.Type
  954. local Extend = 1
  955. local MyRate = 1
  956.  
  957. if Type == "Top" then
  958. Extend = ExtendTop
  959. MyRate = RateTop + 30
  960. elseif Type == "Bot" then
  961. Extend = ExtendBot
  962. MyRate = RateBot
  963. else
  964.  
  965. end
  966.  
  967. if CurrentAnimation == "Idle" or CurrentAnimation == "DisableHandAnim" then
  968. if Type == "Wing" or Type == "WingLow" then
  969. if Type == "WingLow" then
  970. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(Side == true and -0.5 or 0.5,1.65,0.5) * CFrame.Angles(math.rad(65 + Lift*3),math.rad((Side == true and 30 + Lift*2 or -30 - Lift*2)),0), CurrentFrame)
  971. else
  972. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(0,1.8,0.5) * CFrame.Angles(math.rad(65 + Lift*3),math.rad((Side == true and 30 + Lift*2 or -30 - Lift*2)),0), CurrentFrame)
  973. end
  974. else
  975. Weld.C1 = CFrame.new(0,0,Spread) * CFrame.Angles(math.rad(-Extend),math.rad(60*Series + (Side == true and -MyRate or MyRate)),0) * CFrame.new(0,Distance,0)
  976. end
  977. elseif CurrentAnimation == "Forward" or CurrentAnimation == "Backward" then
  978. if Type == "Wing" or Type == "WingLow" then
  979. if Type == "WingLow" then
  980. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(Side == true and -0.5 or 0.5,1.65,0.5) * CFrame.Angles(math.rad(65 + Lift*10),math.rad((Side == true and 30 + Lift*2 or -30 - Lift*2)),0), CurrentFrame)
  981. else
  982. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(0,1.8,0.5) * CFrame.Angles(math.rad(65 + Lift*10),math.rad((Side == true and 30 + Lift*2 or -30 - Lift*2)),0), CurrentFrame)
  983. end
  984. else
  985. Weld.C1 = CFrame.new(0,0,Spread) * CFrame.Angles(math.rad(-Extend),math.rad(60*Series + (Side == true and -MyRate or MyRate)),0) * CFrame.new(0,Distance,0)
  986. end
  987. elseif CurrentAnimation == "SwivelLeft" then
  988. if Type == "Wing" or Type == "WingLow" then
  989. if Type == "WingLow" then
  990. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(Side == true and -0.5 or 0.5,1.65,0.5) * CFrame.Angles(math.rad(65 + Lift*3),math.rad((Side == true and 50 or -10)),0), CurrentFrame)
  991. else
  992. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(0,1.8,0.5) * CFrame.Angles(math.rad(65 + Lift*3),math.rad((Side == true and 50 or -10)),0), CurrentFrame)
  993. end
  994. else
  995. Weld.C1 = CFrame.new(0,0,Spread) * CFrame.Angles(math.rad(-Extend),math.rad(60*Series + (Side == true and -MyRate or MyRate)),0) * CFrame.new(0,Distance,0)
  996. end
  997. elseif CurrentAnimation == "SwivelRight" then
  998. if Type == "Wing" or Type == "WingLow" then
  999. if Type == "WingLow" then
  1000. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(Side == true and -0.5 or 0.5,1.65,0.5) * CFrame.Angles(math.rad(65 + Lift*3),math.rad((Side == true and 10 or -50)),0), CurrentFrame)
  1001. else
  1002. Weld.C1 = AnimLerp(Weld.C1, CFrame.new(0,1.8,0.5) * CFrame.Angles(math.rad(65 + Lift*3),math.rad((Side == true and 10 or -50)),0), CurrentFrame)
  1003. end
  1004. else
  1005. Weld.C1 = CFrame.new(0,0,Spread) * CFrame.Angles(math.rad(-Extend),math.rad(60*Series + (Side == true and -MyRate or MyRate)),0) * CFrame.new(0,Distance,0)
  1006. end
  1007. else
  1008. Weld.C1 = CFrame.new(0,0,Spread) * CFrame.Angles(math.rad(-Extend),math.rad(60*Series + (Side == true and -MyRate or MyRate)),0) * CFrame.new(0,Distance,0)
  1009. end
  1010. end
  1011.  
  1012. TurnAngle = TurnAngle + ymove
  1013.  
  1014. Rotate.cframe = CFrame.new()*CFrame.Angles(0,math.rad(TurnAngle),0)
  1015.  
  1016. local Ray = Ray.new(Torso.CFrame.p,Down.CFrame.lookVector*15)
  1017. local Part,Pos = game:GetService("Workspace"):findPartOnRay(Ray,Character)
  1018. local Distance = (Pos - Torso.CFrame.p).magnitude
  1019. local Face = Torso.CFrame.lookVector
  1020.  
  1021. if Part and Pos then
  1022. local sides = Enum.NormalId:GetEnumItems();
  1023. local default = Vector3.new(0,1,0)
  1024. for i,v in pairs(sides) do
  1025. sides[i] = Vector3.FromNormalId(v)
  1026. end
  1027. if Part:IsA("Part") then
  1028. if Part.Shape.Name == "Ball" then
  1029. sides = {}
  1030. default = Part.CFrame:vectorToObjectSpace(Pos-Part.Position).unit
  1031. elseif Part.Shape.Name == "Cylinder" then
  1032. sides = {Vector3.new(1,0,0),Vector3.new(-1,0,0)}
  1033. default = (Part.CFrame:vectorToObjectSpace(Pos-Part.Position)*Vector3.new(0,1,1)).unit
  1034. end
  1035. elseif Part:IsA("WedgePart") then
  1036. sides = {Vector3.new(1,0,0),Vector3.new(-1,0,0),Vector3.new(0,-1,0),Vector3.new(0,0,-1)}
  1037. default = Vector3.new(0,1,-Part.Size.Y/Part.Size.Z).unit
  1038. end
  1039. local obs,siz,sidevector = Part.CFrame:pointToObjectSpace(Pos),Part.Size/2
  1040. for i,v in pairs(sides) do
  1041. if (obs*v/(siz*v+Vector3.new(1,1,1)*1e-7)):isClose(v,.01) then
  1042. sidevector = v
  1043. break
  1044. end
  1045. end
  1046. if not sidevector then sidevector = default end
  1047. if sidevector then
  1048. local cf = CFrame.new(Pos,Pos+Part.CFrame:vectorToWorldSpace(sidevector)) * CFrame.Angles(-math.pi/2,0,0)
  1049. Move.position = Vector3.new(cf.X,cf.Y + 6 + Lift,cf.Z) + Vector3.new(Face.X,0,Face.Z)*Accel*xmove
  1050. Move.maxForce = Vector3.new(1e7,1e7,1e7)
  1051. end
  1052. else
  1053. Move.maxForce = Vector3.new(1e7,0,1e7)
  1054. Move.position = Vector3.new(Torso.CFrame.X,Torso.CFrame.Y,Torso.CFrame.Z) + Vector3.new(Face.X,0,Face.Z)*Accel*xmove
  1055. end
  1056.  
  1057. CurrentLeftArm = LA.C0
  1058. CurrentRightArm = RA.C0
  1059. CurrentRightLeg = LR.C1
  1060. CurrentLeftLeg = LL.C1
  1061.  
  1062. if math.floor(Lift+0.5) == 3 then
  1063. --FlapSound:Play()
  1064. end
  1065.  
  1066. if CurrentAnimation == "Idle" then
  1067. rofTop = 1
  1068. rofBot = 1
  1069. RA.C0 = AnimLerp(CurrentRightArm, RAD * CFrame.Angles(math.rad(0),0,math.rad(25 + Lift*2)), CurrentFrame)
  1070. LA.C0 = AnimLerp(CurrentLeftArm, LAD * CFrame.Angles(math.rad(0),0,math.rad(-25 - Lift*2)), CurrentFrame)
  1071. LR.C1 = AnimLerp(CurrentRightLeg, RLD * CFrame.Angles(0,0,math.rad(-7.5 + Lift)), CurrentFrame)
  1072. LL.C1 = AnimLerp(CurrentLeftLeg, LLD * CFrame.Angles(0,0,math.rad(7.5 - Lift)), CurrentFrame)
  1073. elseif CurrentAnimation == "Forward" then
  1074. rofTop = 6
  1075. rofBot = 6
  1076. RA.C0 = AnimLerp(CurrentRightArm, RAD * CFrame.Angles(math.rad(-15),0,math.rad(30)), CurrentFrame)
  1077. LA.C0 = AnimLerp(CurrentLeftArm, LAD * CFrame.Angles(math.rad(-15),0,math.rad(-30)), CurrentFrame)
  1078. LR.C1 = AnimLerp(CurrentRightLeg, RLD * CFrame.Angles(math.rad(15),0,math.rad(-7.5)), CurrentFrame)
  1079. LL.C1 = AnimLerp(CurrentLeftLeg, LLD * CFrame.Angles(math.rad(15),0,math.rad(7.5)), CurrentFrame)
  1080. elseif CurrentAnimation == "Backward" then
  1081. rotTop = -6
  1082. rofBot = -6
  1083. RA.C0 = AnimLerp(CurrentRightArm, RAD * CFrame.Angles(math.rad(15),0,math.rad(20)), CurrentFrame)
  1084. LA.C0 = AnimLerp(CurrentLeftArm, LAD * CFrame.Angles(math.rad(15),0,math.rad(-20)), CurrentFrame)
  1085. LR.C1 = AnimLerp(CurrentRightLeg, RLD * CFrame.Angles(math.rad(-15),0,math.rad(-7.5)), CurrentFrame)
  1086. LL.C1 = AnimLerp(CurrentLeftLeg, LLD * CFrame.Angles(math.rad(-15),0,math.rad(7.5)), CurrentFrame)
  1087. elseif CurrentAnimation == "SwivelLeft" then
  1088. rofTop = 3
  1089. rofBot = 3
  1090. RA.C0 = AnimLerp(CurrentRightArm, RAD * CFrame.Angles(math.rad(15),0,math.rad(25)), CurrentFrame)
  1091. LA.C0 = AnimLerp(CurrentLeftArm, LAD * CFrame.Angles(math.rad(-15),0,math.rad(-25)), CurrentFrame)
  1092. LR.C1 = AnimLerp(CurrentRightLeg, RLD * CFrame.Angles(math.rad(-10),0,math.rad(-7.5)), CurrentFrame)
  1093. LL.C1 = AnimLerp(CurrentLeftLeg, LLD * CFrame.Angles(math.rad(10),0,math.rad(7.5)), CurrentFrame)
  1094. elseif CurrentAnimation == "SwivelRight" then
  1095. rofTop = -3
  1096. rofBot = -3
  1097. RA.C0 = AnimLerp(CurrentRightArm, RAD * CFrame.Angles(math.rad(-15),0,math.rad(25)), CurrentFrame)
  1098. LA.C0 = AnimLerp(CurrentLeftArm, LAD * CFrame.Angles(math.rad(15),0,math.rad(-25)), CurrentFrame)
  1099. LR.C1 = AnimLerp(CurrentRightLeg, RLD * CFrame.Angles(math.rad(10),0,math.rad(-7.5)), CurrentFrame)
  1100. LL.C1 = AnimLerp(CurrentLeftLeg, LLD * CFrame.Angles(math.rad(-10),0,math.rad(7.5)), CurrentFrame)
  1101. elseif CurrentAnimation == "DisableHandAnim" then
  1102. rofBot = 1
  1103. LR.C1 = AnimLerp(CurrentRightLeg, RLD * CFrame.Angles(0,0,math.rad(-7.5)), CurrentFrame)
  1104. LL.C1 = AnimLerp(CurrentLeftLeg, LLD * CFrame.Angles(0,0,math.rad(7.5)), CurrentFrame)
  1105. end
  1106.  
  1107. LastAnimation = CurrentAnimation
  1108. end)
  1109.  
  1110. while true do
  1111. for i = 0,10,0.1 do
  1112. Lift = Lift + (math.sin(math.pi*2/10*i)*0.1)
  1113. wait(0.02)
  1114. end
  1115. end
Add Comment
Please, Sign In to add comment