LeGoldenRobloxian

holo sword

May 31st, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.58 KB | None | 0 0
  1. --Sword.lua
  2. --lal it's just put up from some random ideas kk
  3. function clerp(c1,c2,al)
  4. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  5. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  6. for i,v in pairs(com1) do
  7. com1[i] = v+(com2[i]-v)*al
  8. end
  9. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  10. end
  11.  
  12.  
  13. plr = game:service'Players'.LocalPlayer
  14. char = plr.Character
  15. mouse = plr:GetMouse()
  16. humanoid = char:findFirstChild("Humanoid")
  17. torso = char:findFirstChild("Torso")
  18. head = char.Head
  19. ra = char:findFirstChild("Right Arm")
  20. la = char:findFirstChild("Left Arm")
  21. rl = char:findFirstChild("Right Leg")
  22. ll = char:findFirstChild("Left Leg")
  23. rs = torso:findFirstChild("Right Shoulder")
  24. ls = torso:findFirstChild("Left Shoulder")
  25. rh = torso:findFirstChild("Right Hip")
  26. lh = torso:findFirstChild("Left Hip")
  27. neck = torso:findFirstChild("Neck")
  28. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  29. rootpart = char:findFirstChild("HumanoidRootPart")
  30. camera = workspace.CurrentCamera
  31. anim = char:findFirstChild("Animate")
  32. if anim then
  33. anim:Destroy()
  34. end
  35. nameofModel = "HoloSword"
  36.  
  37.  
  38. if char:findFirstChild(nameofModel) then char:findFirstChild(nameofModel):Destroy() end
  39.  
  40.  
  41. model = Instance.new("Model", char)
  42. model.Name = nameofModel
  43.  
  44. local rm = Instance.new("Motor", torso)
  45. rm.C0 = CFrame.new(1.5, 0.5, 0)
  46. rm.C1 = CFrame.new(0, 0.5, 0)
  47. rm.Part0 = torso
  48. rm.Part1 = ra
  49.  
  50. local lm = Instance.new("Motor", torso)
  51. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  52. lm.C1 = CFrame.new(0, 0.5, 0)
  53. lm.Part0 = torso
  54. lm.Part1 = la
  55.  
  56. local rlegm = Instance.new("Motor", torso)
  57. rlegm.C0 = CFrame.new(0.5, -1, 0)
  58. rlegm.C1 = CFrame.new(0, 1, 0)
  59. rlegm.Part0 = torso
  60. rlegm.Part1 = rl
  61. local llegm = Instance.new("Motor", torso)
  62. llegm.C0 = CFrame.new(-0.5, -1, 0)
  63. llegm.C1 = CFrame.new(0, 1, 0)
  64. llegm.Part0 = torso
  65. llegm.Part1 = ll
  66.  
  67.  
  68. humanoid.WalkSpeed = 10
  69.  
  70.  
  71. -- 2 - Blade
  72. obj2 = Instance.new("Part")
  73. obj2.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.690000057, 19.1000042)) * CFrame.Angles(-0, 0, -0)
  74. obj2.FormFactor = Enum.FormFactor.Custom
  75. obj2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  76. obj2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  77. obj2.Reflectance = 0.5
  78. obj2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  79. obj2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  80. obj2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  81. obj2.Material = Enum.Material.SmoothPlastic
  82. obj2.Size = Vector3.new(0.200000003, 1, 4.79999971)
  83. obj2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  84. obj2.BrickColor = BrickColor.new("Institutional white")
  85. obj2.Friction = 0.30000001192093
  86. obj2.Shape = Enum.PartType.Block
  87. obj2.Name = "Blade"
  88. obj2.Parent = model
  89.  
  90. -- 3 - Mesh
  91. obj3 = Instance.new("BlockMesh")
  92. obj3.Scale = Vector3.new(0.200000003, 0.699999988, 1)
  93. obj3.Parent = obj2
  94.  
  95. -- 4 - BladeDec
  96. obj4 = Instance.new("Part")
  97. obj4.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.489999712, 19.1000004)) * CFrame.Angles(-0, 0, -0)
  98. obj4.FormFactor = Enum.FormFactor.Custom
  99. obj4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  100. obj4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  101. obj4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  102. obj4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  103. obj4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  104. obj4.Material = Enum.Material.SmoothPlastic
  105. obj4.Size = Vector3.new(0.600000024, 0.200000003, 4.79999924)
  106. obj4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  107. obj4.BrickColor = BrickColor.new("Really black")
  108. obj4.Friction = 0.30000001192093
  109. obj4.Shape = Enum.PartType.Block
  110. obj4.Name = "BladeDec"
  111. obj4.Parent = model
  112.  
  113. -- 5 - Mesh
  114. obj5 = Instance.new("BlockMesh")
  115. obj5.Scale = Vector3.new(0.200000003, 0.699999988, 1)
  116. obj5.Parent = obj4
  117.  
  118. -- 6 - BladeDec
  119. obj6 = Instance.new("Part")
  120. obj6.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.489999712, 21.6000099)) * CFrame.Angles(3.141592502594, 0, -0)
  121. obj6.FormFactor = Enum.FormFactor.Custom
  122. obj6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  123. obj6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  124. obj6.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  125. obj6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  126. obj6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  127. obj6.Material = Enum.Material.SmoothPlastic
  128. obj6.Size = Vector3.new(0.600000024, 0.200000033, 0.200000003)
  129. obj6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  130. obj6.BrickColor = BrickColor.new("Really black")
  131. obj6.Friction = 0.30000001192093
  132. obj6.Shape = Enum.PartType.Block
  133. obj6.Name = "BladeDec"
  134. obj6.Parent = model
  135.  
  136. -- 7 - Mesh
  137. obj7 = Instance.new("SpecialMesh")
  138. obj7.MeshType = Enum.MeshType.Wedge
  139. obj7.Scale = Vector3.new(0.200000003, 0.699999988, 1)
  140. obj7.Parent = obj6
  141.  
  142. -- 8 - BladeDec
  143. obj8 = Instance.new("Part")
  144. obj8.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.690000057, 22.0000057)) * CFrame.Angles(3.141592502594, 0, -0)
  145. obj8.FormFactor = Enum.FormFactor.Custom
  146. obj8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  147. obj8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  148. obj8.Reflectance = 0.5
  149. obj8.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  150. obj8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  151. obj8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  152. obj8.Material = Enum.Material.SmoothPlastic
  153. obj8.Size = Vector3.new(0.200000003, 1, 1)
  154. obj8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  155. obj8.BrickColor = BrickColor.new("Institutional white")
  156. obj8.Friction = 0.30000001192093
  157. obj8.Shape = Enum.PartType.Block
  158. obj8.Name = "BladeDec"
  159. obj8.Parent = model
  160.  
  161. -- 9 - Mesh
  162. obj9 = Instance.new("SpecialMesh")
  163. obj9.MeshType = Enum.MeshType.Wedge
  164. obj9.Scale = Vector3.new(0.200000003, 0.699999988, 1)
  165. obj9.Parent = obj8
  166.  
  167. -- 10 - HandleDecoration
  168. obj10 = Instance.new("Part")
  169. obj10.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.689999878, 16)) * CFrame.Angles(-0, 0, -0)
  170. obj10.FormFactor = Enum.FormFactor.Custom
  171. obj10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  172. obj10.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  173. obj10.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  174. obj10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  175. obj10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  176. obj10.Material = Enum.Material.SmoothPlastic
  177. obj10.Size = Vector3.new(0.200000003, 0.200000003, 1)
  178. obj10.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  179. obj10.BrickColor = BrickColor.new("Bright blue")
  180. obj10.Friction = 0.30000001192093
  181. obj10.Shape = Enum.PartType.Block
  182. obj10.Name = "HandleDecoration"
  183. obj10.Parent = model
  184.  
  185. -- 11 - Mesh
  186. obj11 = Instance.new("BlockMesh")
  187. obj11.Scale = Vector3.new(1.10000002, 1.10000002, 0.800000012)
  188. obj11.Parent = obj10
  189.  
  190. -- 12 - BladeDec
  191. obj12 = Instance.new("Part")
  192. obj12.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.889999926, 19.4000015)) * CFrame.Angles(-0, 0, -0)
  193. obj12.FormFactor = Enum.FormFactor.Custom
  194. obj12.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  195. obj12.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  196. obj12.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  197. obj12.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  198. obj12.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  199. obj12.Material = Enum.Material.SmoothPlastic
  200. obj12.Size = Vector3.new(0.600000024, 0.200000003, 5.39999866)
  201. obj12.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  202. obj12.BrickColor = BrickColor.new("Really black")
  203. obj12.Friction = 0.30000001192093
  204. obj12.Shape = Enum.PartType.Block
  205. obj12.Name = "BladeDec"
  206. obj12.Parent = model
  207.  
  208. -- 13 - Mesh
  209. obj13 = Instance.new("BlockMesh")
  210. obj13.Scale = Vector3.new(0.200000003, 0.699999988, 1)
  211. obj13.Parent = obj12
  212.  
  213. -- 14 - HandleDecoration
  214. obj14 = Instance.new("Part")
  215. obj14.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.690000057, 16.6000004)) * CFrame.Angles(-0, 0, -0)
  216. obj14.FormFactor = Enum.FormFactor.Custom
  217. obj14.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  218. obj14.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  219. obj14.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  220. obj14.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  221. obj14.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  222. obj14.Material = Enum.Material.SmoothPlastic
  223. obj14.Size = Vector3.new(0.200000003, 1.4000001, 0.200000003)
  224. obj14.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  225. obj14.BrickColor = BrickColor.new("Really black")
  226. obj14.Friction = 0.30000001192093
  227. obj14.Shape = Enum.PartType.Block
  228. obj14.Name = "HandleDecoration"
  229. obj14.Parent = model
  230.  
  231. -- 15 - Mesh
  232. obj15 = Instance.new("BlockMesh")
  233. obj15.Scale = Vector3.new(1, 0.800000012, 1)
  234. obj15.Parent = obj14
  235.  
  236. -- 16 - BladeDec
  237. obj16 = Instance.new("Part")
  238. obj16.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.889999926, 22.2000122)) * CFrame.Angles(3.141592502594, 0, -0)
  239. obj16.FormFactor = Enum.FormFactor.Custom
  240. obj16.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  241. obj16.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  242. obj16.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  243. obj16.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  244. obj16.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  245. obj16.Material = Enum.Material.SmoothPlastic
  246. obj16.Size = Vector3.new(0.600000024, 0.200000033, 0.200000003)
  247. obj16.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  248. obj16.BrickColor = BrickColor.new("Really black")
  249. obj16.Friction = 0.30000001192093
  250. obj16.Shape = Enum.PartType.Block
  251. obj16.Name = "BladeDec"
  252. obj16.Parent = model
  253.  
  254. -- 17 - Mesh
  255. obj17 = Instance.new("SpecialMesh")
  256. obj17.MeshType = Enum.MeshType.Wedge
  257. obj17.Scale = Vector3.new(0.200000003, 0.699999988, 1)
  258. obj17.Parent = obj16
  259.  
  260. -- 18 - Handle
  261. obj18 = Instance.new("Part")
  262. obj18.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.690000117, 16)) * CFrame.Angles(-0, 0, -0)
  263. obj18.FormFactor = Enum.FormFactor.Custom
  264. obj18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  265. obj18.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  266. obj18.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  267. obj18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  268. obj18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  269. obj18.Material = Enum.Material.SmoothPlastic
  270. obj18.Size = Vector3.new(0.200000003, 0.200000003, 1)
  271. obj18.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  272. obj18.BrickColor = BrickColor.new("Really black")
  273. obj18.Friction = 0.30000001192093
  274. obj18.Shape = Enum.PartType.Block
  275. obj18.Name = "Handle"
  276. obj18.Parent = model
  277.  
  278. -- 19 - HandleDecoration
  279. obj19 = Instance.new("Part")
  280. obj19.CFrame = CFrame.new(Vector3.new(-4.79999304, 0.689999819, 15.3999977)) * CFrame.Angles(-0, 0, -0)
  281. obj19.FormFactor = Enum.FormFactor.Custom
  282. obj19.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  283. obj19.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  284. obj19.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  285. obj19.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  286. obj19.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  287. obj19.Material = Enum.Material.SmoothPlastic
  288. obj19.Size = Vector3.new(0.600000024, 0.600000024, 0.200000003)
  289. obj19.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  290. obj19.BrickColor = BrickColor.new("Really black")
  291. obj19.Friction = 0.30000001192093
  292. obj19.Shape = Enum.PartType.Block
  293. obj19.Name = "HandleDecoration"
  294. obj19.Parent = model
  295.  
  296. -- 20 - Mesh
  297. obj20 = Instance.new("BlockMesh")
  298. obj20.Parent = obj19
  299.  
  300. local parts,last = {}
  301. local function scan(parent)
  302. for _,v in pairs(parent:GetChildren()) do
  303. if (v:IsA("BasePart")) then
  304. if (last) then
  305. local w = Instance.new("Weld")
  306. w.Name = ("%s_Weld"):format(v.Name)
  307. w.Part0,w.Part1 = last,v
  308. w.C0 = last.CFrame:inverse()
  309. w.C1 = v.CFrame:inverse()
  310. w.Parent = last
  311. end
  312. last = v
  313. table.insert(parts,v)
  314. end
  315. scan(v)
  316. end
  317. end
  318. scan(model)
  319. for _,v in pairs(parts) do
  320. v.Anchored = false
  321. v.Locked = true
  322. end
  323. for _,v in pairs(parts) do
  324. v.CanCollide = false
  325. end
  326.  
  327. local handle = Instance.new("Part", model)
  328. handle.FormFactor = "Custom"
  329. handle.BrickColor = BrickColor.new("Bright orange")
  330. handle.Transparency = .5
  331. handle.TopSurface = 0
  332. handle.BottomSurface = 0
  333. handle.Size = Vector3.new(0, 0, 0)
  334.  
  335. local weldtohandle = Instance.new("Weld", char)
  336. weldtohandle.Part0 = handle
  337. weldtohandle.Part1 = obj18
  338.  
  339. local wld = Instance.new("Weld", handle)
  340. wld.Part0 = handle
  341. wld.Part1 = ra
  342. wld.C1 = CFrame.new(0, -1, 0) * CFrame.Angles(0, math.pi, 0)
  343.  
  344. rj.C0 = CFrame.new()
  345. rj.C1 = CFrame.new()
  346.  
  347. neck.C0 = CFrame.new(0, 1, 0)
  348. neck.C1 = CFrame.new(0, -0.5, 0)
  349.  
  350. local speed = 0.3
  351. local angle = 0
  352. local anglespeed = 1
  353. local STOPtrail = true
  354. rsc0 = rm.C0
  355. lsc0 = lm.C0
  356. llc0 = llegm.C0
  357. rlc0 = rlegm.C0
  358. rootc0 = rj.C0
  359. neckc0 = neck.C0
  360. swordc0 = wld.C0
  361. action = "None"
  362.  
  363. mouse.KeyDown:connect(function(k)
  364. if k == "e" then
  365. action = 'PowerSlash'
  366. end
  367. if string.byte(k) == 48 then
  368. if action == "Slash1" or action == "Slash2" then return end
  369. humanoid.WalkSpeed = 17
  370. end
  371. end)
  372. mouse.KeyUp:connect(function(k)
  373. if string.byte(k) == 48 then
  374. if action == "Slash1" or action == "Slash2" then return end
  375. humanoid.WalkSpeed = 10
  376. end
  377. end)
  378.  
  379. slash1 = true
  380. slash2 = false
  381.  
  382. punchsound = Instance.new("Sound", head)
  383. punchsound.SoundId = "rbxassetid://138285836"
  384. punchsound.Volume = 1
  385. slashsound = Instance.new("Sound", head)
  386. slashsound.SoundId = "rbxasset://sounds/swordslash.mp3"
  387. slashsound.Volume = 1
  388. icebreak = Instance.new("Sound")
  389. icebreak.SoundId = "rbxassetid://138122923"
  390. icebreak.Volume = .75
  391. chargesound = Instance.new("Sound", head)
  392. chargesound.Volume = 1
  393. chargesound.SoundId = "rbxassetid://2101137"
  394. freezes = Instance.new("Sound")
  395. freezes.SoundId = "rbxassetid://2801263"
  396. freezes.Volume = 1
  397. mouse.Button1Down:connect(function()
  398. if slash1 and action == "None" then
  399. slashsound:play()
  400. action = "Slash1"
  401. slash1 = false
  402. slash2 = true
  403. return
  404. elseif slash2 and action == "None" then
  405. slashsound:play()
  406. action = "Slash2"
  407. slash1 = true
  408. slash2 = false
  409. return
  410. end
  411.  
  412.  
  413. end)
  414.  
  415. humanoid.Jumping:connect(function()
  416. action = "Jumping"
  417. end)
  418.  
  419. local controllerService = game:GetService("ControllerService")
  420. local controller = controllerService:GetChildren()[1]
  421.  
  422. do
  423. local trail = {}
  424. local obj = obj16
  425. for i = 1, 8 do
  426. local p = Instance.new("Part")
  427. p.BrickColor = obj.BrickColor
  428. p.formFactor = "Custom"
  429. p.Size = Vector3.new(1,1,1)
  430. p.Locked = true
  431. p.Anchored = true
  432. p.CanCollide = false
  433. local mesh = Instance.new("CylinderMesh", p)
  434. mesh.Name = "Mesh"
  435. table.insert(trail,{p,0})
  436. end
  437. local lastpos = obj.Position
  438. local updatethis = 0
  439. local dontdothis = false
  440. game:service'RunService'.Stepped:connect(function()
  441. if STOPtrail == false then
  442. do
  443. local effect = Instance.new("Part", char)
  444. effect.CanCollide = false
  445. effect.FormFactor = 'Custom'
  446. effect.Size = Vector3.new(.2,.2,.2)
  447. effect.Transparency = .1
  448. effect.Anchored = true
  449. effect.CFrame = obj2.CFrame * CFrame.new(math.random(-1,1)/2, -math.random(-2,4), math.random(-1,1)/2) * CFrame.Angles(math.random(1,4), math.random(1,4), math.random(1,4))
  450. effect.BrickColor = obj16.BrickColor
  451. local effectmesh = Instance.new("BlockMesh", effect)
  452. effectmesh.Scale = Vector3.new(.5, .5, .5)
  453. coroutine.wrap(function()
  454. while wait() and effect and effect.Transparency <= 1 do
  455. effectmesh.Scale = effectmesh.Scale + Vector3.new(.25, .25, .25)
  456. effect.Transparency = effect.Transparency + .1
  457. end
  458. effect:Destroy()
  459. end)()
  460. end
  461. updatethis = ((updatethis) % 8) + 1
  462. local dstnc = (obj.Position - lastpos).magnitude
  463. trail[updatethis][1].Mesh.Scale = Vector3.new(.2,dstnc,.2)
  464. trail[updatethis][1].Parent = obj.Parent
  465. trail[updatethis][1].CFrame = CFrame.new((obj.Position + lastpos)/2,obj.Position) * CFrame.Angles(math.pi/2, 0, 0)
  466. trail[updatethis][2] = 0
  467. for i,v in pairs(trail) do
  468. v[2] = v[2] + .15
  469. v[1].Transparency = v[2]
  470. end
  471. lastpos = obj.Position
  472. else
  473. for i,v in pairs(trail) do
  474. v[2] = v[2] + 1
  475. v[1].Transparency = v[2]
  476. end
  477. end
  478. lastpos = obj.Position
  479. end)
  480. end
  481.  
  482.  
  483. while wait() do
  484. angle = (angle % 100) + anglespeed/10
  485. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  486. local rscf = rsc0
  487. local lscf = lsc0
  488. local rlcf = rlc0
  489. local llcf = llc0
  490. local rjcf = CFrame.new()
  491. local ncf = neckc0
  492. local hndlcf = swordc0
  493. local ray = Ray.new(rootpart.Position, Vector3.new(0, -5.1, 0))
  494. local hitz, enz = workspace:FindPartOnRay(ray, char)
  495. if not hitz and torso.Velocity.y <= -0.5 then
  496. if action == "None" then
  497. speed = 0.3
  498. anglespeed = 1/2
  499. rjcf = rootc0 * CFrame.Angles(math.pi/18, 0, 0)
  500. rscf = rsc0 * CFrame.Angles(-math.pi/.8, 0, 0)
  501. lscf = lsc0 * CFrame.Angles(-math.pi/.8, 0, 0)
  502. rlcf = rlc0 * CFrame.new(0, .4, -.3) * CFrame.Angles(-math.pi/20, 0, math.rad(5))
  503. llcf = llc0 * CFrame.new(0, .4, -.3) * CFrame.Angles(-math.pi/20, 0, -math.rad(5))
  504. end
  505. elseif action == "Jumping" then
  506. for waiting = 0, 10 do
  507. rjcf = rootc0 * CFrame.Angles(-math.pi/18, 0, 0)
  508. rscf = rsc0 * CFrame.Angles(-math.pi/10, 0, 0)
  509. lscf = lsc0 * CFrame.Angles(-math.pi/10, 0, 0)
  510. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) * CFrame.Angles(-math.pi/14, 0, 0)
  511. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  512. hndlcf = swordc0
  513. rm.C0 = clerp(rm.C0,rscf,speed)
  514. lm.C0 = clerp(lm.C0,lscf,speed)
  515. rj.C0 = clerp(rj.C0,rjcf,speed)
  516. neck.C0 = clerp(neck.C0,ncf,speed)
  517. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  518. llegm.C0 = clerp(llegm.C0,llcf,speed)
  519. wld.C0 = clerp(wld.C0,hndlcf,speed)
  520. wait()
  521. end
  522. action = "None"
  523. elseif action == "PowerSlash" then
  524. speed = .3
  525. anglespeed = 0
  526. for slash1 = 0, 40 do
  527. angle = (angle % 100) + anglespeed/10
  528. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  529. ncf = neckc0 * CFrame.Angles(math.pi*.25, 0, 0)
  530. rjcf = rootc0
  531. rscf = rsc0 * CFrame.Angles(math.pi/1.25, 0, 0)
  532. lscf = lsc0
  533. rlcf = rlc0 * CFrame.Angles(0, 0, math.rad(5.5))
  534. llcf = llc0 * CFrame.Angles(0, 0, -math.rad(5.5))
  535. hndlcf = swordc0 * CFrame.Angles(math.pi*.25, 0, 0)
  536. if slash1 >= 10 then
  537. local effect = Instance.new("Part", char)
  538. effect.CanCollide = false
  539. effect.FormFactor = 'Custom'
  540. effect.Size = Vector3.new(.25,.25,.25)
  541. effect.Transparency = .1
  542. effect.Anchored = true
  543. effect.CFrame = obj2.CFrame * CFrame.new(math.random(-1,1), math.random(-1,5), math.random(-1,1)) * CFrame.Angles(math.random(1,4), math.random(1,4), math.random(1,4))
  544. effect.BrickColor = BrickColor.new"Bright blue"
  545. local effectmesh = Instance.new("BlockMesh", effect)
  546. coroutine.wrap(function()
  547. if not chargesound.IsPlaying then chargesound:play() end
  548. while wait() and effect and effect.Transparency <= 1 do
  549. effectmesh.Scale = effectmesh.Scale + Vector3.new(.55, .55, .55)
  550. effect.Transparency = effect.Transparency + .1
  551. end
  552. effect:Destroy()
  553. end)()
  554. end
  555. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  556. anglespeed = 5
  557. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(5))
  558. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(5))
  559. end
  560. rm.C0 = clerp(rm.C0,rscf,speed)
  561. lm.C0 = clerp(lm.C0,lscf,speed)
  562. rj.C0 = clerp(rj.C0,rjcf,speed)
  563. neck.C0 = clerp(neck.C0,ncf,speed)
  564. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  565. llegm.C0 = clerp(llegm.C0,llcf,speed)
  566. wld.C0 = clerp(wld.C0,hndlcf,speed)
  567. wait()
  568. end
  569. for slash2 = 0, 20 do
  570. angle = (angle % 100) + anglespeed/10
  571. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  572. ncf = neckc0
  573. rjcf = rootc0
  574. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, math.pi/2.5)
  575. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, -math.pi/2.5)
  576. rlcf = rlc0 * CFrame.Angles(0, 0, math.rad(5.5))
  577. llcf = llc0 * CFrame.Angles(0, 0, -math.rad(5.5))
  578. hndlcf = swordc0 * CFrame.Angles(-math.pi/2, 0, 0)
  579. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  580. anglespeed = 5
  581. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(5.5))
  582. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(5.5))
  583. end
  584. rm.C0 = clerp(rm.C0,rscf,speed)
  585. lm.C0 = clerp(lm.C0,lscf,speed)
  586. rj.C0 = clerp(rj.C0,rjcf,speed)
  587. neck.C0 = clerp(neck.C0,ncf,speed)
  588. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  589. llegm.C0 = clerp(llegm.C0,llcf,speed)
  590. wld.C0 = clerp(wld.C0,hndlcf,speed)
  591. wait()
  592. end
  593. for slash3 = 0, 10 do
  594. angle = (angle % 100) + anglespeed/10
  595. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  596. ncf = neckc0
  597. rjcf = rootc0
  598. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, -math.pi/2.5)
  599. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, math.pi/2.5)
  600. rlcf = rlc0 * CFrame.Angles(0, 0, math.rad(5.5))
  601. llcf = llc0 * CFrame.Angles(0, 0, -math.rad(5.5))
  602. hndlcf = swordc0 * CFrame.Angles(-math.pi/2, 0, 0)
  603. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  604. anglespeed = 5
  605. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(5.5))
  606. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(5.5))
  607. end
  608. rm.C0 = clerp(rm.C0,rscf,speed)
  609. lm.C0 = clerp(lm.C0,lscf,speed)
  610. rj.C0 = clerp(rj.C0,rjcf,speed)
  611. neck.C0 = clerp(neck.C0,ncf,speed)
  612. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  613. llegm.C0 = clerp(llegm.C0,llcf,speed)
  614. wld.C0 = clerp(wld.C0,hndlcf,speed)
  615. wait()
  616. end
  617. coroutine.wrap(function()
  618. chargesound:stop()
  619. local circle = Instance.new("Part", char)
  620. circle.Anchored = true
  621. circle.FormFactor = 'Custom'
  622. circle.BrickColor = BrickColor.new'Bright blue'
  623. circle.Size = Vector3.new(3, .2, 3)
  624. circle.Transparency = .45
  625. circle.CFrame = torso.CFrame * CFrame.new(0, -3, 0)
  626. game:service'Debris':AddItem(circle, 3)
  627. Instance.new("CylinderMesh", circle)
  628. for i = 1, 5 do
  629. circle.Mesh.Scale = circle.Mesh.Scale + Vector3.new(1+i, 0, 1+i)
  630. wait()
  631. end
  632. for angle = 1, 360, 5 do
  633. local p = Instance.new('Part', circle)
  634. p.Size = Vector3.new(4, 8, 4)
  635. p.BrickColor = BrickColor.new("Bright blue")
  636. p.Anchored = true
  637. p.CFrame = circle.CFrame
  638. * CFrame.new(0, -5, 0)
  639. * CFrame.Angles(0, math.rad(angle), 0)
  640. * CFrame.new(0, 0, 30)
  641. * CFrame.Angles(math.random(-1,1)/2, 0, math.random(-1,1)/2)
  642. Instance.new("SpecialMesh", p).MeshId = "rbxassetid://1033714"
  643. p.Mesh.Scale = Vector3.new(7,40,7)
  644. end
  645. for i,v in pairs(workspace:children()) do
  646. coroutine.wrap(function()
  647. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - circle.Position).magnitude <= 29 then
  648. v:findFirstChild("Torso").Anchored = true
  649. local freezesound = freezes:clone()
  650. freezesound.Parent = v:findFirstChild'Torso'
  651. freezesound:play()
  652. for i = 1, 5 do
  653. coroutine.wrap(function()
  654. local freeze = Instance.new("Part", workspace)
  655. freeze.Anchored = true
  656. freeze.Size = Vector3.new(4.5,4.1,4.9)
  657. freeze.CFrame = v:findFirstChild'Torso'.CFrame * CFrame.new(math.random(-2, 2), -math.random() - 2.5, math.random(-2, 2)) * CFrame.Angles(math.random(-2, 2),math.random(-2, 2),math.random(-2, 2))
  658. freeze.CanCollide = false
  659. freeze.TopSurface = 0
  660. freeze.BottomSurface = 0
  661. freeze.Transparency = .5
  662. freeze.BrickColor = BrickColor.new'Bright blue'
  663. wait(3)
  664. freeze.Anchored = false
  665. freeze:breakJoints()
  666. freeze:breakJoints()
  667. freeze:breakJoints()
  668. freeze:breakJoints()
  669. game:service'Debris':AddItem(freeze, 5)
  670. end)()
  671. end
  672. v:findFirstChild("Humanoid"):TakeDamage(30.9)
  673. wait(3)
  674. local icebreaksound = icebreak:clone()
  675. icebreaksound.Parent = v:findFirstChild'Torso'
  676. icebreaksound:play()
  677. v:findFirstChild("Torso").Anchored = false
  678. end
  679. end)()
  680. end
  681. end)()
  682. action = 'None'
  683. elseif action == "Slash1" then
  684. STOPtrail = false
  685. speed = 0.3
  686. anglespeed = 0
  687. for slash1 = 0, 12 do
  688. angle = (angle % 100) + anglespeed/10
  689. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  690. ncf = neckc0 * CFrame.Angles(0, -math.rad(45), 0)
  691. rjcf = rootc0 * CFrame.new(0, 0, -.6) * CFrame.Angles(0, math.rad(45), 0)
  692. rscf = rsc0 * CFrame.new(-.35, 0, -.5) * CFrame.Angles(math.rad(165), 0, -math.rad(65))
  693. lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.rad(165), 0, math.rad(25))
  694. rlcf = rlc0 * CFrame.Angles(math.rad(12.5), -math.rad(45), math.rad(10.5))
  695. llcf = llc0 * CFrame.Angles(-math.rad(12.5), -math.rad(45), -math.rad(10.5))
  696. hndlcf = swordc0 * CFrame.Angles(math.pi/2, math.pi, -math.rad(105))
  697. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  698. anglespeed = 5
  699. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, -math.rad(45), math.rad(10.5))
  700. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, -math.rad(45), -math.rad(10.5))
  701. end
  702. rm.C0 = clerp(rm.C0,rscf,speed)
  703. lm.C0 = clerp(lm.C0,lscf,speed)
  704. rj.C0 = clerp(rj.C0,rjcf,speed)
  705. neck.C0 = clerp(neck.C0,ncf,speed)
  706. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  707. llegm.C0 = clerp(llegm.C0,llcf,speed)
  708. wld.C0 = clerp(wld.C0,hndlcf,speed)
  709. wait()
  710. end
  711. coroutine.wrap(function()
  712. for slash2 = 0, 19 do
  713. angle = (angle % 100) + anglespeed/10
  714. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  715. ncf = neckc0 * CFrame.Angles(-math.pi/15, -math.rad(45), 0)
  716. rjcf = rootc0 * CFrame.new(0, 0, -.6) * CFrame.Angles(0, math.rad(45), 0)
  717. rscf = rsc0 * CFrame.new(-.35, 0, -.5) * CFrame.Angles(math.rad(45), 0, -math.rad(65))
  718. lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.rad(45), 0, math.rad(25))
  719. rlcf = rlc0 * CFrame.Angles(math.rad(12.5), -math.rad(45), math.rad(10.5))
  720. llcf = llc0 * CFrame.Angles(-math.rad(12.5), -math.rad(45), -math.rad(10.5))
  721. hndlcf = swordc0 * CFrame.Angles(math.pi/2, math.pi, -math.rad(105))
  722. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  723. anglespeed = 5
  724. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, -math.rad(45), math.rad(10.5))
  725. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, -math.rad(45), -math.rad(10.5))
  726. end
  727. rm.C0 = clerp(rm.C0,rscf,speed)
  728. lm.C0 = clerp(lm.C0,lscf,speed)
  729. rj.C0 = clerp(rj.C0,rjcf,speed)
  730. neck.C0 = clerp(neck.C0,ncf,speed)
  731. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  732. llegm.C0 = clerp(llegm.C0,llcf,speed)
  733. wld.C0 = clerp(wld.C0,hndlcf,speed)
  734. wait()
  735. end
  736. STOPtrail = true
  737. end)()
  738. wait(.05)
  739. for i,v in pairs(workspace:children()) do
  740. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - obj2.Position).magnitude <= 5 then
  741. coroutine.wrap(function()
  742. v:findFirstChild("Humanoid"):TakeDamage(20.25)
  743. punchsound:play()
  744. v:findFirstChild'Humanoid'.PlatformStand = true
  745. local gyro = Instance.new("BodyGyro", v:findFirstChild'Torso')
  746. gyro.maxTorque = Vector3.new(1/0,1/0,1/0)
  747. gyro.cframe = torso.CFrame * CFrame.Angles(math.pi/2, 0, 0)
  748. game:service'Debris':AddItem(gyro, .1)
  749. wait(.75)
  750. v:findFirstChild'Humanoid'.PlatformStand = false
  751. end)()
  752. end
  753. end
  754. wait(.15)
  755. for i,v in pairs(workspace:children()) do
  756. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - obj2.Position).magnitude <= 5 then
  757. v:findFirstChild("Humanoid"):TakeDamage(20.25)
  758. if not punchsound.IsPlaying then
  759. coroutine.wrap(function()
  760. punchsound:play()
  761. v:findFirstChild'Humanoid'.PlatformStand = true
  762. local gyro = Instance.new("BodyGyro", v:findFirstChild'Torso')
  763. gyro.maxTorque = Vector3.new(1/0,1/0,1/0)
  764. gyro.cframe = torso.CFrame * CFrame.Angles(math.pi/2, 0, 0)
  765. game:service'Debris':AddItem(gyro, .1)
  766. wait(.75)
  767. v:findFirstChild'Humanoid'.PlatformStand = false
  768. end)()
  769. end
  770. end
  771. end
  772. wait(.2)
  773. punchsound:stop()
  774. humanoid.WalkSpeed = 10
  775. controller.Parent = controllerService
  776. action="None"
  777. elseif action == "Slash2" then
  778. STOPtrail = false
  779. humanoid.WalkSpeed = 10
  780. speed = 0.3
  781. anglespeed = 0
  782. for slash1 = 0, 12 do
  783. angle = (angle % 100) + anglespeed/10
  784. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  785. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  786. rjcf = rootc0 * CFrame.Angles(0, -math.rad(15), 0)
  787. rscf = rsc0 * CFrame.Angles(math.pi/2.2, 0, math.pi/2.5)
  788. lscf = lsc0 * CFrame.Angles(math.pi/14, 0, math.pi/24)
  789. rlcf = rlc0 * CFrame.Angles(-math.rad(2.5), 0, math.rad(5))
  790. llcf = llc0 * CFrame.Angles(math.rad(4.5), 0, -math.rad(5))
  791. hndlcf = swordc0 * CFrame.Angles(-math.pi/8, -math.pi/2, 0)
  792. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  793. anglespeed = 5
  794. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(.5))
  795. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(.5))
  796. end
  797. rm.C0 = clerp(rm.C0,rscf,speed)
  798. lm.C0 = clerp(lm.C0,lscf,speed)
  799. rj.C0 = clerp(rj.C0,rjcf,speed)
  800. neck.C0 = clerp(neck.C0,ncf,speed)
  801. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  802. llegm.C0 = clerp(llegm.C0,llcf,speed)
  803. wld.C0 = clerp(wld.C0,hndlcf,speed)
  804. wait()
  805. end
  806. coroutine.wrap(function()
  807. for slash2 = 0, 19 do
  808. angle = (angle % 100) + anglespeed/10
  809. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  810. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  811. rjcf = rootc0 * CFrame.new(0, 0, -.3) * CFrame.Angles(0, math.rad(15), 0)
  812. rscf = rsc0 * CFrame.Angles(math.pi/2.2, 0, -math.pi/4)
  813. lscf = lsc0 * CFrame.Angles(-math.rad(30), 0, -math.pi/19)
  814. rlcf = rlc0 * CFrame.Angles(math.rad(10.5), 0, math.rad(5))
  815. llcf = llc0 * CFrame.Angles(-math.rad(.5), 0, -math.rad(5))
  816. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  817. anglespeed = 5
  818. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(.5))
  819. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(.5))
  820. end
  821. hndlcf = swordc0 * CFrame.Angles(-math.pi/2, math.pi/2, math.pi/16)
  822. rm.C0 = clerp(rm.C0,rscf,speed)
  823. lm.C0 = clerp(lm.C0,lscf,speed)
  824. rj.C0 = clerp(rj.C0,rjcf,speed)
  825. neck.C0 = clerp(neck.C0,ncf,speed)
  826. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  827. llegm.C0 = clerp(llegm.C0,llcf,speed)
  828. wld.C0 = clerp(wld.C0,hndlcf,speed)
  829. wait()
  830. end
  831. STOPtrail = true
  832. end)()
  833. wait(.05)
  834. for i,v in pairs(workspace:children()) do
  835. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - obj2.Position).magnitude <= 5 then
  836. coroutine.wrap(function()
  837. v:findFirstChild("Humanoid"):TakeDamage(10.25)
  838. punchsound:play()
  839. v:findFirstChild'Humanoid'.PlatformStand = true
  840. local gyro = Instance.new("BodyGyro", v:findFirstChild'Torso')
  841. gyro.maxTorque = Vector3.new(1/0,1/0,1/0)
  842. gyro.cframe = torso.CFrame * CFrame.Angles(math.pi/2, 0, 0)
  843. game:service'Debris':AddItem(gyro, .05)
  844. wait(.75)
  845. v:findFirstChild'Humanoid'.PlatformStand = false
  846. end)()
  847. end
  848. end
  849. wait(.15)
  850. for i,v in pairs(workspace:children()) do
  851. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - obj2.Position).magnitude <= 5 then
  852. v:findFirstChild("Humanoid"):TakeDamage(30.25)
  853. coroutine.wrap(function()
  854. if not punchsound.IsPlaying then
  855. punchsound:play()
  856. v:findFirstChild'Humanoid'.PlatformStand = true
  857. local gyro = Instance.new("BodyGyro", v:findFirstChild'Torso')
  858. gyro.maxTorque = Vector3.new(1/0,1/0,1/0)
  859. gyro.cframe = torso.CFrame * CFrame.Angles(math.pi/2, 0, 0)
  860. game:service'Debris':AddItem(gyro, .05)
  861. wait(.75)
  862. v:findFirstChild'Humanoid'.PlatformStand = false
  863. end
  864. end)()
  865. end
  866. end
  867. wait(.4)
  868. punchsound:stop()
  869. action="None"
  870. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  871. if action == "None" then
  872. speed = 0.3
  873. anglespeed = 1/2.5
  874. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.075, 0, 0)
  875. rjcf = rootc0
  876. rscf = rsc0 * CFrame.Angles(-math.pi/24+math.sin(-angle)*0.05, -math.rad(15), math.rad(5))
  877. lscf = lsc0 * CFrame.Angles(-math.pi/24+math.sin(-angle)*0.05, 0, -math.rad(5))
  878. rlcf = rlc0 * CFrame.Angles(-math.rad(2.5), 0, math.rad(2.5))
  879. llcf = llc0 * CFrame.Angles(math.rad(4.5), 0, -math.rad(2.5))
  880. hndlcf = swordc0 * CFrame.Angles(math.pi/14, 0, 0)
  881. end
  882. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 16 then
  883. if action == "None" then
  884. speed = 0.3
  885. anglespeed = 3
  886. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  887. rjcf = rootc0
  888. rscf = rsc0 * CFrame.Angles(-math.pi/24+math.sin(angle)*.05, -math.rad(15), math.rad(5))
  889. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*.65, 0, -math.rad(5))
  890. rlcf = rlc0 * CFrame.new(0, .075 + -math.cos(-angle)*.075, -.05+math.sin(angle)*0.1) * CFrame.Angles(math.sin(-angle)*.45, 0, math.rad(.5))
  891. llcf = llc0 * CFrame.new(0, .075 - -math.cos(angle)*.075, -.05-math.sin(angle)*0.1) * CFrame.Angles(math.sin(angle)*.45, 0, -math.rad(.5))
  892. hndlcf = swordc0 * CFrame.Angles(math.pi/14, 0, 0)
  893. end
  894. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 16 then
  895. if action == "None" then
  896. speed = 0.3
  897. anglespeed = 4
  898. ncf = neckc0 * CFrame.Angles(0, -math.sin(angle)*.1, 0)
  899. rscf = rsc0 * CFrame.Angles(-math.pi/3.5,0,0)
  900. lscf = lsc0 * CFrame.new(0, 0, math.sin(angle)*0.125) * CFrame.Angles(math.pi/24+math.sin(-angle)*1.1, 0, math.abs(mvmnt)*0.02)
  901. rjcf = rootc0 * CFrame.new(0, 0, 0) * CFrame.Angles(math.abs(math.sin(angle))*0.055 + -math.pi/18, math.sin(angle)*.1, math.sin(angle)*.045)
  902. rlcf = rlc0 * CFrame.new(0, .3 + -math.cos(-angle)*.3, -.2+math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(-angle)*1.3, 0, math.rad(.5))
  903. llcf = llc0 * CFrame.new(0, .3 - -math.cos(angle)*.3, -.05-math.sin(angle)*0.25) * CFrame.Angles(-math.pi/18+math.sin(angle)*1.3, 0, -math.rad(.5))
  904. hndlcf = swordc0 * CFrame.Angles(-math.pi/2, 0, 0)
  905. end
  906. end
  907. rm.C0 = clerp(rm.C0,rscf,speed)
  908. lm.C0 = clerp(lm.C0,lscf,speed)
  909. rj.C0 = clerp(rj.C0,rjcf,speed)
  910. neck.C0 = clerp(neck.C0,ncf,speed)
  911. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  912. llegm.C0 = clerp(llegm.C0,llcf,speed)
  913. wld.C0 = clerp(wld.C0,hndlcf,speed)
  914. end
Add Comment
Please, Sign In to add comment