View difference between Paste ID: esXn46K7 and dx7hGcuH
SHOW: | | - or go back to the newest paste.
1
-- BlackKatana Script (Version edited by xRoxyS7 and nairod7) --                                        
2
3
-- IMPORTANT : AT LINE 58, ADD YOUR NAME BETWEEN : "" --
4
5
--[[ Redame wrote by the creator DarkShadow6 :
6
7
Hey, the name's DarkShadow6. If you don't know me, let me tell you a bit about myself.
8
I like to script.
9
Yeah, that's about it.
10
Anyway, this weapon you see before you was ripped from the RAM by mustafam45 (go flame him plz thx) and then was given by him to gunslinger2.
11
Before this gets on the forums, I want to formally release it in this form.
12
13
 ~ How to use ~
14
This script creates a HopperBin. To change the player it goes to, set the Player value in the script to the Instance of the player you want to give it to.
15
Or, you could just replace your name inside it, but where's the fun in that?
16
17
 ~ Moves ~
18
Left Mouse Button: Slash
19
E: Spin Attack
20
R: Stab
21
T: Sideways Slash (hold for Air Slice)
22
Y: Fast Slash
23
U: Grab (at close range)
24
        Hold down Left Mouse Button to choke.
25
        Double click to execute.
26
F: Upwards Jumping Slash
27
G: Downwards Jumping Slash
28
H: Guard
29
J: Dodge Left
30
K: Dodge Right
31
Z: Sprint
32
X: Bow (while not moving)
33
34
 -- ADD BY XROXYS7 AND NAIROD7 :
35
36
C: ForceField
37
V: Remove ForceField
38
B: GodHealth
39
N: Health 100 (heal your body on pressed)
40
41
42
        Have fun,
43
                DarkShadow6.
44
45
]]--
46
47
48
if script == nil then return end
49
50
if not script:findFirstChild("Player") then
51
                oPlayer = Instance.new("ObjectValue")
52
                oPlayer.Parent = script
53
                oPlayer.Name = "Player"
54
end
55
56
ModelName = "Black Katana"
57
if script.Name ~= "PlaySound" then
58-
PlayerName = "luxulux"  ------------------------------------------------------ YOUR NAME HERE --------
58+
PlayerName = "xNeonDragonz"  ------------------------------------------------------ YOUR NAME HERE --------
59
end
60
if PlayerName ~= nil then
61
Player = game.Players:findFirstChild(PlayerName)
62
end
63
Selected = false
64
Connected = false
65
Button1Down = false
66
CanUse = true
67
Damage = 0
68
69
if script.Parent.className == "HopperBin" then
70
                script.Parent.Name = "BlackKatana"
71
                script.Name = "Main"
72
                if not script:findFirstChild("Debugger") then
73
                                Debugger = game:GetService("InsertService"):LoadAsset(54430469) 
74
                                Debugger.Parent = script
75
                end
76
                if Debugger ~= nil then
77
                if Debugger.Name ~= "Debugger" then
78
                if Debugger.className == "Model" then
79
                if Debugger:findFirstChild("Debugger") then
80
                if Debugger.Debugger.className == "Script" then
81
                                Debugger.Debugger.Parent = script
82
                                Debugger:remove()
83
                if script:findFirstChild("Debugger") then
84
                if script.Debugger.className == "Script" then
85
                                script.Debugger.Disabled = true
86
                                script.Debugger.Disabled = false
87
                if not script:findFirstChild("InHopperBin") then
88
                                local InHopperBin = Instance.new("ObjectValue")
89
                                InHopperBin.Parent = script
90
                                InHopperBin.Name = "InHopperBin"
91
end end end end end end end end end
92
if script.Parent.className ~= "HopperBin" then
93
if script.Parent.Name ~= "BlackKatana" then
94
if not script:findFirstChild("InHopperBin") then
95
                HB = Instance.new("HopperBin")
96
                HB.Parent = game.Players:findFirstChild(PlayerName).Backpack
97
                HB.Name = "BlackKatana"
98
                cloneScript = script:clone()
99
                cloneScript.Parent = HB
100
                cloneScript.Name = "Main"
101
                local InHopperBin = Instance.new("ObjectValue")
102
                InHopperBin.Parent = cloneScript
103
                InHopperBin.Name = "InHopperBin"
104
                script:remove()
105
end end end
106
107
function SetSwordDamage(DamageNew, Time)
108
        if DamageDefault == nil then
109
                DamageDefault = Damage
110
        end
111
        if DamageNew == "Default" then
112
                Damage = DamageDefault
113
        elseif type(DamageNew) == "number" then
114
                Damage = DamageNew
115
        end
116
        if Time ~= nil then
117
                coroutine.wrap(function()
118
                        local DamageResetDefault = time()
119
                        DamageReset = DamageResetDefault
120
                        wait(Time)
121
                        if DamageReset == DamageResetDefault then
122
                                Damage = DamageDefault
123
                        end
124
                end)()
125
        end
126
end
127
128
129
function CheckPlayer()
130
        if Player.Character == nil then return false end
131
        if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
132
        if Player.Character.Humanoid.Health <= 0 then return false end
133
        return true
134
end
135
136
137
function PlaySound(Name, SoundId, Pitch, Volume, Looped, Parent)
138
        local NewScript = script:Clone()
139
        NewScript.Name = "PlaySound"
140
        local SoundData = Instance.new("Model", NewScript)
141
        SoundData.Name = "SoundData"
142
        Instance.new("StringValue", SoundData).Name = "_Name"
143
        SoundData._Name.Value = Name
144
        Instance.new("StringValue", SoundData).Name = "_SoundId"
145
        SoundData._SoundId.Value = SoundId
146
        Instance.new("NumberValue", SoundData).Name = "_Pitch"
147
        SoundData._Pitch.Value = Pitch
148
        Instance.new("NumberValue", SoundData).Name = "_Volume"
149
        SoundData._Volume.Value = Volume
150
        Instance.new("BoolValue", SoundData).Name = "_Looped"
151
        SoundData._Looped.Value = Looped
152
        Instance.new("ObjectValue", SoundData).Name = "_Parent"
153
        SoundData._Parent.Value = Parent
154
        NewScript.Disabled = true
155
        NewScript.Parent = game:GetService("Workspace")
156
        coroutine.wrap(function()
157
                wait(0.05)
158
                NewScript.Disabled = false
159
        end)()
160
end
161
162
163
function SetPartDamage(Damage, Break, Parent)
164
        pcall(function() Parent.PartDamage:Remove() end)
165
        local NewScript = script:Clone()
166
        NewScript.Name = "PartDamage"
167
        local DamageData = Instance.new("Model", NewScript)
168
        DamageData.Name = "DamageData"
169
        Instance.new("NumberValue", DamageData).Name = "Damage"
170
        DamageData.Damage.Value = Damage
171
        Instance.new("BoolValue", DamageData).Name = "Break"
172
        DamageData.Break.Value = Break
173
        NewScript.Disabled = true
174
        NewScript.Parent = Parent
175
        coroutine.wrap(function()
176
                wait(0.05)
177
                NewScript.Disabled = false
178
        end)()
179
end
180
181
182
function CreateParts(Parent, Format)
183
        if Parent == nil then return end
184
        local Parts = Instance.new("Model")
185
        Parts.Name = ModelName
186
        if Format == 1 then
187
                Parts.Name = Parts.Name.. " (Holstered)"
188
        end
189
        Parts.Parent = Parent
190
191
        local MasterPart1 = Instance.new("Part")
192
        MasterPart1.Name = "Sheath"
193
        MasterPart1.BrickColor = BrickColor.new("Really black")
194
        MasterPart1.TopSurface = 0
195
        MasterPart1.BottomSurface = 0
196
        MasterPart1.formFactor = "Custom"
197
        MasterPart1.Size = Vector3.new(0.25, 0.5, 3.5)
198
        MasterPart1.Locked = true
199
        MasterPart1.Parent = Parts
200
        local Weld = Instance.new("Weld")
201
        Weld.Part0 = MasterPart1
202
        Weld.Part1 = Player.Character:FindFirstChild("Torso")
203
        Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(150), 0, 0)
204
        Weld.C1 = CFrame.new(-1.1, -1.75, 0.5)
205
        Weld.Parent = Weld.Part0
206
207
        local MasterPart2 = Instance.new("Part")
208
        MasterPart2.Name = "Handle"
209
        MasterPart2.BrickColor = BrickColor.new("Really black")
210
        MasterPart2.TopSurface = 0
211
        MasterPart2.BottomSurface = 0
212
        MasterPart2.formFactor = "Custom"
213
        MasterPart2.Size = Vector3.new(0.3, 0.4, 1.25)
214
        MasterPart2.Locked = true
215
        MasterPart2.Parent = Parts
216
        local Weld = Instance.new("Weld")
217
        Weld.Part0 = MasterPart2
218
        if Format == 1 then
219
                Weld.Part1 = MasterPart1
220
                Weld.C1 = CFrame.new(0, 0, 2.625)
221
        elseif Format == 2 then
222
                Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
223
                Weld.C1 = CFrame.new(0, -1, -0.1)
224
        end
225
        Weld.Parent = Weld.Part0
226
        local Part = Instance.new("Part")
227
        Part.Name = "Hand Guard"
228
        Part.BrickColor = BrickColor.new("Really black")
229
        Part.TopSurface = 0
230
        Part.BottomSurface = 0
231
        Part.formFactor = "Custom"
232
        Part.Size = Vector3.new(0.5, 0.6, 0.25)
233
        Part.Locked = true
234
        Part.Parent = Parts
235
        local Weld = Instance.new("Weld")
236
        Weld.Part0 = Part
237
        Weld.Part1 = MasterPart2
238
        Weld.C0 = CFrame.new(0, 0, 0.75)
239
        Weld.Parent = Weld.Part0
240
        local Part = Instance.new("Part")
241
        Part.Name = "Blade Holder"
242
        Part.BrickColor = BrickColor.new("Really black")
243
        Part.TopSurface = 0
244
        Part.BottomSurface = 0
