Advertisement
Dark_EccentricYT

Untitled

Sep 16th, 2020
1,951
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.25 KB | None | 0 0
  1. --holy sword
  2. local lp = game.Players.LocalPlayer
  3. local chr = lp.Character
  4. local lp = game.Players.LocalPlayer
  5. local chr = lp.Character
  6. local mouse = lp:GetMouse()
  7. local soulsteal = false
  8. local percent = 0
  9. local plr=game.Players.LocalPlayer
  10. local chr=plr.Character
  11. local asin = math.asin
  12. local atan2 = math.atan2
  13. local rad = math.rad
  14. local sin = math.sin
  15. local abs = math.abs
  16. local ceil = math.ceil
  17. local dmg = 3
  18.  
  19. local function getAngles(cf)
  20. local sx,sy,sz,m00,m01,m02,m10,m11,m12,m20,m21,m22 = cf:components()
  21. return atan2(-m12,m22),asin(m02),atan2(-m01,m00)
  22. end
  23. Lerp = {
  24. Number = function(C1,C2,inc)
  25. return C1 + (C2 - C1) * inc
  26. end;
  27. CFrame = function(a,b,m)
  28. local c,d={a:components()},{b:components()}
  29. table.foreach(c,function(a,b)c[a]=c[a]+(d[a]-c[a])*m end)
  30. return CFrame.new(unpack(c))
  31. end;
  32. }
  33. local function genWeld(a,b)
  34. local w = Instance.new("Weld",a)
  35. w.Part0 = a
  36. w.Part1 = b
  37. return w
  38. end
  39.  
  40. anglespeed = 1
  41. yeet = 0
  42. count = 0
  43. angle = 0
  44. local attacking = false
  45. speed = 1
  46. local plr=game.Players.LocalPlayer
  47. local chr=plr.Character
  48. local torso=chr.Torso
  49. local mouse=plr:GetMouse()
  50. local Neck = genWeld(chr.Torso,chr.Head)
  51. Neck.C0 = CFrame.new(0,1,0)
  52. Neck.C1 = CFrame.new(0,-0.5,0)
  53. local LeftShoulder = genWeld(chr.Torso,chr['Left Arm'])
  54. LeftShoulder.C0 = CFrame.new(-1,0.5,0)
  55. LeftShoulder.C1 = CFrame.new(0.5,0.5,0)
  56. RightShoulder = genWeld(chr.Torso,chr['Right Arm'])
  57. RightShoulder.C0 = CFrame.new(1,0.5,0)
  58. RightShoulder.C1 = CFrame.new(-0.5,0.5,0)
  59. local LeftHip = genWeld(chr.Torso,chr['Left Leg'])
  60. LeftHip.C0 = CFrame.new(-1,-1,0)
  61. LeftHip.C1 = CFrame.new(-0.5,1,0)
  62. local RightHip = genWeld(chr.Torso,chr['Right Leg'])
  63. RightHip.C0 = CFrame.new(1,-1,0)
  64. RightHip.C1 = CFrame.new(0.5,1,0)
  65. local RootJoint = genWeld(chr.HumanoidRootPart,chr.Torso)
  66. RootJoint.C0 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  67. RootJoint.C1 = CFrame.new(0,0,0) * CFrame.Angles(-math.pi/2,0,math.pi)
  68. local function newLerpTo(weld)
  69. return {
  70. Weld = weld; -- The weld that will lerp
  71. To = weld.C0; -- Where it will lerp to; a CFrame
  72. Cache = weld.C0; -- Cache of original position; it helps when making anim keyframes
  73. Speed = 0.1; -- Speed of lerp. 0.1 or 0.2 is best
  74. }
  75. end
  76. LerpTo = {
  77. Neck = newLerpTo(Neck);
  78. LeftArm = newLerpTo(LeftShoulder);
  79. RightArm = newLerpTo(RightShoulder);
  80. LeftLeg = newLerpTo(LeftHip);
  81. RightLeg = newLerpTo(RightHip);
  82. RootJoint = newLerpTo(RootJoint);
  83. }
  84. local effects = Instance.new("Model",chr)--so we can get rid of effects easily, with for i,v
  85. local sound = function(id,looped,parent,pitch)--for effects and stuff :)
  86. local s = Instance.new("Sound",parent)
  87. s.Volume=math.huge
  88. s.Looped=looped
  89. if pitch ~= nil then
  90. s.Pitch=pitch
  91. end
  92. s.SoundId="rbxassetid://"..id
  93. s:Play()
  94. return s
  95. end
  96. --sound("232544821",true,chr)
  97. local it = Instance.new
  98. local bc = BrickColor.new
  99. local c3 = Color3.new
  100. local cf = CFrame.new
  101. local ca = CFrame.Angles
  102. local rad = math.rad
  103. local cos = math.cos
  104. local weld = function(p0,p1,x,y,z,ax,ay,az)
  105. p0.Position=p1.Position
  106. local w = it("Motor",p0)
  107. w.Part0=p0
  108. w.Part1=p1
  109. w.C0=cf(x,y,z)*ca(ax,ay,az)
  110. return w
  111. end
  112. local explode = function(player)
  113. if workspace[player] and workspace[player].Torso then
  114. local trso = workspace[player].Torso
  115. local exp = Instance.new("Part",trso.Parent)
  116. exp.CanCollide=false
  117. exp.TopSurface='Smooth'
  118. exp.BottomSurface='Smooth'
  119. exp.FormFactor='Custom'
  120. exp.Anchored=true
  121. exp.Size=Vector3.new(1,1,1)
  122. exp.BrickColor=bc("Really red")
  123. exp.CFrame=trso.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  124. print("Hit:"..trso.Parent.Name)
  125. coroutine.resume(coroutine.create(function()
  126. for i = 1,10 do
  127. wait()
  128. exp.CFrame=exp.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  129. exp.Size=exp.Size+Vector3.new(.5,.5,.5)
  130. exp.Transparency=exp.Transparency+.1
  131. end
  132. exp:Destroy()
  133. end))
  134. end
  135. end
  136. local sword = it("Model",chr)
  137. sword.Name="HolySword"
  138. local p1 = it("Part",sword)
  139. p1.CanCollide=false
  140. p1.FormFactor="Custom"
  141. p1.BrickColor=bc("Institutional white")
  142. p1.TopSurface="Smooth"
  143. p1.BottomSurface="Smooth"
  144. p1.Size=Vector3.new(.2,.2,.2)
  145. weld(p1,chr['Right Arm'],0,1,0,0,math.pi/2,0)
  146. local p1m = it("SpecialMesh",p1)
  147. p1m.MeshType="Cylinder"
  148. p1m.Scale=Vector3.new(7.5,1,1)
  149. local p2 = it("Part",sword)
  150. p2.CanCollide=false
  151. p2.FormFactor="Custom"
  152. p2.TopSurface="Smooth"
  153. p2.BottomSurface="Smooth"
  154. p2.BrickColor=bc("Bright orange")
  155. p2.Size=Vector3.new(.2,.75,.75)
  156. weld(p2,p1,0,0,-1.1,0,math.pi/2,0)
  157. local p3 = it("Part",sword)
  158. p3.CanCollide=false
  159. p3.FormFactor="Custom"
  160. p3.TopSurface="Smooth"
  161. p3.BottomSurface="Smooth"
  162. p3.BrickColor=bc("Dark green")
  163. p3.Size=Vector3.new(.4,.4,.4)
  164. p3.Reflectance=.4
  165. local p3m = it("SpecialMesh",p3)
  166. p3m.MeshType="Sphere"
  167. weld(p3,p2,0,0,0,0,0,0)
  168. local p4 = it("Part",sword)
  169. p4.CanCollide=false
  170. p4.FormFactor="Custom"
  171. p4.TopSurface="Smooth"
  172. p4.BottomSurface="Smooth"
  173. p4.BrickColor=bc("Bright orange")
  174. p4.Reflectance=.25
  175. p4.Size=Vector3.new(.2,.25,4)
  176. local p4m = it("SpecialMesh",p4)
  177. p4m.MeshType="Brick"
  178. p4m.Scale=Vector3.new(.5,1,1)
  179. weld(p4,p2,0,0,-2.2,0,0,0)
  180. local p5 = it("Part",sword)
  181. p5.CanCollide=false
  182. p5.FormFactor="Custom"
  183. p5.TopSurface="Smooth"
  184. p5.BottomSurface="Smooth"
  185. p5.BrickColor=bc("Institutional white")
  186. p5.Reflectance=.25
  187. p5.Size=Vector3.new(.2,.25,4)
  188. weld(p5,p4,0,-.25,0,0,0,0)
  189. local p6 = it("Part",sword)
  190. p6.CanCollide=false
  191. p6.FormFactor="Custom"
  192. p6.TopSurface="Smooth"
  193. p6.BottomSurface="Smooth"
  194. p6.BrickColor=bc("Institutional white")
  195. p6.Reflectance=.25
  196. p6.Size=Vector3.new(.2,.25,4)
  197. weld(p6,p4,0,.25,0,0,0,0)
  198. local p7 = it("WedgePart",sword)
  199. p7.CanCollide=false
  200. p7.FormFactor="Custom"
  201. p7.TopSurface="Smooth"
  202. p7.BottomSurface="Smooth"
  203. p7.Size=Vector3.new(.2,.25,.2)
  204. p7.BrickColor=bc("Bright orange")
  205. p7.Reflectance = .25
  206. weld(p7,p4,0,-.0625,2.1,rad(180),0,0)
  207. local p7m = it("SpecialMesh",p7)
  208. p7m.MeshType="Wedge"
  209. p7m.Scale=Vector3.new(.5,.5,1)
  210. local p8 = it("WedgePart",sword)
  211. p8.CanCollide=false
  212. p8.FormFactor="Custom"
  213. p8.TopSurface="Smooth"
  214. p8.BottomSurface="Smooth"
  215. p8.Size=Vector3.new(.2,.25,.2)
  216. p8.BrickColor=bc("Bright orange")
  217. p8.Reflectance = .25
  218. weld(p8,p4,0,-.0625,2.1,rad(180),0,rad(180))
  219. local p8m = it("SpecialMesh",p8)
  220. p8m.MeshType="Wedge"
  221. p8m.Scale=Vector3.new(.5,.5,1)
  222. local p9 = it("WedgePart",sword)
  223. p9.CanCollide=false
  224. p9.FormFactor="Custom"
  225. p9.BrickColor=bc("Institutional white")
  226. p9.TopSurface="Smooth"
  227. p9.BottomSurface="Smooth"
  228. p9.Size=Vector3.new(.2,.25,.25)
  229. p9.Reflectance=.25
  230. weld(p9,p5,0,-2.125,0,-rad(90),0,0)
  231. local p10 = it("WedgePart",sword)
  232. p10.CanCollide=false
  233. p10.FormFactor="Custom"
  234. p10.BrickColor=bc("Institutional white")
  235. p10.TopSurface="Smooth"
  236. p10.BottomSurface="Smooth"
  237. p10.Size=Vector3.new(.2,.25,.25)
  238. p10.Reflectance=.25
  239. weld(p10,p6,0,0,2.125,-rad(180),0,0)
  240. local p11 = it("WedgePart",sword)
  241. p11.CanCollide=false
  242. p11.FormFactor="Custom"
  243. p11.BrickColor=bc("Institutional white")
  244. p11.TopSurface="Smooth"
  245. p11.BottomSurface="Smooth"
  246. p11.Size=Vector3.new(.2,.25,.25)
  247. p11.Reflectance=.25
  248. weld(p11,p9,0,-.25,-.1875,0,0,0)
  249. local p11m = it("SpecialMesh",p11)
  250. p11m.MeshType="Wedge"
  251. p11m.Scale=Vector3.new(1,1,.5)
  252. local p12 = it("WedgePart",sword)
  253. p12.CanCollide=false
  254. p12.FormFactor="Custom"
  255. p12.BrickColor=bc("Institutional white")
  256. p12.TopSurface="Smooth"
  257. p12.BottomSurface="Smooth"
  258. p12.Size=Vector3.new(.2,.25,.25)
  259. p12.Reflectance=.25
  260. weld(p12,p10,0,.1875,.25,0,0,0)
  261. local p12m = it("SpecialMesh",p12)
  262. p12m.MeshType="Wedge"
  263. p12m.Scale=Vector3.new(1,.5,1)
  264. local p13 = it("WedgePart",sword)
  265. p13.CanCollide=false
  266. p13.FormFactor="Custom"
  267. p13.TopSurface="Smooth"
  268. p13.BottomSurface="Smooth"
  269. p13.Size=Vector3.new(.2,.25,.2)
  270. p13.BrickColor=bc("Institutional white")
  271. p13.Reflectance = .25
  272. weld(p13,p7,0,0,0,rad(180),rad(0),rad(0))
  273. local p13m = it("SpecialMesh",p13)
  274. p13m.MeshType="Wedge"
  275. p13m.Scale=Vector3.new(1,.5,1)
  276. local p14 = it("WedgePart",sword)
  277. p14.CanCollide=false
  278. p14.FormFactor="Custom"
  279. p14.TopSurface="Smooth"
  280. p14.BottomSurface="Smooth"
  281. p14.Size=Vector3.new(.2,.25,.2)
  282. p14.BrickColor=bc("Institutional white")
  283. p14.Reflectance = .25
  284. weld(p14,p8,0,0,0,rad(180),rad(0),rad(0))
  285. local p14m = it("SpecialMesh",p14)
  286. p14m.MeshType="Wedge"
  287. p14m.Scale=Vector3.new(1,.5,1)
  288. local p15 = it("Part",sword)
  289. p15.CanCollide=false
  290. p15.FormFactor="Custom"
  291. p15.TopSurface="Smooth"
  292. p15.BottomSurface="Smooth"
  293. p15.Size=Vector3.new(.2,.25,.2)
  294. p15.Reflectance=.25
  295. p15.BrickColor=bc("Institutional white")
  296. weld(p15,p4,0,0,-2.225,0,0,0)
  297. p15m = it("SpecialMesh",p15)
  298. p15m.MeshType="Brick"
  299. p15m.Scale=Vector3.new(1,1,.25)
  300. local p16 = it("Part",sword)
  301. p16.CanCollide=false
  302. p16.FormFactor="Custom"
  303. p16.TopSurface="Smooth"
  304. p16.BottomSurface="Smooth"
  305. p16.Size=Vector3.new(.2,.2,.2)
  306. weld(p16,p3,-.4,-.2,0,-rad(90),0,rad(90))
  307. p16m=it("SpecialMesh",p16)
  308. p16m.MeshId="rbxassetid://111893941"
  309. p16m.Scale=Vector3.new(.25,.25,.25)
  310. local p17 = it("Part",sword)
  311. p17.CanCollide=false
  312. p17.FormFactor="Custom"
  313. p17.TopSurface="Smooth"
  314. p17.BottomSurface="Smooth"
  315. p17.Size=Vector3.new(.2,.2,.2)
  316. weld(p17,p3,.4,-.2,0,-rad(90),0,rad(90))
  317. p17m=it("SpecialMesh",p17)
  318. p17m.MeshId="rbxassetid://111896510"
  319. p17m.Scale=Vector3.new(.25,.25,.25)
  320. local p18 = it("Part",sword)
  321. p18.CanCollide=false
  322. p18.FormFactor="Custom"
  323. p18.TopSurface="Smooth"
  324. p18.BottomSurface="Smooth"
  325. p18.Size=Vector3.new(.2,.2,.2)
  326. weld(p18,p3,-.4,-.2,0,-rad(90),rad(45),rad(90))
  327. p18m=it("SpecialMesh",p18)
  328. p18m.MeshId="rbxassetid://111893941"
  329. p18m.Scale=Vector3.new(.25,.25,.25)
  330. local p19 = it("Part",sword)
  331. p19.CanCollide=false
  332. p19.FormFactor="Custom"
  333. p19.TopSurface="Smooth"
  334. p19.BottomSurface="Smooth"
  335. p19.Size=Vector3.new(.2,.2,.2)
  336. weld(p19,p3,.4,-.2,0,-rad(90),rad(45),rad(90))
  337. p19m=it("SpecialMesh",p19)
  338. p19m.MeshId="rbxassetid://111896510"
  339. p19m.Scale=Vector3.new(.25,.25,.25)
  340. local p20 = it("Part",sword)
  341. p20.CanCollide=false
  342. p20.FormFactor="Custom"
  343. p20.TopSurface="Smooth"
  344. p20.BottomSurface="Smooth"
  345. p20.Size=Vector3.new(.2,.2,.2)
  346. weld(p20,p3,-.4,-.2,0,-rad(90),-rad(45),rad(90))
  347. p20m=it("SpecialMesh",p20)
  348. p20m.MeshId="rbxassetid://111893941"
  349. p20m.Scale=Vector3.new(.25,.25,.25)
  350. local p21 = it("Part",sword)
  351. p21.CanCollide=false
  352. p21.FormFactor="Custom"
  353. p21.TopSurface="Smooth"
  354. p21.BottomSurface="Smooth"
  355. p21.Size=Vector3.new(.2,.2,.2)
  356. weld(p21,p3,.4,-.2,0,-rad(90),-rad(45),rad(90))
  357. p21m=it("SpecialMesh",p21)
  358. p21m.MeshId="rbxassetid://111896510"
  359. p21m.Scale=Vector3.new(.25,.25,.25)
  360. p16.BrickColor=bc("Institutional white")
  361. p17.BrickColor=bc("Institutional white")
  362. p18.BrickColor=bc("Institutional white")
  363. p19.BrickColor=bc("Institutional white")
  364. p20.BrickColor=bc("Institutional white")
  365. p21.BrickColor=bc("Institutional white")
  366. p16.Reflectance=.25
  367. p17.Reflectance=.25
  368. p18.Reflectance=.25
  369. p19.Reflectance=.25
  370. p20.Reflectance=.25
  371. p21.Reflectance=.25
  372. p2.Transparency=1
  373. for i,v in pairs(sword:GetChildren()) do
  374. v.Touched:connect(function(hit)
  375. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name~=lp.Name and attacking == true then
  376. hit.Parent.Humanoid:TakeDamage(1)
  377. end
  378. end)
  379. end
  380. p4.Touched:connect(function(hit)
  381. if hit.Parent.Name~= lp.Name and hit.Parent:FindFirstChild("Humanoid") and attacking == true then
  382. explode(hit.Parent.Name)
  383. end
  384. end)
  385. local anim = true
  386. local equipped = false
  387. local bin = Instance.new("HopperBin",game.Players.LocalPlayer.Backpack)
  388. bin.Selected:connect(function()
  389. equipped = true
  390. end)
  391. bin.Deselected:connect(function()
  392. equipped = false
  393. end)
  394. posplus = 0
  395. local function updateanims()
  396. if anim==true and equipped == false then
  397. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  398. anglespeed = 1/3
  399. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  400. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  401. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-rad(155),rad(75),-rad(25))
  402. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(25),0,-rad(15))
  403. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(0),0,rad(0))
  404. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(0),0,-rad(0))
  405. end
  406. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  407. anglespeed = 3
  408. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(25),0,0)
  409. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(rad(0),0,sin(angle)*.2)
  410. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(-rad(155),rad(75),-rad(25))
  411. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(-rad(25),0,-rad(15))
  412. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-sin(angle)*.8,0,0)
  413. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(sin(angle)*.8,0,0)
  414. end
  415. elseif anim==true and equipped == true then
  416. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude < 2 then
  417. anglespeed = 1/3
  418. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  419. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  420. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(75),rad(15),-rad(45))
  421. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(75),-rad(15),rad(45))
  422. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(5),0,rad(5))
  423. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(5),0,-rad(5))
  424. end
  425. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude > 2 then
  426. anglespeed = 3
  427. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(rad(15),0,0)
  428. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(rad(15),0,sin(angle)*.2)
  429. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(75),rad(15),-rad(45))
  430. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(75),-rad(15),rad(45))
  431. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(-sin(angle)*.8,0,0)
  432. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(sin(angle)*.8,0,0)
  433. end
  434. end
  435. end
  436. local slash = function()
  437. anglespeed = 4
  438. sound("232210079",false,chr,.5)
  439. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(-rad(25),0,0)
  440. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  441. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(180),0,rad(25))
  442. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(25))
  443. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(sin(angle)*.05,0,0)
  444. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-sin(angle)*.05,0,0)
  445. wait(.15)
  446. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(25))
  447. wait(.15)
  448. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(0),0,-rad(25))
  449. wait(.15)
  450. end
  451. local swipe = function()
  452. anglespeed = 4
  453. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  454. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  455. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,rad(0))
  456. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(25))
  457. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
  458. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
  459. wait(.25)
  460. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(0),0,rad(90))
  461. wait(.25)
  462. end
  463. local smash = function()
  464. anglespeed = 4
  465. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  466. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  467. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(180),0,-rad(55))
  468. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(180),0,rad(55))
  469. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
  470. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
  471. wait(.15)
  472. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(90),0,-rad(55))
  473. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,rad(55))
  474. wait(.15)
  475. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(rad(0),0,-rad(55))
  476. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(0),0,rad(55))
  477. wait(.15)
  478. end
  479. local spin = function()
  480. anglespeed = 7
  481. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  482. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  483. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(0,0,rad(90))
  484. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(0,0,-rad(90))
  485. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
  486. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
  487. for i = 1,10 do
  488. wait(.15)
  489. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,math.cos(1,360)*angle)
  490. end
  491. end
  492. local beam = function()
  493. LerpTo.Neck.To = LerpTo.Neck.Cache * CFrame.Angles(0,0,0)
  494. LerpTo.RootJoint.To=LerpTo.RootJoint.Cache * CFrame.new(0,0,0)*CFrame.Angles(0,0,0)
  495. LerpTo.RightArm.To = LerpTo.RightArm.Cache * CFrame.Angles(0,0,rad(20))
  496. LerpTo.LeftArm.To = LerpTo.LeftArm.Cache * CFrame.Angles(rad(90),0,0)
  497. LerpTo.RightLeg.To = LerpTo.RightLeg.Cache * CFrame.Angles(rad(15),0,rad(15))
  498. LerpTo.LeftLeg.To = LerpTo.LeftLeg.Cache * CFrame.Angles(-rad(15),0,-rad(15))
  499. wait(.5)
  500. local bm = it("Part",effects)
  501. bm.CanCollide=false
  502. bm.FormFactor="Custom"
  503. bm.TopSurface="Smooth"
  504. bm.BottomSurface="Smooth"
  505. bm.Size=Vector3.new(1000,30,30)
  506. bm.Reflectance=.5
  507. bm.Transparency=.5
  508. bm.BrickColor=bc("Really black")
  509. local bmm = Instance.new("SpecialMesh",bm)
  510. bmm.MeshType="Cylinder"
  511. bm.Anchored = true
  512. bm.CFrame=chr['Left Arm'].CFrame*CFrame.new(0,-499,0)*CFrame.Angles(0,0,math.pi/2)
  513. bm.Touched:connect(function(hit)
  514. if hit.Parent.Name~= lp.Name and hit.Parent:FindFirstChild("Humanoid") then
  515. hit.Parent:BreakJoints()
  516. end
  517. end)
  518. for i = 1,10 do
  519. wait()
  520. bm.Transparency=bm.Transparency+.1
  521. bmm.Scale=Vector3.new(.5,.5,.5)
  522. wait()
  523. bmm.Scale=Vector3.new(1,1,1)
  524. end
  525. bm:Destroy()
  526. end
  527. mouse.KeyDown:connect(function(key)
  528. if key == "q" and attacking == false and anim == true and equipped == true then
  529. anim = false
  530. attacking = true
  531. swipe()
  532. attacking = false
  533. anim = true
  534. elseif key == "e" and attacking == false and anim == true and equipped == true then
  535. anim = false
  536. attacking = true
  537. slash()
  538. attacking = false
  539. anim = true
  540. elseif key == "r" and attacking == false and anim == true and equipped == true then
  541. anim = false
  542. attacking = true
  543. smash()
  544. anim = true
  545. attacking = false
  546. elseif key == "t" and attacking == false and anim == true and equipped == true then
  547. anim = false
  548. attacking = true
  549. spin()
  550. wait()
  551. attacking = false
  552. anim = true
  553. elseif key == "f" and anim == true and attacking == false and equipped == true then
  554. attacking = true
  555. anim = false
  556. beam()
  557. wait(.5)
  558. attacking = false
  559. anim = true
  560. elseif key == "x" then
  561. local bp = Instance.new("BodyPosition",chr.Torso)
  562. bp.position=Vector3.new(0,chr.Torso.Position.y,0)
  563. bp.maxForce=Vector3.new(0,math.huge,0)
  564. elseif key == "c" then
  565. posplus = 2
  566. elseif key == "v" then
  567. posplus = -2
  568. elseif key == "b" then
  569. if chr.Torso:FindFirstChild("BodyPosition") then
  570. chr.Torso.BodyPosition:Destroy()
  571. end
  572. end
  573. end)
  574. mouse.KeyUp:connect(function(key)
  575. if key == "c" or key == "v" then
  576. posplus = 0
  577. end
  578. end)
  579. Spawn(function()
  580. while wait()do
  581. angle = (angle % 100) + anglespeed/10 -- no matter whut it has to be in a loop or its on exticy
  582. if chr.Torso:FindFirstChild("BodyPosition") then
  583. chr.Torso.BodyPosition.position = Vector3.new(0,chr.Torso.Position.y+posplus,0)
  584. end
  585. end
  586. end)
  587. sdeb=false
  588. game:service'RunService'.RenderStepped:connect(function()
  589. if attacking == true then
  590. local asd = Instance.new("Part",effects)
  591. asd.CanCollide=false
  592. asd.FormFactor="Custom"
  593. asd.TopSurface="Smooth"
  594. asd.BottomSurface="Smooth"
  595. asd.Size=Vector3.new(.2,.2,.2)
  596. asd.BrickColor=BrickColor.new("Really red")
  597. asd.Anchored=true
  598. asd.CFrame=p15.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  599. coroutine.resume(coroutine.create(function()
  600. for i = 1,10 do
  601. game:GetService("RunService").Stepped:wait()
  602. asd.Transparency=asd.Transparency+.1
  603. asd.Size=asd.Size+Vector3.new(.1,.1,.1)
  604. asd.CFrame=asd.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  605. end
  606. asd:Destroy()
  607. end))
  608. elseif attacking == false and equipped == false then
  609. local asd = Instance.new("Part",effects)
  610. asd.CanCollide=false
  611. asd.FormFactor="Custom"
  612. asd.TopSurface="Smooth"
  613. asd.BottomSurface="Smooth"
  614. asd.Size=Vector3.new(.2,.2,.2)
  615. asd.BrickColor=BrickColor.new("Really red")
  616. asd.Anchored=true
  617. asd.CFrame=chr['Left Arm'].CFrame*CFrame.new(0,-1,0)*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  618. coroutine.resume(coroutine.create(function()
  619. for i = 1,10 do
  620. game:GetService("RunService").Stepped:wait()
  621. asd.Transparency=asd.Transparency+.1
  622. asd.Size=asd.Size+Vector3.new(.1,.1,.1)
  623. asd.CFrame=asd.CFrame*CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  624. end
  625. asd:Destroy()
  626. end))
  627. end
  628. for _,v in pairs(LerpTo) do
  629. v.Weld.C0 = Lerp.CFrame(v.Weld.C0,v.To,v.Speed)end
  630. updateanims()
  631. end)
  632.  
  633.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement