View difference between Paste ID: Kb6LRnVQ and EssARB76
SHOW: | | - or go back to the newest paste.
1
--By Rufus14
2
print("hi guy made by CoolScripter")
3
warn("!!WARNING!!: Has some blood moves.")
4
--Converted with ttyyuu12345's model to script plugin v4
5
function sandbox(var,func)
6
	local env = getfenv(func)
7
	local newenv = setmetatable({},{
8
		__index = function(self,k)
9
			if k=="script" then
10
				return var
11
			else
12
				return env[k]
13
			end
14
		end,
15
	})
16
	setfenv(func,newenv)
17
	return func
18
end
19
cors = {}
20
mas = Instance.new("Model",game:GetService("Lighting"))
21
Tool0 = Instance.new("Tool")
22
Part1 = Instance.new("Part")
23
SpecialMesh2 = Instance.new("SpecialMesh")
24
Trail3 = Instance.new("Trail")
25
RemoteEvent4 = Instance.new("RemoteEvent")
26
LocalScript5 = Instance.new("LocalScript")
27
Script6 = Instance.new("Script")
28
Tool0.Name = "Katana"
29
Tool0.Parent = mas
30
Part1.Name = "Handle"
31
Part1.Parent = Tool0
32
Part1.CFrame = CFrame.new(-5.07497549, 2.59999967, -14.1249638, 0, 0, 1, 0, 1, -0, -1, 0, 0)
33
Part1.Orientation = Vector3.new(0, 90, 0)
34-
Part1.Size = Vector3.new(0.050000000745058, 5.199999332428, 0.24999992549419)
34+
35
Part1.Rotation = Vector3.new(0, 90, 0)
36
Part1.Size = Vector3.new(0.339, 4.371, 1.15)
37
Part1.BottomSurface = Enum.SurfaceType.Smooth
38-
SpecialMesh2.MeshId = "rbxassetid://443853663"
38+
39-
SpecialMesh2.Scale = Vector3.new(3, 4.9523801803589, 3.7500004768372)
39+
40-
SpecialMesh2.TextureId = "rbxassetid://443853675"
40+
SpecialMesh2.MeshId = "rbxassetid://6917585880"
41
SpecialMesh2.Scale = Vector3.new(0.9, 0.9, 0.9)
42
SpecialMesh2.TextureId = "rbxassetid://6917585923"
43
SpecialMesh2.MeshType = Enum.MeshType.FileMesh
44
Trail3.Name = "trail"
45
Trail3.Parent = Part1
46
Trail3.Attachment0 = nil
47
Trail3.Attachment1 = nil
48
Trail3.Enabled = false
49
Trail3.LightInfluence = 1
50
Trail3.Transparency = NumberSequence.new(0.89999997615814,0.89999997615814)
51
Trail3.Lifetime = 0.050000000745058
52
local heit = -1
53
for i = 1,10 do
54
	local a = Instance.new("Attachment", Part1)
55
	a.Name = "hitat"
56
	if i <= 8 then
57
		a.Position = Vector3.new(0,heit,0)
58
		heit = heit + 0.5
59
	elseif i == 9 then
60
		a.Position = Vector3.new(0, -1.2, 0)
61
		a.Name = "trailat1"
62
		Trail3.Attachment0 = a
63
	elseif i == 10 then
64
		a.Position = Vector3.new(0, 2.6, 0)
65
		a.Name = "trailat2"
66
		Trail3.Attachment1 = a
67
	end
68
end
69
RemoteEvent4.Parent = Tool0
70
LocalScript5.Parent = Tool0
71
table.insert(cors,sandbox(LocalScript5,function()
72
end))
73
Script6.Parent = Tool0
74
table.insert(cors,sandbox(Script6,function()
75
--By Rufus14, FPS unlocker really recommended to improve hitbox
76
tool = script.Parent
77
handle = tool.Handle
78
trail = handle.trail
79
players = game:GetService("Players")
80
runservice = game:GetService("RunService")
81
tweenservice = game:GetService("TweenService")
82
player = nil
83
character = nil
84
charhum = nil
85
validatetick = nil
86
parryfunc = nil
87
slicefunc = nil
88
lastswingtick = tick()
89
lastparrytick = tick()
90
equiptick = nil
91
swinganimation = 0
92
state = "unequipped"
93
hitpeople = {}
94
remote = tool.RemoteEvent
95
cfnew = CFrame.new
96
cfeuler = CFrame.fromEulerAnglesXYZ
97
rand = math.random
98
headoffset = 0
99
speedbuff = 3
100
animslowdownmult = 1
101
bloodpuddlesizemultiplier = 1.8
102
parrycooldown = 3
103
bleedingtime = 3
104-
swingids = {6241709963}
104+
105
ragdolldespawntime = 10
106
swingids = {1306070008}
107
headshotids = {7025209172, 7025209359, 7025209663}
108
parryids = {7058511334, 7058511852, 7058511971}
109
decapids = {6425362825}
110
spinids = {608600954, 608494468}
111
bloodcolorfromtorso = false
112
actuallyparied = false
113
oldplayerws = 16
114
oldplayerjp = 50
115
oldplayerhealth = 100
116
117
function monar(WHAT, duration)
118
	game:GetService("Debris"):AddItem(WHAT, duration)
119
end
120
121
function pose(POSE, KEYFRAME, speeed, btick)
122
	if state ~= "unequipped" and btick == validatetick then
123
		pcall(function()
124
			local findhead = findthing("HeadWeld", character.Torso)
125
			local findrarm = findthing("RightArmWeld", character.Head)
126
			local findlarm = findthing("LeftArmWeld", character.Head)
127
			local findrleg = findthing("RightLegWeld", character.Torso)
128
			local findlleg = findthing("LeftLegWeld", character.Torso)
129
			local findrootpart = findthing("HumanoidRootPartWeld", character.HumanoidRootPart)
130
			local findhandle = findthing("RightGrip", character["Right Arm"])
131
			local startheadcf = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0,0.35,0)
132
			if POSE == "equip" then
133
				if KEYFRAME == 1 then
134
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhead, {C0 = startheadcf})
135
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findlarm, {C0 = cfnew(-1.44015026, -1.21483612, -0.510011673, 0.939692616, -0.0593911, -0.336824089, -0.219846278, 0.649519145, -0.727868319, 0.262002617, 0.75802207, 0.59729147)})
136
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrarm, {C0 = cfnew(1.50723648, -0.872226715, -0.475799561, 0.993774354, -0.0206981599, 0.109471887, 0.105154656, -0.150392503, -0.983018041, 0.0368103981, 0.988409638, -0.147279769)})
137
				elseif KEYFRAME == 2 then
138
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0, findhead, {C0 = startheadcf})
139
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0, findlarm, {C0 = cfnew(-0.806467056, -1.62165117, -0.794884682, 0.766044438, -0.642787576, 0, 0.413175881, 0.492403835, -0.766044259, 0.492403805, 0.586824, 0.642787635)})
140
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0, findrarm, {C0 = cfnew(0.806467056, -1.62165117, -0.794883728, 0.766044438, 0.642787576, 1.34110465e-07, -0.413175851, 0.492403924, -0.766044199, -0.492403805, 0.58682394, 0.642787695 )})
141
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0, findrootpart, {C0 = cfnew()})
142
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0, findhandle, {C0 = cfnew(-0.0361614227, -1.21160364, -1.67413998, -0.766044438, 0.111618906, 0.63302207, -0.642787576, -0.1330221, -0.754406452, -1.34110451e-07, -0.984807611, 0.17364794)})
143
				end
144
			elseif POSE == "swing" then
145
				if KEYFRAME == 1 then
146
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(-0.0434112549, 0, -0.0751914978, 0.866025388, -0.0868240893, 0.492403865, -7.4505806e-09, 0.98480767, 0.173648149, -0.49999997, -0.150383741, 0.852868438 ) * cfnew(0,0.35,0)})
147
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findlarm, {C0 = cfnew(1.10525131, -0.346797466, -0.610911369, 0.518183529, -0.848274708, 0.109158911, -0.846994162, -0.491261691, 0.203131348, -0.118685439, -0.19771643, -0.973047614)})
148
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.866025388, -0.0868240893, -0.492403865, 0, 0.98480773, -0.173648179, 0.5, 0.150383726, 0.852868497)})
149
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrarm, {C0 = cfnew(1.81095028, -0.792669296, -0.122826576, 0.963875651, -0.228141725, -0.137458891, -0.23417446, -0.971755028, -0.0292248353, -0.126908764, 0.0603585877, -0.990076005)})
150
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhandle, {C0 = cfnew(-0.0190238953, -0.549611807, -1.82067871, -0.981861174, 0.00535122305, -0.189525232, 0.18533048, 0.238044456, -0.953408003, 0.0400138423, -0.971239328, -0.234718204)})
151
				elseif KEYFRAME == 2 then
152
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0, 0, 0, 1, -1.04308143e-07, -1.49011612e-07, 1.0430815e-07, 0.999999821, 1.65765769e-07, 2.08616228e-07, -1.93715067e-07, 0.999999881) * cfnew(0,0.35,0)})
153
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findlarm, {C0 = cfnew(-0.333414078, -1.1603899, -1.28833961, -0.117892452, -0.802119613, -0.585410416, -0.97422111, -0.0207587872, 0.224636063, -0.192337379, 0.596802056, -0.778994918)})
154
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 1, 0, 2.98023224e-08, 0, 0.99999994, 0, 2.98023224e-08, -1.49011612e-08, 0.99999994)})
155
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrarm, {C0 = cfnew(1.57797241, -1.13960147, -0.93402195, 0.677886784, -0.0921047777, -0.729373753, -0.707186043, 0.189408958, -0.681183755, 0.200890377, 0.977568626, 0.0632626489)})
156
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhandle, {C0 = cfnew(0.076672554, -1.0224762, -1.91989994, -0.988381743, 0.0340628475, -0.148095697, 0.147101954, -0.0299755335, -0.988663375, -0.0381166637, -0.998965383, 0.0246175826)})
157
				elseif KEYFRAME == 3 then
158
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0.0194320679, 0, 0.0230379105, 0.503339767, 0.0388669819, -0.863213837, -0.0593909621, 0.998181283, 0.0103131784, 0.862044811, 0.0460760593, 0.504732668) * cfnew(0,0.35,0)})
159
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findlarm, {C0 = cfnew(-1.66619301, -1.35887671, 0.900477409, 0.347174168, 0.935889959, -0.0598304197, -0.937460423, 0.34805873, 0.00472488534, 0.025246473, 0.054448206, 0.998196959)})
160
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.503340006, -0.111618757, 0.856848836, -0.0593910962, 0.98480773, 0.163175702, -0.862044871, -0.13302207, 0.489063919)})
161
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrarm, {C0 = cfnew(-0.775262833, -1.72180367, -1.46918297, 0.257305473, 0.91981864, 0.296187043, -0.845346093, 0.362754226, -0.392171323, -0.468169838, -0.149472997, 0.870904207)})
162
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhandle, {C0 = cfnew(-0.0486164093, -1.80741692, -1.70041466, -0.988385677, -0.0317156464, -0.148615748, 0.147103667, -0.444996178, -0.883367658, -0.0381168537, -0.894970179, 0.444493681)})
163
				end
164
			elseif POSE == "swing2" then
165
				if KEYFRAME == 1 then
166
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0, 0, 0, 0.499999881, -1.93715096e-07, -0.866025388, -1.49011612e-08, 0.999999821, -2.08499841e-07, 0.866025388, 1.04308128e-07, 0.499999821) * cfnew(0,0.35,0)})
167
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findlarm, {C0 = cfnew(-1.26632309, -1.35090113, 1.35695839, -0.043412149, 0.829598188, 0.556670249, -0.413175851, 0.492403537, -0.766044378, -0.909615695, -0.263258487, 0.321393788)})
168
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.49999997, -0.150383741, 0.852868557, 0, 0.98480773, 0.173648179, -0.866025448, -0.0868240818, 0.492403835)})
169
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrarm, {C0 = cfnew(-0.190731049, -1.41545725, -1.84366465, -0.313556612, 0.859663248, 0.403312594, 0.936659455, 0.210210949, 0.280142605, 0.156047612, 0.465607256, -0.871125042)})
170
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhandle, {C0 = cfnew(0.0359020233, -1.18655944, -1.69773293, -0.99903971, 0.0379881859, -0.0215185583, 0.0147992102, -0.169099867, -0.985478938, -0.0410740413, -0.984856904, 0.16837585)})
171
				elseif KEYFRAME == 2 then
172
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(-1.90734863e-06, 0, 0, 0.98480767, -1.94675067e-07, -0.173648372, 1.59529648e-07, 0.999999821, -1.30153737e-07, 0.173648268, 9.32407218e-08, 0.98480767) * cfnew(0,0.35,0)})
173
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findlarm, {C0 = cfnew(-1.85346794, -1.35090137, -0.0978221893, 0.668901265, 0.734923184, 0.111618809, -0.413175821, 0.492403537, -0.766044259, -0.617945373, 0.466289818, 0.63302207)})
174
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.98480773, 1.49011612e-08, 0.173648357, -1.95160688e-08, 0.99999994, 2.32583446e-08, -0.173648417, -2.23517418e-08, 0.98480773)})
175
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrarm, {C0 = cfnew(1.62541008, -0.550931454, -1.00405025, -0.500828028, -0.225280374, 0.835714996, 0.801650107, -0.484819978, 0.349722683, 0.326385826, 0.845102489, 0.423407525)})
176
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhandle, {C0 = cfnew(0.0359020233, -1.18655944, -1.69773293, -0.99903971, 0.0379881859, -0.0215185583, 0.0147992102, -0.169099867, -0.985478938, -0.0410740413, -0.984856904, 0.16837585)})
177
				elseif KEYFRAME == 3 then
178
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(-0.0184164047, 0, -0.0394973755, 0.906307757, -0.0368337184, 0.421010077, 2.04890966e-07, 0.996194601, 0.0871555358, -0.42261827, -0.0789896399, 0.902859092) * cfnew(0,0.35,0)})
179
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findlarm, {C0 = cfnew(-1.3277626, -1.3879056, -1.36363697, 0.962377727, 0.00575536489, -0.271653891, -0.232926458, 0.532265604, -0.813902915, 0.139907792, 0.846557558, 0.513581514 )})
180
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.866025448, -0.0435778536, -0.49809736, 5.32907052e-15, 0.996194661, -0.0871556997, 0.5, 0.0754790604, 0.862729967)})
181
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findrarm, {C0 = cfnew(1.8669529, -0.645955563, 0.99232769, -0.597461581, -0.717176378, -0.358744264, 0.800334334, -0.505381048, -0.322574556, 0.050040368, -0.479841352, 0.875927091)})
182
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhandle, {C0 = cfnew(0.0359020233, -1.18655944, -1.69773293, -0.99903971, 0.0379881859, -0.0215185583, 0.0147992102, -0.169099867, -0.985478938, -0.0410740413, -0.984856904, 0.16837585)})
183
				elseif KEYFRAME == 4 then
184
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(-0.0184164047, 0, -0.0394954681, 0.906307697, -0.036833711, 0.421010017, 2.05246465e-07, 0.996194661, 0.0871555358, -0.42261827, -0.0789896473, 0.902858973) * cfnew(0,0.35,0)})
185
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0, findlarm, {C0 = cfnew(-1.32776451, -1.3879056, -1.36363792, 0.962377548, 0.0057553798, -0.271653861, -0.232926458, 0.532265663, -0.813903034, 0.139907733, 0.846557438, 0.513581395)})
186
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.939692616, 3.7252903e-09, -0.342020184, 8.53839044e-09, 1, 3.93331376e-08, 0.342020154, -2.98023224e-08, 0.939692616) * cfeuler(0.1,-0.4,0)})
187
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0, findrarm, {C0 = cfnew(1.66443443, -1.47913337, 0.946339607, 0.24478662, -0.60071516, -0.761065364, 0.873036921, 0.478010893, -0.0964972153, 0.42176491, -0.640816987, 0.641457379)})
188
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0, findhandle, {C0 = cfnew(0.0359020233, -1.18655944, -1.69773293, -0.99903971, 0.0379881859, -0.0215185583, 0.0147992102, -0.169099867, -0.985478938, -0.0410740413, -0.984856904, 0.16837585)})
189
				end
190
			elseif POSE == "swing3" then
191
				if KEYFRAME == 1 then
192
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(-9.53674316e-07, 0, 0, 1, 8.44011083e-10, -1.21071935e-08, 8.44011083e-10, 0.99999994, 0, -1.21071935e-08, 0, 1) * cfnew(0,0.35,0)})
193
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findlarm, {C0 = cfnew(-0.876605034, -0.68309474, -0.88924408, 0.824110806, -0.556670368, -0.104687028, -0.363025188, -0.377203643, -0.852015138, 0.434803277, 0.740159035, -0.512943029)})
194
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.999619842, 0.0271295328, 0.00487130741, -0.0275630038, 0.984844267, 0.171235546, -0.000151902437, -0.171304792, 0.985218048) * cfeuler(0,-math.pi/2,0)})
195
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrarm, {C0 = cfnew(0.876605988, -0.68309474, -0.889242172, 0.824110806, 0.556670308, 0.104687028, 0.363025099, -0.377203435, -0.852015316, -0.434803486, 0.740159214, -0.512942791)})
196
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhandle, {C0 = cfnew(0.0889234543, -1.26559258, -1.66704273, -0.794784725, 0.295260459, 0.530224919, -0.589384019, -0.16718325, -0.790364504, -0.144718692, -0.940675676, 0.306896657)})
197
				elseif KEYFRAME == 2 then
198
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0,0.35,0)})
199
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, -0.999992967, -0.00218574586, -0.00302373013, -0.00259801745, 0.989592612, 0.143872872, 0.00267777848, 0.143879741, -0.989591479)})
200
				elseif KEYFRAME == 3 then
201
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0,0.35,0)})
202
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, -0.00269090617, -0.176192135, 0.984351993, 0.00505291298, 0.984340549, 0.176203862, -0.999983549, 0.00544799771, -0.00175847043)})
203
				elseif KEYFRAME == 4 then
204
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0, 0, 0, 0.98480767, 3.7252903e-09, 0.173648149, -3.46973899e-08, 0.99999994, 2.08616257e-07, -0.173648149, -1.78813934e-07, 0.984807551) * cfnew(0,0.35,0)})
205
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.999992847, -0.00301244156, 0.00220119907, 0.00259798742, 0.985669076, 0.16866897, -0.00267774635, -0.168662101, 0.985670209)})
206
				elseif KEYFRAME == 5 then
207
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0, 0, 0, 0.766044617, 1.51420721e-07, 0.642787516, -5.98007404e-08, 1, -1.64301071e-07, -0.642787516, 8.74227624e-08, 0.766044617) * cfnew(0,0.35,0)})
208
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findlarm, {C0 = cfnew(0.0016746521, -0.961540222, -1.22285843, 0.0597488321, -0.980557978, -0.186909884, -0.995255589, -0.0729201585, 0.0644006208, -0.076778017, 0.18217501, -0.98026371)})
209
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew(0, 0, 0, 0.499999702, 0, -0.866025627, 0, 1, 0, 0.866025627, 0, 0.499999702)})
210
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findrarm, {C0 = cfnew(2.0153923, -0.72571063, 0.879398346, -0.0795951486, -0.993162811, -0.0853892565, 0.991188586, -0.0879518017, 0.0990364254, -0.105869673, -0.0767543465, 0.991413116)})
211
					tween(speeed, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhandle, {C0 = cfnew(0.413618088, -1.95290947, -1.42747879, -0.955172837, 0.258495659, -0.144297406, -0.0294617563, -0.56799978, -0.822499931, -0.294573754, -0.7813797, 0.550155461)})
212
				end
213
			elseif POSE == "parry" then
214
				if KEYFRAME == 1 then
215
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(-2.86102295e-06, 1.49998641, -1.90734863e-06, 0.342018098, -1.65216625e-06, 0.939690888, -7.4505806e-09, 0.999991, -1.77635229e-06, -0.939686537, -5.99771738e-07, 0.342019409)})
216
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findlarm, {C0 = cfnew(0.901594162, -1.32347822, -0.197136879, 0.143755198, -0.0773586929, 0.986578584, 0.882555306, -0.440967113, -0.163174614, 0.447674662, 0.894181073, 0.00488291308)})
217
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew(-0.0118789673, -0.203036547, -0.0326347351, 0.336822152, -0.0593906455, -0.939686477, 0.173646167, 0.98479867, -3.4137355e-07, 0.925415277, -0.163176209, 0.342019528)})
218
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrarm, {C0 = cfnew(1.0626297, -1.06209946, -0.0650787354, 0.173646837, 1.99768692e-07, 0.984801412, 0.969837129, -0.173648328, -0.171008199, 0.171008036, 0.98480612, -0.0301532429)})
219
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findhandle, {C0 = cfnew(-0.00456058979, -2.48153496, -0.0186843872, -0.955164194, 0.030058451, -0.294546902, -0.0294590909, -0.999545097, -0.00647266675, -0.29460746, 0.00249462551, 0.955615103)})
220
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrleg, {C0 = cfnew(0.872175694, -2.11068511, 3.81469727e-06, 0.939689875, -0.342020959, 1.40070915e-06, 0.342015445, 0.939684629, -6.03497028e-07, 1.10268593e-06, -1.04308128e-06, 0.99999404)})
221
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findlleg, {C0 = cfnew(-1.05737257, -1.62676859, -0.219942093, 0.940149069, 0.339419574, 0.030154705, -0.339420617, 0.924949646, 0.171007872, 0.0301550031, -0.171009108, 0.984801829)})
222
				elseif KEYFRAME == 2 then
223
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(0, 1.40954661, 0.28676796, 1, -5.39914254e-07, -4.47039042e-07, 1.85861694e-07, 0.819152832, -0.573575437, 6.75874787e-07, 0.573575377, 0.819152832)})
224
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findlarm, {C0 = cfnew(-0.429336548, -1.00871325, -1.33772755, 0.984801352, -0.172986597, 0.0151341371, 0.0151344296, -0.00131911295, -0.999875188, 0.172987774, 0.984921634, 0.00131988712)})
225
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew(0, -0.617840767, -0.494980812, 0.999993563, 6.19543812e-08, 2.25289909e-07, 1.7997111e-07, 0.819144428, 0.573571026, 1.49011044e-07, -0.57357651, 0.819150507)})
226
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrarm, {C0 = cfnew(0.389614105, -1.01415372, -1.39992189, 0.965919554, 0.257832646, -0.0225576032, -0.0225570872, -0.00295865815, -0.999731779, -0.25783366, 0.966183484, 0.00295909657)})
227
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findhandle, {C0 = cfnew(0.187524796, -2.42712927, -0.0307271481, -0.960426033, 0.271946609, 0.0602244027, -0.27195397, -0.962275028, 0.00823253393, 0.0601912513, -0.00847152341, 0.998150945)})
228
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrleg, {C0 = cfnew(0.499992371, -2.13795662, 0.419466019, 1, 5.65172051e-08, -6.98682413e-07, 1.85861694e-07, 0.9396891, 0.342029929, 6.75874787e-07, -0.342029929, 0.9396891)})
229
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findlleg, {C0 = cfnew(-0.499990463, -0.670339346, -1.34637785, 1, -6.78257038e-07, -1.76970985e-07, 1.85861694e-07, 0.499993026, -0.866029501, 6.75874787e-07, 0.866029501, 0.499992996)})
230
				elseif KEYFRAME == 3 then
231
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhead, {C0 = cfnew(0, 1.49808466, 0.0435743332, 0.999993563, 1.51361462e-07, 1.77998857e-07, 1.35271748e-07, 0.996185958, -0.0871579498, 1.90513617e-07, 0.0871537328, 0.996192634)})
232
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findlarm, {C0 = cfnew(-1.44930458, -0.834447384, -0.797714233, 0.941139936, 0.337688953, 0.0144438297, 0.0715859234, -0.157381371, -0.984930634, -0.330331385, 0.92800492, -0.172290504)})
233
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrootpart, {C0 = cfnew(0, 0.110053539, -0.00343513489, 0.999993563, 1.35271748e-07, 1.90513617e-07, 1.7997111e-07, 0.965916872, 0.25881663, 1.49011044e-07, -0.25881961, 0.965924263)})
234
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrarm, {C0 = cfnew(-0.362801552, -1.00685477, -1.16335297, -0.0252703037, 0.862672448, -0.505131364, 0.975723982, 0.131241634, 0.175324127, 0.217541575, -0.488438249, -0.84504658)})
235
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findhandle, {C0 = cfnew(0.0678982735, -1.63876772, -1.6992836, -0.960412204, 0.0364360884, 0.276190013, -0.272002608, -0.336854935, -0.901411951, 0.0601920374, -0.940851271, 0.33343032)})
236
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findrleg, {C0 = cfnew(0.499990463, -2.13794041, 0.419459343, 1, -1.85854347e-07, -6.7587689e-07, 4.05815683e-07, 0.939688921, 0.342030555, 5.71546025e-07, -0.342030525, 0.939688921)})
237
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, findlleg, {C0 = cfnew(-0.499990463, -1.82915878, -1.20715046, 1, -6.37221092e-07, -2.92062737e-07, 4.05815683e-07, 0.866023302, -0.500003815, 5.71546025e-07, 0.500003815, 0.866023302)})
238
				elseif KEYFRAME == 4 then
239
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhead, {C0 = cfnew(0.0613927841, 1.49586678, -0.0182418823, 0.707104743, 0.122787073, -0.696359098, -0.061628405, 0.991752684, 0.112293229, 0.70441556, -0.0364881307, 0.708845139)})
240
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findlarm, {C0 = cfnew(-1.45631075, -1.61514974, 0.858612061, -0.159541398, 0.823127031, 0.54498136, 0.316107392, 0.565577507, -0.761694908, -0.935206056, 0.0507521033, -0.350429177)})
241
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrootpart, {C0 = cfnew(0, 0.010434866, 0.00528049469, 0.866522372, 0.0320669971, -0.498094201, -0.0436544456, 0.998969615, -0.0116322422, 0.49721542, 0.0318230875, 0.867041707)})
242
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrarm, {C0 = cfnew(1.27984476, -1.29986334, -1.68792152, 0.702379942, -0.36221078, 0.612749696, 0.711705089, 0.371021271, -0.596489966, -0.0112873912, 0.855062604, 0.518389583)})
243
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findhandle, {C0 = cfnew(0.510777473, -2.92113781, -0.426809311, -0.960421741, 0.2573888, 0.106494546, -0.271978766, -0.949076772, -0.158999994, 0.0601466894, -0.181671321, 0.981518209)})
244
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findrleg, {C0 = cfnew(0.761685371, -1.95332146, -0.144449234, 0.984808087, -0.17298606, 0.015127738, 0.173646256, 0.981060505, -0.085832946, 6.67582299e-06, 0.0871558487, 0.99619472)})
245
					tween(speeed, Enum.EasingStyle.Back, Enum.EasingDirection.Out, 0, false, 0, findlleg, {C0 = cfnew(-0.670157433, -1.95244908, 0.142192841, 0.995965123, 0.0780069456, 0.0443671234, -0.0844863355, 0.981733739, 0.170472875, -0.0302586295, -0.17353344, 0.984363079)})
246
				end
247
			elseif POSE == "r6stance" then
248
				if KEYFRAME == 1 then
249
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = startheadcf})
250
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findlarm, {C0 = cfnew(-0.806467056, -1.62165117, -0.794884682, 0.766044438, -0.642787576, 0, 0.413175881, 0.492403835, -0.766044259, 0.492403805, 0.586824, 0.642787635)})
251
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrarm, {C0 = cfnew(0.806467056, -1.62165117, -0.794883728, 0.766044438, 0.642787576, 1.34110465e-07, -0.413175851, 0.492403924, -0.766044199, -0.492403805, 0.58682394, 0.642787695 )})
252
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrootpart, {C0 = cfnew()})
253
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findhandle, {C0 = cfnew(-0.0361614227, -1.21160364, -1.67413998, -0.766044438, 0.111618906, 0.63302207, -0.642787576, -0.1330221, -0.754406452, -1.34110451e-07, -0.984807611, 0.17364794)})
254
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findrleg, {C0 = cfnew(0.5,-2,0)})
255
					tween(speeed, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0, findlleg, {C0 = cfnew(-0.5,-2,0)})
256
				end
257
			end
258
		end)
259
	end
260
end
261
262
263
function tooltransparency(transparency)
264
	table.foreach(tool:GetDescendants(), function(_, XD) if XD:IsA("BasePart") then XD.Transparency = transparency end end)
265
end
266
function searchfornearesthead(maxrange)
267
	local closestdistance = maxrange
268
	local guyhead
269
	for i,v in pairs(workspace:GetDescendants()) do
270
		local hhhh = v:FindFirstChildOfClass("Humanoid")
271
		if hhhh and v ~= character then
272
			if hhhh.Health > 0 then
273
				local foundhead = v:FindFirstChild("Head")
274
				if foundhead then
275
					local mag = (foundhead.Position - character.Head.Position).magnitude
276
					if mag < closestdistance then
277
						closestdistance = mag
278
						guyhead = foundhead
279
					end
280
				end
281
			end
282
		end
283
	end
284
	return guyhead, closestdistance
285
end
286
function weldlimb(part0, part1, startc0, name)
287
	local a = Instance.new("Weld", part0)
288
	a.Part0 = part0
289
	a.Part1 = part1
290
	a.C0 = startc0
291
	a.Name = name
292
end
293
function playsound(id, volume, speed, debris, timeposition, parent)
294
	pcall(function() --pcalling sounds because void has trash sound limit that breaks scripts if you dont do that
295
		local s = Instance.new("Sound")
296
		if parent ~= nil then
297
			s.Parent = parent
298
		else
299
			s.Parent = handle
300
		end
301
		s.SoundId = "rbxassetid://"..tostring(id)
302
		s.Volume = volume
303
		s.PlaybackSpeed = speed
304
		s.TimePosition = timeposition
305
		s:Play()
306
		monar(s, debris)
307
	end)