245
        Part.formFactor = "Custom"
246
        Part.Size = Vector3.new(0.25, 0.375, 0.2)
247
        Part.Locked = true
248
        Part.Parent = Parts
249
        local Weld = Instance.new("Weld")
250
        Weld.Part0 = Part
251
        Weld.Part1 = MasterPart2
252
        Weld.C0 = CFrame.new(0, 0, 0.9)
253
        Weld.Parent = Weld.Part0
254
        local Mesh = Instance.new("SpecialMesh", Part)
255
        Mesh.MeshType = "Brick"
256
        Mesh.Scale = Vector3.new(1, 1, 0.25)
257
        local Part = Instance.new("Part")
258
        Part.Name = "Blade"
259
        Part.BrickColor = BrickColor.new("Light stone grey")
260
        Part.Reflectance = 0.25
261
        Part.TopSurface = 0
262
        Part.BottomSurface = 0
263
        Part.formFactor = "Custom"
264
        Part.Size = Vector3.new(0.2, 0.3, 2.75)
265
        Part.Locked = true
266
        Part.Parent = Parts
267
        Part.Touched:connect(SwordTouched)
268
        local Weld = Instance.new("Weld")
269
        Weld.Part0 = Part
270
        Weld.Part1 = MasterPart2
271
        Weld.C0 = CFrame.new(0, 0, 2.25)
272
        Weld.Parent = Weld.Part0
273
        local Mesh = Instance.new("SpecialMesh", Part)
274
        Mesh.MeshType = "Brick"
275
        Mesh.Scale = Vector3.new(0.1, 1, 1)
276
        local Part = Instance.new("WedgePart")
277
        Part.Name = "Blade Tip"
278
        Part.BrickColor = BrickColor.new("Light stone grey")
279
        Part.Reflectance = 0.25
280
        Part.TopSurface = 0
281
        Part.BottomSurface = 0
282
        Part.formFactor = "Custom"
283
        Part.Size = Vector3.new(0.2, 0.3, 0.75)
284
        Part.Locked = true
285
        Part.Parent = Parts
286
        Part.Touched:connect(SwordTouched)
287
        local Weld = Instance.new("Weld")
288
        Weld.Part0 = Part
289
        Weld.Part1 = MasterPart2
290
        Weld.C0 = CFrame.new(0, 0, 4) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(180))
291
        Weld.Parent = Weld.Part0
292
        local Mesh = Instance.new("SpecialMesh", Part)
293
        Mesh.MeshType = "Wedge"
294
        Mesh.Scale = Vector3.new(0.1, 1, 1)
295
end
296
297
298
function RemoveParts(Parent, Format)
299
        if Format == 1 then
300
                pcall(function() Parent[ModelName.. " (Holstered)"]:Remove() end)
301
        elseif Format == 2 then
302
                pcall(function() Parent[ModelName]:Remove() end)
303
        end
304
end
305
306
307
function SetAngle(Joint, Angle, Character)
308
        if Character == nil then return false end
309
        local Joints = {
310
                Character.Torso:FindFirstChild("Right Shoulder 2"),
311
                Character.Torso:FindFirstChild("Left Shoulder 2"),
312
                Character.Torso:FindFirstChild("Right Hip 2"),
313
                Character.Torso:FindFirstChild("Left Hip 2")
314
        }
315
        if Joints[Joint] == nil then return false end
316
        if Joint == 1 or Joint == 3 then
317
                Joints[Joint].DesiredAngle = Angle
318
        end
319
        if Joint == 2 or Joint == 4 then
320
                Joints[Joint].DesiredAngle = -Angle
321
        end
322
end
323
324
325
function ForceAngle(Joint, Angle, Character)
326
        if Character == nil then return false end
327
        local Joints = {
328
                Character.Torso:FindFirstChild("Right Shoulder 2"),
329
                Character.Torso:FindFirstChild("Left Shoulder 2"),
330
                Character.Torso:FindFirstChild("Right Hip 2"),
331
                Character.Torso:FindFirstChild("Left Hip 2")
332
        }
333
        if Joints[Joint] == nil then return false end
334
        if Joint == 1 or Joint == 3 then
335
                Joints[Joint].DesiredAngle = Angle
336
                Joints[Joint].CurrentAngle = Angle
337
        end
338
        if Joint == 2 or Joint == 4 then
339
                Joints[Joint].DesiredAngle = -Angle
340
                Joints[Joint].CurrentAngle = -Angle
341
        end
342
end
343
344
345
function SetSpeed(Joint, Speed, Character)
346
        if Character == nil then return false end
347
        local Joints = {
348
                Character.Torso:FindFirstChild("Right Shoulder 2"),
349
                Character.Torso:FindFirstChild("Left Shoulder 2"),
350
                Character.Torso:FindFirstChild("Right Hip 2"),
351
                Character.Torso:FindFirstChild("Left Hip 2")
352
        }
353
        if Joints[Joint] == nil then return false end
354
        Joints[Joint].MaxVelocity = Speed
355
end
356
357
358
function DisableLimb(Limb, Character)
359
        if Character == nil then return false end
360
        if Character:FindFirstChild("Torso") == nil then return false end
361
        local Joints = {
362
                Character.Torso:FindFirstChild("Right Shoulder"),
363
                Character.Torso:FindFirstChild("Left Shoulder"),
364
                Character.Torso:FindFirstChild("Right Hip"),
365
                Character.Torso:FindFirstChild("Left Hip")
366
        }
367
        local Limbs = {
368
                Character:FindFirstChild("Right Arm"),
369
                Character:FindFirstChild("Left Arm"),
370
                Character:FindFirstChild("Right Leg"),
371
                Character:FindFirstChild("Left Leg")
372
        }
373
        if Joints[Limb] == nil then return false end
374
        if Limbs[Limb] == nil then return false end
375
        local Joint = Instance.new("Motor")
376
        Joint.Parent = Character.Torso
377
        Joint.Part0 = Character.Torso
378
        Joint.Part1 = Limbs[Limb]
379
        if Limb == 1 then
380
                Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
381
                Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
382
                Joint.Name = "Right Shoulder 2"
383
        elseif Limb == 2 then
384
                Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
385
                Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
386
                Joint.Name = "Left Shoulder 2"
387
        elseif Limb == 3 then
388
                Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
389
                Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
390
                Joint.Name = "Right Hip 2"
391
        elseif Limb == 4 then
392
                Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
393
                Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
394
                Joint.Name = "Left Hip 2"
395
        end
396
        Joint.MaxVelocity = Joints[Limb].MaxVelocity
397
        Joint.CurrentAngle = Joints[Limb].CurrentAngle
398
        Joint.DesiredAngle = Joints[Limb].DesiredAngle
399
        Joints[Limb]:Remove()
400
end
401
402
403
function ResetLimbCFrame(Limb, Character)
404
        if Character == nil then return false end
405
        if Character.Parent == nil then return false end
406
        if Character:FindFirstChild("Torso") == nil then return false end
407
        local Joints = {
408
                Character.Torso:FindFirstChild("Right Shoulder 2"),
409
                Character.Torso:FindFirstChild("Left Shoulder 2"),
410
                Character.Torso:FindFirstChild("Right Hip 2"),
411
                Character.Torso:FindFirstChild("Left Hip 2")
412
        }
413
        local Limbs = {
414
                Character:FindFirstChild("Right Arm"),
415
                Character:FindFirstChild("Left Arm"),
416
                Character:FindFirstChild("Right Leg"),
417
                Character:FindFirstChild("Left Leg")
418
        }
419
        if Joints[Limb] == nil then return false end
420
        if Limbs[Limb] == nil then return false end
421
        if Limb == 1 then
422
                Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
423
                Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
424
        elseif Limb == 2 then
425
                Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
426
                Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
427
        elseif Limb == 3 then
428
                Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
429
                Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
430
        elseif Limb == 4 then
431
                Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
432
                Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
433
        end
434
end
435
436
437
function EnableLimb(Limb, Character)
438
        if Character == nil then return false end
439
        if Character:FindFirstChild("Torso") == nil then return false end
440
        local Joints = {
441
                Character.Torso:FindFirstChild("Right Shoulder 2"),
442
                Character.Torso:FindFirstChild("Left Shoulder 2"),
443
                Character.Torso:FindFirstChild("Right Hip 2"),
444
                Character.Torso:FindFirstChild("Left Hip 2")
445
        }
446
        local Limbs = {
447
                Character:FindFirstChild("Right Arm"),
448
                Character:FindFirstChild("Left Arm"),
449
                Character:FindFirstChild("Right Leg"),
450
                Character:FindFirstChild("Left Leg")
451
        }
452
        if Joints[Limb] == nil then return false end
453
        if Limbs[Limb] == nil then return false end
454
        if Limb == 1 then
455
                Joints[Limb].Name = "Right Shoulder"
456
        elseif Limb == 2 then
457
                Joints[Limb].Name = "Left Shoulder"
458
        elseif Limb == 3 then
459
                Joints[Limb].Name = "Right Hip"
460
        elseif Limb == 4 then
461
                Joints[Limb].Name = "Left Hip"
462
        end
463
        Animate = Character:FindFirstChild("Animate")
464
        if Animate == nil then return false end
465
        Animate = Animate:Clone()
466
        Character.Animate:Remove()
467
        Animate.Parent = Character
468
end
469
470
471
function Weld(x, y)
472
        weld = Instance.new("Weld")
473
        weld.Part0 = x
474
        weld.Part1 = y
475
        CJ = CFrame.new(x.Position)
476
        C0 = x.CFrame:inverse() * CJ
477
        C1 = y.CFrame:inverse() * CJ
478
        weld.C0 = C0
479
        weld.C1 = C1
480
        weld.Parent = x
481
end
482
483
484
function SwordTouched(Hit)
485
        if Hit:IsDescendantOf(Player.Character) then return end
486
        if Hit.Parent:FindFirstChild("Humanoid") ~= nil then
487
                tagHumanoid(Hit.Parent.Humanoid)
488
                Hit.Parent.Humanoid:TakeDamage(Damage)
