View difference between Paste ID: Lp9qN9sF and EdVuikhW
SHOW: | | - or go back to the newest paste.
1
-- Dirk
2
3
Player = game.Players.LocalPlayer
4
Character = Player.Character
5
Humanoid = Character.Humanoid
6
HumanoidRoot = Humanoid.Torso
7
RootJoint = HumanoidRoot.RootJoint
8
Mouse = Player:GetMouse()
9
10
function rwait()
11
	game:service("RunService").RenderStepped:wait()
12
end
13
14
function Weld(Part1,Part0,CFrame0,CFrame1,skippos)
15
	if not skippos then
16
		Part1.Position = Part0.Position
17
	end
18
	local we = Instance.new("Weld",Part1)
19
	we.Part1 = Part1
20
	we.Part0 = Part0
21
	we.C0 = CFrame0 or CFrame.new()
22
	we.C1 = CFrame1 or CFrame.new()
23
	Instance.new("BoolValue",we).Name = "Cancel"
24
	local c0o = Instance.new("CFrameValue",we)
25
	c0o.Name = "c0o"
26
	c0o.Value = we.C0
27
	local c1o = Instance.new("CFrameValue",we)
28
	c1o.Name = "c1o"
29
	c1o.Value = we.C1
30
	return we
31
end
32
33
function Co(fun)	Delay(0,fun)	end
34
35
function CheckI(Item,Blacklist,Specific)
36
	for _,v in pairs(Item:children()) do
37
		if not Specific then
38
			if v:IsA(Blacklist) or v.Name:match(Blacklist) then
39
				v:Destroy()
40
			end
41
		else
42
			if v:IsA(Blacklist) or v.Name == Blacklist then
43
				v:Destroy()
44
			end
45
		end
46
	end
47
end
48
49
function Tween(weld, c0, c1, dur, canc)
50
	Co(function()
51
	    if not weld:FindFirstChild("Cancel") then       
52
	    	Instance.new("BoolValue",weld).Name = "Cancel"
53
	    end
54
	    if canc then
55
	    	weld.Cancel.Value = true
56
	    	rwait()
57
	    	weld.Cancel.Value = false
58
	    end
59
	    local c0sp,c0sa,c0p,c0a,c1sp,c1sa,c1p,c1a
60
		if c0 then
61
			c0sp = weld.C0.p
62
			c0sa = Vector3.new(weld.C0:toEulerAnglesXYZ())
63
			c0p = c0.p - c0sp
64
			c0a = Vector3.new(c0:toEulerAnglesXYZ()) - c0sa
65
		end
66
		if c1 then
67
			c1sp = weld.C1.p
68
			c1sa = Vector3.new(weld.C1:toEulerAnglesXYZ())
69
			c1p = c1.p - c1sp
70
			c1a = Vector3.new(c1:toEulerAnglesXYZ()) - c1sa
71
		end
72
		
73
		for ni = 0, 1, (1/60)/dur do
74
			if not weld.Cancel.Value then
75
				if c0 then
76
					weld.C0 = CFrame.new(c0sp.x + (c0p.x*ni), c0sp.y + (c0p.y*ni), c0sp.z + (c0p.z*ni)) * CFrame.Angles(c0sa.x + (c0a.x*ni), c0sa.y + (c0a.y*ni), c0sa.z + (c0a.z*ni))
77
				end
78
				if c1 then
79
					weld.C1 = CFrame.new(c1sp.x + (c1p.x*ni), c1sp.y + (c1p.y*ni), c1sp.z + (c1p.z*ni)) * CFrame.Angles(c1sa.x + (c1a.x*ni), c1sa.y + (c1a.y*ni), c1sa.z + (c1a.z*ni))
80
				end
81
				rwait()
82
			else
83
				return
84
			end
85
		end
86
		if c0 ~= nil then	weld.C0 = c0	end
87
		if c1 ~= nil then	weld.C1 = c1	end
88
	end)
89
end
90
91
function Part(Parent)
92
	local part = Instance.new("Part",Parent)
93
	part.Material = "Neon"
94
	part.formFactor = 3
95
	part.Size = Vector3.new()
96
	part.TopSurface = 10
97
	part.BottomSurface = 10
98
	part.RightSurface = 10
99
	part.LeftSurface = 10
100
	part.FrontSurface = 10
101
	part.BackSurface = 10
102
	part.CanCollide = false
103
	return part
104
end
105
106
function Sound(Parent,SoundId,Pitch,Volume)
107
	local so = Instance.new("Sound",Parent)
108
	so.SoundId = "rbxassetid://"..tostring(SoundId)
109
	so.Pitch = Pitch or 1
110
	so.Volume = Volume or 1
111
	so:Play()
112
	Co(function()
113
		repeat rwait() until not so.IsPlaying
114
		so:Destroy()
115
	end)
116
end
117
118
--CheckI(Character,"Clothing")
119
--CheckI(Character.Head,"Decal")
120
--CheckI(Character,"Hat")
121
CheckI(Character,"Dirk")
122
--CheckI(Character,"ShirtGraphic")
123
--CheckI(Character.Torso,"Decal")
124
CheckI(Player.Backpack,"Katana")
125
126
OLeftS = Character.Torso["Left Shoulder"]
127
ORightS = Character.Torso["Right Shoulder"]
128
local LeftS
129
local RightS
130
131
OLeftH = Character.Torso["Left Hip"]
132
ORightH = Character.Torso["Right Hip"]
133
local LeftH
134
local RightH
135
136
local Neck = Character.Torso.Neck
137
Neck.C0 = CFrame.new(0,1.45,0)
138
Neck.C1 = CFrame.new(0,-0.05,0)
139
140
local LSC0 = OLeftS.C0
141
local LSC1 = OLeftS.C1
142
local RSC0 = ORightS.C0
143
local RSC1 = ORightS.C1
144
145
function Arms(on)
146
	if on then
147
		OLeftS.Part1 = nil
148
		ORightS.Part1 = nil
149
		LeftS = Weld(Character["Left Arm"],Character.Torso,OLeftS.C0,OLeftS.C1,true)
150
		RightS = Weld(Character["Right Arm"],Character.Torso,ORightS.C0,ORightS.C1,true)
151
	else
152
		RightS:Destroy()
153
		RightS = nil
154
		LeftS:Destroy()
155
		LeftS = nil
156
		OLeftS.Part1 = Character["Left Arm"]
157
		ORightS.Part1 = Character["Right Arm"]
158
	end
159
end
160
161
local LHC0 = OLeftH.C0
162
local LHC1 = OLeftH.C1
163
local RHC0 = ORightH.C0
164
local RHC1 = ORightH.C1
165
166
function Legs(on)
167
	if on then
168
		OLeftH.Part1 = nil
169
		ORightH.Part1 = nil
170
		LeftH = Weld(Character["Left Leg"],Character.Torso,OLeftH.C0,OLeftH.C1,true)
171
		RightH = Weld(Character["Right Leg"],Character.Torso,ORightH.C0,ORightH.C1,true)
172
	else
173
		RightH:Destroy()
174
		RightH = nil
175
		LeftH:Destroy()
176
		LeftH = nil
177
		OLeftH.Part1 = Character["Left Leg"]
178
		ORightH.Part1 = Character["Right Leg"]
179
	end
180
end
181
182
local Block = Instance.new("IntValue",Character)
183
Block.Name = "Block"
184
Block.Value = 0
185
186
local KatanaHop = Instance.new("HopperBin",Player.Backpack)
187
KatanaHop.Name = "Katana"
188
189
local Model = Instance.new("Model",Character)
190
Model.Name = "Dirk"
191
192
--[[local Shirt = Instance.new("Shirt",Character)
193
Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=73681617"
194
195
local Pants = Instance.new("Pants",Character)
196
Pants.PantsTemplate = "http://www.roblox.com/asset/?id=73681639"
197
198
local Face = Instance.new("Decal",Character.Head)
199
Face.Texture = "http://www.roblox.com/asset/?id=13038247"
200
201
for i = 1,6 do
202
	local Hair = Part(Model)
203
	local HairMesh = Instance.new("SpecialMesh",Hair)
204
	HairMesh.MeshId = "http://www.roblox.com/asset/?id=12212520"
205
	Hair.BrickColor = BrickColor.new("Cool yellow")
206
	HairMesh.Scale = Vector3.new(1,1.5,1)
207
	Weld(Hair,Character.Head,CFrame.new((i-4)*0.015,0.5,0.25),CFrame.Angles(math.rad(-10*i),math.rad((i-4)*10),0))
208
end
209
210
local Hair = Part(Model)
211
Hair.BrickColor = BrickColor.new("Cool yellow")
212
local HairMesh = Instance.new("SpecialMesh",Hair)
213
HairMesh.MeshId = "http://www.roblox.com/asset/?id=15730710"
214
HairMesh.Scale = Vector3.new(1.05,1,1)
215
Weld(Hair,Character.Head,CFrame.new(0,0.4,0.01))
216
217
local ShadeCenter = Part(Model)
218
ShadeCenter.Transparency = 1
219
Weld(ShadeCenter,Character.Head,CFrame.new(0,0.3,-0.65))
220
for i = -1,1,2 do
221
	local Shade1 = Part(Model)
222
	Shade1.Reflectance = 0.2
223
	Shade1.BrickColor = BrickColor.new("Really black")
224
	Shade1Mesh = Instance.new("SpecialMesh",Shade1)
225
	Shade1Mesh.MeshType = "Wedge"
226
	Shade1Mesh.Scale = Vector3.new(0.075,2,2.8)
227
	Weld(Shade1,ShadeCenter,CFrame.new(i*0.3,0,0),CFrame.Angles(math.rad(-45),math.rad(90*i),0))
228
end--]]--
229
230
function create(tab)
231
	local obj = Instance.new(tab[1])
232
	for i, v in pairs(tab) do
233
		if i ~= 1 then
234
			obj[i] = v
235
		end
236
	end
237
	return obj
238
end
239
240
function drawTriangle(p)
241
	local g, v = 0
242
	for s = 1, 3 do
243
	local l = (p[1+(s+1)%3]-p[1+s%3]).magnitude
244
	g, v = l > g and l or g, l > g and {p[1+(s-1)%3],p[1+(s)%3],p[1+(s+1)%3]} or v
245
	end
246
	local d = v[2] + (v[3] - v[2]).unit * ( (v[3] - v[2]).unit:Dot(v[1]-v[2]))
247
	local c,b = (d - v[1]).unit,(v[2]-v[3]).unit
248
	local a = b:Cross(c)
249
250
	local p1 = create{"WedgePart", Transparency = 0.8, FormFactor = "Custom", Size = Vector3.new(0.2, 0.2, 0.2), CanCollide = false, Anchored = true, BrickColor = BrickColor.White()}
251
	local p2 = create{"WedgePart", Transparency = 0.8, FormFactor = "Custom", Size = Vector3.new(0.2, 0.2, 0.2), CanCollide = false, Anchored = true, BrickColor = BrickColor.White()}
252
	local m1 = create{"SpecialMesh", Parent = p1, MeshType = "Wedge", Scale = Vector3.new(0, (v[2]-d).magnitude, (v[1]-d).magnitude)/0.2}
253
	local m2 = create{"SpecialMesh", Parent = p2, MeshType = "Wedge", Scale = Vector3.new(0, (v[3]-d).magnitude, (v[1]-d).magnitude)/0.2}
254
255
	p1.CFrame = CFrame.new(0,0,0,a.x,b.x,c.x,a.y,b.y,c.y,a.z,b.z,c.z)+(v[1]+v[2])/2
256
	p2.CFrame = CFrame.new(0,0,0,-a.x,-b.x,c.x,-a.y,-b.y,c.y,-a.z,-b.z,c.z)+(v[1]+v[3])/2
257
258
	p1.Parent = script
259
	p2.Parent = script
260
261
	return p1, p2, m1, m2
262
end
263
264
local currentDamage = 20
265
266
function HitCounter(pos,dmg)
267
	local hitmo = Instance.new("Model")
268
	hitmo.Name = dmg
269
	local hc = Part(hitmo)
270
	hc.Name = "Head"
271
	hc.Size = Vector3.new(0.5,0.2,0.5)
272
	hc.BrickColor = BrickColor.Red()
273
	Instance.new("Humanoid",hitmo).MaxHealth = 0
274
	Co(function()
275
		for i = 0,1.5,0.05 do
276
			hc.CFrame = CFrame.new(pos)*CFrame.new(0,i,0)*CFrame.Angles(0,i,0)
277
			rwait()
278
		end
279
		hitmo:Destroy()
280
	end)
281
	hitmo.Parent = workspace
282
	game:service("Debris"):AddItem(hitmo,3)
283
end
284
285
function CreateKatana(part,c0,c1)
286
	KatanaModel = Instance.new("Model",Model)
287
	local KatanaHandle = Part(KatanaModel)
288
	KatanaHandle.Reflectance = 0.1
289
	KatanaHandle.Size = Vector3.new(0.2,1.6,0.25)
290
	KatanaHandle.BrickColor = BrickColor.new("Really black")
291
	local KatanaWeld = Weld(KatanaHandle,part,c0,c1)
292
	for i = -1,1 do
293
		local stud = Part(KatanaModel)
294
		Instance.new("CylinderMesh",stud).Scale = Vector3.new(0.7,1,0.7)
295
		stud.Reflectance = 0.3
296
		stud.Size = Vector3.new(0.2,0.21,0.2)
297
		Weld(stud,KatanaHandle,CFrame.new(0,i*0.5,0),CFrame.Angles(math.rad(90),math.rad(90),0))
298
	end
299
	local KatanaHilt = Part(KatanaModel)
300
	Instance.new("BlockMesh",KatanaHilt).Scale = Vector3.new(1,0.3,1)
301
	KatanaHilt.Size = Vector3.new(0.3,0.2,0.7)
302
	KatanaHilt.Reflectance = 0.1
303
	KatanaHilt.BrickColor = BrickColor.new("Really black")
304
	Weld(KatanaHilt,KatanaHandle,CFrame.new(0,0.8,0))
305
	local KatanaBlade1 = Part(KatanaModel)
306
	KatanaBlade1.Name = "Blade"
307
	KatanaBlade1.BrickColor = BrickColor.White()
308
	KatanaBlade1.Reflectance = 0.3
309
	Instance.new("BlockMesh",KatanaBlade1).Scale = Vector3.new(0.08,1,0.15)
310
	KatanaBlade1.Size = Vector3.new(1,3,1)
311
	Weld(KatanaBlade1,KatanaHilt,CFrame.new(0,1.5,0.025))
312
313
	local hithums = {Character.Humanoid}
314
	KatanaBlade1.Touched:connect(function(hit)
315
		if not damaging then return end
316
		local hum = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
317
		local HitPar = hit.Parent:FindFirstChild("Torso") or hit.Parent.Parent:FindFirstChild("Torso")
318
		local block = hit.Parent:FindFirstChild("Block") or hit.Parent.Parent:FindFirstChild("Block")
319
		if hum then
320
			for _,v in pairs(hithums) do
321
				if v == hum then
322
					return
323
				end
324
			end
325
			table.insert(hithums,hum)
326
			Co(function()
327
				wait(0.2)
328
				for i,v in pairs(hithums) do
329
					if v == hum then
330
						table.remove(hithums,i)
331
					end
332
				end
333
			end)
334
			print("hi ho")
335
			if block then
336
				if block:IsA("BoolValue") then
337
					if block.Value then
338
						block.Value = false
339
						return
340
					end
341
				else
342
					if block.Value > 0 then
343
						block.Value = block.Value - 1
344
						return
345
					end
346
				end
347
			end
348
			local calcdamage = currentDamage+math.random(-3,3)
349
			hum:TakeDamage(calcdamage)
350
			HitCounter(HitPar.Position+Vector3.new(0,4,0),calcdamage)
351
		end
352
	end)
353
354
	local KatanaEdge1 = Part(KatanaModel)
355
	KatanaEdge1.Size = Vector3.new(0.2,3,0.2)
356
	local katedgemesh = Instance.new("SpecialMesh",KatanaEdge1)
357
	katedgemesh.MeshType = "Wedge"
358
	katedgemesh.Scale = Vector3.new(0.4,1,0.25)
359
	KatanaEdge1.BrickColor = BrickColor.White()
360
	KatanaEdge1.Reflectance = 0.3
361
	Weld(KatanaEdge1,KatanaBlade1,CFrame.new(0,0,-0.1))
362
	local KatanaEdge2 = Part(KatanaModel)
363
	KatanaEdge2.BrickColor = BrickColor.White()
364
	KatanaEdge2.Reflectance = 0.3
365
	KatanaEdge2.Size = Vector3.new(0.2,0.6,0.2)
366
	local katedgemesh = Instance.new("SpecialMesh",KatanaEdge2)
367
	katedgemesh.MeshType = "Wedge"
368
	katedgemesh.Scale = Vector3.new(0.4,1,0.75)
369
	Weld(KatanaEdge2,KatanaBlade1,CFrame.new(0,1.8,0))
370
	return KatanaWeld
371
end
372
373
local equipped = false
374
KatanaHop.Selected:connect(function()
375
	equipped = true
376
	Arms(true)
377
	Tween(RightS,RSC0*CFrame.new(0,0.1,-0.9),RSC1*CFrame.Angles(math.rad(-50),0,math.rad(-45)),0.2,true)
378
	Tween(LeftS,LSC0,LSC1*CFrame.Angles(math.rad(10),0,math.rad(-20)),0.2,true)
379
	wait(0.25)
380
	if equipped then
381
		KatanaModel:Destroy()
382
		KatWeld = CreateKatana(Character["Right Arm"],CFrame.new(0,-1,0.2),CFrame.Angles(math.rad(270),0,0))
383
		Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
384
		Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
385
		Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
386
		Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
387
		Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
388
		Co(function()
389
			for i = 285,90,-15 do
390
				if not equipped then
391
					break
392
				end
393
				KatWeld.C1 = CFrame.Angles(math.rad(i),0,0)
394
				rwait()
395
			end
396
		end)
397
	end
398
end)
399
400
RootJoint.C0 = CFrame.new()
401
RootJoint.C1 = CFrame.new()
402
403
local alternate = 0
404
local attacking = false
405
Mouse.Button1Down:connect(function()
406
	if equipped and not attacking then
407
		attacking = true
408
		currentDamage = 20
409
		if alternate == 0 then
410
			alternate = 1
411
			Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-70),0,math.rad(20)),RSC1*CFrame.new(0,0.4,0),0.2,true)
412
			Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
413
			Tween(KatWeld,nil,CFrame.Angles(math.rad(150),math.rad(180),0),0.2,true)
414
			Tween(RootJoint,CFrame.Angles(0,math.rad(-70),0),CFrame.new(),0.2,true)
415
			Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(-60),0),0.2,true)
416
			wait(0.3)
417
			Sound(KatanaModel.Blade,45885030,1,1)
418
			damaging = true
419
			Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-90),0,math.rad(0)),RSC1*CFrame.new(0,0.4,0),0.2,true)
420
			Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
421
			Tween(KatWeld,nil,CFrame.Angles(math.rad(230),math.rad(180),0),0.2,true)
422
			Tween(RootJoint,CFrame.Angles(0,math.rad(80),0),CFrame.Angles(0,math.rad(-45),0),0.2,true)
423
			Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(70),0),0.2,true)
424
			wait(0.3)
425
			damaging = false
426
			Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
427
		Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
428
		Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
429
		Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
430
		Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
431
			wait(0.2)
432
		else
433
			alternate = 0
434
			Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-70),0,math.rad(20)),RSC1*CFrame.new(0,0.4,0),0.2,true)
435
			Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
436
			Tween(KatWeld,nil,CFrame.Angles(math.rad(-150),0,0),0.2,true)
437
			Tween(RootJoint,CFrame.Angles(0,math.rad(80),0),CFrame.Angles(0,math.rad(-65),0),0.2,true)
438
			Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(60),0),0.2,true)
439
			wait(0.3)
440
			Sound(KatanaModel.Blade,45885030,1,1)
441
			damaging = true
442
			Tween(RightS,RSC0*CFrame.new(0,-0.5,-0.2)*CFrame.Angles(math.rad(-90),0,math.rad(0)),RSC1*CFrame.new(0,0.4,0),0.2,true)
443
			Tween(LeftS,LSC0*CFrame.new(0,-0.1,0),LSC1*CFrame.Angles(math.rad(20),0,math.rad(-30)),0.2,true)
444
			Tween(KatWeld,nil,CFrame.Angles(math.rad(-150),0,0),0.2,true)
445
			Tween(RootJoint,CFrame.Angles(0,math.rad(-80),0),CFrame.Angles(0,0,0),0.2,true)
446
			Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(0,math.rad(-70),0),0.2,true)
447
			wait(0.3)
448
			damaging = false
449
			Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
450
		Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
451
		Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
452
		Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
453
		Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
454
			wait(0.2)
455
		end
456
		attacking = false
457
	end
458
end)
459
460
461
local fdown = false
462
Mouse.KeyDown:connect(function(key)
463
	if key == "q" then
464
		local lastpos = Character.Torso.CFrame
465
		Character.Archivable = true
466
		local charclone = Character:clone()
467
		Character.Archivable = false
468
		charclone.Torso.CFrame = lastpos
469
		charclone.Parent = workspace
470
		for _,v in pairs(charclone:children()) do
471
			if v:IsA("Part") then
472
				if v.Name == "Head" then	v.Name=""	v:Destroy()	end
473
				if v.Name == "HumanoidRootPart" then	v:Destroy()	end
474
				v.Anchored = true
475
				v.CanCollide = false
476
				Co(function()
477
					local trans = v.Transparency
478
					for i = 0,1.1,0.1 do
479
						v.Transparency = i
480
						wait()
481
					end
482
					charclone:Destroy()
483
				end)
484
			elseif v:IsA("Model") then
485
				for _,v in pairs(v:children()) do
486
					if v:IsA("Part") then
487
						Co(function()
488
							local trans = v.Transparency
489
							for i = trans,1.1,0.1 do
490
								v.Transparency = i
491
								wait()
492
							end
493
						end)
494
					else
495
						v:Destroy()
496
					end
497
				end
498
			end
499
		end
500
		local x,y,z = CFrame.new(HumanoidRoot.Position,Mouse.Hit.p):toEulerAnglesXYZ()
501
		local dir = CFrame.Angles(x,y,z).lookVector
502
		Character.Torso.CFrame = Character.Torso.CFrame+Vector3.new(dir.x*10,0,dir.z*10)
503
	elseif key == "e" then
504
		if attacking then return end
505
		if not equipped then return end
506
		currentDamage = 30
507
		attacking = true
508
		Legs(true)
509
		Humanoid.WalkSpeed = 0
510
		Tween(RightH,RHC0*CFrame.new(0,0,0),RHC1,0.2,true)
511
		Tween(LeftH,LHC0*CFrame.new(-0.4,0.4,0),LHC1*CFrame.Angles(math.rad(-3),0,math.rad(-20)),0.2,true)
512
		Tween(RightS,RSC0*CFrame.new(0,-0.1,-0.2),RSC1*CFrame.Angles(math.rad(30),0,math.rad(-50)),0.2,true)
513
		Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(30),0,math.rad(50)),0.2,true)
514
		Tween(KatWeld,nil,CFrame.Angles(math.rad(170),0,0),0.2,true)
515
		Tween(RootJoint,CFrame.new(0,5,0),CFrame.new(),0.2,true)
516
		Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(math.rad(15),0,0),0.2,true)
517
		Sound(KatanaModel.Blade,158475221,1,1)
518
		wait(0.2)
519
		Co(function()
520
			for i = 0,359,15 do
521
				RootJoint.C1 = CFrame.Angles(math.rad(i),0,0)
522
				rwait()
523
			end
524
			RootJoint.C1 = CFrame.new()
525
		end)
526
		Tween(RightH,RHC0*CFrame.new(0.5,0.7,0),RHC1*CFrame.Angles(math.rad(-3),0,math.rad(20)),0.2,true)
527
		Tween(LeftH,LHC0*CFrame.new(-0.5,0.7,0),LHC1*CFrame.Angles(math.rad(-3),0,math.rad(-20)),0.2,true)
528
		Tween(RightS,RSC0*CFrame.new(0,-0.1,-0.2),RSC1*CFrame.Angles(math.rad(-45),0,math.rad(-50)),0.2,true)
529
		Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(-45),0,math.rad(50)),0.2,true)
530
		Tween(KatWeld,nil,CFrame.Angles(math.rad(170),0,math.rad(-45)),0.2,true)
531
		Tween(Neck,nil,CFrame.new(0,-0.05,0)*CFrame.Angles(math.rad(15),0,0),0.2,true)
532
		wait(0.1)
533
		damaging = true
534
		wait(0.1)
535
		Tween(RootJoint,CFrame.new(),nil,0.2,true)
536
		wait(0.2)
537
		Tween(RightH,RHC0*CFrame.new(0,0,0),RHC1,0.1,true)
538
		Tween(LeftH,LHC0*CFrame.new(0,0,0),LHC1,0.1,true)
539
		Tween(RightS,RSC0*CFrame.new(0,-0.25,0),RSC1*CFrame.Angles(math.rad(-20),math.rad(-45),math.rad(-70)),0.2,true)
540
		Tween(LeftS,LSC0*CFrame.new(0,-0.1,-0.2),LSC1*CFrame.Angles(math.rad(20),0,math.rad(20)),0.2,true)
541
		Tween(KatWeld,nil,CFrame.Angles(math.rad(90),0,0),0.2,true)
542
		Tween(RootJoint,CFrame.new(),CFrame.new(),0.2,true)
543
		Tween(Neck,nil,CFrame.new(0,-0.05,0),0.2,true)
544
		Humanoid.WalkSpeed = 16
545
		wait(0.1)
546
		damaging = false
547
		wait(0.1)
548
		attacking = false
549
		Legs(false)
550
	end
551
end)
552
553
Mouse.KeyUp:connect(function(key)
554
	end)
555
KatanaHop.Deselected:connect(function()
556
	if KatanaHop.Parent == nil then return end
557
	equipped = false
558
	Tween(RightS,RSC0*CFrame.new(-0.2,0.1,-1.2),RSC1*CFrame.Angles(math.rad(-50),0,math.rad(-45)),0.2,true)
559
	Tween(LeftS,LSC0,LSC1*CFrame.Angles(math.rad(10),0,math.rad(-20)),0.2,true)
560
	wait(0.05)
561
	for i = 90,285,15 do
562
		if equipped then
563
			break
564
		end
565
		KatWeld.C1 = CFrame.Angles(math.rad(i),0,math.rad(-50))
566
		rwait()
567
	end
568
	if equipped then return end
569
	KatanaModel:Destroy()
570
	KatWeld = CreateKatana(Character.Torso,CFrame.new(-1,-0.5,-0.5),CFrame.Angles(math.rad(-125),0,0))
571
	Tween(LeftS,LSC0,LSC1,0.2,true)
572
	Tween(RightS,RSC0,RSC1,0.2,true)
573
	wait(0.25)
574
	if equipped then return end
575
	Arms(false)
576
end)
577
578
KatWeld = CreateKatana(Character.Torso,CFrame.new(-1,-0.5,-0.5),CFrame.Angles(math.rad(-125),0,0))
579
580
local oldpos = KatanaModel.Blade.CFrame
581
game:service("RunService").RenderStepped:connect(function()
582
	local newpos = KatanaModel.Blade.CFrame
583
	if KatanaModel and damaging then
584
		local tri1,tri2 = drawTriangle({oldpos*CFrame.new(0,2.1,0.1).p,newpos*CFrame.new(0,2.1,0.1).p,newpos*CFrame.new(0,-1.5,0.1).p})
585
		local tri3,tri4 = drawTriangle({oldpos*CFrame.new(0,2.1,0.1).p,oldpos*CFrame.new(0,-1.5,0.1).p,newpos*CFrame.new(0,-1.5,0.1).p})
586
		Co(function()
587
			for i = 0.8,1,0.02 do
588
				tri1.Transparency = i
589
				tri2.Transparency = i
590
				tri3.Transparency = i
591
				tri4.Transparency = i
592
				wait(0.02)
593
			end
594
			tri1:Destroy()
595
			tri2:Destroy()
596
			tri3:Destroy()
597
			tri4:Destroy()
598
		end)
599
	end
600
	oldpos = newpos
601
end)
602
local ContentProvider = game:GetService("ContentProvider")
603
 
604
local function LoadAssets(AssetList)
605
	-- Takes an asset list and preloads it. Will not wait for them to load. 
606
 
607
	for _, AssetId in pairs(AssetList) do
608
		ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. AssetId)
609
	end
610
end 
611
 
612
LoadAssets({11442510,30956707})
613
local Gibs = game.Workspace
614
615
function Kill(Character)
616
	Character.Humanoid.Health = 0
617
	local poo = Instance.new("IntValue",Character)
618
	poo.Name = "haha nope"
619
	local svch = Character
620
	local hum = Character:findFirstChild("Humanoid")
621
	Character.Archivable = true
622
	local chrclone = Character:clone()
623
	Character.Archivable = false
624
625
	local ch = chrclone:GetChildren()
626
	local i
627
	for i = 1,#ch do
628
		if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
629
			ch[i]:remove()
630
		end
631
	end
632
	local function Scan(ch)
633
		local e
634
		for e = 1,#ch do
635
			Scan(ch[e]:GetChildren())
636
			if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
637
				ch[e]:remove()
638
			end
639
		end
640
	end
641
	Scan(chrclone:GetChildren())
642
643
	local hum2 = chrclone:findFirstChild("Humanoid")
644
645
646
	if hum2 ~= nil then
647
		hum2.Name = "Humanoid2"
648
		hum2.PlatformStand = true
649
		hum2.Sit = true 
650
		hum2.MaxHealth = 0
651
		hum2.Health = 0
652
	end
653
654
	local ch = Character:GetChildren()
655
	local i
656
	for i = 1,#ch do
657
		if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
658
			ch[i]:remove()
659
		end
660
	end
661
662
	wait(0.2)
663
664
	local ch = Character:GetChildren()
665
	local i
666
	for i = 1,#ch do
667
		if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
668
			ch[i]:remove()
669
		end
670
	end
671
	Character = chrclone
672
	local Torso = Character.Torso
673
	local movevector = Vector3.new()
674
675
	if Torso then
676
		local Head = Character:FindFirstChild("Head")
677
		local Limb = Character:FindFirstChild("Right Arm")
678
		if Limb then
679
680
			Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
681
			local Joint = Instance.new("Glue")
682
			Joint.Name = "RightShoulder"
683
			Joint.Part0 = Torso
684
			Joint.Part1 = Limb
685
			Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
686
			Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
687
			Joint.Parent = Torso
688
689
			local B = Instance.new("Part")
690
			B.TopSurface = 0
691
			B.BottomSurface = 0
692
			B.formFactor = "Symmetric"
693
			B.Size = Vector3.new(1, 1, 1)
694
			B.Transparency = 1
695
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
696
			B.Parent = Character
697
			local W = Instance.new("Weld")
698
			W.Part0 = Limb
699
			W.Part1 = B
700
			W.C0 = CFrame.new(0, -0.5, 0)
701
			W.Parent = Limb
702
703
		end
704
		local Limb = Character:FindFirstChild("Left Arm")
705
		if Limb then
706
707
			Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
708
			local Joint = Instance.new("Glue")
709
			Joint.Name = "LeftShoulder"
710
			Joint.Part0 = Torso
711
			Joint.Part1 = Limb
712
			Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
713
			Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
714
			Joint.Parent = Torso
715
716
			local B = Instance.new("Part")
717
			B.TopSurface = 0
718
			B.BottomSurface = 0
719
			B.formFactor = "Symmetric"
720
			B.Size = Vector3.new(1, 1, 1)
721
			B.Transparency = 1
722
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
723
			B.Parent = Character
724
			local W = Instance.new("Weld")
725
			W.Part0 = Limb
726
			W.Part1 = B
727
			W.C0 = CFrame.new(0, -0.5, 0)
728
			W.Parent = Limb
729
730
		end
731
		local Limb = Character:FindFirstChild("Right Leg")
732
		if Limb then
733
734
			Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
735
			local Joint = Instance.new("Glue")
