R

Fe sonik

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