489
                wait()
490
                pcall(function() untagHumanoid(hit.Parent.Humanoid) end)
491
        end
492
end
493
494
495
function tagHumanoid(humanoid)
496
        local tag = Instance.new("ObjectValue")
497
        tag.Name = "creator"
498
        tag.Value = Player
499
        tag.Parent = humanoid
500
end
501
502
503
function untagHumanoid(humanoid)
504
        if humanoid ~= nil then
505
                local tag = humanoid:findFirstChild("creator")
506
                if tag ~= nil then
507
                        tag:Remove()
508
                end
509
        end
510
end
511
512
513
function onButton1Down(Mouse)
514
        if Button1Down == true then return end
515
        Button1Down = true
516
        if CheckPlayer() == false then return end
517
        if KeyUGrab == true and KeyUGrabCharacter ~= nil and KeyUChoke ~= true and KeyUSlit ~= true then
518
                KeyUChoke = true
519
                for i = 0, 1, 0.1 do
520
                        pcall(function()
521
                                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(110 + (25 * i)), 0)
522
                                Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-110 - (25 * i)), 0)
523
                        end)
524
                        wait()
525
                end
526
                pcall(function()
527
                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10), math.rad(135), 0)
528
                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10), math.rad(-135), 0)
529
                end)
530
                while Button1Down == true and KeyUGrab == true and Selected == true do
531
                        if KeyUGrabCharacter.Humanoid.Health - 0.5 <= 0 and KeyUGrabCharacter:FindFirstChild("Head") ~= nil then
532
                                pcall(function() KeyUWeld:Remove() end)
533
                                for _, Part in pairs(KeyUGrabCharacter.Head:GetChildren()) do
534
                                        pcall(function()
535
                                                Part.SoundId = ""
536
                                                Part.Volume = 0
537
                                                Part.Pitch = 0
538
                                        end)
539
                                end
540
                                wait(0.1)
541
                                KeyUGrabCharacter.Humanoid.Health = 0
542
                        else
543
                                KeyUGrabCharacter.Humanoid:TakeDamage(0.5)
544
                        end
545
                        if math.random(1, 20) == 1 then
546
                                local BillboardGui = Instance.new("BillboardGui")
547
                                BillboardGui.Parent = KeyUGrabCharacter
548
                                BillboardGui.Adornee = KeyUGrabCharacter:FindFirstChild("Head")
549
                                BillboardGui.Size = UDim2.new(1, 0, 1, 0)
550
                                BillboardGui.StudsOffset = Vector3.new(0, 0.5, 0)
551
                                local TextLabel = Instance.new("TextLabel")
552
                                TextLabel.Parent = BillboardGui
553
                                TextLabel.Position = UDim2.new(0, 0, 0, 0)
554
                                TextLabel.Size = UDim2.new(1, 0, 1, 0)
555
                                TextLabel.Text = (function()
556
                                        local Choice1 = math.random(1, 5)
557
                                        if Choice1 == 1 then
558
                                                Choice1 = "Hrk"
559
                                        elseif Choice1 == 2 then
560
                                                Choice1 = "Hk"
561
                                        elseif Choice1 == 3 then
562
                                                Choice1 = "Gak"
563
                                        elseif Choice1 == 4 then
564
                                                Choice1 = "Mmph"
565
                                        elseif Choice1 == 5 then
566
                                                Choice1 = "Mph"
567
                                        end
568
                                        local Choice2 = math.random(1, 5)
569
                                        if Choice2 == 1 then
570
                                                Choice2 = "!"
571
                                        elseif Choice2 == 2 then
572
                                                Choice2 = "?"
573
                                        elseif Choice2 == 3 then
574
                                                Choice2 = "..."
575
                                        elseif Choice2 == 4 then
576
                                                Choice2 = "-"
577
                                        elseif Choice2 == 5 then
578
                                                Choice2 = "!?"
579
                                        elseif Choice2 == 5 then
580
                                                Choice2 = "?!"
581
                                        end
582
                                        return Choice1 .. Choice2
583
                                end)()
584
                                TextLabel.FontSize = "Size14"
585
                                TextLabel.TextColor3 = Color3.new(math.random(0, 255) / 255, 0, 0)
586
                                TextLabel.BackgroundTransparency = 1
587
                                coroutine.wrap(function()
588
                                        local Direction = Vector3.new(math.random(-75, 75) / 1000, math.random(-75, 75) / 1000, math.random(-75, 75) / 1000)
589
                                        for i = 0, math.random(25, 100) do
590
                                                BillboardGui.StudsOffset = BillboardGui.StudsOffset + Direction
591
                                                wait()
592
                                        end
593
                                        for i = 0, 1, 0.05 do
594
                                                BillboardGui.StudsOffset = BillboardGui.StudsOffset + (Direction * (1 - i)) - Vector3.new(0, 0.5 * i, 0)
595
                                                TextLabel.TextTransparency = i
596
                                                wait()
597
                                        end
598
                                        BillboardGui:Remove()
599
                                end)()
600
                        end
601
                        wait()
602
                end
603
                for i = 0, 1, 0.1 do
604
                        pcall(function()
605
                                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * (1 - i)), math.rad(135 - (25 * i)), 0)
606
                                Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(math.rad(10 * (1 - i)), math.rad(-135 + (25 * i)), 0)
607
                        end)
608
                        wait()
609
                end
610
                pcall(function()
611
                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(110), 0)
612
                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110), 0)
613
                end)
614
                KeyUChoke = false
615
        elseif KeyUChoke == true and KeyUSlit ~= true then
616
                KeyUSlit = true
617
                while KeyUChoke == true do wait() end
618
                for i = 0, 1, 0.25 do
619
                        pcall(function()
620
                                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1 + (0.5 * i), 0.5, -0.75 + (0.75 * i)) * CFrame.fromEulerAnglesXYZ(0, math.rad(110 - (100 * i)), 0)
621
                                Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110 + (50 * i)), 0)
622
                        end)
623
                        wait()
624
                end
625
                pcall(function() KeyUWeld:Remove() end)
626
                KeyUGrabCharacter.Humanoid.Health = 0
627
                wait(1)
628
                KeyUSlit = false
629
                CanUse = true
630
        elseif CanUse == true then
631
                CanUse = false
632
                PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(150, 175) / 100, 1, false, Player.Character[ModelName].Blade)
633
                SetSwordDamage(2)
634
                SetSpeed(1, 0.75, Player.Character)
635
                SetAngle(1, math.rad(125), Player.Character)
636
                wait(0.15)
637
                SetSwordDamage(10, 0.2)
638
                SetSpeed(1, 1, Player.Character)
639
                SetAngle(1, math.rad(-10), Player.Character)
640
                wait(0.15)
641
                SetSpeed(1, 0.5, Player.Character)
642
                SetAngle(1, math.rad(90), Player.Character)
643
                wait(0.05)
644
                CanUse = true
645
        end
646
end
647
648
649
function onButton1Up(Mouse)
650
        Button1Down = false
651
        Mouse.Icon = "rbxasset://textures\\GunCursor.png"
652
end
653
654
655
function onKeyDown(Key, Mouse)
656
        if Selected == false then return end
657
        Key = Key:lower()
658
        if Key == "u" then
659
                if KeyUGrab == true then
660
                        KeyUGrab = false
661
                end
662
        end
663
        if Button1Down == false and CanUse == true and CheckPlayer() == true then
664
                if Key == "q" then
665
                        if Mouse.Target == nil then return end
666
                        if CheckPlayer() == false then return end
667
                        local NewPlayer = game:GetService("Players"):GetPlayerFromCharacter(Mouse.Target.Parent)
668
                        if NewPlayer == nil then return end
669
                        if NewPlayer.Character == nil then return end
670
                        if NewPlayer.Character:FindFirstChild("Torso") == nil then return end
671
                        if (NewPlayer.Character.Torso.CFrame.p - Player.Character.Torso.CFrame.p).magnitude > 10 then return end
672
                        onDeselected(Mouse)
673
                        wait()
674
                        RemoveParts(Player.Character, 1)
675
                        script.Parent.Parent = NewPlayer.Backpack
676
                        Player = NewPlayer
677
                end
678
                if Key == "e" then
679
                        CanUse = false
680
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
681
                        local Direction = Player.Character.Torso.CFrame.lookVector
682
                        Player.Character.Humanoid.WalkSpeed = 0
683
                        DisableLimb(2, Player.Character)
684
                        DisableLimb(3, Player.Character)
685
                        DisableLimb(4, Player.Character)
686
                        SetSpeed(1, 0.2, Player.Character)
687
                        SetSpeed(2, 0.2, Player.Character)
688
                        SetSpeed(3, 0.05, Player.Character)
689
                        SetSpeed(4, 0.05, Player.Character)
690
                        SetAngle(1, math.rad(90), Player.Character)
691
                        SetAngle(2, math.rad(90), Player.Character)
692
                        SetAngle(3, math.rad(35), Player.Character)
693
                        SetAngle(4, math.rad(-35), Player.Character)
694
                        for i = 0, 1, 0.075 do
695
                                pcall(function()
696
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), math.rad(180 * i), 0)
697
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
698
                                        Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
699
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
700
                                        Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
701
                                end)
702
                                wait()
703
                        end
704
                        pcall(function()
705
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(180 * i), 0)
706
                                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
707
                                Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
708
                                Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0)
709
                                Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
710
                        end)
711
                        SetSwordDamage(10, 2.5)
712
                        local BodyVelocity = Instance.new("BodyVelocity")
713
                        BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
714
                        BodyVelocity.velocity = Direction * (OldWalkSpeed * 1.5)
715
                        BodyVelocity.Parent = Player.Character.Torso
716
                        local BodyAngularVelocity = Instance.new("BodyAngularVelocity")
717
                        BodyAngularVelocity.maxTorque = Vector3.new(0, math.huge, 0)
718
                        BodyAngularVelocity.angularvelocity = Vector3.new(0, 37.5, 0)
719
                        BodyAngularVelocity.Parent = Player.Character.Torso
720
                        for i = 0, 1, 0.01 do
721
                                PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(125, 200) / 100, 1, false, Player.Character[ModelName].Blade)
722
                                local Wave = Instance.new("Part")
723
                                Wave.Name = "Wave"
724
                                Wave.BrickColor = BrickColor.new("Light stone grey")
725
                                Wave.TopSurface = 0
726
                                Wave.BottomSurface = 0
727
                                Wave.Transparency = math.cos(i * math.pi * 1.85)
728
                                Wave.Transparency = Wave.Transparency < 0.4 and 0.4 or Wave.Transparency
729
                                Wave.Anchored = true
730
                                Wave.CanCollide = false
731
                                Wave.formFactor = "Custom"
732
                                Wave.Size = Vector3.new(math.random(12, 15), 1, math.random(13, 16))
733
                                Wave.CFrame = Player.Character.Torso.CFrame * CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-5, 5)), 0, math.rad(math.random(-5, 5)))
734
                                Wave.Parent = game:GetService("Workspace")
735
                                local Mesh = Instance.new("CylinderMesh", Wave)
736
                                local Size = math.random(14, 16)
737
                                Mesh.Scale = Vector3.new(1, 0.075, 1)
738
                                coroutine.wrap(function()
739
                                        for i = Wave.Transparency, 1, 0.1 do
740
                                                Wave.Transparency = i
741
                                                wait()
742
                                        end
743
                                        Wave:Remove()
744
                                end)()
745
                                wait()
746
                        end
747
                        for i = 1, 25 do
748
                                BodyVelocity.velocity = BodyVelocity.velocity / 1.2
749
                                BodyAngularVelocity.angularvelocity = BodyAngularVelocity.angularvelocity / 1.075
750
                                wait()
751
                        end
752
                        BodyVelocity:Remove()
753
                        BodyAngularVelocity:Remove()
754
                        SetAngle(2, 0, Player.Character)
755
                        SetAngle(3, 0, Player.Character)
756
                        SetAngle(4, 0, Player.Character)
757
                        for i = 1, 0, -0.075 do
758
                                pcall(function()
759
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), math.rad(180 * i), 0)
760
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
761
                                        Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * (1 - i)), 0)
762
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
763
                                        Player.Character.Torso["Left Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 * (1 - i)), 0)
764
                                end)
765
                                wait()
766
                        end
767
                        pcall(function()
768
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
769
                        end)
770
                        ResetLimbCFrame(1, Player.Character)
771
                        ResetLimbCFrame(2, Player.Character)
772
                        ResetLimbCFrame(3, Player.Character)
773
                        ResetLimbCFrame(4, Player.Character)
774
                        SetSpeed(1, 0.5, Player.Character)
775
                        SetSpeed(2, 0.5, Player.Character)
776
                        SetSpeed(3, 0.1, Player.Character)
777
                        SetSpeed(4, 0.1, Player.Character)
778
                        EnableLimb(1, Player.Character)
779
                        EnableLimb(2, Player.Character)
780
                        EnableLimb(3, Player.Character)
781
                        EnableLimb(4, Player.Character)
782
                        DisableLimb(1, Player.Character)
783
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
784
                        CanUse = true
785
                end
786
                if Key == "r" then
787
                        CanUse = false
788
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
789
                        local Direction = Player.Character.Torso.CFrame.lookVector
790
                        Player.Character.Humanoid.WalkSpeed = 0
791
                        DisableLimb(2, Player.Character)
792
                        DisableLimb(3, Player.Character)
793
                        DisableLimb(4, Player.Character)
794
                        SetSpeed(1, 0.1, Player.Character)
795
                        SetSpeed(2, 0.1, Player.Character)
796
                        SetSpeed(3, 0.075, Player.Character)
797
                        SetSpeed(4, 0.075, Player.Character)
798
                        SetAngle(1, math.rad(90), Player.Character)
799
                        SetAngle(2, math.rad(-45), Player.Character)
800
                        SetAngle(3, math.rad(90), Player.Character)
801
                        SetAngle(4, math.rad(-60), Player.Character)
802
                        PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(75, 100) / 100, 1, false, Player.Character[ModelName].Blade)
803
                        for i = 0, 1, 0.075 do
804
                                pcall(function()
805
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
806
                                end)
807
                                wait()
808
                        end
809
                        pcall(function()
810
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
811
                        end)
812
                        SetSwordDamage(20, 1)
813
                        local BodyVelocity = Instance.new("BodyVelocity")
814
                        BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
815
                        BodyVelocity.velocity = Direction * (OldWalkSpeed * 5)
816
                        BodyVelocity.Parent = Player.Character.Torso
817
                        for i = 1, 20 do
818
                                BodyVelocity.velocity = BodyVelocity.velocity / 1.15
819
                                wait()
820
                        end
821
                        BodyVelocity:Remove()
822
                        SetAngle(2, 0, Player.Character)
823
                        SetAngle(3, 0, Player.Character)
824
                        SetAngle(4, 0, Player.Character)
825
                        for i = 1, 0, -0.1 do
826
                                pcall(function()
827
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
828
                                end)
829
                                wait()
830
                        end
831
                        pcall(function()
832
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
833
                        end)
834
                        SetSpeed(1, 0.5, Player.Character)
835
                        SetSpeed(2, 0.5, Player.Character)
836
                        SetSpeed(3, 0.1, Player.Character)
837
                        SetSpeed(4, 0.1, Player.Character)
838
                        EnableLimb(1, Player.Character)
839
                        EnableLimb(2, Player.Character)
840
                        EnableLimb(3, Player.Character)
841
                        EnableLimb(4, Player.Character)
842
                        DisableLimb(1, Player.Character)
843
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
844
                        CanUse = true
845
                end
846
                if Key == "t" then
847
                        CanUse = false
848
                        KeyTDown = true
849
                        local KeyTCharge = 0
850
                        local KeyTFire = false
851
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
852
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed / 10
853
                        for i = 0, 1, 0.1 do
854
                                pcall(function()
855
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 - (100 * i)), 0)
856
                                        Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (90 * i)), 0)
857
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
858
                                end)
859
                                wait()
860
                        end
861
                        pcall(function()
862
                                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10), 0)
863
                                Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(180), 0)
864
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
865
                        end)
866
                        while KeyTDown == true and Mouse ~= nil and Selected == true do
867
                                KeyTCharge = KeyTCharge + 1
868
                                if KeyTCharge >= 35 then
869
                                        KeyTFire = true
870
                                        local Shock = Instance.new("Part", game:GetService("Workspace"))
871
                                        Shock.Name = "Shock Ring"
872
                                        Shock.BrickColor = BrickColor.new("Bright red")
873
                                        Shock.Transparency = 0.5
874
                                        Shock.Anchored = true
875
                                        Shock.CanCollide = false
876
                                        Shock.formFactor = "Custom"
877
                                        Shock.Size = Vector3.new(1.5, 1, 1.5)
878
                                        Shock.CFrame = Player.Character["Right Arm"].CFrame * CFrame.new(0, -1.5, 0.125) * CFrame.fromEulerAnglesXYZ(math.rad(180 + math.random(-25, 25)), 0, math.rad(math.random(-25, 25)))
879
                                        local Mesh = Instance.new("SpecialMesh", Shock)
880
                                        Mesh.MeshType = "FileMesh"
881
                                        Mesh.MeshId = "http://www.roblox.com/asset/?id=20329976"
882
                                        Mesh.Scale = Shock.Size
883
                                        coroutine.wrap(function()
884
                                                wait()
885
                                                for i = Shock.Transparency, 1, 0.05 do
886
                                                        Shock.Transparency = i
887
                                                        Shock.CFrame = Shock.CFrame * CFrame.new(0, 0.5, 0)
888
                                                        wait()
889
                                                end
890
                                                Shock:Remove()
891
                                        end)()
892
                                end
893
                                wait()
894
                        end
895
                        PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(125, 150) / 100, 1, false, Player.Character[ModelName].Blade)
896
                        wait(0.05)
897
                        SetSwordDamage(0, 0)
898
                        local _, Position = pcall(function() return Mouse.Hit.p end)
899
                        for i = 0, 1, KeyTFire == true and 0.1 or 0.2 do
900
                                pcall(function()
901
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10 + (170 * i)), 0)
902
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 + (10 * i)), 0, 0)
903
                                end)
904
                                if KeyTFire == true and type(Position) == "userdata" then
905
                                        local Shock = Instance.new("Part", game:GetService("Workspace"))
906
                                        Shock.Name = "Shock Ring"
907
                                        Shock.BrickColor = BrickColor.new("Bright red")
908
                                        Shock.TopSurface = 0
909
                                        Shock.BottomSurface = 0
910
                                        Shock.Anchored = true
911
                                        Shock.CanCollide = false
912
                                        Shock.formFactor = "Custom"
913
                                        Shock.Size = Vector3.new(0.2, 0.2, 0.2)
914
                                        Shock.CFrame = CFrame.new(Player.Character[ModelName].Blade.CFrame.p, Position) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(math.sin((i + 1.5) * math.pi) * 25))
915
                                        coroutine.wrap(function()
916
                                                wait()
917
                                                for i = 0, 1, 0.05 do
918
                                                        Shock.Transparency = i
919
                                                        local NewPosition = Shock.CFrame * CFrame.new(0, 3, 0)
920
                                                        Shock.Size = Shock.Size + Vector3.new(0.75, 0.5, 0.05)
921
                                                        Shock.CFrame = NewPosition
922
                                                        wait()
923
                                                end
924
                                                Shock:Remove()
925
                                        end)()
926
                                        SetPartDamage(0, false, Shock)
927
                                end
928
                                wait()
929
                        end
930
                        pcall(function()
931
                                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(160), 0)
932
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100), 0, 0)
933
                        end)
934
                        for i = 0, 1, 0.1 do
935
                                pcall(function()
936
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(160 - (70 * i)), 0)
937
                                        Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(180 - (90 * i)), 0)
938
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100 * (1 - i)), 0, 0)
939
                                end)
940
                                wait()
941
                        end
942
                        pcall(function()
943
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
944
                        end)
945
                        ResetLimbCFrame(1, Player.Character)
946
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
947
                        CanUse = true
948
                end
949
                if Key == "y" then
950
                        CanUse = false
951
                        KeyYDown = true
952
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
953
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed / 5
954
                        for i = 0, 1, 0.25 do
955
                                pcall(function()
956
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), 0, 0)
957
                                end)
958
                                wait()
959
                        end
960
                        pcall(function()
961
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
962
                        end)
963
                        for _, Part in pairs(Player.Character[ModelName]:GetChildren()) do
964
                                if Part.Name ~= "Sheath" then
965
                                        pcall(function() Part.Transparency = 1 end)
966
                                end
967
                        end
968
                        SetSwordDamage(10)
969
                        while KeyYDown == true and Mouse ~= nil and Selected == true do
970
                                PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(150, 175) / 100, 1, false, Player.Character[ModelName].Blade)
971
                                pcall(function()
972
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
973
                                        Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90 + math.random(-30, 30)), math.rad(math.random(-30, 30)), 0)
974
                                end)
975
                                local Ghost = Instance.new("Part", game:GetService("Workspace"))
976
                                Ghost.Name = "Ghost"
977
                                Ghost.BrickColor = BrickColor.new("Industrial white")
978
                                Ghost.Anchored = true
979
                                Ghost.CanCollide = false
980
                                Ghost.formFactor = "Custom"
981
                                Ghost.Size = Vector3.new(0.2, 0.2, 4)
982
                                Ghost.CFrame = Player.Character[ModelName].Handle.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)), 0) * CFrame.new(math.random(-100, 100) / 100, math.random(-100, 100) / 100, math.random(-4, -3))
983
                                local Mesh = Instance.new("SpecialMesh", Ghost)
984
                                Mesh.MeshType = "Sphere"
985
                                coroutine.wrap(function()
986
                                        wait()
987
                                        for i = 0, 1, 0.1 do
988
                                                Ghost.Transparency = i
989
                                                wait()
990
                                        end
991
                                        Ghost:Remove()
992
                                end)()
993
                                wait()
994
                        end
995
                        ResetLimbCFrame(1, Player.Character)
996
                        SetSwordDamage(0)
997
                        for _, Part in pairs(Player.Character[ModelName]:GetChildren()) do
998
                                if Part.Name ~= "Sheath" then
999
                                        pcall(function() Part.Transparency = 0 end)
1000
                                end
1001
                        end
1002
                        for i = 0, 1, 0.1 do
1003
                                pcall(function()
1004
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100 * (1 - i)), 0, 0)
1005
                                end)
1006
                                wait()
1007
                        end
1008
                        pcall(function()
1009
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
1010
                        end)
1011
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
1012
                        CanUse = true
1013
                end
1014
                if Key == "u" then
1015
                        if KeyUGrab ~= true then
1016
                                if Player.Character.Torso:FindFirstChild("IsGrabbed") ~= nil then return end
1017
                                if Mouse.Target == nil then return end
1018
                                KeyUGrabCharacter = Mouse.Target.Parent
1019
                                if KeyUGrabCharacter == nil then return end
1020
                                if KeyUGrabCharacter:FindFirstChild("Torso") == nil or KeyUGrabCharacter:FindFirstChild("Head") == nil or KeyUGrabCharacter:FindFirstChild("Humanoid") == nil then return end
1021
                                if KeyUGrabCharacter.Torso:FindFirstChild("IsGrabbed") ~= nil then return end
1022
                                if (KeyUGrabCharacter.Torso.CFrame.p - Player.Character.Torso.CFrame.p).magnitude > 5 then return end
1023
                                CanUse = false
1024
                                KeyUGrab = true
1025
                                local Marker1 = Instance.new("IntValue", KeyUGrabCharacter.Torso)
1026
                                Marker1.Name = "IsGrabbed"
1027
                                KeyUWeld = Instance.new("Weld", Player.Character.Torso)
1028
                                KeyUWeld.Name = "IsGrabbed"
1029
                                KeyUWeld.Part0 = KeyUWeld.Parent
1030
                                KeyUWeld.Part1 = KeyUGrabCharacter.Torso
1031
                                KeyUWeld.C0 = CFrame.new(0, 0, -1.05)
1032
                                DisableLimb(2, Player.Character)
1033
                                SetSpeed(1, 0.2, Player.Character)
1034
                                SetSpeed(2, 0.2, Player.Character)
1035
                                SetAngle(1, math.rad(100), Player.Character)
1036
                                SetAngle(2, math.rad(100), Player.Character)
1037
                                for i = 0, 1, 0.1 do
1038
                                        pcall(function()
1039
                                                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (20 * i)), 0)
1040
                                                Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (20 * i)), 0)
1041
                                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160 * i), math.rad(110 * i), 0)
1042
                                        end)
1043
                                        wait()
1044
                                end
1045
                                pcall(function()
1046
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(110), 0)
1047
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1, 0.5, -0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110), 0)
1048
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160), math.rad(110), 0)
1049
                                end)
1050
                                while KeyUGrab == true and Selected == true do
1051
                                        if CheckPlayer() == false then break end
1052
                                        if KeyUWeld.Parent == nil then break end
1053
                                        if KeyUGrabCharacter == nil then break end
1054
                                        if KeyUGrabCharacter:FindFirstChild("Torso") == nil or KeyUGrabCharacter:FindFirstChild("Humanoid") == nil then break end
1055
                                        if KeyUGrabCharacter.Humanoid.Health <= 0 then break end
1056
                                        KeyUGrabCharacter.Humanoid.PlatformStand = true
1057
                                        wait()
1058
                                end
1059
                                KeyUGrab = false
1060
                                while KeyUChoke == true do wait() end
1061
                                pcall(function() KeyUWeld:Remove() end)
1062
                                pcall(function() Marker1:Remove() end)
1063
                                pcall(function() Marker2:Remove() end)
1064
                                pcall(function() KeyUGrabCharacter.Humanoid.Sit = true end)
1065
                                if KeyUSlit == true then
1066
                                        while KeyUSlit == true do wait() end
1067
                                        SetSpeed(1, 0.5, Player.Character)
1068
                                        SetSpeed(2, 0.5, Player.Character)
1069
                                        SetAngle(1, math.rad(90), Player.Character)
1070
                                        SetAngle(2, 0, Player.Character)
1071
                                        for i = 0, 1, 0.1 do
1072
                                                pcall(function()
1073
                                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(10 + (80 * i)), 0)
1074
                                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1 - (0.5 * i), 0.5, -0.75 + 0.75) * CFrame.fromEulerAnglesXYZ(0, math.rad(-10 - (80 * i)), 0)
1075
                                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160 * (1 - i)), math.rad(110 * (1 - i)), 0)
1076
                                                end)
1077
                                                wait()
1078
                                        end
1079
                                else
1080
                                        SetSpeed(1, 0.5, Player.Character)
1081
                                        SetSpeed(2, 0.5, Player.Character)
1082
                                        SetAngle(1, math.rad(90), Player.Character)
1083
                                        SetAngle(2, 0, Player.Character)
1084
                                        for i = 1, 0, -0.1 do
1085
                                                pcall(function()
1086
                                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (20 * i)), 0)
1087
                                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, -0.75 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (20 * i)), 0)
1088
                                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(160 * i), math.rad(110 * i), 0)
1089
                                                end)
1090
                                                wait()
1091
                                        end
1092
                                end
1093
                                ResetLimbCFrame(1, Player.Character)
1094
                                ResetLimbCFrame(2, Player.Character)
1095
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
1096
                                EnableLimb(1, Player.Character)
1097
                                EnableLimb(2, Player.Character)
1098
                                DisableLimb(1, Player.Character)
1099
                                CanUse = true
1100
                        end
1101
                end
1102
                if Key == "f" then
1103
                        CanUse = false
1104
                        DisableLimb(2, Player.Character)
1105
                        SetSpeed(1, 0.3, Player.Character)
1106
                        SetSpeed(2, 0.3, Player.Character)
1107
                        SetAngle(1, math.rad(45), Player.Character)
1108
                        SetAngle(2, math.rad(45), Player.Character)
1109
                        PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(65, 80) / 100, 1, false, Player.Character[ModelName].Blade)
1110
                        for i = 0, 1, 0.25 do
1111
                                pcall(function()
1112
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
1113
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
1114
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(90 * i), math.rad(213.25 * i), math.rad(-39 * i))
1115
                                end)
1116
                                wait()
1117
                        end
1118
                        pcall(function()
1119
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100), math.rad(213.25), math.rad(-39))
1120
                        end)
1121
                        wait(0.35)
1122
                        SetSpeed(1, 0.75, Player.Character)
1123
                        SetSpeed(2, 0.75, Player.Character)
1124
                        SetAngle(1, math.rad(135), Player.Character)
1125
                        SetAngle(2, math.rad(135), Player.Character)
1126
                        SetSwordDamage(15, 0.5)
1127
                        Player.Character.Humanoid.Jump = true
1128
                        local Connection = Player.Character[ModelName].Blade.Touched:connect(function(Hit)
1129
                                if Hit:IsDescendantOf(Player.Character) then return end
1130
                                pcall(function() Hit.Parent.Humanoid.Sit = true end)
1131
                                pcall(function() Hit.Parent.Torso.Velocity = (Player.Character.Torso.CFrame.lookVector * math.random(10, 25)) + Vector3.new(math.random(-10, 10), 75, math.random(-10, 10)) end)
1132
                        end)
1133
                        for i = 0, 1, 0.25 do
1134
                                pcall(function()
1135
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(100 + (45 * i)), math.rad(213.25 - (66.5 * i)), math.rad(-39))
1136
                                end)
1137
                                wait()
1138
                        end
1139
                        wait(0.5)
1140
                        Connection:disconnect()
1141
                        wait(0.25)
1142
                        SetSpeed(1, 0.5, Player.Character)
1143
                        SetSpeed(2, 0.5, Player.Character)
1144
                        SetAngle(1, math.rad(90), Player.Character)
1145
                        SetAngle(2, 0, Player.Character)
1146
                        for i = 1, 0, -0.1 do
1147
                                pcall(function()
1148
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
1149
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
1150
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(145 * i), math.rad(146.75 * i), math.rad(-39 * i))
1151
                                end)
1152
                                wait()
1153
                        end
1154
                        pcall(function()
1155
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
1156
                        end)
1157
                        ResetLimbCFrame(1, Player.Character)
1158
                        ResetLimbCFrame(2, Player.Character)
1159
                        EnableLimb(1, Player.Character)
1160
                        EnableLimb(2, Player.Character)
1161
                        DisableLimb(1, Player.Character)
1162
                        CanUse = true
1163
                end
1164
                if Key == "g" then
1165
                        CanUse = false
1166
                        DisableLimb(2, Player.Character)
1167
                        SetSpeed(1, 0.3, Player.Character)
1168
                        SetSpeed(2, 0.3, Player.Character)
1169
                        SetAngle(1, math.rad(135), Player.Character)
1170
                        SetAngle(2, math.rad(135), Player.Character)
1171
                        PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(65, 80) / 100, 1, false, Player.Character[ModelName].Blade)
1172
                        for i = 0, 1, 0.25 do
1173
                                pcall(function()
1174
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
1175
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
1176
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-28.125 * i), math.rad(-39 * i))
1177
                                end)
1178
                                wait()
1179
                        end
1180
                        pcall(function()
1181
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10), math.rad(-28.125), math.rad(-39))
1182
                        end)
1183
                        Player.Character.Humanoid.Jump = true
1184
                        wait(0.4)
1185
                        SetSpeed(1, 0.75, Player.Character)
1186
                        SetSpeed(2, 0.75, Player.Character)
1187
                        SetAngle(1, math.rad(45), Player.Character)
1188
                        SetAngle(2, math.rad(45), Player.Character)
1189
                        SetSwordDamage(20, 0.5)
1190
                        for i = 0, 1, 0.25 do
1191
                                pcall(function()
1192
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 + (90 * i)), math.rad(-28.125 + (66.5 * i)), math.rad(-39))
1193
                                end)
1194
                                wait()
1195
                        end
1196
                        wait(0.5)
1197
                        SetSpeed(1, 0.5, Player.Character)
1198
                        SetSpeed(2, 0.5, Player.Character)
1199
                        SetAngle(1, math.rad(90), Player.Character)
1200
                        SetAngle(2, 0, Player.Character)
1201
                        for i = 1, 0, -0.1 do
1202
                                pcall(function()
1203
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
1204
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
1205
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(145 * i), math.rad(146.75 * i), math.rad(-39 * i))
1206
                                end)
1207
                                wait()
1208
                        end
1209
                        pcall(function()
1210
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
1211
                        end)
1212
                        ResetLimbCFrame(1, Player.Character)
1213
                        ResetLimbCFrame(2, Player.Character)
1214
                        EnableLimb(1, Player.Character)
1215
                        EnableLimb(2, Player.Character)
1216
                        DisableLimb(1, Player.Character)
1217
                        CanUse = true
1218
                end
1219
                if Key == "h" then
1220
                        CanUse = false
1221
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
1222
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed / 10
1223
                        SetAngle(1, math.rad(90), Player.Character)
1224
                        SetSwordDamage(10)
1225
                        for i = 0, 1, 0.01 do
1226
                                pcall(function()
1227
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(0, math.rad(360 * 15 * i), 0)
1228
                                end)
1229
                                PlaySound("Slash", "rbxasset://sounds\\swordslash.wav", math.random(125, 200) / 100, 1, false, Player.Character[ModelName].Blade)
1230
                                local Size = math.random(8, 12)
1231
                                local Wave = Instance.new("Part")
1232
                                Wave.Name = "Wave"
1233
                                Wave.BrickColor = BrickColor.new("Light stone grey")
1234
                                Wave.TopSurface = 0
1235
                                Wave.BottomSurface = 0
1236
                                Wave.Transparency = math.cos(i * math.pi * 1.85)
1237
                                Wave.Transparency = Wave.Transparency < 0.4 and 0.4 or Wave.Transparency
1238
                                Wave.Anchored = true
1239
                                Wave.CanCollide = math.random(1, 3) == 1 and true or false
1240
                                Wave.formFactor = "Custom"
1241
                                Wave.Size = Vector3.new(Size, 1, Size)
1242
                                Wave.CFrame = Player.Character["Right Arm"].CFrame * CFrame.new(0, math.random(-150, -125) / 100, 0) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-5, 5)), 0, math.rad(math.random(-5, 5)))
1243
                                Wave.Parent = game:GetService("Workspace")
1244
                                local Mesh = Instance.new("CylinderMesh", Wave)
1245
                                Mesh.Scale = Vector3.new(1, 0.075, 1)
1246
                                coroutine.wrap(function()
1247
                                        for i = Wave.Transparency, 1, 0.1 do
1248
                                                Wave.Transparency = i
1249
                                                wait()
1250
                                        end
1251
                                        Wave:Remove()
1252
                                end)()
1253
                                wait()
1254
                        end
1255
                        pcall(function()
1256
                                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new()
1257
                        end)
1258
                        SetSwordDamage("Default")
1259
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
1260
                        CanUse = true
1261
                end
1262
                if Key == "x" then
1263
                        if Player.Character.Torso.Velocity.x > 2 or Player.Character.Torso.Velocity.y > 2 or Player.Character.Torso.Velocity.z > 2 or Player.Character.Torso.Velocity.x < -2 or Player.Character.Torso.Velocity.y < -2 or Player.Character.Torso.Velocity.z < -2 then return end
1264
                        CanUse = false
1265
                        Player.Character.Torso.Anchored = true
1266
                        Player.Character.Humanoid.PlatformStand = true
1267
                        local Pos = Player.Character.Torso.CFrame
1268
                        DisableLimb(2, Player.Character)
1269
                        DisableLimb(3, Player.Character)
1270
                        DisableLimb(4, Player.Character)
1271
                        SetSpeed(1, 0.3, Player.Character)
1272
                        SetSpeed(2, 0.3, Player.Character)
1273
                        SetSpeed(3, 0.3, Player.Character)
1274
                        SetSpeed(4, 0.3, Player.Character)
1275
                        SetAngle(1, math.rad(90), Player.Character)
1276
                        SetAngle(2, math.rad(90), Player.Character)
1277
                        SetAngle(3, 0, Player.Character)
1278
                        SetAngle(4, 0, Player.Character)
1279
                        for i = 0, 1, 0.25 do
1280
                                pcall(function()
1281
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
1282
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
1283
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-28.125 * i), math.rad(-39 * i))
1284
                                end)
1285
                                wait()
1286
                        end
1287
                        wait(0.1)
1288
                        for i = 0, math.pi, 0.05 do
1289
                                Player.Character.Torso.CFrame = Pos * CFrame.new(0, math.sin(-i) + 0.25, math.sin(-i)) * CFrame.fromEulerAnglesXYZ(math.rad(math.sin(-i) * 80), 0, 0)
1290
                                ForceAngle(3, math.rad(math.sin(i) * 80), Player.Character)
1291
                                ForceAngle(4, math.rad(math.sin(i) * 80), Player.Character)
1292
                                wait()
1293
                        end
1294
                        SetAngle(2, 0, Player.Character)
1295
                        for i = 1, 0, -0.25 do
1296
                                pcall(function()
1297
                                        Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5 - (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (45 * i)), 0)
1298
                                        Player.Character.Torso["Left Shoulder 2"].C0 = CFrame.new(-1.5 + (0.5 * i), 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (45 * i)), 0)
1299
                                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(10 * i), math.rad(-28.125 * i), math.rad(-39 * i))
1300
                                end)
1301
                                wait()
1302
                        end
1303
                        wait(0.1)
1304
                        SetSpeed(1, 0.2, Player.Character)
1305
                        SetSpeed(2, 0.2, Player.Character)
1306
                        SetSpeed(3, 0.1, Player.Character)
1307
                        SetSpeed(4, 0.1, Player.Character)
1308
                        EnableLimb(1, Player.Character)
1309
                        EnableLimb(2, Player.Character)
1310
                        EnableLimb(3, Player.Character)
1311
                        EnableLimb(4, Player.Character)
1312
                        DisableLimb(1, Player.Character)
1313
                        Player.Character.Torso.Velocity = Vector3.new(0, 0, 0)
1314
                        Player.Character.Torso.Anchored = false
1315
                        Player.Character.Humanoid.PlatformStand = false
1316
                        CanUse = true
1317
                end
1318
                if Key == "j" then
1319
                        CanUse = false
1320
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
1321
                        local Direction = (Player.Character.Torso.CFrame.p - (Player.Character.Torso.CFrame * CFrame.new(3, 0, 0)).p).unit
1322
                        Player.Character.Humanoid.WalkSpeed = 0
1323
                        local BodyVelocity = Instance.new("BodyVelocity")
1324
                        BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
1325
                        BodyVelocity.velocity = Direction * (OldWalkSpeed * 10)
1326
                        BodyVelocity.Parent = Player.Character.Torso
1327
                        for i = 1, 20 do
1328
                                BodyVelocity.velocity = BodyVelocity.velocity / 1.2
1329
                                wait()
1330
                        end
1331
                        BodyVelocity:Remove()
1332
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
1333
                        CanUse = true
1334
                end
1335
                if Key == "k" then
1336
                        CanUse = false
1337
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
1338
                        local Direction = (Player.Character.Torso.CFrame.p - (Player.Character.Torso.CFrame * CFrame.new(-3, 0, 0)).p).unit
1339
                        Player.Character.Humanoid.WalkSpeed = 0
1340
                        local BodyVelocity = Instance.new("BodyVelocity")
1341
                        BodyVelocity.maxForce = Vector3.new(math.huge, 0, math.huge)
1342
                        BodyVelocity.velocity = Direction * (OldWalkSpeed * 10)
1343
                        BodyVelocity.Parent = Player.Character.Torso