308
end
309
function playswingid()
310
	local rand = math.random(1,#swingids)
311
	playsound(swingids[rand], 1.5, 1.5+math.random(-10,10)/70, 4, 0)
312
end
313
function playheadshotid()
314
	local rand = math.random(1,#headshotids)
315
	playsound(headshotids[rand], 1, 1+math.random(-10,10)/70, 4, 0.2)
316
end
317
function playspinid()
318
	local rand = math.random(1,#spinids)
319
	playsound(spinids[rand], 0.5, 1+math.random(-10,10)/70, 4, 0)
320
end
321
function playparryid()
322
	local rand = math.random(1,#parryids)
323
	playsound(parryids[rand], 0.5, 1+math.random(-10,10)/70, 4, 0)
324
end
325
function tween(speed, easingstyle, easingdirection, loopcount, reverseafterfinish, delaytime, WHAT, goal)
326
	local info = TweenInfo.new(speed, easingstyle, easingdirection, loopcount, reverseafterfinish, delaytime)
327
	local goals = goal
328
	local anim = tweenservice:Create(WHAT, info, goals)
329
	anim:Play()
330
end
331
function findthing(WHAT, parent)
332
	local thing = parent:FindFirstChild(WHAT, true)
333
	if thing then
334
		return thing
335
	else return nil end
336
end
337
function push(WHAT, force, debris)
338
	local v = Instance.new("BodyVelocity", WHAT)
339
	v.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
340
	v.Velocity = (WHAT.Position - character.Head.Position).unit*force
341
	monar(v, debris)
342
end
343
function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper, du)
344
	local connection = Instance.new('BallSocketConstraint', limb)
345
	local bone = Instance.new("Part", limb)
346
	connection.LimitsEnabled = true
347
	connection.Attachment0 = attachementone
348
	connection.Attachment1 = attachmenttwo
349
	connection.TwistLimitsEnabled = true
350
	connection.TwistLowerAngle = twistlower
351
	connection.TwistUpperAngle = twistupper
352
	bone:BreakJoints()
353
	local bonew = Instance.new("Weld", bone)
354
	bonew.Part0 = limb
355
	bonew.Part1 = bone
356
	bonew.C0 = cfeuler(0,0,math.pi/2) * cfnew(-limb.Size.y/4.5,0,0)
357
	if limb.Parent:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then
358
		bone.Size = Vector3.new(limb.Size.y/1.8,limb.Size.z,limb.Size.x)
359
	else
360
		bone.Size = Vector3.new(limb.Size.y/3,limb.Size.z,limb.Size.x)
361
	end
362
	bone.Transparency = 1
363
	bone.Shape = "Cylinder"
364
	local noc = Instance.new("NoCollisionConstraint", bone)
365
	noc.Part0 = attachementone.Parent
366
	noc.Part1 = attachmenttwo.Parent
367
	monar(bone, du)
368
	monar(connection, du)
369
end
370
function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper, du)
371
	local connection = Instance.new('HingeConstraint', limb)
372
	local bone = Instance.new("Part", limb)
373
	connection.LimitsEnabled = true
374
	connection.Attachment0 = attachementone
375
	connection.Attachment1 = attachmenttwo
376
	connection.LimitsEnabled = true
377
	connection.LowerAngle = lower
378
	connection.UpperAngle = upper
379
	bone:BreakJoints()
380
	local bonew = Instance.new("Weld", bone)
381
	bonew.Part0 = limb
382
	bonew.Part1 = bone
383
	bonew.C0 = cfeuler(0,0,math.pi/2) * cfnew(-limb.Size.y/4.5,0,0)
384
	if limb.Parent:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R6 then
385
		bone.Size = Vector3.new(limb.Size.y/1.8,limb.Size.z,limb.Size.x)
386
	elseif limb.Parent:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
387
		bone.Size = Vector3.new(limb.Size.y/3,limb.Size.z,limb.Size.x)
388
	elseif limb.Name == "Head" then
389
		bone.Size = Vector3.new(limb.Size.y/5,limb.Size.z,limb.Size.x)
390
	end
391
	bone.Transparency = 1
392
	bone.Shape = "Cylinder"
393
	local noc = Instance.new("NoCollisionConstraint", bone)
394
	noc.Part0 = attachementone.Parent
395
	noc.Part1 = attachmenttwo.Parent
396
	monar(bone, du)
397
	monar(connection, du)
398
end
399
function headshotdeath(ch)
400
	local ched = ch:FindFirstChild("Head")
401
	if ched then
402
		Instance.new("BoolValue", ch).Name = "diedbydecapitation"
403
		local soundpart = Instance.new("Part", workspace)
404
		soundpart.Anchored = true
405
		soundpart.Size = Vector3.new()
406
		soundpart.CanCollide = false
407
		soundpart.CFrame = ched.CFrame
408
		soundpart.Transparency = 1
409
		playsound("4307125957", 1, 1+math.random(-10,10)/70, 2, 0.05)
410
		playsound("4086201929", 1, 1+math.random(-10,10)/70, 3, 0, soundpart)
411
		playsound("4086193139", 0.5, 1+math.random(-10,10)/70, 5, 0, soundpart)
412
		monar(soundpart, 6)
413
	end
414
end
415
function makeragdolllimbr6(limb, dudetorso, at1pos, at2pos, lowt, upt, duratio)
416
	local at1 = Instance.new("Attachment", dudetorso)
417
	local at2 = Instance.new("Attachment", limb)
418
	at1.Position = at1pos
419
	at2.Position = at2pos
420
	makeballconnections(limb, at1, at2, lowt, upt, duratio)
421
	game.Debris:AddItem(at1, duratio)
422
	game.Debris:AddItem(at2, duratio)
423
end
424
function ragdollify(ch, duration, dea)
425
	local chum = ch:FindFirstChildOfClass("Humanoid")
426
	if chum then
427
		if not chum.PlatformStand then
428
			chum.PlatformStand = true
429
			if dea then
430
				chum.RequiresNeck = false
431
				chum.Health = 0
432
				local hpsc = ch:FindFirstChild("Health")
433
				if hpsc then
434
					if hpsc:IsA("Script") then
435
						hpsc.Disabled = true
436
					end
437
				end
438
				if ch:FindFirstChild("HumanoidRootPart") then
439
					ch:FindFirstChild("HumanoidRootPart"):Destroy()
440
				end
441
				push(ch.Head, 10, 0.3)
442
				monar(ch, ragdolldespawntime)
443
			elseif ch:FindFirstChild("HumanoidRootPart") then
444
				if ch:FindFirstChild("HumanoidRootPart").CanCollide then
445
					ch:FindFirstChild("HumanoidRootPart").CanCollide = false
446
					coroutine.wrap(function()
447
						task.wait(duration)
448
						if ch:FindFirstChild("HumanoidRootPart") then
449
							ch:FindFirstChild("HumanoidRootPart").CanCollide = true
450
						end
451
					end)()
452
				end
453
			end
454
			local savedglue = {}
455
			local mainpart
456
			if chum.RigType == Enum.HumanoidRigType.R6 then
457
				local chtor = ch.Torso
458
				mainpart = chtor
459
				if not dea then
460
					for i,v in pairs(chtor:GetChildren()) do
461
						if v:IsA("Motor6D") then
462
							if v.Part1.Name ~= "Head" and v.Part0.Name ~= "HumanoidRootPart" then
463
								table.insert(savedglue, {v, v.Part0, v.Part1})
464
								v.Part1 = nil
465
								v.Part0 = nil
466
							end
467
						end
468
					end
469
				end
470
				pcall(function()
471
					makeragdolllimbr6(ch["Right Arm"], ch.Torso, Vector3.new((ch.Torso.Size.x/2) + (ch.Torso.Size.x/4), (ch.Torso.Size.y/4), 0), Vector3.new(0,ch["Right Arm"].Size.y/4,0), -180, 180, duration)
472
				end)
473
				pcall(function()
474
					makeragdolllimbr6(ch["Left Arm"], ch.Torso, Vector3.new(-(ch.Torso.Size.x/2) - (ch.Torso.Size.x/4), (ch.Torso.Size.y/4), 0), Vector3.new(0,ch["Left Arm"].Size.y/4,0), -180, 180, duration)
475
				end)
476
				pcall(function()
477
					makeragdolllimbr6(ch["Left Leg"], ch.Torso, Vector3.new(-(ch.Torso.Size.x/4), -(ch.Torso.Size.y/2), 0), Vector3.new(0,ch["Left Leg"].Size.y/2,0), -80, 80, duration)
478
				end)
479
				pcall(function()
480
					makeragdolllimbr6(ch["Right Leg"], ch.Torso, Vector3.new((ch.Torso.Size.x/4), -(ch.Torso.Size.y/2), 0), Vector3.new(0,ch["Right Leg"].Size.y/2,0), -80, 80, duration)
481
				end)
482
				if dea == true and not ch:FindFirstChild("diedbydecapitation") then
483
					if ch.Torso:findFirstChild("NeckAttachment") then
484
						local headattachment = Instance.new("Attachment", ch.Head)
485
						headattachment.Position = Vector3.new(0,-ch.Head.Size.y/2,0)
486
						makehingeconnections(ch.Head, headattachment, ch.Torso.NeckAttachment, -50, 50, ragdolldespawntime)
487
					else
488
						local wed = Instance.new("Weld", ch.Head)
489
						wed.Part1 = ch.Head
490
						wed.Part0 = ch.Torso
491
						wed.C0 = cfnew(0,(ch.Torso.Size.y/2)+(ch.Head.Size.y/2),0)
492
					end
493
				end
494
				if not dea then
495
					coroutine.wrap(function()
496
						task.wait(duration)
497
						for i,v in pairs(savedglue) do
498
							v[1].Part0 = v[2]
499
							v[1].Part1 = v[3]
500
							savedglue[i] = nil
501
						end
502
						chum.PlatformStand = false
503
					end)()
504
				end
505
			elseif chum.RigType == Enum.HumanoidRigType.R15 then
506
				local chuppertor = ch.UpperTorso
507
				mainpart = chuppertor
508
				if not dea then
509
					for i,v in pairs(ch:GetDescendants()) do
510
						if v:IsA("Motor6D") then
511
							if v.Part1.Name ~= "Head" and v.Part0.Name ~= "HumanoidRootPart" then
512
								table.insert(savedglue, {v, v.Part0, v.Part1})
513
								v.Part1 = nil
514
								v.Part0 = nil
515
							end
516
						end
517
					end
518
				end
519
				if dea == true and not ch:FindFirstChild("diedbydecapitation") then
520
					if ch.UpperTorso:findFirstChild("NeckAttachment") then
521
						local HeadAttachment = Instance.new("Attachment", ch.Head)
522
						HeadAttachment.Position = Vector3.new(0, -0.5, 0)
523
						makehingeconnections(ch.Head, HeadAttachment, ch.UpperTorso.NeckAttachment, -50, 50, ragdolldespawntime)
524
					else
525
						local wed = Instance.new("Weld", ch.Head)
526
						wed.Part1 = ch.Head
527
						wed.Part0 = ch.UpperTorso
528
						wed.C0 = cfnew(0,(ch.UpperTorso.Size.y/2)+(ch.Head.Size.y/2),0)
529
					end
530
				end
531
				pcall(function()
532
					makehingeconnections(ch.LowerTorso, ch.LowerTorso.WaistRigAttachment, ch.UpperTorso.WaistRigAttachment, -50, 50, duration)
533
					makeballconnections(ch.LeftUpperArm, ch.LeftUpperArm.LeftShoulderRigAttachment, ch.UpperTorso.LeftShoulderRigAttachment, -200, 200, duration)
534
					makehingeconnections(ch.LeftLowerArm, ch.LeftLowerArm.LeftElbowRigAttachment, ch.LeftUpperArm.LeftElbowRigAttachment, 0, -60, duration)
535
					makehingeconnections(ch.LeftHand, ch.LeftHand.LeftWristRigAttachment, ch.LeftLowerArm.LeftWristRigAttachment, -20, 20, duration)
536
					--
537
					makeballconnections(ch.RightUpperArm, ch.RightUpperArm.RightShoulderRigAttachment, ch.UpperTorso.RightShoulderRigAttachment, -200, 200, duration)
538
					makehingeconnections(ch.RightLowerArm, ch.RightLowerArm.RightElbowRigAttachment, ch.RightUpperArm.RightElbowRigAttachment, 0, -60, duration)
539
					makehingeconnections(ch.RightHand, ch.RightHand.RightWristRigAttachment, ch.RightLowerArm.RightWristRigAttachment, -20, 20, duration)
540
					--
541
					makeballconnections(ch.RightUpperLeg, ch.RightUpperLeg.RightHipRigAttachment, ch.LowerTorso.RightHipRigAttachment, -80, 80, duration)
542
					makehingeconnections(ch.RightLowerLeg, ch.RightLowerLeg.RightKneeRigAttachment, ch.RightUpperLeg.RightKneeRigAttachment, 0, 60, duration)
543
					makehingeconnections(ch.RightFoot, ch.RightFoot.RightAnkleRigAttachment, ch.RightLowerLeg.RightAnkleRigAttachment, -20, 20, duration)
544
					--
545
					makeballconnections(ch.LeftUpperLeg, ch.LeftUpperLeg.LeftHipRigAttachment, ch.LowerTorso.LeftHipRigAttachment, -80, 80, duration)
546
					makehingeconnections(ch.LeftLowerLeg, ch.LeftLowerLeg.LeftKneeRigAttachment, ch.LeftUpperLeg.LeftKneeRigAttachment, 0, 60, duration)
547
					makehingeconnections(ch.LeftFoot, ch.LeftFoot.LeftAnkleRigAttachment, ch.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20, duration)
548
				end)
549
				if not dea then
550
					coroutine.wrap(function()
551
						task.wait(duration)
552
						for i,v in pairs(savedglue) do
553
							v[1].Part0 = v[2]
554
							v[1].Part1 = v[3]
555
							savedglue[i] = nil
556
						end
557
						chum.PlatformStand = false
558
					end)()
559
				end
560
			end
561
			if dea then
562
				for i,v in pairs(ch:GetChildren()) do
563
					if v:IsA("Accessory") then
564
						if v:FindFirstChild("Handle") then
565
							local attachment1 = v.Handle:FindFirstChildOfClass("Attachment")
566
							if attachment1 then
567
								for q,w in pairs(ch:GetChildren()) do
568
									if w:IsA("Part") then
569
										local attachment2 = w:FindFirstChild(attachment1.Name)
570
										if attachment2 then
571
											local hinge = Instance.new("HingeConstraint", v.Handle)
572
											hinge.Attachment0 = attachment1
573
											hinge.Attachment1 = attachment2
574
											hinge.LimitsEnabled = true
575
											hinge.LowerAngle = 0
576
											hinge.UpperAngle = 0
577
										end
578
									end
579
								end
580
							end
581
						end
582
					end
583
				end
584
				if ch:FindFirstChild("diedbydecapitation") then
585
					local cutpart = Instance.new("Part", mainpart)
586
					cutpart.Size = Vector3.new(0.05,0.5,0.5)
587
					cutpart.CanCollide = false
588
					cutpart.Material = "Pebble"
589
					cutpart.Shape = "Cylinder"
590
					if bloodcolorfromtorso then
591
						cutpart.Color = mainpart.Color
592
					else
593
						cutpart.BrickColor = BrickColor.new("Maroon")
594
					end
595
					cutpart:BreakJoints()
596
					local cutweld = Instance.new("Weld", cutpart)
597
					cutweld.Part0 = mainpart
598
					cutweld.Part1 = cutpart
599
					cutweld.C0 = cfeuler(0,0,math.pi/2) * cfnew((mainpart.Size.y/2),0,0)
600
					local pe = Instance.new("ParticleEmitter", cutpart)
601
					if bloodcolorfromtorso then
602
						pe.Color = ColorSequence.new(mainpart.Color)
603
					else
604
						pe.Color = ColorSequence.new(Color3.fromRGB(100,0,0))
605
					end
606
					pe.LightEmission = 0
607
					pe.LightInfluence = 1
608
					pe.EmissionDirection = "Right"
609
					pe.Orientation = Enum.ParticleOrientation.VelocityParallel
610
					pe.Size = NumberSequence.new(1,0)
611
					pe.Texture = "rbxassetid://243132757"
612
					pe.Transparency = NumberSequence.new(0,0.4)
613
					pe.Lifetime = NumberRange.new(0.25,0.4)
614
					pe.Rate = 300
615
					pe.Rotation = NumberRange.new(90)
616
					pe.RotSpeed = NumberRange.new(0)
617
					pe.Speed = NumberRange.new(15)
618
					pe.SpreadAngle = Vector2.new(-15,15)
619
					pe.Drag = NumberRange.new(1)
620
					pe.Acceleration = Vector3.new(rand(-20,20),-50,rand(-20,20))
621
					local pplandotherstuff = {}
622
					local hitgroundalready = false
623
					table.foreach(workspace:GetDescendants(), function(z,x)
624
						if x:FindFirstChildOfClass("Humanoid") then
625
							table.insert(pplandotherstuff, x)
626
						elseif x:IsA("BasePart") then
627
							if not x.CanCollide then
628
								table.insert(pplandotherstuff, x)
629
							end
630
						end
631
					end)
632
					coroutine.wrap(function()
633-
							task.wait(0.1)
633+
634
						local bloodincreasefunc
635
						for i = 1,ragdolldespawntime*10 do
636
							task.wait(0)
637
							local ray = Ray.new(cutpart.Position, Vector3.new(0,-(mainpart.Size.z/2)+(-1),0))
638
							hit,position,surface = workspace:FindPartOnRayWithIgnoreList(ray, pplandotherstuff)
639
							if hit ~= nil then
640
								hitgroundalready = true
641
								break
642
							end
643
						end
644
						if hitgroundalready then
645
							local bloodpartfloor = Instance.new("Part", workspace)
646
							bloodpartfloor.Size = Vector3.new(0.05,0.5,0.5)
647
							bloodpartfloor.CanCollide = false
648
							bloodpartfloor.Material = "Glass"
649
							bloodpartfloor.Shape = "Cylinder"
650
							bloodpartfloor.Anchored = true
651
							bloodpartfloor.CFrame = cfnew(position, position-surface) * cfeuler(math.pi/2,0,math.pi/2)
652
							bloodpartfloor:BreakJoints()
653
							monar(bloodpartfloor, ragdolldespawntime+2)
654
							if bloodcolorfromtorso then
655
								bloodpartfloor.Color = mainpart.Color
656
							else
657
								bloodpartfloor.BrickColor = BrickColor.new("Maroon")
658
							end
659
							local delta
660
							local lastframe = tick()
661
							local bloodtime = 0
662
							bloodincreasefunc = runservice.Stepped:Connect(function()
663
								delta = tick() - lastframe
664
								bloodtime = bloodtime + delta
665
								bloodpartfloor.Size = bloodpartfloor.Size + Vector3.new(0,delta*bloodpuddlesizemultiplier, delta*bloodpuddlesizemultiplier)
666
								if bloodtime > bleedingtime then
667
									pe.Enabled = false
668
									bloodincreasefunc:Disconnect()
669
								end
670
								lastframe = tick()
671
							end)
672
						end
673
					end)()
674
				end
675
			end
676
		end
677
	end
678
end
679
680
function ragdollkilldude(who)
681
	who.Archivable = true
682
	table.foreach(who:GetDescendants(), function(_,hi) 
683
		if hi:IsA("Sound") then
684
			hi:Destroy()
685
		end
686
	end)
687
	local clr = who:Clone()
688
	table.foreach(who:GetChildren(), function(_,hi) 
689
		if hi:IsA("BasePart") or hi:IsA("ForceField") or hi:IsA("Accessory") or hi:IsA("Hat") then
690
			hi:Destroy()
691
		end
692
	end)
693
	clr.Parent = workspace
694
	clr:BreakJoints()
695
	ragdollify(clr, ragdolldespawntime, true)
696
end
697
function selectionbox(part, linet, surt, color3, surcolor3, transp, maxtime)
698
	local boxfunc
699
	local frametick = tick()
700
	local timepassed = tick()
701
	local delta
702
	local selbox = Instance.new("SelectionBox", part)
703
	selbox.LineThickness = linet
704
	selbox.SurfaceTransparency = surt
705
	selbox.Color3 = color3
706
	selbox.SurfaceColor3 = color3
707
	selbox.Transparency = transp
708
	selbox.Adornee = part
709
	monar(selbox, maxtime)
710
	tween(maxtime, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, selbox, {Transparency = 1})
711
	tween(maxtime, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0, selbox, {SurfaceTransparency = 1})
712
end
713
function removeselbox(part)
714
	table.foreach(character:GetDescendants(), function(a,b)
715
		if b:IsA("SelectionBox") then
716
			if part == true then
717
				b:Destroy()
718
			elseif part:IsA("BasePart") then
719
				if b.Adornee == part then
720
					b:Destroy()
721
				end
722
			end
723
		end
724
	end)
725
end
726
727
728
function hitperson(hispart, headshotknockback)
729
	local findh = hispart.Parent:FindFirstChildOfClass("Humanoid")
730
	if findh then
731
		if findh.Health > 0 then
732
			local him = table.find(hitpeople, findh.Parent)
733
			if not him then
734
				playsound("2900321088", 2, 1+math.random(-10,10)/70, 2, 0.2)
735
				if not findh:FindFirstChild("dontchangews") then
736-
							wait(0.5)
736+
737
						coroutine.wrap(function()
738
							findh.WalkSpeed = findh.WalkSpeed - 1
739
							findh.JumpHeight = findh.JumpHeight - 1
740
							wait(0)
741
							findh.WalkSpeed = findh.WalkSpeed + 1
742
							findh.JumpHeight = findh.JumpHeight + 1
743
						end)()
744
					end)()
745
				end
746
				if hispart.Name == "Head" then
747
					playheadshotid()
748
					if swinganimation == 0 then --this is the number before 360 spin headshot insta kill move
749
						headshotdeath(findh.Parent)
750
						ragdollkilldude(findh.Parent)
751
						return
752
					elseif findh.Health < damage then
753
						headshotdeath(findh.Parent)
754
					end
755
				end
756
				if findh.Health > damage then
757
					findh.Health = findh.Health - damage
758
					if findh.PlatformStand then
759
						push(hispart, 5, 0.3)
760
					end
761
					if hispart.Name == "Head" then
762
						ragdollify(findh.Parent, 1, false)
763
						push(hispart, headshotknockback, 0.3)
764
					end
765
				else
766
					if hispart.Name == "Head" then
767
						playheadshotid()
768
					end
769
					ragdollkilldude(findh.Parent)
770
				end
771
			end
772
		end
773
	end
774
end
775
776
remote.OnServerEvent:Connect(function(WHO, WHAT, parameter1)
777
	if WHO == player and state ~= "unequipped" then
778
		if WHAT == "1" then
779
			headoffset = parameter1
780
			local findhead = findthing("HeadWeld", character.Torso)
781
			if findhead and state ~= "swinging" and state ~= "inparrymode" and state ~= "unforeseenconsequence" then
782
				tween(0.2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0, findhead, {C0 = cfnew(0,1.15,0) * cfeuler(-headoffset/1.5,0,0) * cfnew(0,0.35,0)})
783
			end
784
		elseif WHAT == "2" and state == "swinging" then
785
			if (handle.Position - parameter1.Position).magnitude < 11 then
786
				hitperson(parameter1, 15)
787
			end
788
		elseif WHAT == "3" and state == "idle" and tick() > lastparrytick + parrycooldown and not charhum.PlatformStand then
789
			state = "inparrymode"
790
			actuallyparied = false
791
			local backuptick = equiptick
792
			local donot = Instance.new("BoolValue", charhum)
793
			donot.Name = "dontchangews"
794
			charhum.WalkSpeed = charhum.WalkSpeed - 16
795
			charhum.JumpHeight = charhum.JumpHeight - 7.2
796
			weldlimb(character.Torso, character["Right Leg"], cfnew(0.5,-2,0), "RightLegWeld")
797
			weldlimb(character.Torso, character["Left Leg"], cfnew(-0.5,-2,0), "LeftLegWeld")
798
			pose("parry", 1, 0.2*animslowdownmult, backuptick)
799
			task.wait(1*animslowdownmult)
800
			if not actuallyparied then
801
				state = "fail"
802
				pose("r6stance", 1, 0.4*animslowdownmult, backuptick)
803
				charhum.WalkSpeed = charhum.WalkSpeed + 5
804
				task.wait(0.4*animslowdownmult)
805
				pcall(function()
806
					findthing("LeftLegWeld", character):Destroy()
807
				end)
808
				pcall(function()
809
					findthing("RightLegWeld", character):Destroy()
810
				end)
811
				task.wait(1.4*animslowdownmult)
812
				lastparrytick = tick()
813
				charhum.WalkSpeed = charhum.WalkSpeed + 11
814
				charhum.JumpHeight = charhum.JumpHeight + 7.2
815
				donot:Destroy()
816
				state = "idle"
817
			end
818
		end
819
	end
820
end)
821
--just send ur backup tick to the function and it should work fineeeee
822
tool.Activated:Connect(function()
823
	if state == "idle" and not charhum.PlatformStand then
824
		state = "swinging"
825
		local donot = Instance.new("BoolValue", charhum)
826
		donot.Name = "dontchangews"
827
		for i,v in pairs(hitpeople) do
828
			hitpeople[i] = nil
829
		end
830
		local backuptick = equiptick
831
		if (tick() - lastswingtick) > 2 then
832
			swinganimation = 0
833
		end
834
		if swinganimation == 0 then
835
			swinganimation = 1
836
			charhum.WalkSpeed = charhum.WalkSpeed + speedbuff
837
			pose("swing", 1, 0.25*animslowdownmult, backuptick)
838
			task.wait(0.2*animslowdownmult)
839
			trail.Enabled = true
840
			remote:FireClient(player, "1")
841
			playswingid()
842
			pose("swing", 2, 0.035*animslowdownmult, backuptick)
843
			task.wait(0.035*animslowdownmult)
844
			pose("swing", 3, 0.25*animslowdownmult, backuptick)
845
			task.wait(0.2*animslowdownmult)
846
			remote:FireClient(player, "2")
847
			trail.Enabled = false
848
			charhum.WalkSpeed = charhum.WalkSpeed - speedbuff
849
			pose("equip", 2, 0.5*animslowdownmult, backuptick)
850
			task.wait(0.3*animslowdownmult)
851
			if backuptick == equiptick then
852
				state = "idle"
853
			end
854
		elseif swinganimation == 1 then
855
			swinganimation = 2
856
			charhum.WalkSpeed = charhum.WalkSpeed + speedbuff
857
			pose("swing2", 1, 0.2*animslowdownmult, backuptick)
858
			task.wait(0.15*animslowdownmult)
859
			trail.Enabled = true
860
			remote:FireClient(player, "1")
861
			playswingid()
862
			pose("swing2", 2, 0.08*animslowdownmult, backuptick)
863
			task.wait(0.08*animslowdownmult)
864
			pose("swing2", 3, 0.08*animslowdownmult, backuptick)
865
			task.wait(0.08*animslowdownmult)
866
			charhum.WalkSpeed = charhum.WalkSpeed - speedbuff
867
			remote:FireClient(player, "2")
868
			trail.Enabled = false
869
			pose("swing2", 4, 0.125*animslowdownmult, backuptick)
870
			task.wait(0.125*animslowdownmult)
871
			pose("equip", 2, 0.5*animslowdownmult, backuptick)
872
			task.wait(0.3*animslowdownmult)
873
			if backuptick == equiptick then
874
				state = "idle"
875
			end
876
		elseif swinganimation == 2 then
877
			swinganimation = 0
878
			charhum.WalkSpeed = charhum.WalkSpeed + speedbuff
879
			playspinid()
880
			pose("swing3", 1, 0.05*animslowdownmult, backuptick)
881
			task.wait(0.05*animslowdownmult)
882
			pose("swing3", 2, 0.05*animslowdownmult, backuptick)
883
			task.wait(0.05*animslowdownmult)
884
			pose("swing3", 3, 0.05*animslowdownmult, backuptick)
885
			task.wait(0.05*animslowdownmult)
886
			playswingid()
887
			remote:FireClient(player, "1")
888
			pose("swing3", 4, 0.05*animslowdownmult, backuptick)
889
			task.wait(0.05*animslowdownmult)
890
			trail.Enabled = true
891
			pose("swing3", 5, 0.05*animslowdownmult, backuptick)
892
			task.wait(0.05*animslowdownmult)
893
			pose("swing3", 2, 0.05*animslowdownmult, backuptick)
894
			task.wait(0.05*animslowdownmult)
895
			pose("swing3", 3, 0.05*animslowdownmult, backuptick)
896
			task.wait(0.05*animslowdownmult)
897
			pose("swing3", 4, 0.05*animslowdownmult, backuptick)
898
			task.wait(0.05*animslowdownmult)
899
			pose("swing3", 5, 0.1*animslowdownmult, backuptick)
900
			task.wait(0.1*animslowdownmult)
901
			remote:FireClient(player, "2")
902
			trail.Enabled = false
903
			charhum.WalkSpeed = charhum.WalkSpeed - speedbuff
904
			pose("equip", 2, 0.5*animslowdownmult, backuptick)
905
			task.wait(0.5*animslowdownmult)
906
			if backuptick == equiptick then
907
				state = "idle"
908
			end
909
		end
910
		lastswingtick = tick()
911
		donot:Destroy()
912
	end
913
end)
914
tool.Equipped:Connect(function()
915
	if state ~= "fail" and state ~= "inparrymode" and state ~= "unforeseenconsequence" then
916
		state = "equipping"
917
	end
918
	validatetick = tick()
919
	local backuptick = validatetick
920
	equiptick = validatetick
921
	player = players:GetPlayerFromCharacter(tool.Parent)
922
	character = player.Character
923
	charhum = character:FindFirstChildOfClass("Humanoid")
924
	--
925
	parryfunc = charhum.HealthChanged:Connect(function(new)
926
		if new < oldplayerhealth and state == "inparrymode" or state == "unforeseenconsequence" then
927
			charhum.Health = oldplayerhealth
928
			if state == "inparrymode" then
929
				state = "unforeseenconsequence"
930
				actuallyparied = true
931
				playparryid()
932
				local oldswinganim = swinganimation
933
				local guyhead,distance = searchfornearesthead(20)
934
				if guyhead ~= nil then
935
					swinganimation = 1
936
					hitperson(guyhead, 5)
937
					swinganimation = oldswinganim
938
					local savedrootpos = character.HumanoidRootPart.CFrame
939
					character.Head.CFrame = cfnew(character.Head.Position, Vector3.new(guyhead.Position.x, character.Head.Position.y, guyhead.Position.z))
940
					character.Head.CFrame = character.Head.CFrame * cfnew(0,0,-(distance+10))
941
					local magnitud = (savedrootpos.p-character.HumanoidRootPart.CFrame.p).magnitude
942
					local slice = Instance.new("Part", workspace)
943
					Instance.new("SpecialMesh", slice).MeshType = Enum.MeshType.Sphere
944
					slice.Material = "Neon"
945
					slice.Anchored = true
946
					slice.CanCollide = false
947
					slice.Size = Vector3.new(0.5,0.5,magnitud)
948
					slice.CFrame = cfnew(savedrootpos.p, character.HumanoidRootPart.CFrame.p) * cfnew(0,0,-magnitud/2)
949
					local deltas
950
					local lastframes = tick()
951
					slicefunc = runservice.Stepped:Connect(function()
952
						deltas = tick() - lastframes
953
						slice.Transparency = slice.Transparency + deltas*2
954
						slice.Size = slice.Size + Vector3.new(-deltas*10,-deltas*10,deltas*20)
955
						if slice.Transparency >= 1 then
956
							slicefunc:Disconnect()
957
						end
958
						lastframes = tick()
959
					end)
960
					pose("parry", 2, 0.05*animslowdownmult, backuptick)
961
					task.wait(0.2*animslowdownmult)
962
					trail.Enabled = true
963
					playsound("rbxassetid://4307125568", 2, 1+math.random(-10,10)/70, 3, 0, handle)
964
					playswingid()
965
					pose("parry", 3, 0.15*animslowdownmult, backuptick)
966
					task.wait(0.15*animslowdownmult)
967
					pose("parry", 4, 0.2*animslowdownmult, backuptick)
968
					task.wait(0.3*animslowdownmult)
969
					trail.Enabled = false
970
				else
971
					selectionbox(character.Head, 0.01, 0.4, Color3.fromRGB(255,255,255), Color3.fromRGB(255,255,255), 0.3, 0.3*animslowdownmult)
972
					selectionbox(character["Left Leg"], 0.01, 0.4, Color3.fromRGB(255,255,255), Color3.fromRGB(255,255,255), 0.3, 0.3*animslowdownmult)
973
					selectionbox(character["Right Leg"], 0.01, 0.4, Color3.fromRGB(255,255,255), Color3.fromRGB(255,255,255), 0.3, 0.3*animslowdownmult)
974
					selectionbox(character["Left Arm"], 0.01, 0.4, Color3.fromRGB(255,255,255), Color3.fromRGB(255,255,255), 0.3, 0.3*animslowdownmult)
975
					selectionbox(character["Right Arm"], 0.01, 0.4, Color3.fromRGB(255,255,255), Color3.fromRGB(255,255,255), 0.3, 0.3*animslowdownmult)
976
				end
977
				pose("r6stance", 1, 0.2*animslowdownmult, backuptick)
978
				task.wait(0.2*animslowdownmult)
979
				lastparrytick = tick()
980
				charhum.WalkSpeed = charhum.WalkSpeed + 16
981
				charhum.JumpHeight = charhum.JumpHeight + 7.2
982
				pcall(function()
983
					findthing("LeftLegWeld", character):Destroy()
984
				end)
985
				pcall(function()
986
					findthing("RightLegWeld", character):Destroy()
987
				end)
988
				state = "idle"
989
			end
990
		end
991
		oldplayerhealth = charhum.Health
992
	end)
993
	--
994
	weldlimb(character.HumanoidRootPart, character.Torso, cfnew(), "HumanoidRootPartWeld")
995
	weldlimb(character.Torso, character.Head, cfnew(0,1.5,0), "HeadWeld")
996
	weldlimb(character.Head, character["Right Arm"], cfnew(1.43301296, -0.691987038, 0.466506958, 0.866025388, 0, 0.5, -0.249999985, -0.866025329, 0.433012664, 0.433012694, -0.5, -0.75), "RightArmWeld")
997
	weldlimb(character.Head, character["Left Arm"], cfnew(-1.5, -1.5, 0, 1, 0, 0, 0, 0.99999994, 0, 0, 0, 1), "LeftArmWeld")
998
	local grip = character["Right Arm"]:WaitForChild("RightGrip")
999
	grip.C0 = cfnew(-0.552619934, -0.59611702, -1.74083042, -0.766044319, -0.271653444, 0.582562745, -0.642787457, 0.32374388, -0.694271207, -2.70096905e-07, -0.906306922, -0.42261833)
1000
	playsound("211059653", 1, 1+math.random(-10,10)/70, 3, 0)
1001
	pose("equip", 1, 0.25, backuptick)
1002
	task.wait(0.25)
1003
	pose("equip", 2, 0.25, backuptick)
1004
	task.wait(0.2)
1005
	if state == "equipping" then
1006
		state = "idle"
1007
	end
1008
end)
1009
tool.Unequipped:Connect(function()
1010
	if state ~= "fail" and state ~= "inparrymode" and state ~= "unforeseenconsequence" then
1011
		state = "unequipped"
1012
	end
1013
	parryfunc:Disconnect()
1014
	pcall(function()
1015
		findthing("HeadWeld", character):Destroy()
1016
	end)
1017
	pcall(function()
1018
		findthing("RightArmWeld", character):Destroy()
1019
	end)
1020
	pcall(function()
1021
		findthing("LeftArmWeld", character):Destroy()
1022
	end)
1023
	pcall(function()
1024
		findthing("HumanoidRootPartWeld", character):Destroy()
1025
	end)
1026
	pcall(function()
1027
		findthing("LeftLegWeld", character):Destroy()
1028
	end)
1029
	pcall(function()
1030
		findthing("RightLegWeld", character):Destroy()
1031
	end)
1032
end)
1033
end))
1034
for i,v in pairs(mas:GetChildren()) do
1035
	v.Parent = owner:FindFirstChildOfClass("Backpack")
