Advertisement
memberhero

sword

May 16th, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.91 KB | None | 0 0
  1. script.Name = "Chaos"
  2. local Player = game.Players.LocalPlayer
  3. repeat wait() until Player
  4. local Character = Player.Character
  5. repeat wait() until Character
  6.  
  7. local C_Fold = Instance.new("Folder", Player.PlayerScripts) C_Fold.Name = "Chaos Folder"
  8. script.Parent = C_Fold
  9.  
  10. if script.ClassName == "LocalScript" or script.ClassName == "Script" then
  11. local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call)
  12. local oxbox = getfenv() setfenv(1, setmetatable({}, {__index = Environment}))
  13. oxbox.script:Destroy()
  14. end
  15.  
  16. C_Fold.Parent = nil
  17.  
  18. Value = game.Players.LocalPlayer
  19.  
  20. --Riptide.lua
  21. --made by ace28545 and madiik
  22. function clerp(c1,c2,al)
  23. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  24. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  25. for i,v in pairs(com1) do
  26. com1[i] = v+(com2[i]-v)*al
  27. end
  28. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  29. end
  30.  
  31.  
  32. plr = Value
  33. char = plr.Character
  34. mouse = plr:GetMouse()
  35. humanoid = char:findFirstChild("Humanoid")
  36. torso = char:findFirstChild("Torso")
  37. head = char.Head
  38. ra = char:findFirstChild("Right Arm")
  39. la = char:findFirstChild("Left Arm")
  40. rl = char:findFirstChild("Right Leg")
  41. ll = char:findFirstChild("Left Leg")
  42. rs = torso:findFirstChild("Right Shoulder")
  43. ls = torso:findFirstChild("Left Shoulder")
  44. rh = torso:findFirstChild("Right Hip")
  45. lh = torso:findFirstChild("Left Hip")
  46. neck = torso:findFirstChild("Neck")
  47. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  48. rootpart = char:findFirstChild("HumanoidRootPart")
  49. camera = workspace.CurrentCamera
  50. anim = char:findFirstChild("Animate")
  51. if anim then
  52. anim:Destroy()
  53. end
  54. nameofModel = "HoloSword"
  55.  
  56.  
  57. if char:findFirstChild(nameofModel) then char:findFirstChild(nameofModel):Destroy() end
  58.  
  59.  
  60. model = Instance.new("Model", char)
  61. model.Name = nameofModel
  62.  
  63. local rm = Instance.new("Motor", torso)
  64. rm.C0 = CFrame.new(1.5, 0.5, 0)
  65. rm.C1 = CFrame.new(0, 0.5, 0)
  66. rm.Part0 = torso
  67. rm.Part1 = ra
  68.  
  69. local lm = Instance.new("Motor", torso)
  70. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  71. lm.C1 = CFrame.new(0, 0.5, 0)
  72. lm.Part0 = torso
  73. lm.Part1 = la
  74.  
  75. local rlegm = Instance.new("Motor", torso)
  76. rlegm.C0 = CFrame.new(0.5, -1, 0)
  77. rlegm.C1 = CFrame.new(0, 1, 0)
  78. rlegm.Part0 = torso
  79. rlegm.Part1 = rl
  80. local llegm = Instance.new("Motor", torso)
  81. llegm.C0 = CFrame.new(-0.5, -1, 0)
  82. llegm.C1 = CFrame.new(0, 1, 0)
  83. llegm.Part0 = torso
  84. llegm.Part1 = ll
  85.  
  86.  
  87. humanoid.WalkSpeed = 10
  88.  
  89.  
  90. local handle = Instance.new("Part", model)
  91. handle.Material = "SmoothPlastic"
  92. handle.FormFactor = "Custom"
  93. handle.BrickColor = BrickColor.new("Bright orange")
  94. handle.Transparency = 1
  95. handle.TopSurface = 0
  96. handle.BottomSurface = 0
  97. handle.Size = Vector3.new(0, 0, 0)
  98.  
  99. local airtop = Instance.new("Part", model)
  100. airtop.Material = "SmoothPlastic"
  101. airtop.FormFactor = "Custom"
  102. airtop.BrickColor = BrickColor.new("White")
  103. airtop.Transparency = 1
  104. airtop.TopSurface = 0
  105. airtop.BottomSurface = 0
  106. airtop.Size = Vector3.new(0, 0, 0)
  107.  
  108. local wld74124 = Instance.new("Weld", airtop)
  109. wld74124.Part0 = airtop
  110. wld74124.Part1 = handle
  111. wld74124.C1 = CFrame.Angles(math.pi/2, 0, 0)
  112. wld74124.C0 = CFrame.new(0, 3.5, 0)
  113.  
  114. local wld = Instance.new("Weld", handle)
  115. wld.Part0 = handle
  116. wld.Part1 = ra
  117. wld.C1 = CFrame.new(0, -1, 0)
  118.  
  119. local handle2 = Instance.new("Part", model)
  120. handle2.Material = "SmoothPlastic"
  121. handle2.Transparency = 1
  122. handle2.FormFactor = "Custom"
  123. handle2.TopSurface = 0
  124. handle2.BottomSurface = 0
  125. handle2.Size = Vector3.new(0, 4, 0)
  126.  
  127. local wld2 = Instance.new("Weld", handle2)
  128. wld2.Part0 = handle2
  129. wld2.Part1 = handle
  130. wld2.C1 = CFrame.Angles(math.pi/2, 0, 0)
  131. wld2.C0 = CFrame.new(0, 1.5, 0)
  132.  
  133. local handle3 = Instance.new("Part", model)
  134. handle3.Material = "SmoothPlastic"
  135. handle3.FormFactor = "Custom"
  136. handle3.BrickColor = BrickColor.new("Dark stone grey")
  137. handle3.TopSurface = 0
  138. handle3.BottomSurface = 0
  139. handle3.Size = Vector3.new(.3, 0, .75)
  140.  
  141. local handle3Mesh = Instance.new("SpecialMesh",handle3)
  142. handle3Mesh.MeshType = "FileMesh"
  143. handle3Mesh.MeshId = "http://www.roblox.com/asset/?id=10467539"
  144. handle3Mesh.TextureId = "http://www.roblox.com/asset/?id=10467545"
  145. handle3Mesh.Scale = Vector3.new(1.7, 1.7, 1.7)
  146.  
  147. local wld3 = Instance.new("Weld", handle3)
  148. wld3.Part0 = handle3
  149. wld3.Part1 = handle2
  150. --wld3.C1 = CFrame.new(0, 1, 0)
  151. --wld3.C1 = CFrame.fromEulerAnglesXYZ(0, 0.3, 0) * CFrame.new(0, 0 ,0)
  152. wld3.C0 = CFrame.new(0, -0.3, 0) * CFrame.Angles(math.rad(180),math.rad(360),math.rad(0))
  153.  
  154. for i,v in pairs(model:children()) do
  155. if v:IsA("Part") then
  156. v.CanCollide = false
  157. end
  158. end
  159.  
  160.  
  161. rj.C0 = CFrame.new()
  162. rj.C1 = CFrame.new()
  163.  
  164. neck.C0 = CFrame.new(0, 1, 0)
  165. neck.C1 = CFrame.new(0, -0.5, 0)
  166.  
  167. local speed = 0.3
  168. local angle = 0
  169. local anglespeed = 1
  170. local STOPtrail = true
  171. rsc0 = rm.C0
  172. lsc0 = lm.C0
  173. llc0 = llegm.C0
  174. rlc0 = rlegm.C0
  175. rootc0 = rj.C0
  176. neckc0 = neck.C0
  177. swordc0 = wld.C0
  178. action = "None"
  179.  
  180. mouse.KeyDown:connect(function(k)
  181. if k == "e" then
  182. action = 'PowerSlash'
  183. end
  184. if string.byte(k) == 48 then
  185. if action == "Slash1" or action == "Slash2" then return end
  186. humanoid.WalkSpeed = 17
  187. end
  188. end)
  189. mouse.KeyUp:connect(function(k)
  190. if string.byte(k) == 48 then
  191. if action == "Slash1" or action == "Slash2" then return end
  192. humanoid.WalkSpeed = 10
  193. end
  194. end)
  195.  
  196. slash1 = true
  197. slash2 = false
  198.  
  199. slashsound = Instance.new("Sound", head)
  200. slashsound.SoundId = "rbxassetid://10209645"
  201. slashsound.Volume = 1
  202. icebreak = Instance.new("Sound")
  203. icebreak.SoundId = "rbxassetid://87015121"
  204. icebreak.Volume = .75
  205. icebreak.Pitch = 1.5
  206. chargesound = Instance.new("Sound", head)
  207. chargesound.Volume = 1.5
  208. chargesound.SoundId = "rbxassetid://2101137"
  209. freezes = Instance.new("Sound")
  210. freezes.SoundId = "rbxassetid://41763367"
  211. freezes.Volume = 3
  212. freezes.Pitch = 2
  213. hitsound = Instance.new("Sound", head)
  214. hitsound.SoundId = "rbxassetid://10209590"
  215. hitsound.Volume = 2
  216. hitsound.Pitch = 1
  217.  
  218. mouse.Button1Down:connect(function()
  219. if slash1 and action == "None" then
  220. slashsound:play()
  221. action = "Slash1"
  222. slash1 = false
  223. slash2 = true
  224. return
  225. elseif slash2 and action == "None" then
  226. slashsound:play()
  227. action = "Slash2"
  228. slash1 = true
  229. slash2 = false
  230. return
  231. end
  232.  
  233.  
  234. end)
  235.  
  236. humanoid.Jumping:connect(function()
  237. action = "Jumping"
  238. end)
  239.  
  240. local controllerService = game:GetService("ControllerService")
  241. local controller = controllerService:GetChildren()[1]
  242.  
  243. do
  244. local trail = {}
  245. local obj = airtop
  246. for i = 1, 8 do
  247. local p = Instance.new("Part")
  248. p.Material = "SmoothPlastic"
  249. p.BrickColor = obj.BrickColor
  250. p.formFactor = "Custom"
  251. p.Size = Vector3.new(1,1,1)
  252. p.Locked = true
  253. p.Anchored = true
  254. p.CanCollide = false
  255. local mesh = Instance.new("CylinderMesh", p)
  256. mesh.Name = "Mesh"
  257. table.insert(trail,{p,0})
  258. end
  259. local lastpos = obj.Position
  260. local updatethis = 0
  261. local dontdothis = false
  262. game:service'RunService'.Stepped:connect(function()
  263. if STOPtrail == false then
  264. updatethis = ((updatethis) % 8) + 1
  265. local dstnc = (obj.Position - lastpos).magnitude
  266. trail[updatethis][1].Mesh.Scale = Vector3.new(.2,dstnc,.2)
  267. trail[updatethis][1].Parent = obj.Parent
  268. trail[updatethis][1].CFrame = CFrame.new((obj.Position + lastpos)/2,obj.Position) * CFrame.Angles(math.pi/2, 0, 0)
  269. trail[updatethis][2] = 0
  270. for i,v in pairs(trail) do
  271. v[2] = v[2] + .15
  272. v[1].Transparency = v[2]
  273. end
  274. lastpos = obj.Position
  275. else
  276. for i,v in pairs(trail) do
  277. v[2] = v[2] + 1
  278. v[1].Transparency = v[2]
  279. end
  280. end
  281. lastpos = obj.Position
  282. end)
  283. end
  284.  
  285.  
  286. while wait() do
  287. angle = (angle % 100) + anglespeed/10
  288. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  289. local rscf = rsc0
  290. local lscf = lsc0
  291. local rlcf = rlc0
  292. local llcf = llc0
  293. local rjcf = CFrame.new()
  294. local ncf = neckc0
  295. local hndlcf = swordc0
  296. local ray = Ray.new(rootpart.Position, Vector3.new(0, -5.1, 0))
  297. local hitz, enz = workspace:FindPartOnRay(ray, char)
  298. if not hitz and torso.Velocity.y <= -0.5 then
  299. if action == "None" then
  300. speed = 0.3
  301. anglespeed = 1/2
  302. rjcf = rootc0 * CFrame.Angles(math.pi/18, 0, 0)
  303. rscf = rsc0 * CFrame.Angles(-math.pi/.8, 0, 0)
  304. lscf = lsc0 * CFrame.Angles(-math.pi/.8, 0, 0)
  305. rlcf = rlc0 * CFrame.new(0, .4, -.3) * CFrame.Angles(-math.pi/20, 0, math.rad(5))
  306. llcf = llc0 * CFrame.new(0, .4, -.3) * CFrame.Angles(-math.pi/20, 0, -math.rad(5))
  307. end
  308. elseif action == "Jumping" then
  309. for waiting = 0, 10 do
  310. rjcf = rootc0 * CFrame.Angles(-math.pi/18, 0, 0)
  311. rscf = rsc0 * CFrame.Angles(-math.pi/10, 0, 0)
  312. lscf = lsc0 * CFrame.Angles(-math.pi/10, 0, 0)
  313. rlcf = rlc0 * CFrame.new(0, 0.7, -0.5) * CFrame.Angles(-math.pi/14, 0, 0)
  314. llcf = llc0 * CFrame.Angles(-math.pi/20, 0, 0)
  315. hndlcf = swordc0
  316. rm.C0 = clerp(rm.C0,rscf,speed)
  317. lm.C0 = clerp(lm.C0,lscf,speed)
  318. rj.C0 = clerp(rj.C0,rjcf,speed)
  319. neck.C0 = clerp(neck.C0,ncf,speed)
  320. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  321. llegm.C0 = clerp(llegm.C0,llcf,speed)
  322. wld.C0 = clerp(wld.C0,hndlcf,speed)
  323. wait()
  324. end
  325. action = "None"
  326. elseif action == "PowerSlash" then
  327. speed = .3
  328. anglespeed = 0
  329. for slash1 = 0, 40 do
  330. angle = (angle % 100) + anglespeed/10
  331. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  332. ncf = neckc0 * CFrame.Angles(math.pi*.25, 0, 0)
  333. rjcf = rootc0
  334. rscf = rsc0 * CFrame.Angles(math.pi/1.25, 0, 0)
  335. lscf = lsc0
  336. rlcf = rlc0 * CFrame.Angles(0, 0, math.rad(5.5))
  337. llcf = llc0 * CFrame.Angles(0, 0, -math.rad(5.5))
  338. hndlcf = swordc0 * CFrame.Angles(math.pi/2 - math.pi*.25, 0, 0)
  339. if slash1 >= 10 then
  340. local effect = Instance.new("Part", char)
  341. effect.Material = "SmoothPlastic"
  342. effect.CanCollide = false
  343. effect.FormFactor = 'Custom'
  344. effect.Size = Vector3.new(.25,.25,.25)
  345. effect.Transparency = .1
  346. effect.Anchored = true
  347. effect.CFrame = handle.CFrame * CFrame.new(0, 0, -3.5) * CFrame.Angles(math.random(1,4), math.random(1,4), math.random(1,4))
  348. effect.BrickColor = BrickColor.new"Bright blue"
  349. local effectmesh = Instance.new("BlockMesh", effect)
  350. coroutine.wrap(function()
  351. if not chargesound.IsPlaying then chargesound:play() end
  352. while wait() and effect and effect.Transparency <= 1 do
  353. effectmesh.Scale = effectmesh.Scale + Vector3.new(2.25, 2.25, 2.25)
  354. effect.Transparency = effect.Transparency + .1
  355. end
  356. effect:Destroy()
  357. end)()
  358. end
  359. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  360. anglespeed = 5
  361. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(5))
  362. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(5))
  363. end
  364. rm.C0 = clerp(rm.C0,rscf,speed)
  365. lm.C0 = clerp(lm.C0,lscf,speed)
  366. rj.C0 = clerp(rj.C0,rjcf,speed)
  367. neck.C0 = clerp(neck.C0,ncf,speed)
  368. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  369. llegm.C0 = clerp(llegm.C0,llcf,speed)
  370. wld.C0 = clerp(wld.C0,hndlcf,speed)
  371. wait()
  372. end
  373. for slash2 = 0, 20 do
  374. angle = (angle % 100) + anglespeed/10
  375. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  376. ncf = neckc0
  377. rjcf = rootc0
  378. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, math.pi/2.5)
  379. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, -math.pi/2.5)
  380. rlcf = rlc0 * CFrame.Angles(0, 0, math.rad(5.5))
  381. llcf = llc0 * CFrame.Angles(0, 0, -math.rad(5.5))
  382. hndlcf = swordc0 * CFrame.Angles(math.pi/2, 0, 0)
  383. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  384. anglespeed = 5
  385. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(5.5))
  386. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(5.5))
  387. end
  388. rm.C0 = clerp(rm.C0,rscf,speed)
  389. lm.C0 = clerp(lm.C0,lscf,speed)
  390. rj.C0 = clerp(rj.C0,rjcf,speed)
  391. neck.C0 = clerp(neck.C0,ncf,speed)
  392. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  393. llegm.C0 = clerp(llegm.C0,llcf,speed)
  394. wld.C0 = clerp(wld.C0,hndlcf,speed)
  395. wait()
  396. end
  397. for slash3 = 0, 10 do
  398. angle = (angle % 100) + anglespeed/10
  399. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  400. ncf = neckc0
  401. rjcf = rootc0
  402. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, -math.pi/2.5)
  403. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, math.pi/2.5)
  404. rlcf = rlc0 * CFrame.Angles(0, 0, math.rad(5.5))
  405. llcf = llc0 * CFrame.Angles(0, 0, -math.rad(5.5))
  406. hndlcf = swordc0 * CFrame.Angles(math.pi/2, 0, 0)
  407. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  408. anglespeed = 5
  409. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(5.5))
  410. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(5.5))
  411. end
  412. rm.C0 = clerp(rm.C0,rscf,speed)
  413. lm.C0 = clerp(lm.C0,lscf,speed)
  414. rj.C0 = clerp(rj.C0,rjcf,speed)
  415. neck.C0 = clerp(neck.C0,ncf,speed)
  416. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  417. llegm.C0 = clerp(llegm.C0,llcf,speed)
  418. wld.C0 = clerp(wld.C0,hndlcf,speed)
  419. wait()
  420. end
  421. coroutine.wrap(function()
  422. chargesound:stop()
  423. local circle = Instance.new("Part", char)
  424. circle.Material = "SmoothPlastic"
  425. circle.Anchored = true
  426. circle.FormFactor = 'Custom'
  427. circle.BrickColor = BrickColor.new'Bright blue'
  428. circle.Size = Vector3.new(3, .2, 3)
  429. circle.Transparency = .45
  430. circle.CFrame = torso.CFrame * CFrame.new(0, -3, 0)
  431. game:service'Debris':AddItem(circle, 3)
  432. Instance.new("CylinderMesh", circle)
  433. for i = 1, 5 do
  434. circle.Mesh.Scale = circle.Mesh.Scale + Vector3.new(1+i, 0, 1+i)
  435. wait()
  436. end
  437. for angle = 1, 360, 5 do
  438. local p = Instance.new('Part', circle)
  439. p.Material = "SmoothPlastic"
  440. p.Size = Vector3.new(4, 8, 4)
  441. p.BrickColor = BrickColor.new("Bright blue")
  442. p.Anchored = true
  443. p.CFrame = circle.CFrame
  444. * CFrame.new(0, -5, 0)
  445. * CFrame.Angles(0, math.rad(angle), 0)
  446. * CFrame.new(0, 0, 30)
  447. * CFrame.Angles(math.random(-1,1)/2, 0, math.random(-1,1)/2)
  448. Instance.new("SpecialMesh", p).MeshId = "rbxassetid://1033714"
  449. p.Mesh.Scale = Vector3.new(7,40,7)
  450. end
  451. for i,v in pairs(workspace:children()) do
  452. coroutine.wrap(function()
  453. 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
  454. v:findFirstChild("Torso").Anchored = true
  455. local freezesound = freezes:clone()
  456. freezesound.Parent = v:findFirstChild'Torso'
  457. freezesound:play()
  458. for i = 1, 5 do
  459. coroutine.wrap(function()
  460. local freeze = Instance.new("Part", Character)
  461. freeze.Material = "SmoothPlastic"
  462. freeze.Anchored = true
  463. freeze.Size = Vector3.new(4.5,4.1,4.9)
  464. 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))
  465. freeze.CanCollide = false
  466. freeze.TopSurface = 0
  467. freeze.BottomSurface = 0
  468. freeze.Transparency = .5
  469. freeze.BrickColor = BrickColor.new'Bright blue'
  470. wait(3)
  471. freeze.Anchored = false
  472. freeze:breakJoints()
  473. freeze:breakJoints()
  474. freeze:breakJoints()
  475. freeze:breakJoints()
  476. game:service'Debris':AddItem(freeze, 5)
  477. end)()
  478. end
  479. if v:FindFirstChild("Armed") ~= nil then
  480. v:findFirstChild("Humanoid"):TakeDamage(math.random(5,10))
  481. end
  482. hitsound:play()
  483. wait(3)
  484. local icebreaksound = icebreak:clone()
  485. icebreaksound.Parent = v:findFirstChild'Torso'
  486. icebreaksound:play()
  487. v:findFirstChild("Torso").Anchored = false
  488. end
  489. end)()
  490. end
  491. end)()
  492. action = 'None'
  493. elseif action == "Slash1" then
  494. STOPtrail = false
  495. speed = 0.3
  496. anglespeed = 0
  497. for slash1 = 0, 8 do
  498. angle = (angle % 100) + anglespeed/10
  499. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  500. ncf = neckc0 * CFrame.Angles(0, -math.rad(45), 0)
  501. rjcf = rootc0 * CFrame.new(0, 0, -.6) * CFrame.Angles(0, math.rad(45), 0)
  502. rscf = rsc0 * CFrame.new(-.35, 0, -.5) * CFrame.Angles(math.rad(165), 0, -math.rad(65))
  503. lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.rad(165), 0, math.rad(25))
  504. rlcf = rlc0 * CFrame.Angles(math.rad(12.5), -math.rad(45), math.rad(10.5))
  505. llcf = llc0 * CFrame.Angles(-math.rad(12.5), -math.rad(45), -math.rad(10.5))
  506. hndlcf = swordc0 * CFrame.Angles(math.pi/2, 0, -math.rad(105))
  507. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  508. anglespeed = 5
  509. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, -math.rad(45), math.rad(10.5))
  510. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, -math.rad(45), -math.rad(10.5))
  511. end
  512. rm.C0 = clerp(rm.C0,rscf,speed)
  513. lm.C0 = clerp(lm.C0,lscf,speed)
  514. rj.C0 = clerp(rj.C0,rjcf,speed)
  515. neck.C0 = clerp(neck.C0,ncf,speed)
  516. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  517. llegm.C0 = clerp(llegm.C0,llcf,speed)
  518. wld.C0 = clerp(wld.C0,hndlcf,speed)
  519. wait()
  520. end
  521. coroutine.wrap(function()
  522. for slash2 = 0, 15 do
  523. angle = (angle % 100) + anglespeed/10
  524. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  525. ncf = neckc0 * CFrame.Angles(-math.pi/15, -math.rad(45), 0)
  526. rjcf = rootc0 * CFrame.new(0, 0, -.6) * CFrame.Angles(0, math.rad(45), 0)
  527. rscf = rsc0 * CFrame.new(-.35, 0, -.5) * CFrame.Angles(math.rad(45), 0, -math.rad(65))
  528. lscf = lsc0 * CFrame.new(.35, 0, 0) * CFrame.Angles(math.rad(45), 0, math.rad(25))
  529. rlcf = rlc0 * CFrame.Angles(math.rad(12.5), -math.rad(45), math.rad(10.5))
  530. llcf = llc0 * CFrame.Angles(-math.rad(12.5), -math.rad(45), -math.rad(10.5))
  531. hndlcf = swordc0 * CFrame.Angles(math.pi/3, 0, -math.rad(105))
  532. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  533. anglespeed = 5
  534. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, -math.rad(45), math.rad(10.5))
  535. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, -math.rad(45), -math.rad(10.5))
  536. end
  537. rm.C0 = clerp(rm.C0,rscf,speed)
  538. lm.C0 = clerp(lm.C0,lscf,speed)
  539. rj.C0 = clerp(rj.C0,rjcf,speed)
  540. neck.C0 = clerp(neck.C0,ncf,speed)
  541. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  542. llegm.C0 = clerp(llegm.C0,llcf,speed)
  543. wld.C0 = clerp(wld.C0,hndlcf,speed)
  544. wait()
  545. end
  546. STOPtrail = true
  547. end)()
  548. wait(.05)
  549. for i,v in pairs(workspace:children()) do
  550. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - handle2.Position).magnitude <= 5 and v:FindFirstChild("Armed") ~= nil then
  551. v:findFirstChild("Humanoid"):TakeDamage(math.random(5,10))
  552. hitsound:play()
  553. end
  554. end
  555. wait(.15)
  556. for i,v in pairs(workspace:children()) do
  557. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - handle2.Position).magnitude <= 5 and v:FindFirstChild("Armed") ~= nil then
  558. v:findFirstChild("Humanoid"):TakeDamage(math.random(5,10))
  559. hitsound:play()
  560. end
  561. end
  562. wait(.3)
  563. humanoid.WalkSpeed = 10
  564. controller.Parent = controllerService
  565. action="None"
  566. elseif action == "Slash2" then
  567. STOPtrail = false
  568. humanoid.WalkSpeed = 10
  569. speed = 0.3
  570. anglespeed = 0
  571. for slash1 = 0, 8 do
  572. angle = (angle % 100) + anglespeed/10
  573. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  574. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  575. rjcf = rootc0 * CFrame.Angles(0, -math.rad(15), 0)
  576. rscf = rsc0 * CFrame.Angles(math.pi/2.2, 0, math.pi/2.5)
  577. lscf = lsc0 * CFrame.Angles(math.pi/14, 0, math.pi/24)
  578. rlcf = rlc0 * CFrame.Angles(-math.rad(2.5), 0, math.rad(5))
  579. llcf = llc0 * CFrame.Angles(math.rad(4.5), 0, -math.rad(5))
  580. hndlcf = swordc0 * CFrame.Angles(math.pi/2, math.pi/2, 0)
  581. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  582. anglespeed = 5
  583. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(.5))
  584. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(.5))
  585. end
  586. rm.C0 = clerp(rm.C0,rscf,speed)
  587. lm.C0 = clerp(lm.C0,lscf,speed)
  588. rj.C0 = clerp(rj.C0,rjcf,speed)
  589. neck.C0 = clerp(neck.C0,ncf,speed)
  590. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  591. llegm.C0 = clerp(llegm.C0,llcf,speed)
  592. wld.C0 = clerp(wld.C0,hndlcf,speed)
  593. wait()
  594. end
  595. coroutine.wrap(function()
  596. for slash2 = 0, 15 do
  597. angle = (angle % 100) + anglespeed/10
  598. mvmnt = math.pi * math.sin(math.pi*2/100*(angle*10))
  599. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  600. rjcf = rootc0 * CFrame.new(0, 0, -.3) * CFrame.Angles(0, math.rad(15), 0)
  601. rscf = rsc0 * CFrame.Angles(math.pi/2.2, 0, -math.pi/4)
  602. lscf = lsc0 * CFrame.Angles(-math.rad(30), 0, -math.pi/19)
  603. rlcf = rlc0 * CFrame.Angles(math.rad(10.5), 0, math.rad(5))
  604. llcf = llc0 * CFrame.Angles(-math.rad(.5), 0, -math.rad(5))
  605. if Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 2 then
  606. anglespeed = 5
  607. rlcf = rlc0 * CFrame.Angles(math.sin(-angle)*.55, 0, math.rad(.5))
  608. llcf = llc0 * CFrame.Angles(math.sin(angle)*.55, 0, -math.rad(.5))
  609. end
  610. hndlcf = swordc0 * CFrame.Angles(math.pi/2, math.pi/2, math.pi/16)
  611. rm.C0 = clerp(rm.C0,rscf,speed)
  612. lm.C0 = clerp(lm.C0,lscf,speed)
  613. rj.C0 = clerp(rj.C0,rjcf,speed)
  614. neck.C0 = clerp(neck.C0,ncf,speed)
  615. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  616. llegm.C0 = clerp(llegm.C0,llcf,speed)
  617. wld.C0 = clerp(wld.C0,hndlcf,speed)
  618. wait()
  619. end
  620. STOPtrail = true
  621. end)()
  622. wait(.05)
  623. for i,v in pairs(workspace:children()) do
  624. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - handle2.Position).magnitude <= 5 and v:FindFirstChild("Armed") ~= nil then
  625. v:findFirstChild("Humanoid"):TakeDamage(math.random(5,10))
  626. hitsound:play()
  627. end
  628. end
  629. wait(.15)
  630. for i,v in pairs(workspace:children()) do
  631. if v and v:findFirstChild("Humanoid") and v.Name ~= char.Name and v:findFirstChild("Torso") and (v:findFirstChild("Torso").Position - handle2.Position).magnitude <= 5 and v:FindFirstChild("Armed") ~= nil then
  632. v:findFirstChild("Humanoid"):TakeDamage(math.random(5,10))
  633. hitsound:play()
  634. end
  635. end
  636. wait(.3)
  637. action="None"
  638. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 2 then
  639. if action == "None" then
  640. speed = 0.3
  641. anglespeed = 1/2.5
  642. ncf = neckc0 * CFrame.Angles(math.sin(angle)*0.075, 0, 0)
  643. rjcf = rootc0
  644. rscf = rsc0 * CFrame.Angles(-math.pi/24+math.sin(-angle)*0.05, -math.rad(15), math.rad(5))
  645. lscf = lsc0 * CFrame.Angles(-math.pi/24+math.sin(-angle)*0.05, 0, -math.rad(5))
  646. rlcf = rlc0 * CFrame.Angles(-math.rad(2.5), 0, math.rad(2.5))
  647. llcf = llc0 * CFrame.Angles(math.rad(4.5), 0, -math.rad(2.5))
  648. hndlcf = swordc0 * CFrame.Angles(math.pi/14, 0, 0)
  649. end
  650. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude <= 16 then
  651. if action == "None" then
  652. speed = 0.3
  653. anglespeed = 3
  654. ncf = neckc0 * CFrame.Angles(0, 0, 0)
  655. rjcf = rootc0
  656. rscf = rsc0 * CFrame.Angles(-math.pi/24+math.sin(angle)*.05, -math.rad(15), math.rad(5))
  657. lscf = lsc0 * CFrame.Angles(math.sin(-angle)*.65, 0, -math.rad(5))
  658. 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))
  659. 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))
  660. hndlcf = swordc0 * CFrame.Angles(math.pi/14, 0, 0)
  661. end
  662. elseif Vector3.new(torso.Velocity.x, 0, torso.Velocity.z).magnitude >= 16 then
  663. if action == "None" then
  664. speed = 0.3
  665. anglespeed = 4
  666. ncf = neckc0 * CFrame.Angles(0, -math.sin(angle)*.1, 0)
  667. rscf = rsc0 * CFrame.Angles(-math.pi/3.5,0,0)
  668. 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)
  669. 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)
  670. 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))
  671. 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))
  672. hndlcf = swordc0 * CFrame.Angles(math.pi/2, 0, 0)
  673. end
  674. end
  675. rm.C0 = clerp(rm.C0,rscf,speed)
  676. lm.C0 = clerp(lm.C0,lscf,speed)
  677. rj.C0 = clerp(rj.C0,rjcf,speed)
  678. neck.C0 = clerp(neck.C0,ncf,speed)
  679. rlegm.C0 = clerp(rlegm.C0,rlcf,speed)
  680. llegm.C0 = clerp(llegm.C0,llcf,speed)
  681. wld.C0 = clerp(wld.C0,hndlcf,speed)
  682. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement