Guest User

Untitled

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