Advertisement
firasj082

World eater script

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