Advertisement
Insanity_Mark

weqewqeqw

Dec 5th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.12 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. script.Parent = Player.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --[[ World eater Script ]]--
  20. --[[ Declarations ]]--
  21. wait(.0000000000000000000001)
  22. local Player = game:GetService("Players").LocalPlayer
  23. local Character = Player.Character
  24. local Head = Character.Head
  25. local Torso = Character.Torso
  26. local Right_Arm = Character["Right Arm"]
  27. local Right_Leg = Character["Right Leg"]
  28. local Left_Arm = Character["Left Arm"]
  29. local Left_Leg = Character["Left Leg"]
  30. local Humanoid = Character.Humanoid
  31. local Animation = "Idle"
  32. local Mouse = Player:GetMouse()
  33. local LeftShoulder = Torso["Left Shoulder"]
  34. local Left_Hip = Torso["Left Hip"]
  35. local RightShoulder = Torso["Right Shoulder"]
  36. local Right_Hip = Torso["Right Hip"]
  37. local Root = Character.HumanoidRootPart
  38. local RootJoint = Root.RootJoint
  39. local Attacking = false
  40. local CanAttack = true
  41. local Anim = "Idle"
  42. local Combo = 1
  43. local Blocking = false
  44. local MaxDestruction = 1000
  45. local Destruction = 0
  46. local MaxBlock = 100
  47. local Effects = {}
  48. local Color = "Bright yellow"
  49. local Invert = false
  50. local Idle = 0
  51. local Equipped = false
  52. local Running = false
  53. local Unseathed = false
  54. local Shard = "None"
  55.  
  56. Humanoid.MaxHealth = 3000
  57. Humanoid.Health = 3000
  58.  
  59. local WorldEaterTheme = Instance.new("Sound",Character)
  60. WorldEaterTheme.Name = "WorldEaterTheme"
  61. WorldEaterTheme.Looped = true
  62. WorldEaterTheme.SoundId = "http://www.roblox.com/asset?id=149981769"
  63. WorldEaterTheme:Play()
  64.  
  65. Left_Shoulder = Instance.new("Weld", Torso)
  66. Left_Shoulder.Part0 = Torso
  67. Left_Shoulder.Part1 = Left_Arm
  68. Left_Shoulder.Name = "Left Shoulder"
  69. Left_Shoulder.C0 = CFrame.new(-1.5,0,0)
  70.  
  71. Right_Shoulder = Instance.new("Weld", Torso)
  72. Right_Shoulder.Part0 = Torso
  73. Right_Shoulder.Part1 = Right_Arm
  74. Right_Shoulder.Name = "Right Shoulder"
  75. Right_Shoulder.C0 = CFrame.new(1.5,0,0)
  76.  
  77. LeftShoulder.Parent = nil
  78. RightShoulder.Parent = nil
  79. Humanoid.WalkSpeed = 10
  80.  
  81. local RootCFrame = CFrame.fromEulerAnglesXYZ(-1.57,0,3.14)
  82. Necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  83. Necko2 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  84. Right_Hip_C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  85. Left_Hip_C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  86.  
  87.  
  88. Movemment = 1
  89. Walk = 0
  90.  
  91. Animator = Humanoid.Animator
  92. --Animate = Character.Animate
  93.  
  94. Animator.Parent = nil
  95. --Animate.Parent = nil
  96.  
  97. local Services = {
  98.  
  99. SoundService = game:GetService("SoundService");
  100. Players = game:GetService("Players");
  101. Debris = game:GetService("Debris");
  102. Workspace = game:GetService("Workspace");
  103. Lighting = game:GetService("Lighting");
  104. HttpService = game:GetService("HttpService");
  105. InsertService = game:GetService("InsertService");
  106.  
  107. }
  108.  
  109. local ManaBarGUI = Instance.new("ScreenGui", Player.PlayerGui)
  110. ManaBarGUI.Name = "ManaBarGUI"
  111.  
  112. local ManaBarP1 = Instance.new("Frame", ManaBarGUI)
  113. ManaBarP1.Name = "ManaBarPart1"
  114. ManaBarP1.Size = UDim2.new(0,300,0,20)
  115. ManaBarP1.Position = UDim2.new(0,350,0.1,0)
  116. ManaBarP1.BackgroundColor3 = BrickColor.Black().Color
  117.  
  118. local ManaBarP2 = Instance.new("Frame", ManaBarP1)
  119. ManaBarP2.Name = "ManaBarPart2"
  120. ManaBarP2.Size = UDim2.new(0,300,0,20)
  121. ManaBarP2.Position = UDim2.new(0,0,0,0)
  122. ManaBarP2.BackgroundColor3 = BrickColor.new("Black").Color
  123.  
  124. local ManaBarText = Instance.new("TextLabel", ManaBarP1)
  125. ManaBarText.Name = "ManaBarText"
  126. ManaBarText.Size = UDim2.new(0,300,0,20)
  127. ManaBarText.Position = UDim2.new(0,0,-1.5,0)
  128. ManaBarText.TextScaled = true
  129. ManaBarText.Text = "<{[ Destruction ]}> 0 <{[ Destruction ]}>"
  130. ManaBarText.BackgroundTransparency = 1
  131. ManaBarText.TextStrokeTransparency = 0
  132. ManaBarText.TextStrokeColor3 = Color3.new(1,1,1)
  133. ManaBarText.TextColor3 = Color3.new(0,0,0)
  134. ManaBarText.Font = "Garamond"
  135.  
  136. local WorldEaterGui = Instance.new("BillboardGui", Head)
  137. WorldEaterGui.ExtentsOffset = Vector3.new(0,5,0)
  138. WorldEaterGui.Adornee = Head
  139. WorldEaterGui.AlwaysOnTop = true
  140. WorldEaterGui.Enabled = true
  141. WorldEaterGui.Size = UDim2.new(0, 200,0, 50)
  142.  
  143. local WorldEaterText = Instance.new("TextLabel", WorldEaterGui)
  144. WorldEaterText.BackgroundTransparency = 1
  145. WorldEaterText.Font = "Garamond"
  146. WorldEaterText.Size = UDim2.new(0, 200,0, 50)
  147. WorldEaterText.TextStrokeColor3 = BrickColor.Red().Color
  148. WorldEaterText.TextStrokeTransparency = 0
  149. WorldEaterText.TextColor3 = BrickColor.Black().Color
  150. WorldEaterText.TextScaled = true
  151. WorldEaterText.Text = "World Eater"
  152.  
  153. --------[[ Mesh Ids ]]--------
  154.  
  155. SpikeMeshId = 1033714
  156. SpikeBallId = 9982590
  157. StarMeshId = 45428961
  158. CrystalMeshId = 9756362
  159.  
  160. --[[ Essential Functions ]]--
  161. function NoOutlines(Part)
  162. Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
  163. end
  164.  
  165.  
  166. local CreatePart = function(Parent, Name, Color, Size, Material, Transparency, Shape)
  167.  
  168. local Part = Instance.new("Part", Parent)
  169. Part.Name = Name
  170. Part.BrickColor = BrickColor.new(Color)
  171. Part.Size = Size
  172. Part.Material = Material
  173. Part.Transparency = Transparency
  174. Part.Shape = Shape
  175. Part.CanCollide = false
  176. NoOutlines(Part)
  177.  
  178. return Part
  179.  
  180. end
  181.  
  182. local CreateMesh = function(Parent, Scale, Shape)
  183.  
  184.  
  185. local Mesh = Instance.new("BlockMesh", Parent)
  186. Mesh.Scale = Scale
  187.  
  188. return Mesh
  189.  
  190. end
  191.  
  192. local CreateWedge = function(Parent, Name, Color, Size, Material, Transparency)
  193.  
  194. local WedgePart = Instance.new("WedgePart", Parent)
  195. WedgePart.Name = Name
  196. WedgePart.BrickColor = BrickColor.new(Color)
  197. WedgePart.Size = Size
  198. WedgePart.Material = Material
  199. WedgePart.Transparency = Transparency
  200. WedgePart.CanCollide = false
  201. NoOutlines(WedgePart)
  202.  
  203. return WedgePart
  204.  
  205. end
  206.  
  207. local CreateWeld = function(Parent, Cframe, P1 , P0)
  208.  
  209. local Weld = Instance.new("Weld", Parent)
  210. Weld.Part0 = P0
  211. Weld.Part1 = P1
  212. Weld.Name = P0.Name .. "To" .. P1.Name
  213. Weld.C0 = Cframe
  214.  
  215. return Weld
  216.  
  217. end
  218.  
  219. local CreateVelocity = function(Parent,Velocity,Force)
  220.  
  221. local BodyVelocity = Instance.new("BodyVelocity", Parent)
  222. BodyVelocity.Velocity = Velocity
  223. BodyVelocity.MaxForce = Force
  224.  
  225.  
  226.  
  227. return BodyVelocity
  228.  
  229. end
  230.  
  231.  
  232. local CreateCrystal = function(Parent, Name, Color, Size, Material, Transparency, Scale)
  233.  
  234.  
  235. local Part = Instance.new("Part", Parent)
  236. Part.Name = Name
  237. Part.BrickColor = BrickColor.new(Color)
  238. Part.Size = Size
  239. Part.Material = Material
  240. Part.Transparency = Transparency
  241. Part.CanCollide = false
  242. NoOutlines(Part)
  243.  
  244. local Mesh = Instance.new("SpecialMesh", Part)
  245. Mesh.MeshId = "http://www.roblox.com/asset?id=" .. CrystalMeshId
  246. Mesh.Scale = Scale
  247.  
  248. return Mesh and Part
  249.  
  250. end
  251.  
  252. local MakeSFX = function(Parent, Id, Volume, Pitch, Type)
  253.  
  254. local SFX = Instance.new("Sound", Parent)
  255. SFX.SoundId = "http://www.roblox.com/asset?id=" .. Id
  256. SFX.Name = "SFX"
  257. SFX:Play()
  258. SFX.Volume = Volume
  259. SFX.Pitch = Pitch
  260. SFX.PlayOnRemove = true
  261. SFX:Remove()
  262.  
  263. if Type == "Echo" then
  264.  
  265. Instance.new("EchoSoundEffect", SFX)
  266.  
  267. end
  268.  
  269. end
  270.  
  271. local CreateSpike = function(Parent, Name, Color, Size, Material, Transparency, Scale)
  272.  
  273.  
  274. local Part = Instance.new("Part", Parent)
  275. Part.Name = Name
  276. Part.BrickColor = BrickColor.new(Color)
  277. Part.Size = Size
  278. Part.Material = Material
  279. Part.Transparency = Transparency
  280. Part.CanCollide = false
  281. NoOutlines(Part)
  282.  
  283. local Mesh = Instance.new("SpecialMesh", Part)
  284. Mesh.MeshId = "http://www.roblox.com/asset?id=" .. SpikeMeshId
  285. Mesh.Scale = Scale
  286.  
  287. return Mesh and Part
  288.  
  289. end
  290.  
  291. CircleEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency)
  292.  
  293. local Part = Instance.new("Part", Parent)
  294. Part.Transparency = Transparency
  295. Part.Name = "CircleEffect"
  296. Part.Size = Vector3.new()
  297. Part.Anchored = true
  298. Part.CanCollide = false
  299. Part.Position = Position
  300. Part.BrickColor = BrickColor.new(Brickcolor)
  301. Part.Material = Material
  302. NoOutlines(Part)
  303.  
  304. local Mesh = Instance.new("SpecialMesh", Part)
  305. Mesh.MeshType = "Sphere"
  306. Mesh.Scale = Vector3.new(DSX, DSY, DSZ)
  307.  
  308. Services.Debris:AddItem(Part, Time)
  309.  
  310.  
  311. table.insert(Effects, {Part, "Circle", Time, SX, SY, SZ})
  312.  
  313.  
  314. end
  315.  
  316. BlockEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency)
  317.  
  318. local Part = Instance.new("Part", Parent)
  319. Part.Transparency = Transparency
  320. Part.Name = "BlockEffect"
  321. Part.Size = Vector3.new()
  322. Part.Anchored = true
  323. Part.Position = Position
  324. Part.CanCollide = false
  325. Part.BrickColor = BrickColor.new(Brickcolor)
  326. Part.Material = Material
  327. NoOutlines(Part)
  328.  
  329. local Mesh = Instance.new("BlockMesh", Part)
  330. Mesh.Scale = Vector3.new(DSX, DSY, DSZ)
  331.  
  332. Services.Debris:AddItem(Part, Time)
  333.  
  334. table.insert(Effects, {Part, "Block", Time, SX, SY, SZ})
  335.  
  336.  
  337. end
  338.  
  339. --[[ Damage function ]]--
  340.  
  341.  
  342. function DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max)
  343.  
  344. local HitHumanoid = Hit.Parent.Humanoid
  345.  
  346.  
  347. local Damage = math.random(Min, Max)
  348.  
  349.  
  350. coroutine.resume(coroutine.create(function()
  351. HitHumanoid:TakeDamage(Damage)
  352. end))
  353.  
  354. if Type == "Shrink" then
  355. MakeSFX(Hit.Parent.Torso, 209527235, 1, 1)
  356. for i,v in pairs(Hit.Parent:children()) do
  357. if v:IsA("Part") then
  358. coroutine.resume(coroutine.create(function()
  359. for i = 1,100 do
  360. wait()
  361. v.Size = v.Size - Vector3.new(0.05,0.05,0.05)
  362. v.Transparency = v.Transparency + 0.05
  363.  
  364. end
  365. end))
  366. end
  367. end
  368.  
  369. end
  370.  
  371.  
  372.  
  373. if Type == "Normal" then
  374.  
  375. local Push = CreateVelocity(Hit.Parent.Torso, Torso.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge))
  376. Services.Debris:AddItem(Push, 0)
  377. DamageLabel(Hit.Parent, Damage, Hit)
  378.  
  379. elseif Type == "Ranged" then
  380. local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge))
  381. Services.Debris:AddItem(Push, 0)
  382. DamageLabel(Hit.Parent, Damage, Hit)
  383.  
  384. elseif Type == "Impale" then
  385.  
  386. local Spike = CreateSpike(Services.Workspace, "D e a t h", "Black", Vector3.new(), "SmoothPlastic", 0, Vector3.new(1,20,1))
  387. Spike.Anchored = true
  388. Spike.Rotation = Vector3.new(math.random(-50,50), 0 , math.random(-50,50))
  389. Spike.Position = Hit.Parent.Torso.Position
  390.  
  391.  
  392. Services.Debris:AddItem(Spike, 30)
  393.  
  394. Hit.Parent:BreakJoints()
  395. Hit.Parent.Torso.Position = Spike.Position + Vector3.new(0,5,0)
  396. Hit.Parent.Torso.Anchored = true
  397.  
  398. MakeSFX(Spike, 306247724, 1,1)
  399. MakeSFX(Hit.Parent.Torso, 209527175, 10,1)
  400. elseif Type == "Knockdown" then
  401.  
  402.  
  403. local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge))
  404. DamageLabel(Hit.Parent, Damage, Hit)
  405. Services.Debris:AddItem(Push, 0.3)
  406.  
  407. coroutine.resume(coroutine.create(function()
  408.  
  409. HitHumanoid.PlatformStand = true
  410. wait(1)
  411. HitHumanoid.PlatformStand = false
  412.  
  413.  
  414. end))
  415. end
  416.  
  417. if HitSFX == "Penetration" then
  418.  
  419. MakeSFX(Hit, 199149269, 1 , 1)
  420.  
  421. elseif HitSFX == "Punch" then
  422.  
  423. MakeSFX(Hit, 278062209, 1 , 1)
  424.  
  425.  
  426.  
  427.  
  428. end
  429. end
  430.  
  431. function DamageLabel(HitCharacter, DamageDealt, Hit)
  432.  
  433. local DamageShowingPart = CreatePart(Services.Workspace, "ShowDamage", "Bright yellow", Vector3.new(0.8,0.8,0.8), "Neon", 1, "Block")
  434. DamageShowingPart.Position = HitCharacter.Head.Position
  435.  
  436. local DamageGui = Instance.new("BillboardGui", DamageShowingPart)
  437. DamageGui.Name = "Damage"
  438. DamageGui.AlwaysOnTop = true
  439. DamageGui.Size = UDim2.new(5, 0, 5, 0)
  440.  
  441. local DamageNumber = Instance.new("TextLabel", DamageGui)
  442. DamageNumber.Size = UDim2.new(1,0,1,0)
  443. if Hit.Parent:FindFirstChild("Head") then
  444. DamageNumber.TextStrokeColor3 = Hit.Parent.Head.BrickColor.Color
  445. DamageNumber.TextColor3 = Hit.BrickColor.Color
  446. end
  447. DamageNumber.TextStrokeTransparency = 0
  448. DamageNumber.BackgroundTransparency = 1
  449. DamageNumber.Font = "SourceSansBold"
  450. DamageNumber.TextScaled = true
  451. DamageNumber.Text = DamageDealt
  452.  
  453. local BodyVelocity = Instance.new("BodyVelocity", DamageShowingPart)
  454. BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  455. BodyVelocity.Velocity = Vector3.new(0,2,0)
  456.  
  457. Services.Debris:AddItem(DamageShowingPart, 3)
  458.  
  459.  
  460. end
  461.  
  462. function ValidateDamage(Part, Distance ,Min , Max, Type, HitSFX, Knockback)
  463. for _,WorkspaceChildren in pairs(workspace:children()) do
  464.  
  465. local HitHumanoid = WorkspaceChildren:findFirstChild("Humanoid")
  466.  
  467. if HitHumanoid ~= nil then
  468. local Hit = WorkspaceChildren:findFirstChild("Torso")
  469.  
  470. if Hit ~= nil then
  471.  
  472. local Target = Hit.Position - Part.Position
  473.  
  474. local Magnitude = Target.magnitude
  475.  
  476. if Magnitude <= Distance and WorkspaceChildren.Name ~= Player.Name then
  477.  
  478. local HitBlock = Hit.Parent:FindFirstChild("Block")
  479.  
  480. if HitBlock ~= nil and HitBlock:FindFirstChild("BlockDurability") and HitBlock.Value == true then
  481.  
  482. local HitBlock2 = Hit.Parent.Block.BlockDurability
  483.  
  484. if HitBlock2.Value > 15 then
  485.  
  486. local HitN = math.random(1,5)
  487.  
  488. HitBlock2.Value = HitBlock2.Value - 15
  489.  
  490.  
  491. if HitN == 1 then
  492. MakeSFX(Hit ,199148971, 0.5, 1)
  493. end
  494.  
  495. if HitN == 2 then
  496. MakeSFX(Hit ,199149025, 0.5, 1)
  497. end
  498.  
  499. if HitN == 3 then
  500. MakeSFX(Hit ,199149072, 0.5, 1)
  501. end
  502.  
  503. if HitN == 4 then
  504. MakeSFX(Hit ,199149109, 0.5, 1)
  505. end
  506.  
  507. if HitN == 5 then
  508. MakeSFX(Hit ,199149119, 0.5, 1)
  509. end
  510. return
  511. end
  512. end
  513.  
  514. DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max)
  515.  
  516.  
  517.  
  518. end
  519. end
  520. end
  521. end
  522. end
  523.  
  524.  
  525.  
  526. local Cloak = Instance.new("Part", Character)
  527. Cloak.Name = "Cloak"
  528. Cloak.CanCollide = false
  529. Cloak.BrickColor = BrickColor.new("Institutional white")
  530.  
  531. local CloakMesh = Instance.new("SpecialMesh", Cloak)
  532. CloakMesh.MeshId = "http://www.roblox.com/asset?id=16150814"
  533. CloakMesh.TextureId = "http://www.roblox.com/asset?id=16150799"
  534.  
  535. local CloakWeld = CreateWeld(Cloak, CFrame.new(0,0,0) * CFrame.Angles(0,0,0), Head , Cloak, "ArkusToCharacter")
  536.  
  537. for i,v in pairs(Character:children()) do
  538. if v:IsA("Accessory") then
  539. v:Remove()
  540. elseif v:IsA("Shirt") then
  541. v:Remove()
  542. elseif v:IsA("Pants") then
  543. v:Remove()
  544. elseif v:IsA("BodyColors") then
  545.  
  546. Head.BrickColor =BrickColor.new("Really black")
  547. Torso.BrickColor = BrickColor.new("Really black")
  548. Right_Arm.BrickColor = BrickColor.new("Really black")
  549. Right_Leg.BrickColor = BrickColor.new("Really black")
  550. Left_Arm.BrickColor = BrickColor.new("Really black")
  551. Left_Leg.BrickColor = BrickColor.new("Really black")
  552.  
  553. v.HeadColor = BrickColor.new("Really black")
  554. v.TorsoColor = BrickColor.new("Really black")
  555. v.RightArmColor = BrickColor.new("Really black")
  556. v.LeftArmColor = BrickColor.new("Really black")
  557. v.RightLegColor = BrickColor.new("Really black")
  558. v.LeftLegColor = BrickColor.new("Really black")
  559.  
  560. end
  561. end
  562.  
  563.  
  564.  
  565. --[[ CLerp Declarations ]]--
  566.  
  567. function clerp(a,b,t)
  568. local qa = {QuaternionFromCFrame(a)}
  569. local qb = {QuaternionFromCFrame(b)}
  570. local ax, ay, az = a.x, a.y, a.z
  571. local bx, by, bz = b.x, b.y, b.z
  572. local _t = 1-t
  573. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  574. end
  575.  
  576. function QuaternionFromCFrame(cf) -- dis one
  577. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  578. local trace = m00 + m11 + m22
  579. if trace > 0 then
  580. local s = math.sqrt(1 + trace)
  581. local recip = 0.5/s
  582. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  583. else
  584. local i = 0
  585. if m11 > m00 then
  586. i = 1
  587. end
  588. if m22 > (i == 0 and m00 or m11) then
  589. i = 2
  590. end
  591. if i == 0 then
  592. local s = math.sqrt(m00-m11-m22+1)
  593. local recip = 0.5/s
  594. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  595. elseif i == 1 then
  596. local s = math.sqrt(m11-m22-m00+1)
  597. local recip = 0.5/s
  598. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  599. elseif i == 2 then
  600. local s = math.sqrt(m22-m00-m11+1)
  601. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  602. end
  603. end
  604. end
  605.  
  606. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  607. local xs, ys, zs = x + x, y + y, z + z
  608. local wx, wy, wz = w*xs, w*ys, w*zs
  609. local xx = x*xs
  610. local xy = x*ys
  611. local xz = x*zs
  612. local yy = y*ys
  613. local yz = y*zs
  614. local zz = z*zs
  615. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  616. end
  617.  
  618. function QuaternionSlerp(a, b, t)
  619. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  620. local startInterp, finishInterp;
  621. if cosTheta >= 0.0001 then
  622. if (1 - cosTheta) > 0.0001 then
  623. local theta = math.acos(cosTheta)
  624. local invSinTheta = 1/math.sin(theta)
  625. startInterp = math.sin((1-t)*theta)*invSinTheta
  626. finishInterp = math.sin(t*theta)*invSinTheta
  627. else
  628. startInterp = 1-t
  629. finishInterp = t
  630. end
  631. else
  632. if (1+cosTheta) > 0.0001 then
  633. local theta = math.acos(-cosTheta)
  634. local invSinTheta = 1/math.sin(theta)
  635. startInterp = math.sin((t-1)*theta)*invSinTheta
  636. finishInterp = math.sin(t*theta)*invSinTheta
  637. else
  638. startInterp = t-1
  639. finishInterp = t
  640. end
  641. end
  642. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  643. end
  644.  
  645. function RayCast(Pos, Dir, Max, Ignore)
  646. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  647. end
  648.  
  649.  
  650. function Bars()
  651.  
  652. --[[ Mana Bar ]]--
  653. if Destruction ~= MaxDestruction then
  654.  
  655. Destruction = Destruction + 1
  656.  
  657. end
  658.  
  659. if Destruction >= MaxDestruction then
  660.  
  661. Destruction = Destruction
  662.  
  663. end
  664.  
  665.  
  666. ManaBarText.Text = "<{[ Destruction ]}> <|"..Destruction.."|> <{[ Destruction ]}>"
  667.  
  668. ManaBarP2.Size = UDim2.new(Destruction / Destruction,0,0,20)
  669.  
  670. end
  671. local EyeReference = CreatePart(Character, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block")
  672. local EyeReferenceWeld = CreateWeld(EyeReference, CFrame.new(0.15,-0.1,-0.7), EyeReference, Head)
  673.  
  674. coroutine.resume(coroutine.create(function()
  675.  
  676. while wait(3) do
  677.  
  678.  
  679. CircleEffect(EyeReference.Position, Services.Workspace, 1, 1, 1, 1, 1, 1, 0.5, "Bright red", "Neon", 0.5)
  680.  
  681.  
  682. end
  683.  
  684. end))
  685. --[[ Attacks ]]--
  686.  
  687. function Attack1()
  688. Attacking = true
  689. MakeSFX(EyeReference, 341336274, 1,1)
  690. wait(0.3)
  691. local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block")
  692. local ReferenceWeld = CreateWeld(Reference, CFrame.new(0,0.5,-5), Reference, Root)
  693.  
  694. local Reference2 = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block")
  695. local Reference2Weld = CreateWeld(Reference2, CFrame.new(0,0.5,-2), Reference2, Root)
  696.  
  697.  
  698. for i = 1,10 do
  699.  
  700. wait()
  701. RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,-1.6),0.5)
  702. Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,1.3),0.2)
  703. Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3)
  704. Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0,0,-1.6), 0.4)
  705. Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0) * CFrame.Angles(0,1.6,0),0.3)
  706. Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0) * CFrame.Angles(0,-1.6,0),0.3)
  707.  
  708. end
  709.  
  710. CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5)
  711. wait(0.5)
  712. CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5)
  713. wait(0.5)
  714. CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5)
  715. wait(0.5)
  716. CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5)
  717. wait(0.5)
  718. MakeSFX(Reference, 306247724, 1,1)
  719. CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Bright red", "Neon", 0.5)
  720. ValidateDamage(Reference, 10 ,10 , 14, "Shrink", "Penetration", 5)
  721. Attacking = false
  722. end
  723.  
  724. function Attack2()
  725.  
  726. Attacking = true
  727. Humanoid.WalkSpeed = 0
  728. Humanoid.JumpPower = 0
  729.  
  730.  
  731. for i = 1,25 do
  732. wait()
  733.  
  734. RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(-0.5,0,0),0.2)
  735. Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3)
  736. Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1, 1, 0) * CFrame.Angles(3.2,0,-0.6), 0.3)
  737. Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1, 1, 0) * CFrame.Angles(3.2,0,0.6), 0.3)
  738. Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2)
  739. Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2)
  740.  
  741. end
  742.  
  743. MakeSFX(Torso, 142070127, 1, 1)
  744. ValidateDamage(Torso, 60 ,23, 26, "Knockdown", "Penetration", 15)
  745. local Hit, Position = RayCast(Torso.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,100,Character)
  746. if Hit ~= nil then
  747. local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block")
  748. Reference.Anchored = true
  749. Reference.CFrame = CFrame.new(Position)
  750.  
  751. CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Bright red", "Neon", 0.5)
  752.  
  753. game:GetService("Debris"):AddItem(Reference,0.1)
  754. for i=1,50 do
  755.  
  756. local Ground = CreatePart(Services.Workspace, "Ground", Hit.BrickColor.Color, Vector3.new(math.random(1,3), math.random(1,3), math.random(1,3)), Hit.Material, 0, "Block")
  757. Ground.Anchored = true
  758. Ground.CanCollide = true
  759. Ground.CFrame = CFrame.new(Position) * CFrame.new(math.random(-30,30), 0, math.random(-30,30)) * CFrame.Angles(math.random(-50,50),math.random(-50,50), math.random(-50,50))
  760.  
  761. game:GetService("Debris"):AddItem(Ground,10)
  762.  
  763. end
  764. end
  765.  
  766. for i = 1,25 do
  767. wait()
  768.  
  769. RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.5)
  770. Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3)
  771. Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3)
  772. Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3)
  773. Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2)
  774. Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2)
  775.  
  776. end
  777.  
  778. Attacking = false
  779. Humanoid.WalkSpeed = 16
  780. Humanoid.JumpPower = 50
  781.  
  782.  
  783.  
  784. end
  785.  
  786.  
  787. function Attack3()
  788. Humanoid.WalkSpeed = 0
  789. Humanoid.JumpPower = 0
  790. Attacking = true
  791. wait(1)
  792. MakeSFX(Torso, 341336274, 1, 1.2)
  793. CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5)
  794. wait(1)
  795. MakeSFX(Torso, 341336274, 1, 1.2)
  796. CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5)
  797. wait(1)
  798. MakeSFX(Torso, 341336274, 1, 1.2)
  799. CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5)
  800. ValidateDamage(Torso, 60 ,0, 0, "Impale", "Penetration", 15)
  801. Humanoid.WalkSpeed = 16
  802. Humanoid.JumpPower = 50
  803. Attacking = false
  804. end
  805.  
  806. Mouse.Button1Down:connect(function()
  807. if not Attacking then
  808. if Combo == 1 then
  809.  
  810. Combo = 2
  811. Attack1()
  812.  
  813.  
  814. elseif Combo == 2 then
  815.  
  816. Attack2()
  817. Combo = 3
  818.  
  819. elseif Combo == 3 then
  820.  
  821. Attack3()
  822. Combo = 1
  823.  
  824. end
  825. end
  826. end)
  827.  
  828. --[[ CLerp Animations ]]--
  829. Change1 = 0
  830. Change2 = 0
  831. Change3 = 0
  832. Change4 = 0
  833.  
  834. while true do
  835. wait()
  836.  
  837. local Torvel = (Root.Velocity*Vector3.new(1,0,1)).magnitude
  838. local Velderp = Root.Velocity.y
  839. HitFloor,PosFloor = RayCast(Root.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,4,Character)
  840.  
  841. Bars()
  842.  
  843.  
  844. if Torvel < 1 and HitFloor ~= nil and Attacking == false then
  845. Anim = "Idle"
  846.  
  847. RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2)
  848. Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3)
  849. Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3)
  850. Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.1, 0) * CFrame.Angles(0,0,-0.2), 0.3)
  851. Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0) * CFrame.Angles(-0.1,0,0),0.2)
  852. Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0) * CFrame.Angles(-0.1,0,0),0.2)
  853.  
  854. end
  855.  
  856.  
  857. if 2 < Torvel and Torvel < 22 and HitFloor ~= nil and Attacking == false then
  858. Anim = "Walking"
  859.  
  860. if Invert == false then
  861. Change1 = Change1 + 0.1
  862.  
  863. elseif Invert == true then
  864.  
  865. Change1 = Change1 - 0.1
  866.  
  867. end
  868.  
  869. if Change1 > 0.5 then
  870.  
  871. Invert = true
  872.  
  873. elseif Change1 < -0.5 then
  874.  
  875. Invert = false
  876.  
  877. end
  878.  
  879. if Attacking == false then
  880.  
  881. RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2)
  882. Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3)
  883. Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -Change1) * CFrame.Angles(Change1,0,0), 0.3)
  884. Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, Change1) * CFrame.Angles(-Change1,0,0), 0.3)
  885. Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-Change1 / 4)*CFrame.Angles(Change1,1.6,0),0.2)
  886. Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,Change1 / 4)*CFrame.Angles(-Change1,-1.6,0),0.2)
  887.  
  888. end
  889. end
  890.  
  891. if Root.Velocity.y > 1 and HitFloor == nil and Attacking == false then
  892. Anim = "Jump"
  893.  
  894. RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2)
  895. Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3)
  896. Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.2) * CFrame.Angles(-0.4,0,0.2), 0.3)
  897. Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.2) * CFrame.Angles(-0.4,0,-0.2), 0.3)
  898. Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2)
  899. Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2)
  900.  
  901. end
  902.  
  903. if Root.Velocity.y < -1 and HitFloor == nil and Attacking == false then
  904. Anim = "Fall"
  905.  
  906. RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2)
  907. Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3)
  908. Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -0.2) * CFrame.Angles(0.4,0,0.2), 0.3)
  909. Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, -0.2) * CFrame.Angles(0.4,0,-0.2), 0.3)
  910. Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2)
  911. Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2)
  912.  
  913. end
  914.  
  915.  
  916. if #Effects > 0 then
  917. for E = 1, #Effects do
  918. if Effects[E]~=nil then
  919. local Effect = Effects[E]
  920.  
  921. if Effect ~= nil then
  922.  
  923. local Part = Effect[1]
  924. local Mode = Effect[2]
  925. local Time = Effect[3]
  926. local SizeX = Effect[4]
  927. local SizeY = Effect[5]
  928. local SizeZ = Effect[6]
  929.  
  930. if Effect[1].Transparency <= 1 then
  931. if Effect[2] == "Block" then
  932. Effect[1].CFrame = Effect[1].CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  933.  
  934. Mesh = Effect[1]:FindFirstChild("Mesh")
  935. if Mesh ~= nil then
  936. Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6])
  937. end
  938.  
  939. elseif Effect[2] == "Circle" then
  940.  
  941. if Effect[1]:FindFirstChild("Mesh") ~= nil then
  942. Mesh=Effect[1].Mesh
  943. Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6])
  944. end
  945.  
  946. Effect[1].Transparency = Effect[1].Transparency + 0.05
  947.  
  948. else
  949.  
  950. Part.Parent=nil
  951.  
  952. table.remove(Effects, E)
  953.  
  954. end
  955. end
  956. end
  957. end
  958. end
  959. end
  960. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement