Advertisement
Liampdoherty

Bendy!

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