Advertisement
BmanExoni

Untitled

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