SHOW:
|
|
- or go back to the newest paste.
1 | --[[KillerDarkness0105's/Codex's Sonic script]]-- | |
2 | ||
3 | ||
4 | ||
5 | wait(0.07) | |
6 | Player=game:GetService("Players").LocalPlayer | |
7 | Character=Player.Character | |
8 | PlayerGui=Player.PlayerGui | |
9 | Backpack=Player.Backpack | |
10 | Torso=Character.Torso | |
11 | Head=Character.Head | |
12 | Humanoid=Character.Humanoid | |
13 | LeftArm=Character["Left Arm"] | |
14 | LeftLeg=Character["Left Leg"] | |
15 | RightArm=Character["Right Arm"] | |
16 | RightLeg=Character["Right Leg"] | |
17 | LS=Torso["Left Shoulder"] | |
18 | LH=Torso["Left Hip"] | |
19 | RS=Torso["Right Shoulder"] | |
20 | RH=Torso["Right Hip"] | |
21 | Face = Head.face | |
22 | Neck=Torso.Neck | |
23 | it=Instance.new | |
24 | attacktype=1 | |
25 | attacktype2=1 | |
26 | vt=Vector3.new | |
27 | cf=CFrame.new | |
28 | cn=CFrame.new | |
29 | euler=CFrame.fromEulerAnglesXYZ | |
30 | angles=CFrame.Angles | |
31 | combo = 0 | |
32 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
33 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
34 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
35 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
36 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
37 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
38 | RootPart=Character.HumanoidRootPart | |
39 | RootJoint=RootPart.RootJoint | |
40 | RootCF=euler(-1.57,0,3.14) | |
41 | attack = false | |
42 | attackdebounce = false | |
43 | trispeed=.2 | |
44 | attackmode='none' | |
45 | local idle=0 | |
46 | local Anim="Idle" | |
47 | stance = false | |
48 | local ff = 2 | |
49 | noleg = false | |
50 | evadecooldown = false | |
51 | Humanoid.Animator.Parent = nil | |
52 | equip = false | |
53 | local Effects = {} | |
54 | attackspeed = 0.14 | |
55 | df = false | |
56 | Swing = 1 | |
57 | local sine = 0 | |
58 | local change = 1 | |
59 | local val = 0 | |
60 | local speed = 0 | |
61 | local rs = game:GetService("RunService").RenderStepped | |
62 | cam = workspace.CurrentCamera | |
63 | local RbxUtility = LoadLibrary("RbxUtility") | |
64 | local Create = RbxUtility.Create | |
65 | deb = game:GetService("Debris") | |
66 | Face.Transparency = 0 | |
67 | --Face.Texture = "rbxassetid://176217905" --176217905 | |
68 | Humanoid.WalkSpeed = 64 | |
69 | local freefall = 0 | |
70 | Head.Running.SoundId = "rbxassetid://758199523" | |
71 | Head.Running.Volume = 2 | |
72 | local boost = false | |
73 | Humanoid.JumpPower = 88 | |
74 | local musicnum = 1 | |
75 | ||
76 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10 | |
77 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
78 | local GravPoint = RootPart.Velocity.y | |
79 | local NV = Vector3.new(0,0,0) | |
80 | print("Move list") | |
81 | print("---------") | |
82 | print("Shift = Boost") | |
83 | print("Ctrl = Mach Speed Boost") | |
84 | print("Q = Left QuickStep, E = Right QuickStep") | |
85 | print("C = Slide, in air to stomp") | |
86 | print("Jump Then Hold B near a wall to wallrun") | |
87 | print("M to change music, if you're standing still you'll do a special animation!") | |
88 | print("Space near a wall to walljump, away from a wall homing attack") | |
89 | music = Instance.new("Sound",PlayerGui) | |
90 | music.Volume = 1 | |
91 | music.TimePosition = 0 | |
92 | music.Pitch = 1 | |
93 | music.SoundId = "rbxassetid://1251555494" | |
94 | music.Looped = true | |
95 | music:Play() | |
96 | ||
97 | ||
98 | boostsound = Instance.new("Sound",PlayerGui) | |
99 | boostsound.Volume = .6 | |
100 | boostsound.TimePosition = 0 | |
101 | boostsound.Pitch = 1 | |
102 | boostsound.SoundId = "rbxassetid://924922553" | |
103 | boostsound.Looped = false | |
104 | ||
105 | ||
106 | ||
107 | stompsound = Instance.new("Sound",PlayerGui) | |
108 | stompsound.Volume = 2 | |
109 | stompsound.TimePosition = 0 | |
110 | stompsound.Pitch = 1 | |
111 | stompsound.SoundId = "rbxassetid://1295424184" | |
112 | stompsound.Looped = false | |
113 | ||
114 | ||
115 | ||
116 | so = function(id,par,vol,pit) | |
117 | coroutine.resume(coroutine.create(function() | |
118 | local sou = Instance.new("Sound",par or workspace) | |
119 | sou.Volume=vol | |
120 | sou.Pitch=pit or 1 | |
121 | sou.SoundId=id | |
122 | sou:play() | |
123 | game:GetService("Debris"):AddItem(sou,8) | |
124 | end)) | |
125 | end | |
126 | ||
127 | --save shoulders | |
128 | RSH, LSH=nil, nil | |
129 | --welds | |
130 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
131 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
132 | LH=Torso["Left Hip"] | |
133 | RH=Torso["Right Hip"] | |
134 | TorsoColor=Torso.BrickColor | |
135 | function NoOutline(Part) | |
136 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
137 | end | |
138 | player=Player | |
139 | ch=Character | |
140 | RSH=ch.Torso["Right Shoulder"] | |
141 | LSH=ch.Torso["Left Shoulder"] | |
142 | -- | |
143 | RSH.Parent=nil | |
144 | LSH.Parent=nil | |
145 | -- | |
146 | RW.Name="Right Shoulder" | |
147 | RW.Part0=ch.Torso | |
148 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
149 | RW.C1=cf(0, 0.5, 0) | |
150 | RW.Part1=ch["Right Arm"] | |
151 | RW.Parent=ch.Torso | |
152 | -- | |
153 | LW.Name="Left Shoulder" | |
154 | LW.Part0=ch.Torso | |
155 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
156 | LW.C1=cf(0, 0.5, 0) | |
157 | LW.Part1=ch["Left Arm"] | |
158 | LW.Parent=ch.Torso | |
159 | ||
160 | ||
161 | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) | |
162 | local wld = Instance.new("Weld", wp1) | |
163 | wld.Part0 = wp0 | |
164 | wld.Part1 = wp1 | |
165 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
166 | end | |
167 | local rs = game:GetService("RunService").RenderStepped | |
168 | ||
169 | newWeld(RootPart, Torso, 0, -1, 0) | |
170 | Torso.Weld.C1 = CFrame.new(0, -1, 0) | |
171 | newWeld(Torso, LeftLeg, -0.5, -1, 0) | |
172 | LeftLeg.Weld.C1 = CFrame.new(0, 1, 0) | |
173 | newWeld(Torso, RightLeg, 0.5, -1, 0) | |
174 | RightLeg.Weld.C1 = CFrame.new(0, 1, 0) | |
175 | ||
176 | Player=game:GetService('Players').LocalPlayer | |
177 | Character=Player.Character | |
178 | mouse=Player:GetMouse() | |
179 | m=Instance.new('Model',Character) | |
180 | ||
181 | ||
182 | local function weldBetween(a, b) | |
183 | local weldd = Instance.new("ManualWeld") | |
184 | weldd.Part0 = a | |
185 | weldd.Part1 = b | |
186 | weldd.C0 = CFrame.new() | |
187 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
188 | weldd.Parent = a | |
189 | return weldd | |
190 | end | |
191 | ||
192 | ArtificialHB = Instance.new("BindableEvent", script) | |
193 | ArtificialHB.Name = "Heartbeat" | |
194 | ||
195 | script:WaitForChild("Heartbeat") | |
196 | ||
197 | frame = 1 / 80 | |
198 | tf = 0 | |
199 | allowframeloss = false | |
200 | tossremainder = false | |
201 | lastframe = tick() | |
202 | script.Heartbeat:Fire() | |
203 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
204 | tf = tf + s | |
205 | if tf >= frame then | |
206 | if allowframeloss then | |
207 | script.Heartbeat:Fire() | |
208 | lastframe = tick() | |
209 | else | |
210 | for i = 1, math.floor(tf / frame) do | |
211 | script.Heartbeat:Fire() | |
212 | end | |
213 | lastframe = tick() | |
214 | end | |
215 | if tossremainder then | |
216 | tf = 0 | |
217 | else | |
218 | tf = tf - frame * math.floor(tf / frame) | |
219 | end | |
220 | end | |
221 | end) | |
222 | ||
223 | --[[] | |
224 | function swait(num) | |
225 | if num == 0 or num == nil then | |
226 | ArtificialHB.Event:wait() | |
227 | else | |
228 | for i = 0, num do | |
229 | ArtificialHB.Event:wait() | |
230 | end | |
231 | end | |
232 | end | |
233 | ||
234 | ]] | |
235 | ||
236 | ||
237 | ||
238 | ||
239 | function swait(num) | |
240 | if num == 0 or num == nil then | |
241 | game:service("RunService").Stepped:wait() | |
242 | else | |
243 | for i = 0, num do | |
244 | game:service("RunService").Stepped:wait() | |
245 | end | |
246 | end | |
247 | end | |
248 | ||
249 | function RemoveOutlines(part) | |
250 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
251 | end | |
252 | ||
253 | ||
254 | part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size) | |
255 | local fp = it("Part") | |
256 | fp.formFactor = formfactor | |
257 | fp.Parent = parent | |
258 | fp.Reflectance = reflectance | |
259 | fp.Transparency = transparency | |
260 | fp.CanCollide = false | |
261 | fp.Locked = true | |
262 | fp.BrickColor = brickcolor | |
263 | fp.Name = name | |
264 | fp.Size = size | |
265 | fp.Position = Torso.Position | |
266 | NoOutline(fp) | |
267 | if fp.BrickColor == BrickColor.new("Dark indigo") then | |
268 | fp.Material = "Neon" | |
269 | else | |
270 | if fp.BrickColor == BrickColor.new("Really black") then | |
271 | fp.BrickColor = BrickColor.new("Really black") | |
272 | fp.Material = "Metal" | |
273 | else | |
274 | fp.Material = "Neon" | |
275 | end | |
276 | end | |
277 | fp:BreakJoints() | |
278 | return fp | |
279 | end | |
280 | ||
281 | mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
282 | local mesh = it(Mesh) | |
283 | mesh.Parent = part | |
284 | if Mesh == "SpecialMesh" then | |
285 | mesh.MeshType = meshtype | |
286 | mesh.MeshId = meshid | |
287 | end | |
288 | mesh.Offset = offset | |
289 | mesh.Scale = scale | |
290 | return mesh | |
291 | end | |
292 | ||
293 | weld = function(parent, part0, part1, c0) | |
294 | local weld = it("Weld") | |
295 | weld.Parent = parent | |
296 | weld.Part0 = part0 | |
297 | weld.Part1 = part1 | |
298 | weld.C0 = c0 | |
299 | return weld | |
300 | end | |
301 | ||
302 | F1 = Instance.new("Folder", Character) | |
303 | F1.Name = "Effects Folder" | |
304 | F2 = Instance.new("Folder", F1) | |
305 | F2.Name = "Effects" | |
306 | Triangle = function(a, b, c) | |
307 | end | |
308 | ||
309 | MagicBlock = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
310 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
311 | prt.Anchored = true | |
312 | prt.CanCollide = false | |
313 | prt.CFrame = cframe | |
314 | prt.Name = "prt" | |
315 | msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
316 | game:GetService("Debris"):AddItem(prt, 5) | |
317 | table.insert(Effects, {prt, "Block1", delay, x3, y3, z3}) | |
318 | end | |
319 | ||
320 | ||
321 | ||
322 | MagicCircle = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
323 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
324 | prt.Anchored = true | |
325 | prt.CanCollide = false | |
326 | prt.CFrame = cframe | |
327 | prt.Name = "prt" | |
328 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
329 | game:GetService("Debris"):AddItem(prt, 5) | |
330 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3}) | |
331 | end | |
332 | ||
333 | MagicWave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
334 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
335 | prt.Anchored = true | |
336 | prt.CFrame = cframe | |
337 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1)) | |
338 | game:GetService("Debris"):AddItem(prt, 5) | |
339 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3}) | |
340 | end | |
341 | ||
342 | MagicCylinder = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
343 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2)) | |
344 | prt.Anchored = true | |
345 | prt.CFrame = cframe | |
346 | msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
347 | game:GetService("Debris"):AddItem(prt, 5) | |
348 | Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3} | |
349 | end | |
350 | ||
351 | MagicCylinder2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
352 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2)) | |
353 | prt.Anchored = true | |
354 | prt.CFrame = cframe | |
355 | msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
356 | game:GetService("Debris"):AddItem(prt, 5) | |
357 | Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3} | |
358 | end | |
359 | ||
360 | MagicBlood = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
361 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
362 | prt.Anchored = true | |
363 | prt.CFrame = cframe | |
364 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
365 | game:GetService("Debris"):AddItem(prt, 5) | |
366 | table.insert(Effects, {prt, "Blood", delay, x3, y3, z3}) | |
367 | end | |
368 | ||
369 | ElecEffect = function(cff, x, y, z) | |
370 | local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1)) | |
371 | prt.Anchored = true | |
372 | prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z)) | |
373 | prt.CFrame = cf(prt.Position) | |
374 | game:GetService("Debris"):AddItem(prt, 2) | |
375 | xval = math.random() / 2 | |
376 | yval = math.random() / 2 | |
377 | zval = math.random() / 2 | |
378 | msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval)) | |
379 | Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval} | |
380 | end | |
381 | ||
382 | function FindNearestTorso(Position, Distance, SinglePlayer) | |
383 | if SinglePlayer then | |
384 | return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance | |
385 | end | |
386 | local List = {} | |
387 | for i, v in pairs(workspace:GetChildren()) do | |
388 | if v:IsA("Model") then | |
389 | if v:findFirstChild("Torso") then | |
390 | if v ~= Character then | |
391 | if (v.Torso.Position - Position).magnitude <= Distance then | |
392 | table.insert(List, v) | |
393 | end | |
394 | end | |
395 | end | |
396 | end | |
397 | end | |
398 | return List | |
399 | end | |
400 | ||
401 | ||
402 | function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
403 | local Part = Create("Part"){ | |
404 | Parent = Parent, | |
405 | Reflectance = Reflectance, | |
406 | Transparency = Transparency, | |
407 | CanCollide = false, | |
408 | Locked = true, | |
409 | BrickColor = BrickColor.new(tostring(BColor)), | |
410 | Name = Name, | |
411 | Size = Size, | |
412 | Material = Material, | |
413 | } | |
414 | RemoveOutlines(Part) | |
415 | return Part | |
416 | end | |
417 | ||
418 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
419 | local Msh = Create(Mesh){ | |
420 | Parent = Part, | |
421 | Offset = OffSet, | |
422 | Scale = Scale, | |
423 | } | |
424 | if Mesh == "SpecialMesh" then | |
425 | Msh.MeshType = MeshType | |
426 | Msh.MeshId = MeshId | |
427 | end | |
428 | return Msh | |
429 | end | |
430 | ||
431 | ||
432 | ||
433 | function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
434 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
435 | prt.Anchored = true | |
436 | prt.CFrame = cframe | |
437 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
438 | game:GetService("Debris"):AddItem(prt, 10) | |
439 | if Type == 1 or Type == nil then | |
440 | table.insert(Effects, { | |
441 | prt, | |
442 | "Block1", | |
443 | delay, | |
444 | x3, | |
445 | y3, | |
446 | z3, | |
447 | msh | |
448 | }) | |
449 | elseif Type == 2 then | |
450 | table.insert(Effects, { | |
451 | prt, | |
452 | "Block2", | |
453 | delay, | |
454 | x3, | |
455 | y3, | |
456 | z3, | |
457 | msh | |
458 | }) | |
459 | end | |
460 | end | |
461 | ||
462 | function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
463 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
464 | prt.Anchored = true | |
465 | prt.CFrame = cframe | |
466 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
467 | game:GetService("Debris"):AddItem(prt, 10) | |
468 | table.insert(Effects, { | |
469 | prt, | |
470 | "Cylinder", | |
471 | delay, | |
472 | x3, | |
473 | y3, | |
474 | z3, | |
475 | msh | |
476 | }) | |
477 | end | |
478 | ||
479 | function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay,material) | |
480 | local prt=CreatePart(workspace,material,0,0,brickcolor,"Effect",vt(.5,.5,.5))--part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
481 | prt.Anchored=true | |
482 | prt.CFrame=cframe | |
483 | msh=CreateMesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1)) | |
484 | game:GetService("Debris"):AddItem(prt,2) | |
485 | coroutine.resume(coroutine.create(function(Part,Mesh,num) | |
486 | for i=0,1,delay do | |
487 | swait() | |
488 | Part.Transparency=i | |
489 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
490 | end | |
491 | Part.Parent=nil | |
492 | end),prt,msh,(math.random(0,1)+math.random())/5) | |
493 | end | |
494 | ||
495 | function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
496 | local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
497 | prt.Anchored = true | |
498 | prt.CFrame = cframe | |
499 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
500 | game:GetService("Debris"):AddItem(prt, 10) | |
501 | table.insert(Effects, { | |
502 | prt, | |
503 | "Cylinder", | |
504 | delay, | |
505 | x3, | |
506 | y3, | |
507 | z3, | |
508 | msh | |
509 | }) | |
510 | end | |
511 | ||
512 | function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
513 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
514 | prt.Anchored = true | |
515 | prt.CFrame = cframe | |
516 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
517 | game:GetService("Debris"):AddItem(prt, 10) | |
518 | table.insert(Effects, { | |
519 | prt, | |
520 | "Cylinder", | |
521 | delay, | |
522 | x3, | |
523 | y3, | |
524 | z3, | |
525 | msh | |
526 | }) | |
527 | end | |
528 | ||
529 | function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
530 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
531 | prt.Anchored = true | |
532 | prt.CFrame = cframe | |
533 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
534 | game:GetService("Debris"):AddItem(prt, 10) | |
535 | table.insert(Effects, { | |
536 | prt, | |
537 | "Cylinder", | |
538 | delay, | |
539 | x3, | |
540 | y3, | |
541 | z3, | |
542 | msh | |
543 | }) | |
544 | end | |
545 | ||
546 | ||
547 | function MoonEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
548 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
549 | prt.Anchored = true | |
550 | prt.CFrame = cframe | |
551 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://259403370", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
552 | game:GetService("Debris"):AddItem(prt, 10) | |
553 | table.insert(Effects, { | |
554 | prt, | |
555 | "Cylinder", | |
556 | delay, | |
557 | x3, | |
558 | y3, | |
559 | z3, | |
560 | msh | |
561 | }) | |
562 | end | |
563 | ||
564 | function HeadEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
565 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
566 | prt.Anchored = true | |
567 | prt.CFrame = cframe | |
568 | local msh = CreateMesh("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
569 | game:GetService("Debris"):AddItem(prt, 10) | |
570 | table.insert(Effects, { | |
571 | prt, | |
572 | "Cylinder", | |
573 | delay, | |
574 | x3, | |
575 | y3, | |
576 | z3, | |
577 | msh | |
578 | }) | |
579 | end | |
580 | ||
581 | function BreakEffect(brickcolor, cframe, x1, y1, z1) | |
582 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
583 | prt.Anchored = true | |
584 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
585 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
586 | local num = math.random(10, 50) / 1000 | |
587 | game:GetService("Debris"):AddItem(prt, 10) | |
588 | table.insert(Effects, { | |
589 | prt, | |
590 | "Shatter", | |
591 | num, | |
592 | prt.CFrame, | |
593 | math.random() - math.random(), | |
594 | 0, | |
595 | math.random(50, 100) / 100 | |
596 | }) | |
597 | end | |
598 | ||
599 | local lerp = function(a, b, t) | |
600 | return a * (1 - t) + b * t | |
601 | end | |
602 | ||
603 | function clerp(a,b,t) | |
604 | local qa = {QuaternionFromCFrame(a)} | |
605 | local qb = {QuaternionFromCFrame(b)} | |
606 | local ax, ay, az = a.x, a.y, a.z | |
607 | local bx, by, bz = b.x, b.y, b.z | |
608 | local _t = 1-t | |
609 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
610 | end | |
611 | ||
612 | function QuaternionFromCFrame(cf) | |
613 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
614 | local trace = m00 + m11 + m22 | |
615 | if trace > 0 then | |
616 | local s = math.sqrt(1 + trace) | |
617 | local recip = 0.5/s | |
618 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
619 | else | |
620 | local i = 0 | |
621 | if m11 > m00 then | |
622 | i = 1 | |
623 | end | |
624 | if m22 > (i == 0 and m00 or m11) then | |
625 | i = 2 | |
626 | end | |
627 | if i == 0 then | |
628 | local s = math.sqrt(m00-m11-m22+1) | |
629 | local recip = 0.5/s | |
630 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
631 | elseif i == 1 then | |
632 | local s = math.sqrt(m11-m22-m00+1) | |
633 | local recip = 0.5/s | |
634 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
635 | elseif i == 2 then | |
636 | local s = math.sqrt(m22-m00-m11+1) | |
637 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
638 | end | |
639 | end | |
640 | end | |
641 | ||
642 | ||
643 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
644 | local xs, ys, zs = x + x, y + y, z + z | |
645 | local wx, wy, wz = w*xs, w*ys, w*zs | |
646 | local xx = x*xs | |
647 | local xy = x*ys | |
648 | local xz = x*zs | |
649 | local yy = y*ys | |
650 | local yz = y*zs | |
651 | local zz = z*zs | |
652 | return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) | |
653 | end | |
654 | function QuaternionSlerp(a, b, t) | |
655 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
656 | local startInterp, finishInterp; | |
657 | if cosTheta >= 0.0001 then | |
658 | if (1 - cosTheta) > 0.0001 then | |
659 | local theta = math.acos(cosTheta) | |
660 | local invSinTheta = 1/math.sin(theta) | |
661 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
662 | finishInterp = math.sin(t*theta)*invSinTheta | |
663 | else | |
664 | startInterp = 1-t | |
665 | finishInterp = t | |
666 | end | |
667 | else | |
668 | if (1+cosTheta) > 0.0001 then | |
669 | local theta = math.acos(-cosTheta) | |
670 | local invSinTheta = 1/math.sin(theta) | |
671 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
672 | finishInterp = math.sin(t*theta)*invSinTheta | |
673 | else | |
674 | startInterp = t-1 | |
675 | finishInterp = t | |
676 | end | |
677 | end | |
678 | return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp | |
679 | end | |
680 | ||
681 | function weld5(part0, part1, c0, c1) | |
682 | weeld=Instance.new("Weld", part0) | |
683 | weeld.Part0=part0 | |
684 | weeld.Part1=part1 | |
685 | weeld.C0=c0 | |
686 | weeld.C1=c1 | |
687 | return weeld | |
688 | end | |
689 | ||
690 | --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
691 | ||
692 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
693 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
694 | end | |
695 | ||
696 | ||
697 | ||
698 | ||
699 | ||
700 | ||
701 | Character.Humanoid.MaxHealth = 120 | |
702 | Character.Humanoid.Health = 120 | |
703 | ||
704 | local f = 0 | |
705 | local b = Instance.new("BlurEffect",cam) | |
706 | local c = Instance.new('PointLight', Torso) | |
707 | c.Range = 16 | |
708 | c.Color = Color3.new(0, 1,1) | |
709 | c.Brightness = 1.5 | |
710 | game:GetService("RunService"):BindToRenderStep("W0tT", 0, function() | |
711 | ||
712 | b.Size = b.Size - 4 | |
713 | if boost == true then | |
714 | c.Enabled = true | |
715 | cam.FieldOfView = lerp(cam.FieldOfView, 110, 0.5) | |
716 | -- cam.FieldOfView = 110 | |
717 | freefall = 0 | |
718 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,3),0.25) | |
719 | SphereEffect(BrickColor.new("Cyan"),RightLeg.CFrame*CFrame.new(0,-1,0)*angles(math.random(-180,180),math.random(-180,180),math.random(-180,180)),1.4,12,1.4,2.8,26,2.8,0.07) | |
720 | SphereEffect(BrickColor.new("Cyan"),LeftLeg.CFrame*CFrame.new(0,-1,0)*angles(math.random(-180,180),math.random(-180,180),math.random(-180,180)),1.4,12,1.4,2.8,26,2.8,0.07) | |
721 | if hitfloor ~= nil and Anim ~= "runIdle" then | |
722 | SpecialEffect(BrickColor.new("Cyan"),RootPart.CFrame*CFrame.new(0,-3.4,.78) ,2,2,2, 1.5,1.5,1.5,.09) | |
723 | end | |
724 | end | |
725 | if boost == false then | |
726 | cam.FieldOfView = lerp(cam.FieldOfView, 70, 0.076) | |
727 | --cam.FieldOfView = 70 | |
728 | c.Enabled = false | |
729 | end | |
730 | end) | |
731 | ||
732 | ||
733 | ||
734 | mouse.KeyDown:connect(function(key) | |
735 | if string.byte(key) == 48 then | |
736 | b.Size = 40 | |
737 | Swing = 2 | |
738 | freefall = 0 | |
739 | ||
740 | coroutine.resume(coroutine.create(function() | |
741 | for i = 0,1,0.1 do | |
742 | swait() | |
743 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.35*1.8,0.35*1.8),math.random(-0.35*1.8,0.35*1.8),math.random(-0.35*1.8,0.35*1.8)),0.24) | |
744 | end | |
745 | end)) | |
746 | Humanoid.WalkSpeed = 180 | |
747 | RootPart.Velocity = RootPart.CFrame.lookVector*150 | |
748 | RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-9.2) , 1, 1, 1, 8, 8, 8, 0.14,"Neon") | |
749 | boost = true | |
750 | boostsound:Play() | |
751 | end | |
752 | end) | |
753 | ||
754 | mouse.KeyUp:connect(function(key) | |
755 | if string.byte(key) == 48 then | |
756 | Swing = 1 | |
757 | Humanoid.WalkSpeed = 64 | |
758 | boost = false | |
759 | boostsound:Stop() | |
760 | ||
761 | end | |
762 | end) | |
763 | ||
764 | ||
765 | ||
766 | ||
767 | mouse.KeyDown:connect(function(key) | |
768 | if string.byte(key) == 50 then | |
769 | b.Size = 40 | |
770 | freefall = 0 | |
771 | Swing = 2 | |
772 | ||
773 | coroutine.resume(coroutine.create(function() | |
774 | for i = 0,1,0.1 do | |
775 | swait() | |
776 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.35*2.8,0.35*2.8),math.random(-0.35*2.8,0.35*2.8),math.random(-0.35*2.8,0.35*2.8)),0.48) | |
777 | end | |
778 | end)) | |
779 | ||
780 | Humanoid.WalkSpeed = 650 | |
781 | RootPart.Velocity = RootPart.CFrame.lookVector*550 | |
782 | RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-9.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon") | |
783 | RingEffect(BrickColor.new("White"), RootPart.CFrame*CFrame.new(0,0,-11.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon") | |
784 | RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-13.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon") | |
785 | boost = true | |
786 | boostsound:Play() | |
787 | end | |
788 | end) | |
789 | ||
790 | mouse.KeyUp:connect(function(key) | |
791 | if string.byte(key) == 50 then | |
792 | Swing = 1 | |
793 | Humanoid.WalkSpeed = 64 | |
794 | boost = false | |
795 | boostsound:Stop() | |
796 | ||
797 | end | |
798 | end) | |
799 | ||
800 | ||
801 | local lastwall = nil | |
802 | local jumped = false | |
803 | ||
804 | ||
805 | ||
806 | ||
807 | ||
808 | ||
809 | local vwall = false | |
810 | ||
811 | mouse.KeyDown:connect(function(key) | |
812 | if key == 'b' and hitfloor == nil and attack == false then | |
813 | vrun() | |
814 | end | |
815 | end) | |
816 | ||
817 | ||
818 | function vrun() | |
819 | local ray = Ray.new( | |
820 | RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5 | |
821 | ) | |
822 | local hit, position, normal = workspace:FindPartOnRay(ray, character) | |
823 | ||
824 | if hit then | |
825 | if hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "prt" and hit.CanCollide == true then | |
826 | vwall = true | |
827 | local NV = Vector3.new(0,0,0) | |
828 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10 | |
829 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
830 | local GravPoint = RootPart.Velocity.y | |
831 | local velo = Instance.new("BodyVelocity",Torso) | |
832 | velo.MaxForce = Vector3.new(400000,400000,400000) | |
833 | ||
834 | attack = true | |
835 | while vwall == true and ray and hit do | |
836 | swait() | |
837 | change = 0.84+ Humanoid.WalkSpeed/132 | |
838 | if Humanoid.WalkSpeed > 40 and Humanoid.WalkSpeed < 70 then | |
839 | velo.Velocity = Vector3.new(0,40,0) | |
840 | end | |
841 | if Humanoid.WalkSpeed > 70 and Humanoid.WalkSpeed < 200 then | |
842 | velo.Velocity = Vector3.new(0,80,0) | |
843 | end | |
844 | if Humanoid.WalkSpeed > 200 then | |
845 | velo.Velocity = Vector3.new(0,130,0) | |
846 | end | |
847 | ray = Ray.new( | |
848 | RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5 | |
849 | ) | |
850 | hit, position, normal = workspace:FindPartOnRay(ray, character) | |
851 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/2), .6) * angles(math.rad(96), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1) | |
852 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+20*math.sin(sine/2)),math.rad(0),math.rad(0+5*math.sin(sine/4)) + RootPart.RotVelocity.Y / 13),.1) | |
853 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.1) * angles(math.rad(-90-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(15+2*math.sin(sine/4))- RootPart.RotVelocity.Y / 34),.15) | |
854 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.1)*angles(math.rad(-90-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-15+2*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34),.15) | |
855 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.28*math.cos(sine/4), 0-0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0+104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.3+ Humanoid.WalkSpeed/272) | |
856 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.28*math.cos(sine/4),0+0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0-104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.3+ Humanoid.WalkSpeed/272) | |
857 | end | |
858 | velo:Destroy() | |
859 | wait(0.07) | |
860 | ||
861 | if vwall == false then | |
862 | ||
863 | RootPart.Velocity = -RootPart.CFrame.lookVector*68 + Vector3.new(0,86,0) | |
864 | ||
865 | --[[] | |
866 | for i = 0,5,0.2 do | |
867 | rs:wait() | |
868 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -0.79, 0) * CFrame.Angles(math.rad(0+100*i), math.rad(0), math.rad(0)), 0.2) | |
869 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.2) | |
870 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(-60), math.rad(40)),.2) | |
871 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(180), math.rad(60), math.rad(-40)),.2) | |
872 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
873 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
874 | end | |
875 | ]] | |
876 | ||
877 | ||
878 | for i = 0,4,0.1 do | |
879 | swait() | |
880 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
881 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+260*i), math.rad(0), math.rad(0)), 0.6) | |
882 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
883 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
884 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
885 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
886 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
887 | end | |
888 | ||
889 | attack = false | |
890 | ||
891 | ||
892 | end | |
893 | ||
894 | ||
895 | if vwall == true then | |
896 | RootPart.Velocity = RootPart.CFrame.lookVector*38 + Vector3.new(0,86,0) | |
897 | ||
898 | --[[] | |
899 | for i = 0,5,0.2 do | |
900 | rs:wait() | |
901 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -0.79, 0) * CFrame.Angles(math.rad(0+100*i), math.rad(0), math.rad(0)), 0.2) | |
902 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.2) | |
903 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(-60), math.rad(40)),.2) | |
904 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(180), math.rad(60), math.rad(-40)),.2) | |
905 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
906 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
907 | end | |
908 | ]] | |
909 | ||
910 | ||
911 | for i = 0,4,0.15 do | |
912 | swait() | |
913 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
914 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0-260*i), math.rad(0), math.rad(0)), 0.6) | |
915 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
916 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
917 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
918 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
919 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
920 | end | |
921 | ||
922 | attack = false | |
923 | ||
924 | end | |
925 | ||
926 | ||
927 | end | |
928 | end | |
929 | end | |
930 | ||
931 | ||
932 | ||
933 | ||
934 | mouse.KeyUp:connect(function(key) | |
935 | if key == 'b' and vwall == true then | |
936 | vwall = false | |
937 | end | |
938 | end) | |
939 | ||
940 | ||
941 | ||
942 | ||
943 | ||
944 | function Ldash() | |
945 | ||
946 | ||
947 | ||
948 | evadecooldown = true | |
949 | attack = true | |
950 | k = math.random(1,2) | |
951 | if k == 1 then | |
952 | so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1) | |
953 | else | |
954 | so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1) | |
955 | end | |
956 | ||
957 | ||
958 | ||
959 | ||
960 | ||
961 | --+173.8*i | |
962 | for i = 0,.7,0.1 do | |
963 | swait() | |
964 | Head.Velocity = Head.CFrame.rightVector * -135 | |
965 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(32)), 0.2) | |
966 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(-9),math.rad(-14)),.2) | |
967 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.2) * angles(math.rad(27), math.rad(0), math.rad(30)),.2) | |
968 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(30)),.2) | |
969 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(12)), 0.2) | |
970 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(8)), 0.2) | |
971 | end | |
972 | ||
973 | attack = false | |
974 | wait(0.08) | |
975 | evadecooldown = false | |
976 | ||
977 | ||
978 | end | |
979 | ||
980 | ||
981 | ||
982 | ||
983 | ||
984 | function Rdash() | |
985 | ||
986 | ||
987 | ||
988 | evadecooldown = true | |
989 | attack = true | |
990 | k = math.random(1,2) | |
991 | if k == 1 then | |
992 | so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1) | |
993 | else | |
994 | so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1) | |
995 | end | |
996 | ||
997 | ||
998 | ||
999 | ||
1000 | ||
1001 | --+173.8*i | |
1002 | for i = 0,.7,0.1 do | |
1003 | swait() | |
1004 | Head.Velocity = Head.CFrame.rightVector * 135 | |
1005 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-32)), 0.2) | |
1006 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(9),math.rad(14)),.2) | |
1007 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-30)),.2) | |
1008 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.2) * angles(math.rad(27), math.rad(0), math.rad(-30)),.2) | |
1009 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-8)), 0.2) | |
1010 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-12)), 0.2) | |
1011 | end | |
1012 | ||
1013 | attack = false | |
1014 | wait(0.08) | |
1015 | evadecooldown = false | |
1016 | ||
1017 | ||
1018 | end | |
1019 | local sliding = false | |
1020 | ||
1021 | ||
1022 | function Slide() | |
1023 | ||
1024 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10 | |
1025 | spd = spd + 30 | |
1026 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
1027 | local GravPoint = RootPart.Velocity.y | |
1028 | if spd > 40 and hitfloor ~= nil then | |
1029 | noleg = true | |
1030 | ||
1031 | attack = true | |
1032 | k = math.random(1,2) | |
1033 | if k == 1 then | |
1034 | so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1) | |
1035 | else | |
1036 | so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1) | |
1037 | end | |
1038 | ||
1039 | ||
1040 | ||
1041 | ||
1042 | ||
1043 | ||
1044 | ||
1045 | ||
1046 | ||
1047 | ||
1048 | local NV = Vector3.new(0,0,0) | |
1049 | local bv = Instance.new("BodyVelocity", Torso) | |
1050 | bv.maxForce = Vector3.new(1/0,1/0,1/0) | |
1051 | bv.velocity = dir*spd | |
1052 | local bg = Instance.new("BodyGyro", Torso) | |
1053 | bg.maxTorque = Vector3.new(1/0,1/0,1/0) | |
1054 | bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0) | |
1055 | Head.Running.SoundId = "rbxassetid://1295468446" | |
1056 | Head.Running.TimePosition = 0 | |
1057 | ||
1058 | Humanoid.PlatformStand = true | |
1059 | while spd > 2 and hitfloor ~= nil and sliding == true do | |
1060 | swait() | |
1061 | spd = spd - 0.95 | |
1062 | bv.velocity = dir*spd + Vector3.new(0,0,0) | |
1063 | bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0) | |
1064 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -2.3, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(12)), 0.2) | |
1065 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(34),math.rad(0),math.rad(12)),.2) | |
1066 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(110), math.rad(0), math.rad(70)),.2) | |
1067 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.2) * angles(math.rad(0), math.rad(0), math.rad(-60)),.2) | |
1068 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
1069 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -0.56, -0.2) * CFrame.Angles(math.rad(-24), math.rad(0), math.rad(0)), 0.2) | |
1070 | end | |
1071 | bv:Destroy() | |
1072 | bg:Destroy() | |
1073 | Head.Running.SoundId = "rbxassetid://758199523" | |
1074 | Head.Running.TimePosition = 0 | |
1075 | Humanoid.PlatformStand = false | |
1076 | attack = false | |
1077 | sliding = false | |
1078 | wait(0.05) | |
1079 | evadecooldown = false | |
1080 | ||
1081 | ||
1082 | end | |
1083 | end | |
1084 | ||
1085 | function land() | |
1086 | attack = true | |
1087 | RootPart.Velocity = Vector3.new(0,0,0) | |
1088 | WaveEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,-1,0) , 1, 1, 1, 3, 0.8, 3, 0.06) | |
1089 | so("http://www.roblox.com/asset/?id=1295424585", Torso, 3.5, 1) | |
1090 | ||
1091 | coroutine.resume(coroutine.create(function() | |
1092 | for i = 0,1,0.1 do | |
1093 | swait() | |
1094 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.55*2.8,0.55*2.8),math.random(-0.55*2.8,0.55*2.8),math.random(-0.55*2.8,0.55*2.8)),0.44) | |
1095 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -2, 0) * CFrame.Angles(math.rad(-16), math.rad(0), math.rad(0)), 0.5) | |
1096 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(7),math.rad(0),math.rad(0)),.5) | |
1097 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(87)),.5) | |
1098 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0) * angles(math.rad(0), math.rad(0), math.rad(-87)),.5) | |
1099 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, 0, -0.5) * CFrame.Angles(math.rad(16), math.rad(0), math.rad(0)), 0.5) | |
1100 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1.14, 0.2) * CFrame.Angles(math.rad(-17), math.rad(0), math.rad(0)), 0.5) | |
1101 | ||
1102 | end | |
1103 | attack = false | |
1104 | ||
1105 | ||
1106 | end)) | |
1107 | ||
1108 | ||
1109 | ||
1110 | end | |
1111 | ||
1112 | ||
1113 | ||
1114 | ||
1115 | function stomp() | |
1116 | attack = true | |
1117 | stompsound:Play() | |
1118 | ||
1119 | while hitfloor == nil do | |
1120 | swait() | |
1121 | b.Size = 12 | |
1122 | WaveEffect(BrickColor.new("Cyan"), LeftLeg.CFrame*CFrame.new(0,-2.4,0) , 1, 1, 1, 0.8, 0.8, 0.8, 0.14) | |
1123 | RootPart.Velocity = Vector3.new(0,RootPart.Velocity.y/1.6,0) +Vector3.new(0,-150,0) | |
1124 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1125 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(0+4*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07) | |
1126 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(140+12*math.cos(sine/1.3))), 0.07) | |
1127 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(-140+12*math.cos(sine/1.3))), 0.07) | |
1128 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(60+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07) | |
1129 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3), -0.13) * CFrame.Angles(math.rad(0+4*math.cos(sine/1.3)), math.rad(3), math.rad(0)), 0.1) | |
1130 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, .27+0.17*math.cos(sine/1.3), -0.56) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(0), math.rad(0)), 0.1) | |
1131 | ||
1132 | end | |
1133 | stompsound:Stop() | |
1134 | land() | |
1135 | ||
1136 | ||
1137 | end | |
1138 | ||
1139 | ||
1140 | function changemusic() | |
1141 | musicnum = musicnum + 1 | |
1142 | music.TimePosition = 0 | |
1143 | local osix = false | |
1144 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude | |
1145 | if musicnum > 14 then | |
1146 | musicnum = 1 | |
1147 | end | |
1148 | if musicnum == 1 then | |
1149 | music.SoundId = "rbxassetid://179029173" | |
1150 | end | |
1151 | if musicnum == 2 then | |
1152 | music.SoundId = "rbxassetid://146443855" | |
1153 | end | |
1154 | if musicnum == 3 then | |
1155 | music.SoundId = "rbxassetid://1342408291" | |
1156 | end | |
1157 | if musicnum == 4 then | |
1158 | music.SoundId = "rbxassetid://201219416" | |
1159 | end | |
1160 | if musicnum == 5 then | |
1161 | music.SoundId = "rbxassetid://1390472571" | |
1162 | end | |
1163 | if musicnum == 6 then | |
1164 | osix = true | |
1165 | music.SoundId = "rbxassetid://249974783" | |
1166 | end | |
1167 | if musicnum == 7 then | |
1168 | music.SoundId = "rbxassetid://1851880603" | |
1169 | end | |
1170 | if musicnum == 8 then | |
1171 | music.SoundId = "rbxassetid://412034984" | |
1172 | end | |
1173 | if musicnum == 9 then | |
1174 | music.SoundId = "rbxassetid://536915629" | |
1175 | end | |
1176 | if musicnum == 10 then | |
1177 | music.SoundId = "rbxassetid://1200005861" | |
1178 | end | |
1179 | if musicnum == 11 then | |
1180 | music.SoundId = "rbxassetid://1055930631" | |
1181 | end | |
1182 | if musicnum == 12 then | |
1183 | music.SoundId = "rbxassetid://300269553" | |
1184 | end | |
1185 | if musicnum == 13 then | |
1186 | music.SoundId = "rbxassetid://199897052" | |
1187 | end | |
1188 | if musicnum == 14 then | |
1189 | music.SoundId = "rbxassetid://638115895" | |
1190 | end | |
1191 | ||
1192 | if spd < 14 then | |
1193 | Humanoid.Jump = true | |
1194 | ||
1195 | if osix == false then | |
1196 | so("rbxassetid://537371462",PlayerGui,2,1) | |
1197 | end | |
1198 | ||
1199 | ||
1200 | RootPart.Velocity = Vector3.new(0,102,0) | |
1201 | attack = true | |
1202 | wait(0.08) | |
1203 | for i = 0,7,0.1 do | |
1204 | swait() | |
1205 | RootPart.Velocity = Vector3.new(0,2,0) | |
1206 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1207 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0-260*i), math.rad(0), math.rad(0)), 0.6) | |
1208 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1209 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1210 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1211 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1212 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1213 | ||
1214 | end | |
1215 | b.Size = 40 | |
1216 | MoonEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,0) , 1, 1, 1, 8, 8, 8, 0.06) | |
1217 | ||
1218 | if osix == true then | |
1219 | osix = false | |
1220 | so("rbxassetid://156821036",PlayerGui,2,1) | |
1221 | end | |
1222 | ||
1223 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -3, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1) | |
1224 | for i = 0,5,0.1 do | |
1225 | swait() | |
1226 | RootPart.Velocity = Vector3.new(0,3.5,0) | |
1227 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1228 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1+0.1*i, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.21) | |
1229 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(22-2*i),math.rad(0),math.rad(0)),.21) | |
1230 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.09*i, 0) * angles(math.rad(20-6*i), math.rad(0), math.rad(90+13*i)), 0.21) | |
1231 | LW.C0 = clerp(LW.C0, CFrame.new(-1.0-0.12*i, 0.5, -0.4+0.05*i) * angles(math.rad(20+13*i), math.rad(0), math.rad(20-13*i)), 0.21) | |
1232 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(-22-4*i)), 0.21) | |
1233 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(22+4*i)), 0.21) | |
1234 | end | |
1235 | attack = false | |
1236 | end | |
1237 | end | |
1238 | ||
1239 | ||
1240 | mouse.KeyDown:connect(function(key) | |
1241 | if key == 'q' and attack == false and evadecooldown == false then | |
1242 | Ldash() | |
1243 | end | |
1244 | end) | |
1245 | ||
1246 | ||
1247 | ||
1248 | mouse.KeyDown:connect(function(key) | |
1249 | if key == 'e' and attack == false and evadecooldown == false then | |
1250 | Rdash() | |
1251 | end | |
1252 | end) | |
1253 | ||
1254 | mouse.KeyDown:connect(function(key) | |
1255 | if key == 'c' and attack == false and evadecooldown == false and hitfloor ~= nil then | |
1256 | sliding = true | |
1257 | Slide() | |
1258 | end | |
1259 | end) | |
1260 | ||
1261 | mouse.KeyDown:connect(function(key) | |
1262 | if key == 'c' and attack == false and hitfloor == nil then | |
1263 | stomp() | |
1264 | end | |
1265 | end) | |
1266 | ||
1267 | ||
1268 | local walljump = false | |
1269 | ||
1270 | ||
1271 | function walljumpp() | |
1272 | local ray = Ray.new( | |
1273 | Torso.CFrame.p, RootPart.CFrame.lookVector *5 | |
1274 | ) | |
1275 | local hit, position, normal = workspace:FindPartOnRay(ray, character) | |
1276 | ||
1277 | if hit then | |
1278 | if hit.Parent.Parent ~= Character and hit.Parent ~= Character then | |
1279 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
1280 | GravPoint = 0 | |
1281 | freefall = 0 | |
1282 | walljump = true | |
1283 | Humanoid.AutoRotate = false | |
1284 | local velo = Instance.new("BodyVelocity",Torso) | |
1285 | velo.MaxForce = Vector3.new(400000,400000,400000) | |
1286 | --game.Debris:AddItem(velo,0.1) | |
1287 | attack = true | |
1288 | while hitfloor == nil and walljump == true and ray and hit do | |
1289 | swait() | |
1290 | freefall = 0 | |
1291 | GravPoint = GravPoint - 0.36 | |
1292 | ray = Ray.new( | |
1293 | RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5 | |
1294 | ) | |
1295 | hit, position, normal = workspace:FindPartOnRay(ray, character) | |
1296 | velo.Velocity = vt(0,GravPoint,0) | |
1297 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.9) * CFrame.Angles(math.rad(5), math.rad(90), math.rad(8)), 0.2) | |
1298 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(7),math.rad(0),math.rad(86)),.2) | |
1299 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(120)),.2) | |
1300 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)),.2) | |
1301 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-6), math.rad(14), math.rad(-12)), 0.2) | |
1302 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(23)), 0.2) | |
1303 | end | |
1304 | if walljump == false then | |
1305 | k = math.random(1,3) | |
1306 | if k == 1 then | |
1307 | so("http://www.roblox.com/asset/?id=800121776", Head, 2.5, 1) | |
1308 | else if k == 2 then | |
1309 | so("http://www.roblox.com/asset/?id=804889329", Head, 2.5, 1) | |
1310 | else if k == 3 then | |
1311 | so("http://www.roblox.com/asset/?id=804907617", Head, 2.5, 1) | |
1312 | end | |
1313 | end | |
1314 | end | |
1315 | ||
1316 | velo:Destroy() | |
1317 | attack = false | |
1318 | coroutine.resume(coroutine.create(function() | |
1319 | for i = 0,1,0.1 do | |
1320 | swait() | |
1321 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1322 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+260*i), math.rad(0), math.rad(0)), 0.6) | |
1323 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1324 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1325 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1326 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1327 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1328 | end | |
1329 | end)) | |
1330 | ||
1331 | Humanoid.AutoRotate = true | |
1332 | RootPart.Velocity = RootPart.CFrame.lookVector * -137 + Vector3.new(0,136,0) | |
1333 | wait(0.07) | |
1334 | RootPart.CFrame = CFrame.new(RootPart.CFrame.p,-RootPart.CFrame.lookVector) | |
1335 | end | |
1336 | if walljump == true then | |
1337 | attack = false | |
1338 | walljump = false | |
1339 | Humanoid.AutoRotate = true | |
1340 | velo:Destroy() | |
1341 | end | |
1342 | end | |
1343 | end | |
1344 | end | |
1345 | ||
1346 | ||
1347 | local homed = nil | |
1348 | function home() | |
1349 | if walljump ~= true then | |
1350 | for i, v in pairs(FindNearestTorso(Torso.CFrame.p, 80)) do | |
1351 | if v:FindFirstChild('Head') then | |
1352 | Grabbed = true | |
1353 | homed = v | |
1354 | end | |
1355 | end | |
1356 | ||
1357 | if homed ~= nil and homed:FindFirstChildOfClass("Humanoid").Health > 1 and walljump == false then | |
1358 | so("http://www.roblox.com/asset/?id=162460823", Head, 1, .8) | |
1359 | local SBall = Instance.new("Part",Character) | |
1360 | SBall.Name = "Homing Ball" | |
1361 | SBall.CanCollide = false | |
1362 | SBall.Anchored = false | |
1363 | SBall.Transparency = 0.64 | |
1364 | SBall.CFrame = CFrame.new(RootPart.CFrame.p) | |
1365 | SBall.BrickColor = BrickColor.new("Toothpaste") | |
1366 | SBall.Size = Vector3.new(1,1,1) | |
1367 | SBall.Material = "Neon" | |
1368 | SBallweld = Instance.new("Weld") | |
1369 | SBallweld.Parent = SBall | |
1370 | SBallweld.Part0 = RootPart | |
1371 | SBallweld.Part1 = SBall | |
1372 | SBallweld.C1 = CFrame.new(0, 1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | |
1373 | SBallweld.Part0 = RootPart | |
1374 | local SBallmesh = Instance.new("SpecialMesh",SBall) | |
1375 | SBallmesh.MeshType = "Sphere" | |
1376 | SBallmesh.Scale = Vector3.new(6,6,6) | |
1377 | trail = Instance.new("Trail", Character) | |
1378 | a2 = Instance.new("Attachment", Torso) a2.Position = Vector3.new(0,2,0) | |
1379 | a3 = Instance.new("Attachment", Torso)a3.Position = Vector3.new(0,-2.5,0) | |
1380 | trail.Texture = "rbxassetid://0" | |
1381 | trail.Attachment0 = a2 | |
1382 | trail.Attachment1 = a3 | |
1383 | trail.Lifetime = 0.353 | |
1384 | trail.MinLength = 0.03 | |
1385 | trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,1)}) | |
1386 | trail.Color = ColorSequence.new(Color3.new(0,1,1), Color3.new(0, 0,0)) | |
1387 | trail.LightEmission = 4.8 | |
1388 | trail.TextureLength = 0.034 | |
1389 | trail.Enabled = true | |
1390 | attack = true | |
1391 | local position = Instance.new("BodyPosition",Torso) | |
1392 | position.P = 68350 | |
1393 | position.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1394 | ||
1395 | while homed ~= nil and (homed.Torso.Position-RootPart.Position).magnitude > 8 do | |
1396 | swait() | |
1397 | SBall.CFrame = CFrame.new(RootPart.CFrame.p) | |
1398 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+420*math.abs(sine/3.2)), math.rad(0), math.rad(0)), 0.6) | |
1399 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1400 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1401 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1402 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1403 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1404 | position.Position = homed.Torso.Position + Vector3.new(0,2,0) | |
1405 | end | |
1406 | local bodvol=Instance.new("BodyVelocity") | |
1407 | bodvol.velocity= RootPart.CFrame.lookVector*240 + Vector3.new(0,30,0) | |
1408 | bodvol.P= 35200 | |
1409 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1410 | bodvol.Parent=homed.Head | |
1411 | game:GetService("Debris"):AddItem(bodvol, 0.2) | |
1412 | homed:FindFirstChildOfClass("Humanoid"):TakeDamage(math.random(10,30)) | |
1413 | ||
1414 | position:Destroy() | |
1415 | trail.Enabled = false | |
1416 | SBall:Destroy() | |
1417 | RootPart.Velocity = Vector3.new(0,93.5,0) | |
1418 | coroutine.resume(coroutine.create(function() | |
1419 | for i = 0,5,0.26 do | |
1420 | swait() | |
1421 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1422 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1+0.1*i, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.21) | |
1423 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(22-2*i),math.rad(0),math.rad(0)),.21) | |
1424 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.09*i, 0) * angles(math.rad(20-6*i), math.rad(0), math.rad(90+13*i)), 0.21) | |
1425 | LW.C0 = clerp(LW.C0, CFrame.new(-1.0-0.12*i, 0.5, -0.4+0.05*i) * angles(math.rad(20+13*i), math.rad(0), math.rad(20-13*i)), 0.21) | |
1426 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(-22-4*i)), 0.21) | |
1427 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(22+4*i)), 0.21) | |
1428 | end | |
1429 | homed = nil | |
1430 | attack = false | |
1431 | end)) | |
1432 | ||
1433 | end | |
1434 | ||
1435 | end | |
1436 | ||
1437 | ||
1438 | end | |
1439 | ||
1440 | ||
1441 | ||
1442 | ||
1443 | ||
1444 | ||
1445 | ||
1446 | ||
1447 | ||
1448 | ||
1449 | ||
1450 | ||
1451 | ||
1452 | ||
1453 | ||
1454 | ||
1455 | ||
1456 | ||
1457 | ||
1458 | ||
1459 | ||
1460 | ||
1461 | ||
1462 | mouse.KeyDown:connect(function(key) | |
1463 | wait(0.16) | |
1464 | if string.byte(key) == 32 and hitfloor == nil and attack == false and walljump == false and Humanoid.Jump == true then | |
1465 | walljumpp() | |
1466 | end | |
1467 | if string.byte(key) == 32 and hitfloor == nil and attack == false and walljump == false and Humanoid.Jump == true then | |
1468 | home() | |
1469 | end | |
1470 | ||
1471 | if string.byte(key) == 32 and hitfloor == nil and attack == true and walljump == true then | |
1472 | walljump = false | |
1473 | end | |
1474 | end) | |
1475 | ||
1476 | ||
1477 | ||
1478 | ||
1479 | mouse.KeyDown:connect(function(key) | |
1480 | if key == 'm' and attack == false then | |
1481 | changemusic() | |
1482 | end | |
1483 | end) | |
1484 | ||
1485 | ||
1486 | ||
1487 | ||
1488 | ||
1489 | ||
1490 | mouse.KeyUp:connect(function(key) | |
1491 | wait(0.05) | |
1492 | if key == 'c' and sliding == true then | |
1493 | sliding = false | |
1494 | end | |
1495 | end) | |
1496 | local look = 0 | |
1497 | ||
1498 | ||
1499 | ||
1500 | while true do | |
1501 | swait() | |
1502 | sine = sine + change | |
1503 | --speed = speed + music.PlaybackLoudness/90 | |
1504 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
1505 | local velderp=RootPart.Velocity.y | |
1506 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1507 | ||
1508 | local TiltVelocity = CFrame.new(RootPart.CFrame:vectorToObjectSpace(RootPart.Velocity)) | |
1509 | ||
1510 | local rlegray = Ray.new(RightLeg.Position+Vector3.new(0,0.54,0),Vector3.new(0, -1.75, 0)) | |
1511 | local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, Character) | |
1512 | ||
1513 | local llegray = Ray.new(LeftLeg.Position+Vector3.new(0,0.54,0),Vector3.new(0, -1.75, 0)) | |
1514 | local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, Character) | |
1515 | ||
1516 | local waterthing = Ray.new(RootPart.CFrame.p,Vector3.new(0,-1,0)) | |
1517 | local start, position = workspace:FindPartOnRay(waterthing, character) | |
1518 | ||
1519 | if start ~= nil and start.Material == "Water" then | |
1520 | ||
1521 | RootPart.Velocity = RootPart.Velocity + Vector3.new(0,6,0) | |
1522 | ||
1523 | end | |
1524 | ||
1525 | Head.Running.Pitch = 0.76 + Humanoid.WalkSpeed/124 | |
1526 | if torvel<1 and Swing == 2 then | |
1527 | boost = false | |
1528 | elseif torvel>1 and Swing == 2 then | |
1529 | boost = true | |
1530 | freefall = 0 | |
1531 | end | |
1532 | if hitfloor ~= nil and freefall < 150 then | |
1533 | freefall = 0 | |
1534 | end | |
1535 | if freefall > 150 and hitfloor ~= nil then | |
1536 | land() | |
1537 | freefall = 0 | |
1538 | end | |
1539 | ||
1540 | ||
1541 | ||
1542 | ||
1543 | ||
1544 | ||
1545 | ||
1546 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
1547 | Anim="Jump" | |
1548 | ||
1549 | ||
1550 | ||
1551 | ||
1552 | ||
1553 | if attack==false then | |
1554 | change = 1 | |
1555 | look = 0 | |
1556 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1557 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(4), math.rad(0), math.rad(0)), 0.07) | |
1558 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10+2.05*math.cos(sine/5)),math.rad(0),math.rad(0)),0.07) | |
1559 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(50-2.05*math.cos(sine/5))), 0.07) | |
1560 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(-50+2.05*math.cos(sine/5))), 0.07) | |
1561 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, -0.6) * CFrame.Angles(math.rad(-25+3.05*math.cos(sine/5)), math.rad(-3), math.rad(0)), 0.1) | |
1562 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.47, -0.7) * CFrame.Angles(math.rad(-12+3.05*math.cos(sine/5)), math.rad(0), math.rad(0)), 0.1) | |
1563 | end | |
1564 | ||
1565 | elseif RootPart.Velocity.y < -1 and freefall <150 and hitfloor==nil then | |
1566 | Anim="Fall" | |
1567 | change = 1 | |
1568 | freefall = freefall +0.77 | |
1569 | ||
1570 | ||
1571 | if attack==false then | |
1572 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1573 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(7+4*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07) | |
1574 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(140+12*math.cos(sine/1.3))), 0.07) | |
1575 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(-140+12*math.cos(sine/1.3))), 0.07) | |
1576 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(40+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07) | |
1577 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3), -0.13) * CFrame.Angles(math.rad(18+7*math.cos(sine/1.3)), math.rad(3), math.rad(0)), 0.1) | |
1578 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.37+0.17*math.cos(sine/1.3), -0.2) * CFrame.Angles(math.rad(32+7*math.cos(sine/1.3)), math.rad(0), math.rad(0)), 0.1) | |
1579 | end | |
1580 | ||
1581 | ||
1582 | ||
1583 | elseif RootPart.Velocity.y < -1 and freefall > 150 and hitfloor==nil then | |
1584 | Anim="FreeFall" | |
1585 | change = 1 | |
1586 | ||
1587 | ||
1588 | if attack==false then | |
1589 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1590 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(-90+3*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07) | |
1591 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(14+12*math.cos(sine/1.3)), math.rad(0), math.rad(110)), 0.07) | |
1592 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(14+12*math.cos(sine/1.3)), math.rad(0), math.rad(-110)), 0.07) | |
1593 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-12+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07) | |
1594 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3),0.2) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(3), math.rad(-46)), 0.1) | |
1595 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.17*math.cos(sine/1.3), 0.2) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(0), math.rad(46)), 0.1) | |
1596 | end | |
1597 | ||
1598 | elseif torvel<1 and hitfloor~=nil then | |
1599 | Anim="Idle" | |
1600 | change = 1 | |
1601 | if attack==false and equip == false then | |
1602 | ||
1603 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1604 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.04*math.cos(sine/40), -0) * CFrame.Angles(math.rad(0-0.81*math.cos(sine/40)), math.rad(-40), math.rad(0)), 0.1) | |
1605 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0+2.6*math.sin(sine/40)),math.rad(0),math.rad(40)),0.1) | |
1606 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.55+0.04*math.sin(sine/40), 0-0.04*math.cos(sine/40)) * angles(math.rad(-2+1.3*math.cos(sine/40)), math.rad(0+4*math.sin(sine/40)), math.rad(6.3+2.2*math.cos(sine/40))),0.1) | |
1607 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.55+0.04*math.sin(sine/40), 0-0.04*math.cos(sine/40)) * angles(math.rad(2+1.3*math.cos(sine/40)), math.rad(0-4*math.sin(sine/40)), math.rad(-6.3-2.2*math.cos(sine/40))),0.1) | |
1608 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, llegendPoint.Y-LeftLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(18+0.81*math.cos(sine/40)), math.rad(-2-0.81*math.cos(sine/40))),0.1) | |
1609 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.57, rlegendPoint.Y-RightLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(-2+0.81*math.cos(sine/40)), math.rad(3-0.81*math.cos(sine/40))),0.1) | |
1610 | end | |
1611 | ||
1612 | ||
1613 | ||
1614 | elseif torvel>1.5 and torvel<70 and hitfloor~=nil then | |
1615 | Anim="Walk" | |
1616 | change = 0.84+ Character.Humanoid.WalkSpeed/132 | |
1617 | look = 0 | |
1618 | if attack==false and equip == false then | |
1619 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02) | |
1620 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/2), -.8) * angles(math.rad(-90), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1) | |
1621 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *CFrame.new(0, 0, 0 + ((1) - 1) * angles(math.rad(-45)),(math.rad(0) + RootPart.RotVelocity.Y / 0),.1) | |
1622 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.1) * angles(math.rad(-60-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(15+2*math.sin(sine/4))- RootPart.RotVelocity.Y / 34),.15) | |
1623 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.1)*angles(math.rad(-60-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-15+2*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34),.15) | |
1624 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, llegendPoint.Y-LeftLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(18+0.81*math.cos(sine/40)), math.rad(-2-0.81*math.cos(sine/40))),0.1) | |
1625 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.57, rlegendPoint.Y-RightLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(-2+0.81*math.cos(sine/40)), math.rad(3-0.81*math.cos(sine/40))),0.1) | |
1626 | end | |
1627 | ||
1628 | ||
1629 | elseif torvel>=70 and torvel<200 and hitfloor~=nil then | |
1630 | Anim="Run" | |
1631 | change = 0.84+ Character.Humanoid.WalkSpeed/142 | |
1632 | if attack==false and equip == false then | |
1633 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02) | |
1634 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/1.5), -.8) * angles(math.rad(-37), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1) | |
1635 | - | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+25*math.sin(sine/1.5)),math.rad(0),math.rad(0+5*math.sin(sine/3)) + RootPart.RotVelocity.Y / 13),.1) |
1635 | + | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+25*math.sin(sine/1.5)),math.rad(0),math.rad(0+5*math.sin(sine/3))) + RootPart.RotVelocity.Y / 13),.1) |
1636 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.3) * angles(math.rad(-72-8*math.sin(sine/1.5))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(1+0*math.cos(sine/3))- RootPart.RotVelocity.Y / 34),.25) | |
1637 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.3)*angles(math.rad(-72-8*math.sin(sine/1.5))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-1+0*math.cos(sine/3))+ RootPart.RotVelocity.Y / -34),.25) | |
1638 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.32*math.cos(sine/3), 0-0.42*math.cos(sine/3)) * CFrame.Angles(math.rad(0+134*math.sin(sine/3)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.44) | |
1639 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.32*math.cos(sine/3),0+0.42*math.cos(sine/3)) * CFrame.Angles(math.rad(0-134*math.sin(sine/3)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.44) | |
1640 | end | |
1641 | ||
1642 | --[[ | |
1643 | if attack==false then | |
1644 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.4*math.cos(sine/5.5)/2, 0 *math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + -math.sin(sine/5.5)/1.2, math.rad(0), 0), .8) | |
1645 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.4*math.cos(sine/5.5)/2,0 *-math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + math.sin(sine/5.5)/1.2, math.rad(0), 0), .8) | |
1646 | end | |
1647 | ]] | |
1648 | if attack==true and noleg == false then | |
1649 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.24*math.cos(sine/5), 0.+0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0-74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3) | |
1650 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.24*math.cos(sine/5),0.-0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0+74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3) | |
1651 | end | |
1652 | ||
1653 | ||
1654 | ||
1655 | elseif torvel>=200 and hitfloor~=nil then | |
1656 | Anim="MachRun" | |
1657 | change = 0.84+ Character.Humanoid.WalkSpeed/182 | |
1658 | if attack==false and equip == false then | |
1659 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02) | |
1660 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/1), -3.8) * angles(math.rad(-44), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .2) | |
1661 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+25*math.sin(sine/1)),math.rad(0),math.rad(0+5*math.sin(sine/2)) + RootPart.RotVelocity.Y / 13),.2) | |
1662 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.5) * angles(math.rad(-78-12*math.sin(sine/1))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(-24+0*math.cos(sine/2))- RootPart.RotVelocity.Y / 34),.35) | |
1663 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.5)*angles(math.rad(-78-12*math.sin(sine/1))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(24+0*math.cos(sine/2))+ RootPart.RotVelocity.Y / -34),.35) | |
1664 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.42*math.cos(sine/2), 0-0.62*math.cos(sine/2)) * CFrame.Angles(math.rad(0+134*math.sin(sine/2)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.52) | |
1665 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.42*math.cos(sine/2),0+0.62*math.cos(sine/2)) * CFrame.Angles(math.rad(0-134*math.sin(sine/2)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.52) | |
1666 | end | |
1667 | ||
1668 | ||
1669 | ||
1670 | end | |
1671 | ||
1672 | ||
1673 | ||
1674 | ||
1675 | ||
1676 | ||
1677 | ||
1678 | ||
1679 | ||
1680 | if 0 < #Effects then | |
1681 | for e = 1, #Effects do | |
1682 | if Effects[e] ~= nil then | |
1683 | local Thing = Effects[e] | |
1684 | if Thing ~= nil then | |
1685 | local Part = Thing[1] | |
1686 | local Mode = Thing[2] | |
1687 | local Delay = Thing[3] | |
1688 | local IncX = Thing[4] | |
1689 | local IncY = Thing[5] | |
1690 | local IncZ = Thing[6] | |
1691 | if Thing[1].Transparency <= 1 then | |
1692 | if Thing[2] == "Block1" then | |
1693 | Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1694 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1695 | if not Mesh then | |
1696 | Mesh = Instance.new("BlockMesh") | |
1697 | end | |
1698 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1699 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1700 | elseif Thing[2] == "Cylinder" then | |
1701 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1702 | if not Mesh then | |
1703 | Mesh = Instance.new("BlockMesh") | |
1704 | end | |
1705 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1706 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1707 | elseif Thing[2] == "Blood" then | |
1708 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1709 | if not Mesh then | |
1710 | Mesh = Instance.new("BlockMesh") | |
1711 | end | |
1712 | Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0) | |
1713 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1714 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1715 | elseif Thing[2] == "Elec" then | |
1716 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1717 | if not Mesh then | |
1718 | Mesh = Instance.new("BlockMesh") | |
1719 | end | |
1720 | Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9]) | |
1721 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1722 | elseif Thing[2] == "Disappear" then | |
1723 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1724 | end | |
1725 | else | |
1726 | Part.Parent = nil | |
1727 | game:GetService("Debris"):AddItem(Part, 0) | |
1728 | table.remove(Effects, e) | |
1729 | end | |
1730 | end | |
1731 | end | |
1732 | end | |
1733 | end | |
1734 | ||
1735 | end |