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