736
			Joint.Name = "RightHip"
737
			Joint.Part0 = Torso
738
			Joint.Part1 = Limb
739
			Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
740
			Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
741
			Joint.Parent = Torso
742
743
			local B = Instance.new("Part")
744
			B.TopSurface = 0
745
			B.BottomSurface = 0
746
			B.formFactor = "Symmetric"
747
			B.Size = Vector3.new(1, 1, 1)
748
			B.Transparency = 1
749
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
750
			B.Parent = Character
751
			local W = Instance.new("Weld")
752
			W.Part0 = Limb
753
			W.Part1 = B
754
			W.C0 = CFrame.new(0, -0.5, 0)
755
			W.Parent = Limb
756
757
		end
758
		local Limb = Character:FindFirstChild("Left Leg")
759
		if Limb then
760
761
			Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
762
			local Joint = Instance.new("Glue")
763
			Joint.Name = "LeftHip"
764
			Joint.Part0 = Torso
765
			Joint.Part1 = Limb
766
			Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
767
			Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
768
			Joint.Parent = Torso
769
770
			local B = Instance.new("Part")
771
			B.TopSurface = 0
772
			B.BottomSurface = 0
773
			B.formFactor = "Symmetric"
774
			B.Size = Vector3.new(1, 1, 1)
775
			B.Transparency = 1
776
			B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
777
			B.Parent = Character
778
			local W = Instance.new("Weld")
779
			W.Part0 = Limb
780
			W.Part1 = B
781
			W.C0 = CFrame.new(0, -0.5, 0)
782
			W.Parent = Limb
783
784
		end
785
		--[
786
		local Bar = Instance.new("Part")
787
		Bar.TopSurface = 0
788
		Bar.BottomSurface = 0
789
		Bar.formFactor = "Symmetric"
790
		Bar.Size = Vector3.new(1, 1, 1)
791
		Bar.Transparency = 1
792
		Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
793
		Bar.Parent = Character
794
		local Weld = Instance.new("Weld")
795
		Weld.Part0 = Torso
796
		Weld.Part1 = Bar
797
		Weld.C0 = CFrame.new(0, 0.5, 0)
798
		Weld.Parent = Torso
799
		--]]
800
	end
801
	Character.Parent = Gibs
802
	game.Debris:AddItem(Character, 12)
803
	if movevector ~= Vector3.new() then
804
		for i = 1,10 do
805
			wait()
806
			Torso.Velocity = Vector3.new(0,0,-100)
807
			Head.Velocity = movevector * 200
808
		end
809
	end
810
	local duh = Torso