1344
                        for i = 1, 20 do
1345
                                BodyVelocity.velocity = BodyVelocity.velocity / 1.2
1346
                                wait()
1347
                        end
1348
                        BodyVelocity:Remove()
1349
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
1350
                        CanUse = true
1351
                end
1352
                if Key == "c" then
1353
                        if not Player.Character:findFirstChild("ForceField") then
1354
                                        Instance.new("ForceField", Player.Character)
1355
                        end
1356
                end
1357
                if Key == "v" then
1358
                        if Player.Character:findFirstChild("ForceField") then
1359
                                        Player.Character:findFirstChild("ForceField"):remove()
1360
                        end
1361
                end
1362
                if Key == "b" then
1363
                        Player.Character.Humanoid.MaxHealth = math.huge
1364
                        Player.Character.Humanoid.Health = math.huge
1365
                end
1366
                if Key == "n" then
1367
                        Player.Character.Humanoid.MaxHealth = 100
1368
                        Player.Character.Humanoid.Health = 100
1369
                end
1370
                if Key == "z" then
1371
                        if KeyZDown == true then return end
1372
                        local KeyZMaxTime = 25
1373
                        if KeyZTime == nil then KeyZTime = KeyZMaxTime end
1374
                        if KeyZTime <= 0 then return end
1375
                        CanUse = false
1376
                        KeyZDown = true
1377
                        DisableLimb(2, Player.Character)
1378
                        SetSpeed(1, 0.5, Player.Character)
1379
                        SetSpeed(2, 0.5, Player.Character)
1380
                        SetAngle(1, math.rad(10), Player.Character)
1381
                        SetAngle(2, math.rad(10), Player.Character)
1382
                        local KeyZMovement1 = Player.Character.Humanoid.Running:connect(function(Speed)
1383
                                if Speed > 0 then
1384
                                        SetAngle(1, math.rad(-45), Player.Character)
1385
                                        SetAngle(2, math.rad(-45), Player.Character)
1386
                                else
1387
                                        SetAngle(1, math.rad(10), Player.Character)
1388
                                        SetAngle(2, math.rad(10), Player.Character)
1389
                                end
1390
                        end)
1391
                        local KeyZMovement2 = Player.Character.Humanoid.Jumping:connect(function()
1392
                                --Player.Character.Torso.Velocity = Player.Character.Torso.Velocity + Vector3.new(0, 35, 0)
1393
                                wait()
1394
                                SetAngle(1, math.rad(-45), Player.Character)
1395
                                SetAngle(2, math.rad(-45), Player.Character)
1396
                                wait(0.15)
1397
                                SetAngle(1, math.rad(180), Player.Character)
1398
                                SetAngle(2, math.rad(180), Player.Character)
1399
                                wait(0.5)
1400
                        end)
1401
                        local KeyZMovement3 = Player.Character.Humanoid.FreeFalling:connect(function()
1402
                                SetAngle(1, math.rad(180), Player.Character)
1403
                                SetAngle(2, math.rad(180), Player.Character)
1404
                        end)
1405
                        local Gui = Instance.new("ScreenGui", Player.PlayerGui)
1406
                        Gui.Name = ModelName.. " Stamina Bar"
1407
                        local BarUnderlay = Instance.new("Frame", Gui)
1408
                        BarUnderlay.Name = "BarUnderlay"
1409
                        BarUnderlay.BackgroundColor3 = Color3.new(1, 0, 0)
1410
                        BarUnderlay.BorderColor3 = Color3.new(0, 0, 0)
1411
                        BarUnderlay.Size = UDim2.new(0, 250, 0, 15)
1412
                        BarUnderlay.Position = UDim2.new(1, -300, 1, -100)
1413
                        local BarOverlay = Instance.new("Frame", Gui)
1414
                        BarOverlay.Name = "BarOverlay"
1415
                        BarOverlay.BackgroundColor3 = Color3.new(0, 1, 0)
1416
                        BarOverlay.BorderColor3 = Color3.new(0, 0, 0)
1417
                        BarOverlay.Position = UDim2.new(1, -300, 1, -100)
1418
                        local TextLabel = Instance.new("TextLabel", Gui)
1419
                        TextLabel.Name = "Stamina"
1420
                        TextLabel.Text = "Stamina"
1421
                        TextLabel.BackgroundTransparency = 1
1422
                        TextLabel.BorderSizePixel = 1
1423
                        TextLabel.Size = UDim2.new(0, 250, 0, 15)
1424
                        TextLabel.Position = UDim2.new(1, -300, 1, -100)
1425
                        coroutine.wrap(function()
1426
                                for i = 1, 0, -0.1 do
1427
                                        BarUnderlay.BackgroundTransparency = i
1428
                                        BarOverlay.BackgroundTransparency = i
1429
                                        TextLabel.TextTransparency = i
1430
                                        wait()
1431
                                end
1432
                        end)()
1433
                        local OldWalkSpeed = Player.Character.Humanoid.WalkSpeed
1434
                        Player.Character.Humanoid.WalkSpeed = 0
1435
                        wait(0.1)
1436
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed * 2.5
1437
                        while KeyZDown == true and KeyZTime > 0 and Selected == true do
1438
                                KeyZTime = KeyZTime - 0.1
1439
                                BarOverlay.Size = UDim2.new(0, 250 - ((1 - (KeyZTime / KeyZMaxTime)) * 250), 0, 15)
1440
                                wait()
1441
                        end
1442
                        KeyZMovement1:disconnect()
1443
                        KeyZMovement2:disconnect()
1444
                        KeyZMovement3:disconnect()
1445
                        Player.Character.Humanoid.WalkSpeed = 0
1446
                        wait(0.1)
1447
                        Player.Character.Humanoid.WalkSpeed = OldWalkSpeed
1448
                        SetSpeed(1, 0.2, Player.Character)
1449
                        SetSpeed(2, 0.2, Player.Character)
1450
                        SetAngle(1, math.rad(90), Player.Character)
1451
                        SetAngle(2, 0, Player.Character)
1452
                        EnableLimb(1, Player.Character)
1453
                        EnableLimb(2, Player.Character)
1454
                        DisableLimb(1, Player.Character)
1455
                        while KeyZDown == true and Selected == true do
1456
                                wait()
1457
                        end
1458
                        CanUse = true
1459
                        while KeyZDown == false and KeyZTime < KeyZMaxTime and Selected == true do
1460
                                KeyZTime = KeyZTime + 0.09
1461
                                BarOverlay.Size = UDim2.new(0, 250 - ((1 - (KeyZTime / KeyZMaxTime)) * 250), 0, 15)
1462
                                wait()
1463
                        end
1464
                        coroutine.wrap(function()
1465
                                for i = 0, 1, 0.05 do
1466
                                        BarUnderlay.BackgroundTransparency = i
1467
                                        BarOverlay.BackgroundTransparency = i
1468
                                        TextLabel.TextTransparency = i
1469
                                        wait()
1470
                                end
1471
                                Gui:Remove()
1472
                        end)()
1473
                end
1474
        end
1475
end
1476
1477
1478
function onKeyUp(Key, Mouse)
1479
        if Selected == false then return end
1480
        Key = Key:lower()
1481
        if Key == "z" then
1482
                KeyZDown = false
1483
        elseif Key == "t" then
1484
                KeyTDown = false
1485
        elseif Key == "y" then
1486
                KeyYDown = false
1487
        end
1488
        if CheckPlayer() == true then
1489
                if Button1Down == false and CanUse == true then
1490
                        
1491
                end
1492
        end
1493
end
1494
1495
1496
function onSelected(Mouse)
1497
        if script.Parent.Active == false then return end
1498
        if Selected == true then return end
1499
        while true do
1500
                if Player.Character:findFirstChild("Black Katana (Holstered)") and Player.Character:findFirstChild("Back Katana") then
1501
                        Player.Character:findFirstChild("Black Katana (Holstered)"):remove()
1502
                end
1503
                if CheckPlayer() == true then
1504
                        if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil then
1505
                                break
1506
                        end
1507
                end
1508
                wait(0.1)
1509
        end
1510
        Selected = true
1511
        if script.Parent.Active == false then return end
1512
        CanUse = false
1513
        DisableLimb(1, Player.Character)
1514
        SetSpeed(1, 0.5, Player.Character)
1515
        SetAngle(1, 0, Player.Character)
1516
        DisableLimb(2, Player.Character)
1517
        SetSpeed(2, 0.5, Player.Character)
1518
        SetAngle(2, 0, Player.Character)
1519
        wait(0.05)
1520
        for i = 0, 1, 0.1 do
1521
                pcall(function()
1522
                        Player.Character.Torso["Right Shoulder 2"].C0 =
1523
                                CFrame.new(-0.05 * i, 0.11 * i, -0.8 * i) * CFrame.fromEulerAnglesXYZ(math.rad(50) * i, 0, math.rad(-45) * i) *
1524
                                CFrame.new(1.5 * (1 - i), 0.5 * (1 - i), 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
1525
                        Player.Character.Torso["Right Shoulder 2"].C1 =
1526
                                CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
1527
                end)
1528
                wait()
1529
        end
1530
        RemoveParts(Player.Character, 1)
1531
        CreateParts(Player.Character, 2)
1532
        pcall(function()
1533
                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(-0.05, 0.11, -0.8) * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, math.rad(-45))
1534
                Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
1535
                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0, 0, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(200), 0, math.rad(-45))
1536
        end)
1537
        wait(0.1)
1538
        PlaySound("Unsheath", "rbxasset://sounds\\unsheath.wav", 1.25, 1, false, Player.Character[ModelName].Sheath)
1539
        SetSwordDamage(10, 0.5)
1540
        SetSpeed(2, 0.025, Player.Character)
1541
        SetAngle(2, math.rad(-15), Player.Character)
1542
        for i = 0, 1, 0.1 do
