-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparkour script.lua
1803 lines (1471 loc) · 47.9 KB
/
parkour script.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
--Emetimex
plr = game.Players.LocalPlayer
local colormansup = 255
local sliding = false
if plr:WaitForChild("PlayerScripts"):FindFirstChild("Player Stuff") then
plr:WaitForChild("PlayerScripts"):FindFirstChild("Player Stuff"):Destroy()
end
local camerakill = false
mobile = false
local downeddel= false
local walkingmode = false
char = plr.Character
if char:FindFirstChild("ClientInputHandler") then
char:FindFirstChild("ClientInputHandler"):Destroy()
end
if plr:FindFirstChild("Status") then
plr:FindFirstChild("Status"):Destroy()
end
if game.Workspace:FindFirstChild("Remote") then
if game.Workspace:FindFirstChild("Remote"):FindFirstChild("TeamEvent") then
Workspace.Remote.TeamEvent:FireServer("Medium stone grey")
end
end
local downed = false
local combatmusic = Instance.new("Sound",char)
combatmusic.Volume = 0
combatmusic.PlaybackSpeed = 1
combatmusic.Looped = true
local ambience = Instance.new("Sound",char)
ambience.Volume = 0.5
ambience.PlaybackSpeed = 1
ambience.Looped = true
local winder = Instance.new("Sound",char)
winder.SoundId = "rbxassetid://337604103"
winder.Volume = 0
winder.PlaybackSpeed = 1
winder.Looped = true
winder:Play()
local windercloth = Instance.new("Sound",char)
windercloth.SoundId = "rbxassetid://195879271"
windercloth.Volume = 0
windercloth.PlaybackSpeed = 1
windercloth.Looped = true
windercloth:Play()
local explorationmusic = Instance.new("Sound",char)
explorationmusic.Volume = 0
explorationmusic.PlaybackSpeed = 1
explorationmusic.Looped = true
local rannum = math.random(1,11)
if rannum == 1 then
combatmusic.SoundId = "rbxassetid://4842424057"
explorationmusic.SoundId = "rbxassetid://6092889291"
ambience.SoundId = "rbxassetid://4842514147"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 2 then
combatmusic.SoundId = "rbxassetid://5167357719"
explorationmusic.SoundId = "rbxassetid://5136807172"
ambience.SoundId = "rbxassetid://5136807172"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 3 then
combatmusic.SoundId = "rbxassetid://5355007603"
explorationmusic.SoundId = "rbxassetid://5192956194"
ambience.SoundId = "rbxassetid://5192956194"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 4 then
combatmusic.SoundId = "rbxassetid://1591306349"
explorationmusic.SoundId = "rbxassetid://5246801658"
ambience.SoundId = "rbxassetid://5167384455"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 5 then
combatmusic.SoundId = "rbxassetid://5356631522"
explorationmusic.SoundId = "rbxassetid://4502246491"
ambience.SoundId = "rbxassetid://4502246491"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 6 then
combatmusic.SoundId = "rbxassetid://5183689299"
explorationmusic.SoundId = "rbxassetid://538850338"
ambience.SoundId = "rbxassetid://538850338"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 7 then
combatmusic.SoundId = "rbxassetid://5258344366"
explorationmusic.SoundId = "rbxassetid://5079119831"
ambience.SoundId = "rbxassetid://5079119831"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 8 then
combatmusic.SoundId = "rbxassetid://5995057631"
explorationmusic.SoundId = "rbxassetid://477207390"
ambience.SoundId = "rbxassetid://477207390"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 9 then
combatmusic.SoundId = "rbxassetid://4841933336"
explorationmusic.SoundId = "rbxassetid://5114418235"
ambience.SoundId = "rbxassetid://5114418235"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 10 then
combatmusic.SoundId = "rbxassetid://5132571388"
explorationmusic.SoundId = "rbxassetid://5995060646"
ambience.SoundId = "rbxassetid://5995060646"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
if rannum == 11 then
combatmusic.SoundId = "rbxassetid://5433879104"
explorationmusic.SoundId = "rbxassetid://4692224051"
ambience.SoundId = "rbxassetid://4692224051"
ambience:Play()
explorationmusic:Play()
combatmusic:Play()
end
local tricksinarow = 0
local tricktime = 0
local timestanding = 0
local combattime = 0
root = char:WaitForChild("HumanoidRootPart")
local slidingsound = Instance.new("Sound",root)
slidingsound.SoundId = "rbxassetid://4086205029"
slidingsound.PlaybackSpeed = 1.25
slidingsound.Looped = true
slidingsound.Volume = 0.75
local wallrunningsound = Instance.new("Sound",root)
wallrunningsound.SoundId = "rbxassetid://401049343"
wallrunningsound.PlaybackSpeed = 1
wallrunningsound.Looped = true
wallrunningsound.Volume = 0.75
function randomclothrollsound(truth)
coroutine.resume(coroutine.create(function()
if truth ~= nil then
local s = Instance.new("Sound",root)
s.Volume = 0.8 +math.random(1,6)*0.05
s.PlaybackSpeed = 0.8 +math.random(1,6)*0.05
local rannum = math.random(1,5)
if rannum == 1 then
s.SoundId = "rbxassetid://4086203738"
elseif rannum == 2 then
s.SoundId = "rbxassetid://4086203442"
elseif rannum == 3 then
s.SoundId = "rbxassetid://4086203142"
elseif rannum == 4 then
s.SoundId = "rbxassetid://4086203973"
else
s.SoundId = "rbxassetid://4307029050"
end
s:Play()
game:GetService("Debris"):AddItem(s,4)
else
local s = Instance.new("Sound",root)
s.Volume = 0.25 +math.random(1,6)*0.05
s.PlaybackSpeed = 0.8 +math.random(1,6)*0.05
local rannum = math.random(1,7)
if rannum == 1 then
s.SoundId = "rbxassetid://3929467229"
elseif rannum == 2 then
s.SoundId = "rbxassetid://3929467449"
elseif rannum == 3 then
s.SoundId = "rbxassetid://3929467655"
elseif rannum == 4 then
s.SoundId = "rbxassetid://3929467888"
elseif rannum == 5 then
s.SoundId = "rbxassetid://4458760046"
elseif rannum == 6 then
s.SoundId = "rbxassetid://4458760518"
else
s.SoundId = "rbxassetid://4458759938"
end
s:Play()
game:GetService("Debris"):AddItem(s,4)
end
end))
end
local rollingsound = Instance.new("Sound",root)
rollingsound.SoundId = "rbxassetid://2985734522"
rollingsound.PlaybackSpeed = 1
rollingsound.Volume = 0.75
local bodymovesound = Instance.new("Sound",root)
bodymovesound.SoundId = "rbxassetid://152206206"
bodymovesound.PlaybackSpeed = 0.945
bodymovesound.Volume = 2.35
local downedsound = Instance.new("Sound",root)
downedsound.SoundId = "rbxassetid://178088040"
downedsound.PlaybackSpeed = 1
downedsound.Volume = 3
local jumplandsoundthingy = Instance.new("Sound",root)
jumplandsoundthingy.SoundId = "rbxassetid://6079431954"
jumplandsoundthingy.PlaybackSpeed = 0.785
jumplandsoundthingy.Volume = 2
hum = char:WaitForChild("Humanoid")
hum.JumpPower = 50
local colorparkourkill = Instance.new("ColorCorrectionEffect",game.Lighting)
colorparkourkill.Saturation = 0
colorparkourkill.TintColor = Color3.new(1,1,1)
if game.Lighting:FindFirstChild("COLORPARKOURKILL") then
game.Lighting:FindFirstChild("COLORPARKOURKILL"):Destroy()
end
torso = char:WaitForChild("Torso")
local gyro = Instance.new("BodyGyro",torso)
gyro.D = 200
gyro.P = 1800
local cameratilterman = 0
local springjumpdel =false
local gobackroll = false
local befpower = gyro.P
gyro.P = befpower
gyro.MaxTorque = Vector3.new(0,0,0)
local runvel = Instance.new("BodyVelocity",root)
runvel.MaxForce = Vector3.new(0,0,0)
runvel.P = 9999999999999999999999
hum.WalkSpeed =20
local flowmax = 35
local flowmin = 16
local dodgedel = false
local crouchspeed = 8
local flow = flowmin
for i,v in pairs(workspace:GetDescendants()) do
if v.ClassName == "Part" or v.ClassName == "UnionOperation" or v.ClassName == "MeshPart" then
if v.ClassName == "UnionOperation" then
v.CollisionFidelity = Enum.CollisionFidelity.PreciseConvexDecomposition
end
if v.Transparency == 1 then
v.CanCollide = false
end
end
end
floorpositiony = 0
local UIS = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")
if UIS.TouchEnabled and not UIS.KeyboardEnabled and not UIS.MouseEnabled
and not UIS.GamepadEnabled and not GuiService:IsTenFootInterface() then
mobile = true
jb = plr.PlayerGui:WaitForChild("TouchGui"):WaitForChild("TouchControlFrame"):WaitForChild("JumpButton")
jb.MouseButton1Down:Connect(function()
wallrunabletrue()
wallruncheck()
end)
end
local leftwallrunanim = Instance.new("Animation",char)
leftwallrunanim.AnimationId = "rbxassetid://180426354"
local leftwallrunanimplay = hum:LoadAnimation(leftwallrunanim)
local downedanim1 = Instance.new("Animation",char)
downedanim1.AnimationId = "rbxassetid://282574440"
local downedanim1play = hum:LoadAnimation(downedanim1)
local rightwallrunanim = Instance.new("Animation",char)
rightwallrunanim.AnimationId = "rbxassetid://180426354"
local rightwallrunanimplay = hum:LoadAnimation(rightwallrunanim)
local verticalwallrunanim = Instance.new("Animation",char)
verticalwallrunanim.AnimationId = "rbxassetid://180426354"
local verticalwallrunanimplay = hum:LoadAnimation(verticalwallrunanim)
local roll = Instance.new("Animation",char)
roll.AnimationId = "rbxassetid://180612465"
local rollplay = hum:LoadAnimation(roll)
local crouching = Instance.new("Animation",char)
crouching.AnimationId = "rbxassetid://287325678"
local crouchingplay = hum:LoadAnimation(crouching)
local springjump = Instance.new("Animation",char)
springjump.AnimationId = "rbxassetid://287325678"
local springjumpplay = hum:LoadAnimation(springjump)
local dodging = Instance.new("Animation",char)
dodging.AnimationId = "rbxassetid://287325678"
local dodgingplay = hum:LoadAnimation(dodging)
local slidinganim = Instance.new("Animation",char)
slidinganim.AnimationId = "rbxassetid://132546884"
local slidingplay = hum:LoadAnimation(slidinganim)
local rollering = false
hum.Died:Connect(function()
if game.Workspace:FindFirstChild("Remote") then
if game.Workspace:FindFirstChild("Remote"):FindFirstChild("TeamEvent") then
Workspace.Remote.TeamEvent:FireServer("Bright orange")
end
end
camerakill = true
colorparkourkill:Destroy()
for i = 20,1,-1 do
wait()
combatmusic.PlaybackSpeed = combatmusic.PlaybackSpeed-0.05
ambience.PlaybackSpeed = ambience.PlaybackSpeed-0.05
explorationmusic.PlaybackSpeed = explorationmusic.PlaybackSpeed-0.05
end
end)
local tappeda = false
local tappeds = false
local tappedd = false
local tappedw = false
UIS.InputEnded:Connect(function(input,gamestuff)
if input.KeyCode == Enum.KeyCode.S then
if gamestuff then return end
gobackroll = false
end
end)
UIS.InputBegan:Connect(function(input,gamestuff)
if input.KeyCode == Enum.KeyCode.N then
if gamestuff then return end
if walkingmode == false then
walkingmode = true
else
walkingmode = false
end
end
if input.KeyCode == Enum.KeyCode.M then
if gamestuff then return end
if ambience.PlaybackSpeed ~= 0 then
ambience.PlaybackSpeed = 0
combatmusic.PlaybackSpeed = 0
explorationmusic.PlaybackSpeed = 0
else
ambience.PlaybackSpeed = 1
combatmusic.PlaybackSpeed = 1
explorationmusic.PlaybackSpeed = 1
end
end
if input.KeyCode == Enum.KeyCode.S then
if gamestuff then return end
gobackroll = true
end
if downed == true then return end
if sliding == true then return end
if input.KeyCode == Enum.KeyCode.A then
if hitfloor == false then return end
if gamestuff then return end
if tappeda == false then
tappeda = true
wait(0.25)
tappeda = false
else
if dodgedel == false then
dodgedel = true
dodgingplay:Play()
randomclothrollsound()
local bv = Instance.new("BodyVelocity",char:WaitForChild("Head"))
bv.Velocity = root.CFrame.RightVector*-flow*2+Vector3.new(0,flow/2,0)
bv.MaxForce = Vector3.new(99999,99999,99999)
bv.P = 99999999999999
wait(0.1)
bv:Destroy()
wait(0.2)
dodgingplay:Stop()
dodgedel = false
end
end
end
if input.KeyCode == Enum.KeyCode.S then
if hitfloor == false then return end
if gamestuff then return end
if tappeds == false then
tappeds = true
wait(0.25)
tappeds = false
else
if dodgedel == false then
dodgedel = true
dodgingplay:Play()
randomclothrollsound()
local bv = Instance.new("BodyVelocity",char:WaitForChild("Head"))
bv.Velocity = root.CFrame.LookVector*-flow*2+Vector3.new(0,flow/2,0)
bv.MaxForce = Vector3.new(99999,99999,99999)
bv.P = 99999999999999
wait(0.1)
bv:Destroy()
wait(0.2)
dodgingplay:Stop()
dodgedel = false
end
end
end
if input.KeyCode == Enum.KeyCode.D then
if hitfloor == false then return end
if gamestuff then return end
if tappedd == false then
tappedd = true
wait(0.25)
tappedd = false
else
if dodgedel == false then
dodgedel = true
dodgingplay:Play()
randomclothrollsound()
local bv = Instance.new("BodyVelocity",char:WaitForChild("Head"))
bv.Velocity = root.CFrame.RightVector*flow*2+Vector3.new(0,flow/2,0)
bv.MaxForce = Vector3.new(99999,99999,99999)
bv.P = 99999999999999
wait(0.1)
bv:Destroy()
wait(0.2)
dodgingplay:Stop()
dodgedel = false
end
end
end
if input.KeyCode == Enum.KeyCode.W then
if gamestuff then return end
if hitfloor == false then return end
if tappedw == false then
tappedw = true
wait(0.25)
tappedw = false
else
if dodgedel == false then
dodgedel = true
dodgingplay:Play()
randomclothrollsound()
local bv = Instance.new("BodyVelocity",char:WaitForChild("Head"))
bv.Velocity = root.CFrame.LookVector*flow*2+Vector3.new(0,flow/2,0)
bv.MaxForce = Vector3.new(99999,99999,99999)
bv.P = 99999999999999
wait(0.1)
bv:Destroy()
wait(0.2)
dodgingplay:Stop()
dodgedel = false
end
end
end
end)
hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
--rollplay:AdjustSpeed(0)
--rollplay.TimePosition = 1
local player = game.Players.LocalPlayer
local character = player.Character
local hum = character:FindFirstChild("Humanoid")
if not character or not character.Parent then
character = player.CharacterAdded:wait()
if camerakill == true then return end
end
local torso = character:WaitForChild("Torso")
local rightShoulder = torso:WaitForChild("Right Shoulder")
local leftShoulder = torso:WaitForChild("Left Shoulder")
local camera = game.Workspace.CurrentCamera
updateSpeed = 0.5/2
local plr = game.Players.LocalPlayer
local char = plr.Character
local ignorelist = {plr.Character}
for i,v in pairs(workspace:GetDescendants()) do
if v.ClassName == "Part" or v.ClassName == "MeshPart" or v.ClassName == "UnionOperation" then
if v.CanCollide == false or v.Transparency == 1 then
ignorelist[#ignorelist+1] = v
end
end
end
leftarm = char:WaitForChild("Left Arm")
rightarm = char:WaitForChild("Right Arm")
leftleg = char:WaitForChild("Left Leg")
if char:FindFirstChild("Head"):FindFirstChild("BillboardGui") then
char:FindFirstChild("Head"):FindFirstChild("BillboardGui"):Destroy()
end
local flowermax = flowmax-flowmin
local killermancamfov = 0
rightleg = char:WaitForChild("Right Leg")
local hum = char:WaitForChild("Humanoid")
local rootpart,head = char:WaitForChild("HumanoidRootPart"),char:WaitForChild("Head")
game:GetService("RunService"):BindToRenderStep("CameraOffset",Enum.RenderPriority.Character.Value+1,function()
local offsetman = 1.5
if sliding == true then
offsetman = 0
end
if hum.Health == 0 then script:Destroy() end
local distance = (character.Head.Position - camera.CoordinateFrame.p).magnitude
if distance <= 1 then
rightShoulder.C0 = rightShoulder.C0:lerp((camera.CoordinateFrame * CFrame.new(1, -1, 0)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, math.pi/2, 0), updateSpeed)
leftShoulder.C0 = leftShoulder.C0:lerp((camera.CoordinateFrame * CFrame.new(-1, -1, 0)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, -math.pi/2, 0), updateSpeed)
else
rightShoulder.C0 = rightShoulder.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0),updateSpeed)
leftShoulder.C0 = leftShoulder.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0),updateSpeed)
end
hum.CameraOffset = (rootpart.CFrame+Vector3.new(0,offsetman,0)):pointToObjectSpace(head.CFrame.p)
rightarm.LocalTransparencyModifier = rightarm.Transparency+0.5
leftarm.LocalTransparencyModifier = leftarm.Transparency+0.5
leftleg.LocalTransparencyModifier = leftleg.Transparency+0.5
rightleg.LocalTransparencyModifier = rightleg.Transparency+0.5
if camerakill == false then
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
killermancamfov = 20*(flow/flowermax)
colorparkourkill.TintColor = Color3.new(1,colormansup/255,colormansup/255)
colormansup = colormansup+5
if colormansup> 255 then
colormansup = 255
end
cam.FieldOfView = 50+killermancamfov
cam.CFrame = cam.CFrame*CFrame.Angles(0,0,math.rad(cameratilterman))
end
end)
local befh = hum.Health
local function round(number, decimalPlaces)
number = math.round(number * 10^decimalPlaces) * 10^-decimalPlaces
end
local humdowner = false
function downer()
flow = flow-flowmax/10
downedanim1play:Play()
colormansup = colormansup-60
downedsound:play()
randomclothrollsound(true)
randomclothrollsound(true)
randomclothrollsound()
randomclothrollsound()
randomclothrollsound()
downed = true
hum.JumpPower =0
downeddel = true
coroutine.resume(coroutine.create(function()
local tiltnumb = 0
local rannum = math.random(1,4)
if rannum == 1 then
tiltnumb = 80
elseif rannum == 2 then
tiltnumb = 50
elseif rannum == 3 then
tiltnumb = -80
else
tiltnumb = -50
end
local cameratilterman2 =tiltnumb*0.2
local cameratiltermax = cameratilterman2
local sinnerman = 1
local sinnerman2 = 0
for i = 20,1,-1 do
game:GetService("RunService").RenderStepped:Wait()
if camerakill == true then return end
sinnerman = sinnerman-0.05
sinnerman2 = math.sin(sinnerman*1.25)
print(sinnerman .. " I AM SIN")
cameratilterman2 = cameratiltermax*sinnerman2
cam.CFrame = cam.CFrame*CFrame.Angles(0,0,math.rad(cameratilterman2))
end
wait(1)
downeddel = false
end))
end
hum.HealthChanged:Connect(function()
colorparkourkill.Saturation = -1+hum.Health/hum.MaxHealth
if hum.Health/hum.MaxHealth < 0.25 then
if humdowner == false then
humdowner = true
downer()
end
end
if hum.Health < befh then
combattime = 18
local damagetiltmax = befh - hum.Health
round(damagetiltmax,1)
colormansup = colormansup-damagetiltmax*4.25
local cameratilterman2 = math.random(damagetiltmax*-20,damagetiltmax*20)
cameratilterman2 = cameratilterman2 *0.05
local cameratilterman3 = math.random(damagetiltmax*-20,damagetiltmax*20)
cameratilterman3 = cameratilterman3 *0.0008675
local cameratiltermax = cameratilterman2
local cameratiltermax2 = cameratilterman3
local sinnerman = 1
local sinnerman2 = 0
for i = 10,1,-1 do
game:GetService("RunService").RenderStepped:Wait()
sinnerman = sinnerman-0.1
sinnerman2 = math.sin(sinnerman*1.25)
print(sinnerman .. " I AM SIN")
cameratilterman2 = cameratiltermax*sinnerman2
cameratilterman3 = cameratiltermax2*sinnerman2
cam.CFrame = cam.CFrame*CFrame.Angles(math.rad(cameratilterman3),0,math.rad(cameratilterman2))
end
end
befh = hum.Health
end)
function tilterepic(maxnumbman,slideringman)
coroutine.resume(coroutine.create(function()
if maxnumbman ~= 0 then
local sinnerman = 0
local slidingtruth = false
if slideringman ~= nil then
if slideringman == true then
slidingtruth = true
end
end
for i = 20,1,-1 do
if slidingtruth == false then
if wallrunning == false then return end
end
if slidingtruth == true then
if sliding == false then return end
end
game:GetService("RunService").RenderStepped:Wait()
if camerakill == true then return end
sinnerman = sinnerman+0.05
sinnerman = math.sin(sinnerman*1.25)
print(sinnerman .. " I AM SIN2")
cameratilterman = maxnumbman*sinnerman
end
else
print("I AM ZERO BOYO")
local cameratiltermax = cameratilterman
local sinnerman = 1
local sinnerman2 = 0
for i = 10,1,-1 do
game:GetService("RunService").RenderStepped:Wait()
if camerakill == true then return end
sinnerman = sinnerman-0.1
sinnerman2 = math.sin(sinnerman*1.25)
print(sinnerman .. " I AM SIN")
cameratilterman = cameratiltermax*sinnerman2
end
wait()
cameratilterman = 0
end
end))
end
local rolldel =false
function roll()
if sliding == true then return end
if hitfloor == false then return end
if wallrunning == true then return end
if rolldel == true then return end
rolldel = true
randomclothrollsound(true)
rollingsound.TimePosition = 0.3
rollingsound:Play()
root.Velocity = Vector3.new(0,0,0)
local x, y, z = root.CFrame:ToEulerAnglesYXZ()
rollering = true
tricksinarow = tricksinarow+1
local rollmancf = CFrame.new(Vector3.new(root.Position.X,floorpositiony+1.5,root.Position.Z))*CFrame.Angles(0, y, 0)
root.CFrame = rollmancf
wait()
root.Velocity = Vector3.new(0,0,0)
flow = flow+(flowmax-flowmin)/8
runvel.Velocity = (root.CFrame.LookVector*hum.WalkSpeed)
local bp = Instance.new("BodyPosition",torso)
bp.Position = Vector3.new(0,floorpositiony,0)
bp.MaxForce = Vector3.new(0,999999999,0)
bp.P = 25000
hum.PlatformStand = true
runvel.MaxForce = Vector3.new(99999,99999,99999)
gyro.CFrame = rollmancf
gyro.P = 99999
gyro.MaxTorque = Vector3.new(99999,99999,99999)
rollplay:Play()
local lookcfog = cam.CFrame
local angle = 0
rollplay:AdjustSpeed(0)
rollplay.TimePosition = 1
local rotatenumb = -18
if gobackroll == true then
rotatenumb = 18
end
for i = 20,1,-1 do
rs.Heartbeat:Wait()
if camerakill == true then return end
runvel.MaxForce = Vector3.new(99999,99999,99999)
runvel.Velocity = rollmancf.LookVector*-rotatenumb*3
gyro.CFrame = gyro.CFrame*CFrame.Angles(math.rad(rotatenumb),0,0)
root.CFrame = gyro.CFrame
end
runvel.MaxForce = Vector3.new(0,0,0)
rollplay:Stop()
hum.PlatformStand = false
rollering = false
bp:Destroy()
gyro.P = befpower
runvel.MaxForce = Vector3.new(0,0,0)
gyro.MaxTorque = Vector3.new(0,0,0)
root.Velocity = Vector3.new(0,0,0)
root.Velocity = Vector3.new(0,0,0)
rolldel = false
if rotatenumb == 18 then
cam.CFrame = lookcfog
end
wait()
end
local cdown = false
UIS.InputBegan:Connect(function(input,g)
if input.KeyCode == Enum.KeyCode.C then
if g then return end
cdown = true
end
if input.KeyCode == Enum.KeyCode.P then
if g then return end
hum:TakeDamage(1)
end
end)
UIS.InputEnded:Connect(function(input,g)
if input.KeyCode == Enum.KeyCode.C then
if g then return end
cdown = false
end
end)
wallrunable = false
wallrunning = false
hitfloor = false
leftwallrunning = false
rightwallrunning = false
onfloor = false
frontwallrunning = false
fronthit = false
rs = game:GetService("RunService")
cam = workspace.CurrentCamera
UIS.InputBegan:Connect(function(input,gamestuff)
if input.KeyCode == Enum.KeyCode.X then
if camerakill == true then return end
if gamestuff then return end
if camerakill == false then
for i = 5,1,-1 do
rs.RenderStepped:Wait()
if camerakill == true then return end
cam.CFrame = cam.CFrame*CFrame.Angles(0,math.rad(35),0)
end
end
end
end)
local rollering = false
coroutine.resume(coroutine.create(function()
while true do
if camerakill == true then return end
rs.RenderStepped:Wait()
if combattime > 0.05 then
if combatmusic.Volume ~= 0.5 then
combatmusic.Volume = 0.5
ambience.Volume = 0
explorationmusic.Volume = 0
combatmusic:Play()
end
combattime = combattime-0.01
else
combattime = 0
if combatmusic.Volume == 0.5 then
combatmusic.Volume = 0
ambience.Volume = 0.5
explorationmusic.Volume = 0
end
end
if rolldel == true or downed == true then
if camerakill == true then return end
cam.CFrame = char:WaitForChild("Head").CFrame
end
if camerakill == false then
winder.Volume = root.Velocity.Magnitude*0.015
if winder.Volume > 5 then
winder.Volume = 5
end
winder.PlaybackSpeed = root.Velocity.Magnitude*0.015
if winder.PlaybackSpeed > 4 then
winder.PlaybackSpeed = 4
end
windercloth.Volume = root.Velocity.Magnitude*0.015
if windercloth.Volume > 5 then
windercloth.Volume = 5
end
windercloth.PlaybackSpeed = root.Velocity.Magnitude*0.015
if windercloth.PlaybackSpeed > 2 then
windercloth.PlaybackSpeed = 2
end
end
if rolldel == false and wallrunning == false and sliding == false and downed == false and holding == false then
hum.AutoRotate = true
if slidingsound.IsPlaying == true then
slidingsound:Stop()
end
if wallrunningsound.IsPlaying == true then
wallrunningsound:Stop()
end
else
hum.AutoRotate = false
if wallrunning == true then
if wallrunningsound.IsPlaying == false then
wallrunningsound:Play()
end
else
if wallrunningsound.IsPlaying == true then
wallrunningsound:Stop()
end
end
if sliding == true then
if slidingsound.IsPlaying == false then
slidingsound:Play()
end
else
if slidingsound.IsPlaying == true then
slidingsound:Stop()
end
end
end
end
end))
function wallrunabletrue()
coroutine.resume(coroutine.create(function()
if hitfloor == true then return end
wallrunable = true
wait(0.05)
wallrunable = false
end))
end
wallrundel = false
function verticalwallrun(grav2)
coroutine.resume(coroutine.create(function()
if wallrundel == true then return end
if wallrunning == true then return end
if downed == true then return end
if cdown == true then return end
if wallrunable == false then return end
if fronthit then
print("Made it 1")
local rr = Ray.new(root.Position,root.CFrame.LookVector*5)
local rhit,ray,rpoint = workspace:FindPartOnRayWithIgnoreList(rr,ignorelist)
if rhit then
if rhit then
wallrunning = false
wait()
tilterepic(0)
tricksinarow = tricksinarow+1
wallrunning = true
gyro.CFrame = CFrame.new(root.Position,root.Position+rpoint)*CFrame.Angles(math.rad(-22),math.rad(180),0)
gyro.MaxTorque = Vector3.new(99999,99999,99999)
local grav = grav2-11
runvel.Velocity = Vector3.new(0,grav,0)
print("Made it 2")
runvel.MaxForce = Vector3.new(99999,99999,99999)
wallrunable = false
hum.PlatformStand = true
randomclothrollsound()
verticalwallrunanimplay:Play()