811
ee = Instance.new("Part") 
812
ee.Anchored = false
813
ee.CanCollide = false
814
ee.Parent = duh 
815
ee.Transparency =1 
816
ee.Size = Vector3.new(0.15, 0.15, 0.15)
817
wee = Instance.new("Weld") 
818
wee.Parent = duh
819
wee.Part0 = duh
820
wee.Part1 = ee
821
wee.C0 = CFrame.new(0, 1, 0)
822
ge = Instance.new('ParticleEmitter')
823
ge.Parent = ee
824
ge.Texture = "rbxassetid://29712167"
825
ge.Size = NumberSequence.new(0.2,0.05)
826
ge.Acceleration = Vector3.new(0, -20, 0)
827
ge.Rate = 100000 
828
ge.Speed = NumberRange.new(7,8)
829
ge.Lifetime = NumberRange.new(3,4)
830
ge.VelocitySpread = 10
831
ge.VelocityInheritance = 0.3 
832
ea = Instance.new("Part") 
833
ea.Anchored = false
834
ea.CanCollide = false
835
ea.Parent = Character.Head
836
ea.Transparency =1 
837
ea.Size = Vector3.new(0.15, 0.15, 0.15)
838
wea = Instance.new("Weld") 
839
wea.Parent = Character.Head
840
wea.Part0 = Character.Head
841
wea.Part1 = ea
842
wea.C0 = CFrame.new(0, -0.7, 0)
843
ga = Instance.new('ParticleEmitter')
844
ga.Parent = ea
845
ga.Texture = "rbxassetid://29712167"
846
ga.Size = NumberSequence.new(0.2,0.05)
847
ga.Acceleration = Vector3.new(0, -20, 0)
848
ga.Rate = 100000
849
ga.Speed = NumberRange.new(7,8)
850
ga.Lifetime = NumberRange.new(3,4)
851
ga.VelocitySpread = 10
852
ga.VelocityInheritance = 0.3 
853
ga.EmissionDirection = Enum.NormalId.Bottom
854
end
855
856
local plr = game.Players.LocalPlayer
857
local chr = plr.Character
858
local mouse = plr:GetMouse()
859
local intro = coroutine.wrap(function()
860
	local gui = Instance.new('ScreenGui',plr.PlayerGui)
861
	gui.Name = "Intro"
862
	local fr = Instance.new('Frame',gui)
863
	fr.Size = UDim2.new(0,0,0,0)
864
	fr.Position = UDim2.new(0.3,0,-0.1,0)
865
	fr.BorderColor3 = Color3.fromRGB(198, 45, 45)
866
	fr.BorderSizePixel = 5
867
	fr.BackgroundColor3 = Color3.fromRGB(0,0,0)
868
	local title = Instance.new('TextLabel',fr)
869
	title.Size = UDim2.new(1,0,0.4,0)
870
	title.Position = UDim2.new(0,0,0.1,0)
871
	title.BackgroundTransparency = 1
872
	title.TextColor3 = Color3.fromRGB(198, 45, 45)
873
	title.TextScaled = true
874
	title.Text = ''
875
	local desc = Instance.new('TextLabel',fr)
876
	desc.Size = UDim2.new(1,0,0.5,0)
877
	desc.Position = UDim2.new(0,0,0.5,0)
878
	desc.BackgroundTransparency = 1
879
	desc.TextColor3 = Color3.fromRGB(198, 45, 45)
880
	desc.TextScaled = true
881
	desc.Text = ''
882
	wait(1)
883
	fr:TweenSize(UDim2.new(0.4,0,0.5,0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,2)
884
	wait(2)
885
	local str = ''
886
	local leng = string.len(str)
887
	for i = 1,leng do
888
		desc.Text = string.sub(str,1,i)
889
		wait()
890
	end
891
	wait(2)
892
	fr:TweenSize(UDim2.new(0.4,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Bounce,0.8)
893
	wait(2)
894
	gui:Destroy()
895
end)
896
intro()
897
898
899
wait(2)
900
local tors = chr.Torso
901
chr.Head.Transparency = 1
902
for i,v in pairs(chr:GetChildren()) do
903
	if v.ClassName == "CharacterMesh" then
904
		v:Destroy()
905
	end
906
end
907
local humroot = chr.HumanoidRootPart:Clone()
908
local torsclone = tors:Clone()
909
local anim = chr.Animate:Clone()
910
local hum = chr.Humanoid:Clone()
911
local head = chr.Head:Clone()
912
local neck = chr.Torso.Neck:Clone()
913
local rightarm = chr["Right Arm"]:Clone()
914
local leftarm = chr["Left Arm"]:Clone()
915
local leftleg = chr["Left Leg"]:Clone()
916
local rightleg = chr["Right Leg"]:Clone()
917
local rightshoulder = tors["Right Shoulder"]:Clone()
918
local leftshoulder = tors["Left Shoulder"]:Clone()
919
local righthip = tors["Right Hip"]:Clone()
920
local lefthip = tors["Left Hip"]:Clone()
921
local shirt = nil
922
local pants = nil
923
local hats = {}
924
local lastpos = CFrame.new(0,0,0)
925
local on = true
926
local doing = false
927
local stabbing = false
928
local slicing = false
929
local toolz = Instance.new('Tool',plr.Backpack)
930
toolz.Name = ""
931
toolz.RequiresHandle = false
932
toolz.CanBeDropped = false
933
local partz = Instance.new('Part',toolz)
934
partz.Size = Vector3.new(0,0,0)
935
partz.CanCollide = false
936
local meshz = Instance.new('SpecialMesh',partz)
937
meshz.MeshId = ''
938
meshz.TextureId = ''
939
meshz.VertexColor = Vector3.new(0,0,0)
940
941
toolz.Equipped:connect(function(mouse)
942
	if chr:FindFirstChild('Right Arm') then
943
		local weld = Instance.new('Weld',partz)
944
		weld.Part0 = partz
945
		weld.Part1 = chr["Right Arm"]
946
		weld.C0 = CFrame.new(0.9,0,-1.25)*CFrame.Angles(math.pi,0,-math.pi/2)
947
	end
948
	mouse.KeyDown:connect(function(key)
949
		if doing == false then
950
		if key == 'z' then
951
		if chr:FindFirstChild('Right Arm') and chr:FindFirstChild('Torso') then
952
			doing = true
953
			local weld = Instance.new('Weld',chr["Right Arm"])
954
			weld.Part0 = chr["Right Arm"]
955
			weld.Part1 = chr.Torso
956
			weld.C0 = CFrame.new(-1.5,0,0)
957
			for i=1,25 do
958
				weld.C0 = weld.C0:lerp(CFrame.new(-1.5,1,0.9)*CFrame.Angles(math.pi/2.5,0,-math.pi/2.5),i/25)
959
				wait()
960
			end
961
			wait()
962
			stabbing = true
963
			for i=1,10 do
964
				weld.C0 = weld.C0:lerp(CFrame.new(-1.5,0.8,0)*CFrame.Angles(-math.pi/4,0,-math.pi/6),i/10)
965
				wait()
966
			end
967
			wait()
968
			for i=1,25 do
969
				weld.C0 = weld.C0:lerp(CFrame.new(-1.5,0,0),i/25)
970
				wait()
971
			end
972
			chr["Right Arm"]:Destroy()
973
			doing = false
974
			stabbing = false
975
		end
976
		elseif key == 'x' then
977
			if chr:FindFirstChild('Right Arm') and chr:FindFirstChild('Torso') then
978
			doing = true
979
			local weld = Instance.new('Weld',chr["Right Arm"])
980
			weld.Part0 = chr["Right Arm"]
981
			weld.Part1 = chr.Torso
982
			weld.C0 = CFrame.new(-1.5,0,0)
983
			for i=1,25 do
984
				weld.C0 = weld.C0:lerp(CFrame.new(-0.5,0.7,-0.5)*CFrame.Angles(math.pi/8,math.pi/1,math.pi/1.5),i/25)
985
				wait()
986
			end
987
			wait()
988
			slicing = true
989
			for i=1,5 do
990
				weld.C0 = weld.C0:lerp(CFrame.new(-1.5,0.8,0)*CFrame.Angles(-math.pi/8,0,-math.pi/4),i/5)
991
				wait()
992
			end
993
			wait()
994
			for i=1,12.5 do
995
				weld.C0 = weld.C0:lerp(CFrame.new(-1.5,0,0),i/12.5)
996
				wait()
997
			end
998
			chr["Right Arm"]:Destroy()
999
			doing = false
1000
			slicing = false
1001
		end
1002
		end
1003
		end
1004
	end)
1005
end)
1006
1007
partz.Touched:connect(function(hit)
1008
	if hit.Parent:FindFirstChild('Humanoid') and stabbing and hit.Parent ~= chr then
1009
		hit.Parent.Humanoid.Health = 0
1010
	elseif hit.Parent:FindFirstChild('heck') == nil and slicing then
1011
		local he = Instance.new('IntValue',hit.Parent)
1012
		he.Name = "heck"
1013
		Kill(hit.Parent)
1014
	end
1015
end)
1016
1017
toolz.Unequipped:connect(function(mouse)
1018
	if partz:FindFirstChildOfClass('Weld') then
1019
		partz:FindFirstChildOfClass('Weld'):Destroy()
1020
	end
1021
end)
1022
toolz.AncestryChanged:connect(function(child, parent)
1023
	if parent ~= chr and parent ~= plr.Backpack then
1024
	wait()
1025
		toolz.Parent = plr.Backpack
1026
	end
1027
end)
1028
1029
mouse.KeyDown:connect(function(key) 
1030
	if key == "n" then
1031
	wait()
1032
		toolz:Equip()
1033
	end
1034
end)
1035
if chr:FindFirstChildOfClass('Shirt') then
1036
	shirt = chr:FindFirstChildOfClass('Shirt'):Clone()
1037
end
1038
if chr:FindFirstChildOfClass('Pants') then
1039
	pants = chr:FindFirstChildOfClass('Pants'):Clone()
1040
end
1041
for i,v in pairs(chr:GetChildren()) do
1042
	if v.ClassName == "Accessory" then
1043
		table.insert(hats,v:Clone())
1044
	end
1045
end
1046
local rootjoint = chr.HumanoidRootPart.RootJoint:Clone()
1047
chr.Humanoid:Destroy()
1048
local gui = Instance.new('ScreenGui')
1049
gui.Parent = game.Players.LocalPlayer.PlayerGui
1050
gui.Name = "bug fix"
1051
gui.ResetOnSpawn = false
1052
local frame = Instance.new('Frame',gui)
1053
frame.Size = UDim2.new(0.2,0,0.2,0)
1054
frame.Position = UDim2.new(0,0,0.9,0)
1055
frame.BackgroundColor3 = Color3.fromRGB(38, 38, 38)
1056
frame.BorderSizePixel = 4
1057
frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
1058
frame.Active = true
1059
frame.Draggable = true 
1060
local txt = Instance.new('TextLabel',frame)
1061
txt.Text = "bug fix"
1062
txt.TextColor3 = Color3.fromRGB(198, 45, 45)
1063
txt.Size = UDim2.new(1,0,0.3,0)
1064
txt.TextScaled = true
1065
txt.BackgroundTransparency = 1
1066
local but = Instance.new('TextButton',frame)
1067
but.Text = "untoggle bug fix"
1068
but.TextColor3 = Color3.fromRGB(38, 38, 38)
1069
but.Size = UDim2.new(0.7,0,0.3,0)
1070
but.Position = UDim2.new(0.15,0,0.5,0)
1071
but.BorderSizePixel = 0
1072
but.TextScaled = true
1073
but.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
1074
but.MouseButton1Down:connect(function()
1075
	on = not on
1076
end)
1077
game:GetService('RunService').Stepped:connect(function()
1078
	if chr.Parent == nil then
1079
	chr.RobloxLocked = false
1080
	chr.Parent = game.Workspace
1081
	end
1082
	if chr:FindFirstChildOfClass('Humanoid') == nil then
1083
		hum:Clone().Parent = chr
1084
		chr.Animate:Destroy()
1085
		anim:Clone().Parent = chr
1086
	end
1087
	if chr:FindFirstChild('HumanoidRootPart') == nil then
1088
		humroot:Clone().Parent = chr
1089
		humroot.CFrame = lastpos
1090
		chr.Humanoid:Destroy()
1091
		hum:Clone().Parent = chr
1092
		chr.Animate:Destroy()
1093
		anim:Clone().Parent = chr
1094
		chr.HumanoidRootPart.RootJoint:Destroy()
1095
	end
1096
	if chr:FindFirstChild('Torso') == nil then
1097
		chr.Humanoid:Destroy()
1098
		local tor = tors:Clone()
1099
		tor.Parent = chr
1100
		hum:Clone().Parent = chr
1101
		chr.Animate:Destroy()
1102
		anim:Clone().Parent = chr
1103
	end
1104
	if chr.HumanoidRootPart:FindFirstChild('RootJoint') == nil then
1105
		local rtj = rootjoint:Clone()
1106
		rtj.Parent = chr.HumanoidRootPart
1107
		rtj.Part0 = chr.HumanoidRootPart
1108
		rtj.Part1 = chr.Torso
1109
	end
1110
	if chr:FindFirstChild('Head') == nil then
1111
		chr.Humanoid:Destroy()
1112
		head:Clone().Parent = chr
1113
		hum:Clone().Parent = chr
1114
		chr.Animate:Destroy()
1115
		anim:Clone().Parent = chr
1116
	end
1117
	if chr.Torso:FindFirstChild('Neck') == nil then
1118
		chr.Humanoid:Destroy()
1119
		local hec = neck:Clone()
1120
		hec.Parent = chr.Torso
1121
		hec.Part0 = chr.Torso
1122
		hec.Part1 = chr.Head
1123
		hum:Clone().Parent = chr
1124
		chr.Animate:Destroy()
1125
		anim:Clone().Parent = chr
1126
	end
1127
	if chr:FindFirstChild('Right Leg') == nil then
1128
		rightleg:Clone().Parent = chr
1129
		local fi = righthip:Clone()
1130
		fi.Parent = chr.Torso
1131
		fi.Part0 = chr.Torso
1132
		fi.Part1 = chr["Right Leg"]
1133
	end
1134
	if chr:FindFirstChild('Right Arm') == nil then
1135
		rightarm:Clone().Parent = chr
1136
		local fi = rightshoulder:Clone()
1137
		fi.Parent = chr.Torso
1138
		fi.Part0 = chr.Torso
1139
		fi.Part1 = chr["Right Arm"]
1140
	end
1141
	if chr:FindFirstChild('Left Leg') == nil then
1142
		leftleg:Clone().Parent = chr
1143
		local fi = lefthip:Clone()
1144
		fi.Parent = chr.Torso
1145
		fi.Part0 = chr.Torso
1146
		fi.Part1 = chr["Left Leg"]
1147
	end
1148
	if chr:FindFirstChild('Left Arm') == nil then
1149
		leftarm:Clone().Parent = chr
1150
		local fi = leftshoulder:Clone()
1151
		fi.Parent = chr.Torso
1152
		fi.Part0 = chr.Torso
1153
		fi.Part1 = chr["Left Arm"]
1154
	end
1155
	for i,v in pairs(chr:GetChildren()) do
1156
		if v.Name == "Mask" or v.ClassName == "Accessory" or v.ClassName == "Shirt" or v.ClassName == "Pants" or v.Name == "KatanaHolder" then
1157
			v:Destroy()
1158
		end
1159
	end
1160
	chr.Humanoid.Health = chr.Humanoid.MaxHealth
1161
	if partz:FindFirstChild('Weld') == nil and toolz.Parent == chr then
1162
		local weld = Instance.new('Weld',partz)
1163
		weld.Part0 = partz
1164
		weld.Part1 = chr["Right Arm"]
1165
		weld.C0 = CFrame.new(0.9,0,-1.25)*CFrame.Angles(math.pi,0,-math.pi/2)
1166
	end
1167
	lastpos = chr.HumanoidRootPart.CFrame
1168
	local kat = Instance.new('Part',chr)
1169
	kat.Size = Vector3.new(0,0,0)
1170
	kat.Name = "KatanaHolder"
1171
	kat.Material = Enum.Material.SmoothPlastic
1172
	kat.BrickColor = BrickColor.new('Really black')
1173
	kat.CanCollide = false
1174
	local we = Instance.new('Weld',kat)
1175
	we.Part0 = kat
1176
	we.Part1 = chr.Torso
1177
	we.C0 = CFrame.new(0,0,-0.5)*CFrame.Angles(0,0,0.5)
1178
	if on == true then
1179
	else
1180
		chr.Head.Transparency = 0
1181
		if shirt ~= nil then
1182
			shirt:Clone().Parent = chr
1183
		end
1184
		if pants ~= nil then
1185
			pants:Clone().Parent = chr
1186
		end
1187
		for i,v in pairs(hats) do
1188
			v:Clone().Parent = chr
1189
		end
1190
end
1191
end)