1543
                pcall(function()
1544
                        Player.Character.Torso["Right Shoulder 2"].C0 =
1545
                                CFrame.new(-0.05 + (0.4 * i), 0.11 + (0.49 * i), -0.8 - (0.1 * i)) * CFrame.fromEulerAnglesXYZ(math.rad(50 + (130 * i)), 0, math.rad(-45 + (10 * i)))
1546
                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * i, 0, -0.5 * i) * CFrame.fromEulerAnglesXYZ(math.rad(200 + (87.5 * i)), 0, math.rad(-45 - (3 * i)))
1547
                        Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(150 - (40 * i)), math.rad(17.5 * i), 0)
1548
                        Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.1 - (0.375 * i), -1.75, 0.5 - (0.2 * i))
1549
                end)
1550
                wait()
1551
        end
1552
        SetAngle(2, 0, Player.Character)
1553
        pcall(function()
1554
                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(0.35, 0.6, -0.9) * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, math.rad(-35))
1555
                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2, 0, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(287.5), 0, math.rad(-48))
1556
                Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110), math.rad(17.5), 0)
1557
                Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475, -1.75, 0.3)
1558
        end)
1559
        SetAngle(1, math.rad(90), Player.Character)
1560
        for i = 0, 1, 0.1 do
1561
                pcall(function()
1562
                        Player.Character.Torso["Right Shoulder 2"].C0 =
1563
                                CFrame.new(1.5 * i, 0.5 * i, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0) *
1564
                                CFrame.new(0.35 * (1 - i), 0.6 * (1 - i), -0.9 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(180 * (1 - i)), 0, math.rad(-35 * (1 - i)))
1565
                        Player.Character.Torso["Right Shoulder 2"].C1 =
1566
                                CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0)
1567
                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * (1 - i), 0, -0.5 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(287.5 * (1 - i)), 0, math.rad(-48 * (1 - i)))
1568
                        Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110 + (40 * i)), math.rad(17.5 * (1 - i)), 0)
1569
                        Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475 + (0.375 * i), -1.75, 0.3 + (0.2 * i))
1570
                end)
1571
                wait()
1572
        end
1573
        ResetLimbCFrame(1, Player.Character)
1574
        EnableLimb(1, Player.Character)
1575
        SetSpeed(2, 0.2, Player.Character)
1576
        SetAngle(2, 0, Player.Character)
1577
        EnableLimb(2, Player.Character)
1578
        DisableLimb(1, Player.Character)
1579
        Mouse.Icon = "rbxasset://textures\\GunCursor.png"
1580
        Mouse.Button1Down:connect(function() onButton1Down(Mouse) end)
1581
        Mouse.Button1Up:connect(function() onButton1Up(Mouse) end)
1582
        Mouse.KeyDown:connect(function(Key) onKeyDown(Key, Mouse) end)
1583
        Mouse.KeyUp:connect(function(Key) onKeyUp(Key, Mouse) end)
1584
        CanUse = true
1585
end
1586
1587
1588
function onDeselected(Mouse)
1589
        if Selected == false then return end
1590
        Selected = false
1591
        while CanUse == false do wait() end
1592
        RemoveParts(Player.Character, 2)
1593
        CreateParts(Player.Character, 1)
1594
        while Selected == false do
1595
                if CheckPlayer() == true then
1596
                        if Player.Character.Torso:FindFirstChild("Right Shoulder 2") ~= nil then
1597
                                break
1598
                        end
1599
                end
1600
                wait(0.1)
1601
        end
1602
        if Selected == true then return end
1603
        CanUse = false
1604
        RemoveParts(Player.Character, 1)
1605
        CreateParts(Player.Character, 2)
1606
        SetSpeed(1, 0.5, Player.Character)
1607
        SetAngle(1, 0, Player.Character)
1608
        DisableLimb(2, Player.Character)
1609
        SetSpeed(2, 0.5, Player.Character)
1610
        SetAngle(2, 0, Player.Character)
1611
        wait(0.1)
1612
        SetSpeed(2, 0.025, Player.Character)
1613
        SetAngle(2, math.rad(-15), Player.Character)
1614
        for i = 1, 0, -0.1 do
1615
                pcall(function()
1616
                        Player.Character.Torso["Right Shoulder 2"].C0 =
1617
                                CFrame.new(1.5 * i, 0.5 * i, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0) *
1618
                                CFrame.new(0.35 * (1 - i), 0.6 * (1 - i), -0.9 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(180 * (1 - i)), 0, math.rad(-35 * (1 - i)))
1619
                        Player.Character.Torso["Right Shoulder 2"].C1 =
1620
                                CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * i, 0)
1621
                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * (1 - i), 0, -0.5 * (1 - i)) * CFrame.fromEulerAnglesXYZ(math.rad(287.5 * (1 - i)), 0, math.rad(-48 * (1 - i)))
1622
                        Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110 + (40 * i)), math.rad(17.5 * (1 - i)), 0)
1623
                        Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475 + (0.375 * i), -1.75, 0.3 + (0.2 * i))
1624
                end)
1625
                wait()
1626
        end
1627
        pcall(function()
1628
                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(0.35, 0.6, -0.9) * CFrame.fromEulerAnglesXYZ(math.rad(180), 0, math.rad(-35))
1629
                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2, 0, -0.5) * CFrame.fromEulerAnglesXYZ(math.rad(287.5), 0, math.rad(-48))
1630
                Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(110), math.rad(17.5), 0)
1631
                Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.475, -1.75, 0.3)
1632
        end)
1633
        PlaySound("Sheath", "rbxasset://sounds\\unsheath.wav", -1.1, 1, true, Player.Character[ModelName].Sheath)
1634
        coroutine.wrap(function()
1635
                while Player.Character[ModelName].Sheath:FindFirstChild("Sheath") == nil do
1636
                        wait()
1637
                end
1638
                wait(0.05)
1639
                Player.Character[ModelName].Sheath.Sheath.Looped = false
1640
        end)()
1641
        wait(0.15)
1642
        SetAngle(2, 0, Player.Character)
1643
        for i = 1, 0, -0.1 do
1644
                pcall(function()
1645
                        Player.Character.Torso["Right Shoulder 2"].C0 =
1646
                                CFrame.new(-0.05 + (0.4 * i), 0.11 + (0.49 * i), -0.8 - (0.1 * i)) * CFrame.fromEulerAnglesXYZ(math.rad(50 + (130 * i)), 0, math.rad(-45 + (10 * i)))
1647
                        Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0.2 * i, 0, -0.5 * i) * CFrame.fromEulerAnglesXYZ(math.rad(200 + (87.5 * i)), 0, math.rad(-45 - (3 * i)))
1648
                        Player.Character[ModelName].Sheath.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(150 - (40 * i)), math.rad(17.5 * i), 0)
1649
                        Player.Character[ModelName].Sheath.Weld.C1 = CFrame.new(-1.1 - (0.375 * i), -1.75, 0.5 - (0.2 * i))
1650
                end)
1651
                wait()
1652
        end
1653
        pcall(function()
1654
                Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(-0.05, 0.11, -0.8) * CFrame.fromEulerAnglesXYZ(math.rad(50), 0, math.rad(-45))
1655
                Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0)
1656
                Player.Character[ModelName].Handle.Weld.C0 = CFrame.new(0, 0, -0.1) * CFrame.fromEulerAnglesXYZ(math.rad(200), 0, math.rad(-45))
1657
        end)
1658
        RemoveParts(Player.Character, 2)
1659
        CreateParts(Player.Character, 1)
1660
        for i = 1, 0, -0.1 do
1661
                pcall(function()
1662
                        Player.Character.Torso["Right Shoulder 2"].C0 =
1663
                                CFrame.new(-0.05 * i, 0.11 * i, -0.8 * i) * CFrame.fromEulerAnglesXYZ(math.rad(50) * i, 0, math.rad(-45) * i) *
1664
                                CFrame.new(1.5 * (1 - i), 0.5 * (1 - i), 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
1665
                        Player.Character.Torso["Right Shoulder 2"].C1 =
1666
                                CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90) * (1 - i), 0)
1667
                end)
1668
                wait()
1669
        end
1670
        SetSpeed(1, 0.25, Player.Character)
1671
        SetAngle(1, 0, Player.Character)
1672
        ResetLimbCFrame(1, Player.Character)
1673
        EnableLimb(1, Player.Character)
1674
        SetSpeed(2, 0.2, Player.Character)
1675
        SetAngle(2, 0, Player.Character)
1676
        EnableLimb(2, Player.Character)
1677
        CanUse = true
1678
end
1679
1680
1681
if script:FindFirstChild("SoundData") ~= nil then
1682
        local Sound = Instance.new("Sound")
1683
        Sound.Name = script.SoundData._Name.Value
1684
        Sound.SoundId = script.SoundData._SoundId.Value
1685
        Sound.Pitch = script.SoundData._Pitch.Value
1686
        Sound.Volume = script.SoundData._Volume.Value
1687
        Sound.Looped = script.SoundData._Looped.Value
1688
        Sound.Parent = script.SoundData._Parent.Value
1689
        Sound:Play()
1690
        script:Remove()
1691
elseif script:FindFirstChild("DamageData") ~= nil then
1692
        script.Parent.Touched:connect(function(Hit)
1693
                if Hit.Parent == nil then return end
1694
                if script.DamageData.Break.Value == true then Hit:BreakJoints() end
1695
                if Hit.Parent:FindFirstChild("Humanoid") == nil then return end
1696
                Hit.Parent.Humanoid:TakeDamage(script.DamageData.Damage.Value)
1697
        end)
1698
elseif script.Parent.className ~= "HopperBin" then
1699
        if Player == nil then print("Error: Player not found!") return end
1700
        Tool = Instance.new("HopperBin")
1701
        Tool.Name = ModelName
1702
        Tool.Parent = Player.Backpack
1703
        script.Name = "Main"
1704
        script.Parent = Tool
1705
elseif script.Parent.className == "HopperBin" and Connected == false then
1706
        Connected = true
1707
        Player = script.Parent.Parent.Parent
1708
        script.Parent.Selected:connect(onSelected)
1709
        script.Parent.Deselected:connect(onDeselected)
1710
        CreateParts(Player.Character, 1)
1711
end