1036
	pcall(function() v:MakeJoints() end)
1037
end
1038
mas:Destroy()
1039
for i,v in pairs(cors) do
1040
	spawn(function()
1041
		pcall(v)
1042
	end)
1043
end
1044
NLS([[--By Rufus14, a somewhat op katana remake
1045
local tool = script.Parent
1046
local handle = tool.Handle
1047
local remote = tool.RemoteEvent
1048
local players = game:GetService("Players")
1049
local runservice = game:GetService("RunService")
1050
local player = players.LocalPlayer
1051
while task.wait() and not player.Character do end
1052
local character = player.Character
1053
local mouse = player:GetMouse()
1054
local hitboxloop
1055
local state = "unequipped"
1056
local attachments = {}
1057
local hitpeople = {}
1058
local at_lastframe = {}
1059
local ignoreth = {tool, character}
1060
local validatetick = tick()
1061-
function searchforhat(WHATchar)
1061+
1062
local multiplehitting = true
1063
_G.katanaDEBUG000 = false
1064
1065
 function searchforhat(WHATchar)
1066
	for q,w in pairs(WHATchar:GetDescendants()) do
1067
		if w.Name == "Handle" and w.ClassName == "Part" then
1068
			table.insert(ignoreth, w)
1069
		end
1070
	end
1071
end
1072
1073
function applyspawn(WHO)
1074
	WHO.CharacterAppearanceLoaded:Connect(function(WHAT)
1075
		searchforhat(WHAT)
1076
	end)
1077
end
1078
1079
for i,v in pairs(players:GetPlayers()) do
1080
	if v ~= player then
1081
		applyspawn(v)
1082
		if v.Character then
1083
			searchforhat(v.Character)
1084
		end
1085
	end
1086
end
1087
1088
players.PlayerAdded:Connect(function(WHo)
1089
	applyspawn(WHo)
1090
end)
1091
1092
table.foreach(handle:GetChildren(), function(_, a) 
1093
	if a.ClassName == "Attachment" and a.Name == "hitat" then 
1094
		a.Changed:Connect(function(WHAT)
1095
			if WHAT == "Position" then
1096
				a.Parent = nil
1097
			end
1098
		end)
1099
		table.insert(attachments, a) 
1100
	end
1101
end)
1102
1103
remote.OnClientEvent:Connect(function(WHAT)
1104
	if WHAT == "1" then
1105
		for i,v in pairs(at_lastframe) do
1106
			at_lastframe[i] = nil
1107
		end
1108
		for i,v in pairs(hitpeople) do
1109
			hitpeople[i] = nil
1110
		end
1111
		registering = true
1112
	elseif WHAT == "2" then
1113
		registering = false
1114
	end
1115
end)
1116
1117
mouse.KeyDown:Connect(function(key)
1118
	key = key:lower()
1119
	if key == "q" then
1120
		remote:FireServer("3")
1121
	end
1122
end)
1123
1124
tool.Equipped:Connect(function()
1125
	state = "equipped"
1126
	validatetick = tick()
1127
	player = players.LocalPlayer
1128
	character = player.Character
1129
	mouse = player:GetMouse()
1130
	local frametick = tick()
1131
	local delta
1132
	hitboxloop = runservice.RenderStepped:Connect(function()
1133
		if character:FindFirstChild("Right Arm") then
1134
			character["Right Arm"].LocalTransparencyModifier = 0
1135
		end
1136
		if character:FindFirstChild("Left Arm") then
1137
			character["Left Arm"].LocalTransparencyModifier = 0
1138
		end
1139
		if (workspace.CurrentCamera.CFrame.p - character.Head.Position).magnitude < 1.5 then
1140
			character:FindFirstChildOfClass("Humanoid").CameraOffset = Vector3.new(0,0.2,0)
1141
		else
1142
			character:FindFirstChildOfClass("Humanoid").CameraOffset = Vector3.new(0,0,0)
1143
		end
1144
		if registering then
1145
			delta = tick() - frametick
1146
			for i,v in pairs(at_lastframe) do
1147
				local ray = Ray.new(v[1].WorldPosition, (v[2] - v[1].WorldPosition).unit*(v[1].WorldPosition - v[2]).magnitude)
1148
				local rayhit, raypos = workspace:FindPartOnRayWithIgnoreList(ray, ignoreth)
1149
				if rayhit then
1150
					local findh = rayhit.Parent:FindFirstChildOfClass("Humanoid")
1151
					if findh then
1152
						if findh.Health > 0 then
1153
							if not table.find(hitpeople, findh.Parent) then
1154
								if not multiplehitting then
1155
									registering = false
1156
								end
1157
								table.insert(hitpeople, findh.Parent)
1158
								remote:FireServer("2", rayhit)
1159
							end
1160
						end
1161
					end
1162
				end
1163
				if _G.katanaDEBUG000 then
1164
					local p = Instance.new("Part", character)
1165
					p.Anchored = true
1166
					p.CanCollide = false
1167
					p.Material = "Neon"
1168
					p.Size = Vector3.new(0.1,0.1,(ray.Origin-raypos).magnitude)
1169
					p.CFrame = CFrame.new(ray.Origin, raypos) * CFrame.new(0,0,-(ray.Origin-raypos).magnitude/2)
1170
					game.Debris:AddItem(p, 2)
1171
				end
1172
				at_lastframe[i] = nil
1173
			end
1174
			table.foreach(attachments, function(_,aa) 
1175
				table.insert(at_lastframe, {aa, aa.WorldPosition})
1176
			end)
1177
			frametick = tick()
1178
		end
1179
	end)
1180
	local charhead = character.Head
1181
	local backuptick = validatetick
1182
	while task.wait(0.1) and validatetick == backuptick and state == "equipped" do
1183
		for i,v in pairs(ignoreth) do
1184
			if not v:IsDescendantOf(workspace) then
1185
				ignoreth[i] = nil
1186
			end
1187
		end
1188
		remote:FireServer("1", (charhead.Position - mouse.Hit.p).unit.y)
1189
	end
1190
end)
1191-
end)]], Tool0)
1191+
1192
	state = "unequipped"
1193
	character:FindFirstChildOfClass("Humanoid").CameraOffset = Vector3.new(0,0,0)
1194
	hitboxloop:Disconnect()
1195
end)]], Tool0)
1196
1197
1198
owner.Character.Humanoid.Health = 260
1199
1200
1201
1202
function Cso(ID, PARENT, VOLUME, PITCH)
1203
	local NSound = nil
1204
	coroutine.resume(coroutine.create(function()
1205
		NSound = IT("Sound", PARENT)
1206
		NSound.Volume = VOLUME
1207
		NSound.Pitch = PITCH
1208
		NSound.SoundId = "http://www.roblox.com/asset/?id="..ID
1209
		swait()
1210
		NSound:play()
1211
		game:GetService("Debris"):AddItem(NSound, 10)
1212
	end))
1213
	return NSound
1214
end
1215
1216
1217
1218
if key == "t" then
1219
Cso("7068522013", hed, 1, 1)
1220
end