Advertisement
KrYn0MoRe

deepwoken sword

Jun 1st, 2022 (edited)
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 34.44 KB | None | 0 0
  1. -- made by 707_maid
  2. -- edited by KrYn0MoRe
  3.  
  4. local plr = owner
  5. local char = plr.Character
  6. local hrp = char:FindFirstChild("HumanoidRootPart")
  7. local hum = char:FindFirstChild("Humanoid")
  8. local Randomness = Random.new()
  9. local wspeed = 1 -- ingame weapon speed stat
  10. local parry_time = 0.2+0.1
  11. local stun_time = 0.4
  12.  
  13. local equipped = false
  14.  
  15. local currentparry = false
  16. local stunned = false
  17. local attacking = false
  18. local parrying = false
  19. local dodging = false
  20. local pc = false
  21. local parryhitConf = false
  22. local pid = 0
  23.  
  24. function can_use()
  25.     if equipped then
  26.         return true
  27.     end
  28. end
  29.  
  30. -- when player equips tool, add welds AND animate
  31.  
  32. -- when player unequips tool, remove all welds.
  33.  
  34. local tool = Instance.new("Tool")
  35.  
  36. local pos1 = CFrame.new(0, .2, -1.5) * CFrame.Angles(0, math.rad(90), math.rad(90))
  37. tool.Grip = pos1
  38. tool.Name = "Sword of Ages Past"
  39. tool.ToolTip = "Deepwoken Combat(?)"
  40. tool.CanBeDropped = false
  41. script.Parent = tool
  42.  
  43. local handle = Instance.new("Part")
  44. handle.Name = "Handle"
  45. handle.Massless = true
  46. handle.Size = Vector3.new(1, 1, 5)
  47. handle.Parent = tool
  48.  
  49. local handlemesh = Instance.new("SpecialMesh")
  50. handlemesh.MeshId = "rbxasset://fonts/sword.mesh"
  51. handlemesh.TextureId = "rbxasset://textures/SwordTexture.png"
  52. handlemesh.Parent = handle
  53.  
  54. local swordswing = Instance.new("Sound")
  55. swordswing.SoundId = "rbxassetid://8907343824" --4954439454
  56. swordswing.Parent = handle
  57.  
  58. local swordhit = Instance.new("Sound")
  59. swordhit.SoundId = "rbxassetid://4981805515"
  60. swordhit.Volume = 2
  61. swordhit.Parent = handle
  62.  
  63. local Unsheath = Instance.new("Sound")
  64. Unsheath.SoundId = "http://www.roblox.com/asset/?id=12222225"
  65. Unsheath.Parent = handle
  66.  
  67. tool.Parent = plr.Backpack
  68.  
  69. local tweenService = game:GetService("TweenService")
  70. local tweenservice = game:GetService("TweenService")
  71.  
  72. hitpart = nil
  73. Weld1 = nil
  74.  
  75. function Tween(name,style,dirc,time1,cf)
  76.     local twi = TweenInfo.new(time1, Enum.EasingStyle[style], Enum.EasingDirection[dirc], 0, false, 0)
  77.     tweenservice:Create(name, twi, {C0 = cf}):Play()
  78. end
  79. -- so i figured out that the ABOVE tween stacks on top of my animation player, so this may be very cool if it works.
  80.  
  81. local Attachment0
  82. function parryparticle(parent, power)
  83.     if not Attachment0 then
  84.         if not Attachment0 then
  85.             Attachment0 = Instance.new("Attachment")
  86.             ParticleEmitter1 = Instance.new("ParticleEmitter")
  87.             ParticleEmitter2 = Instance.new("ParticleEmitter")
  88.             ParticleEmitter3 = Instance.new("ParticleEmitter")
  89.             ParticleEmitter4 = Instance.new("ParticleEmitter")
  90.             ParticleEmitter5 = Instance.new("ParticleEmitter")
  91.             ParticleEmitter6 = Instance.new("ParticleEmitter")
  92.         end
  93.  
  94.         ParticleEmitter1.Name = "9"
  95.         ParticleEmitter1.Parent = Attachment0
  96.         ParticleEmitter1.Speed = NumberRange.new(24.5, 42)
  97.         ParticleEmitter1.Orientation = Enum.ParticleOrientation.VelocityParallel
  98.         ParticleEmitter1.Rotation = NumberRange.new(90, 90)
  99.         ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647))
  100.         ParticleEmitter1.Enabled = false
  101.         ParticleEmitter1.LightEmission = 1
  102.         ParticleEmitter1.LightInfluence = 0.25
  103.         ParticleEmitter1.Texture = "rbxassetid://6967099425"
  104.         ParticleEmitter1.Size = NumberSequence.new(2.581249952316284,1.5750000476837158,0.7875000238418579,0)
  105.         ParticleEmitter1.Brightness = 7
  106.         ParticleEmitter1.Acceleration = Vector3.new(0, -17.5, 0)
  107.         ParticleEmitter1.Drag = 7
  108.         ParticleEmitter1.EmissionDirection = Enum.NormalId.Bottom
  109.         ParticleEmitter1.Lifetime = NumberRange.new(0.25, 0.4000000059604645)
  110.         ParticleEmitter1.Rate = 100
  111.         ParticleEmitter1.SpreadAngle = Vector2.new(360, -360)
  112.         ParticleEmitter1.VelocityInheritance = -0.04500000178813934
  113.         ParticleEmitter1.VelocitySpread = 360
  114.         ParticleEmitter2.Name = "3"
  115.         ParticleEmitter2.Parent = Attachment0
  116.         ParticleEmitter2.Speed = NumberRange.new(-0.2875387966632843, 0.2875387966632843)
  117.         ParticleEmitter2.Orientation = Enum.ParticleOrientation.VelocityPerpendicular
  118.         ParticleEmitter2.Rotation = NumberRange.new(-360, 360)
  119.         ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647))
  120.         ParticleEmitter2.Enabled = false
  121.         ParticleEmitter2.LightEmission = 1
  122.         ParticleEmitter2.Texture = "rbxassetid://6862984716"
  123.         ParticleEmitter2.Transparency = NumberSequence.new(0,0.675000011920929,0.9312499761581421,1)
  124.         ParticleEmitter2.ZOffset = 0.13860000669956207
  125.         ParticleEmitter2.Size = NumberSequence.new{
  126.             NumberSequenceKeypoint.new(0,0),
  127.             NumberSequenceKeypoint.new(0.08,1.7155100107192993),
  128.             NumberSequenceKeypoint.new(0.23,3.6328399181365967),
  129.             NumberSequenceKeypoint.new(0.5,5.3483500480651855),
  130.             NumberSequenceKeypoint.new(1,6.3574700355529785)
  131.         }
  132.         ParticleEmitter2.Brightness = 1.25
  133.         ParticleEmitter2.EmissionDirection = Enum.NormalId.Front
  134.         ParticleEmitter2.Lifetime = NumberRange.new(0.10000000149011612, 0.41999998688697815)
  135.         ParticleEmitter2.Rate = 25
  136.         ParticleEmitter2.RotSpeed = NumberRange.new(-1050, -700)
  137.         ParticleEmitter2.SpreadAngle = Vector2.new(360, -360)
  138.         ParticleEmitter2.VelocitySpread = 360
  139.         ParticleEmitter3.Name = "13"
  140.         ParticleEmitter3.Parent = Attachment0
  141.         ParticleEmitter3.Speed = NumberRange.new(22.399999618530273, 22.399999618530273)
  142.         ParticleEmitter3.Orientation = Enum.ParticleOrientation.VelocityParallel
  143.         ParticleEmitter3.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647))
  144.         ParticleEmitter3.Enabled = false
  145.         ParticleEmitter3.LightEmission = 1
  146.         ParticleEmitter3.LightInfluence = 0.25
  147.         ParticleEmitter3.Texture = "rbxassetid://7180700683"
  148.         ParticleEmitter3.ZOffset = 0.0279999990016222
  149.         ParticleEmitter3.Size = NumberSequence.new{NumberSequenceKeypoint.new(0,0.3),NumberSequenceKeypoint.new(0.235,0.1559160053730011),NumberSequenceKeypoint.new(0.58,0.05197190120816231),NumberSequenceKeypoint.new(1,0)}
  150.         ParticleEmitter3.Brightness = 3
  151.         ParticleEmitter3.Acceleration = Vector3.new(0, -3.8499999046325684, 0)
  152.         ParticleEmitter3.Drag = 8
  153.         ParticleEmitter3.EmissionDirection = Enum.NormalId.Front
  154.         ParticleEmitter3.Lifetime = NumberRange.new(0.5, 1)
  155.         ParticleEmitter3.Rate = 40
  156.         ParticleEmitter3.RotSpeed = NumberRange.new(-200, 200)
  157.         ParticleEmitter3.SpreadAngle = Vector2.new(360, -360)
  158.         ParticleEmitter3.VelocityInheritance = -0.04500000178813934
  159.         ParticleEmitter3.VelocitySpread = 360
  160.         ParticleEmitter4.Name = "6"
  161.         ParticleEmitter4.Parent = Attachment0
  162.         ParticleEmitter4.Speed = NumberRange.new(0.0020909467712044716, 0.0020909467712044716)
  163.         ParticleEmitter4.Orientation = Enum.ParticleOrientation.VelocityPerpendicular
  164.         ParticleEmitter4.Rotation = NumberRange.new(-360, 360)
  165.         ParticleEmitter4.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647))
  166.         ParticleEmitter4.Enabled = false
  167.         ParticleEmitter4.LightEmission = 1
  168.         ParticleEmitter4.LightInfluence = 0.25
  169.         ParticleEmitter4.Texture = "rbxassetid://7162072137"
  170.         ParticleEmitter4.Transparency = NumberSequence.new(0,0,0.02500000037252903,0.375,0.737500011920929,0.9375,0.956250011920929,1)
  171.         ParticleEmitter4.ZOffset = 0.27937400341033936
  172.         ParticleEmitter4.Size = NumberSequence.new(0,5.167019844055176,6.034480094909668,6.034480094909668,6.034480094909668)
  173.         ParticleEmitter4.Brightness = 3
  174.         ParticleEmitter4.EmissionDirection = Enum.NormalId.Front
  175.         ParticleEmitter4.Lifetime = NumberRange.new(0.15000000596046448, 0.6000000238418579)
  176.         ParticleEmitter4.Rate = 45
  177.         ParticleEmitter4.RotSpeed = NumberRange.new(-50, 50)
  178.         ParticleEmitter4.SpreadAngle = Vector2.new(360, -360)
  179.         ParticleEmitter4.VelocitySpread = 360
  180.         ParticleEmitter5.Name = "11"
  181.         ParticleEmitter5.Parent = Attachment0
  182.         ParticleEmitter5.Speed = NumberRange.new(0.0638682097196579, 0.0638682097196579)
  183.         ParticleEmitter5.Rotation = NumberRange.new(-360, 360)
  184.         ParticleEmitter5.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647))
  185.         ParticleEmitter5.Enabled = false
  186.         ParticleEmitter5.LightEmission = 1
  187.         ParticleEmitter5.LightInfluence = 0.25
  188.         ParticleEmitter5.Texture = "rbxassetid://7153311499"
  189.         ParticleEmitter5.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.3,0),NumberSequenceKeypoint.new(0.45,0.04374999925494194),NumberSequenceKeypoint.new(0.5,0.5874999761581421),NumberSequenceKeypoint.new(0.625,0.831250011920929),NumberSequenceKeypoint.new(0.95,0.9624999761581421),NumberSequenceKeypoint.new(1,1)}
  190.         ParticleEmitter5.ZOffset = 0.1574999988079071
  191.         ParticleEmitter5.Size = NumberSequence.new{NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.2,2.7942299842834473),NumberSequenceKeypoint.new(0.5,3.632499933242798),NumberSequenceKeypoint.new(1,4.071599960327148)}
  192.         ParticleEmitter5.Brightness = 2
  193.         ParticleEmitter5.EmissionDirection = Enum.NormalId.Front
  194.         ParticleEmitter5.Lifetime = NumberRange.new(0.15000000596046448, 0.550000011920929)
  195.         ParticleEmitter5.Rate = 35
  196.         ParticleEmitter5.RotSpeed = NumberRange.new(500, 2000)
  197.         ParticleEmitter5.SpreadAngle = Vector2.new(360, -360)
  198.         ParticleEmitter5.VelocitySpread = 360
  199.         ParticleEmitter6.Name = "3"
  200.         ParticleEmitter6.Parent = Attachment0
  201.         ParticleEmitter6.Speed = NumberRange.new(-0.13348077237606049, 0.13348077237606049)
  202.         ParticleEmitter6.Orientation = Enum.ParticleOrientation.VelocityPerpendicular
  203.         ParticleEmitter6.Rotation = NumberRange.new(-360, 360)
  204.         ParticleEmitter6.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647))
  205.         ParticleEmitter6.Enabled = false
  206.         ParticleEmitter6.LightEmission = 1
  207.         ParticleEmitter6.LightInfluence = 0.25
  208.         ParticleEmitter6.Texture = "rbxassetid://7160024951"
  209.         ParticleEmitter6.ZOffset = -0.17499999701976776
  210.         ParticleEmitter6.Size = NumberSequence.new{
  211.             NumberSequenceKeypoint.new(0,0),
  212.             NumberSequenceKeypoint.new(0.05,0.610414981842041),
  213.             NumberSequenceKeypoint.new(0.113,2.1983799934387207),
  214.             NumberSequenceKeypoint.new(0.149,4.335229873657227),
  215.             NumberSequenceKeypoint.new(0.187,6.656670093536377),
  216.             NumberSequenceKeypoint.new(0.196,6.824490070343018),
  217.             NumberSequenceKeypoint.new(0.208,6.600729942321777),
  218.             NumberSequenceKeypoint.new(0.218,5.733689785003662),
  219.             NumberSequenceKeypoint.new(0.242,3.6639599800109863),
  220.             NumberSequenceKeypoint.new(0.276,2.013780117034912),
  221.             NumberSequenceKeypoint.new(0.313,1.0307400226593018),
  222.             NumberSequenceKeypoint.new(0.344,0.5097079873085022),
  223.             NumberSequenceKeypoint.new(0.369,0.2718450129032135),
  224.             NumberSequenceKeypoint.new(0.401,0.15857599675655365),
  225.             NumberSequenceKeypoint.new(0.44,0.056633900851011276),
  226.             NumberSequenceKeypoint.new(0.524,0),
  227.             NumberSequenceKeypoint.new(1,0)
  228.         }
  229.         ParticleEmitter6.Brightness = 5
  230.         ParticleEmitter6.EmissionDirection = Enum.NormalId.Front
  231.         ParticleEmitter6.Lifetime = NumberRange.new(0.6499999761581421, 0.949999988079071)
  232.         ParticleEmitter6.Rate = 27
  233.         ParticleEmitter6.RotSpeed = NumberRange.new(111, 111)
  234.         ParticleEmitter6.SpreadAngle = Vector2.new(360, -360)
  235.         ParticleEmitter6.VelocitySpread = 360
  236.     end
  237.     local awr = (power/10)*2
  238.     awr = math.clamp(awr,1,power+1)
  239.     Attachment0.Parent = parent
  240.     for i,v in pairs(Attachment0:GetChildren()) do
  241.         v:Emit(awr)
  242.     end
  243. end
  244.  
  245.  
  246. function makewelds(target)
  247.     local WeldFolder = Instance.new("Folder")
  248.     WeldFolder.Parent = target
  249.     local RSweld = Instance.new("Weld")
  250.     local motor = target.Torso["Right Shoulder"]
  251.     WeldFolder.Name = "WeldFolder"
  252.     RSweld.C0 = motor.C0
  253.     RSweld.C1 = motor.C1
  254.     RSweld.Parent = WeldFolder
  255.     RSweld.Name = "Right Shoulder"
  256.     RSweld.Part0 = motor.Part0
  257.     RSweld.Part1 = motor.Part1
  258.  
  259.     local LSweld = Instance.new("Weld")
  260.     local motor = target.Torso["Left Shoulder"]
  261.     LSweld.C0 = motor.C0
  262.     LSweld.C1 = motor.C1
  263.     LSweld.Parent = WeldFolder
  264.     LSweld.Name = "Left Shoulder"
  265.     LSweld.Part0 = motor.Part0
  266.     LSweld.Part1 = motor.Part1
  267.  
  268.     local NKweld = Instance.new("Weld")
  269.     local motor = target.Torso["Neck"]
  270.     NKweld.C0 = motor.C0
  271.     NKweld.C1 = motor.C1
  272.     NKweld.Parent = WeldFolder
  273.     NKweld.Name = "Neck"
  274.     NKweld.Part0 = motor.Part0
  275.     NKweld.Part1 = motor.Part1
  276.  
  277.     local TSweld = Instance.new("Weld")
  278.     local motor = target.HumanoidRootPart["RootJoint"]
  279.     TSweld.C0 = motor.C0
  280.     TSweld.C1 = motor.C1
  281.     TSweld.Parent = WeldFolder
  282.     TSweld.Name = "RootJoint"
  283.     TSweld.Part0 = motor.Part0
  284.     TSweld.Part1 = motor.Part1
  285.     if target == char then
  286.         RA = RSweld
  287.         LA = LSweld
  288.         NE = NKweld
  289.         RJ = TSweld
  290.     end
  291. end
  292. local CF = CFrame.new
  293. local rightdefault = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  294. local leftdefault = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  295. local headdefault = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  296. local torsodefault = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  297.  
  298. local hurttorso = CFrame.new(0, 0, 0.200000018, -1, 0, 0, 0, -0.173648179, 0.98480773, 0, 0.98480773, 0.173648179)
  299. local hurthead = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0.087155737, 0.99619478, 0, 0.99619478, -0.087155737)
  300. local hurtright = CFrame.new(1.00000024, 0.499999762, -1.04308128e-07, 0.355492771, -0.669611037, 0.652108967, 0.569246948, 0.708471239, 0.417164922, -0.741338611, 0.222911909, 0.633030415)
  301. local hurtleft = CFrame.new(-0.999999881, 0.500000119, -5.96046448e-08, 0.409517139, 0.706587732, -0.577087164, -0.667111874, 0.66341418, 0.338885576, 0.622300088, 0.246202216, 0.743052542)
  302.  
  303. RightArmC0,LeftArmC0,TorsoC0,HeadC0 = rightdefault,leftdefault,torsodefault,headdefault
  304.  
  305. function removewelds()
  306.     Tween(RA, "Cubic", "Out", 0.2, rightdefault)
  307.     Tween(LA, "Cubic", "Out", 0.2, leftdefault)
  308.     Tween(RJ, "Cubic", "Out", 0.2, torsodefault)
  309.     Tween(NE, "Cubic", "Out", 0.2, headdefault)
  310.     task.wait(0.2)
  311.     pcall(function()
  312.         char:FindFirstChild("WeldFolder"):Destroy()
  313.     end)
  314. end
  315.  
  316. -- Animations put in functions to make it easier to read
  317.  
  318. function idle()
  319.     Tween(RA, "Cubic", "Out", 0.5, rightdefault * CF(0.253123045, -0.0402455032, -0.207198858, 0.554888189, -0.785348475, -0.274457037, 0.826460123, 0.558132231, 0.0738362223, 0.0951962918, -0.267798901, 0.958760262))
  320.     Tween(LA, "Cubic", "Out", 0.5, leftdefault * CF(-0.0372788236, -0.0369110703, -0.00934666395, 0.998309314, -0.0121976202, -0.0568294711, 0.0300782546, 0.945051253, 0.325535834, 0.0497359969, -0.326694846, 0.943820357))
  321.     Tween(RJ, "Cubic", "Out", 0.5, torsodefault * CF(0, 0, 0, 0.871976554, -0.489547729, 0, 0.489547729, 0.871976554, 0, 0, 0, 1))
  322.     Tween(NE, "Cubic", "Out", 0.5, headdefault * CF(0, 0, 0, 0.894356966, 0.447353959, 0, -0.447353959, 0.894356966, 0, 0, 0, 1))
  323. end
  324.  
  325. function parryinit()
  326.     Tween(RJ, "Linear", "Out", 0.1, TorsoC0 * CF(0, 0, -0.017364502, 0.890735924, -0.454521209, 0, 0.454521209, 0.890735924, 0, 0, 0, 1)
  327.     )
  328.     Tween(NE, "Linear", "Out", 0.1, HeadC0 * CF(0, 0, 0, 0.924134791, 0.382066369, 0, -0.382066369, 0.924134791, 0, 0, 0, 1)
  329.     )
  330.     Tween(RA, "Linear", "Out", 0.1, RightArmC0 * CF(0.437100291, -0.210086942, -0.490853608, -0.201303929, -0.387932032, 0.899436057, 0.902729988, 0.282938659, 0.324074328, -0.380204141, 0.877185285, 0.293241322)
  331.     )
  332.     Tween(LA, "Linear", "Out", 0.1, LeftArmC0 * CF(2.40281224e-07, 2.38418579e-07, 2.98023224e-07, 0.997926712, 0.0621465854, 0.0167354792, -0.0639483929, 0.928053439, 0.366916031, 0.00727114081, -0.367225528, 0.930103421)
  333.     )
  334.     task.wait(parry_time-0.2)
  335.     Tween(RJ, "Linear", "Out", 0.2, TorsoC0 * CF(0, 0, -0.017364502, 0.872435212, -0.488729805, 0, 0.488729805, 0.872435212, 0, 0, 0, 1)
  336.     )
  337.     Tween(NE, "Linear", "Out", 0.2, HeadC0 * CF(0, 0, 0, 0.892648876, 0.450752497, 0, -0.450752497, 0.892648876, 0, 0, 0, 1)
  338.     )
  339.     Tween(RA, "Linear", "Out", 0.2, RightArmC0 * CF(0.437095642, -0.210086823, -0.490859985, -0.328281432, -0.406485021, 0.852643549, 0.935400903, -0.0143626994, 0.353297114, -0.131363764, 0.913544416, 0.384941578)
  340.     )
  341.     Tween(LA, "Linear", "Out", 0.2, LeftArmC0 * CF(2.40281224e-07, 1.49011612e-07, 3.57627869e-07, 0.997926712, 0.0575846173, 0.0287451968, -0.0639483929, 0.836690366, 0.543929815, 0.00727114081, -0.544640303, 0.838638067)
  342.     )
  343.     task.wait(0.2)
  344.     if parrying then return end
  345.     Tween(RJ, "Linear", "Out", 0.2, TorsoC0 * CF(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  346.     )
  347.     Tween(NE, "Linear", "Out", 0.2, HeadC0 * CF(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  348.     )
  349.     Tween(RA, "Linear", "Out", 0.2, RightArmC0 * CF(5.96046448e-08, -1.49011612e-08, 3.27825546e-07, 0.0511461198, -0.810129523, 0.584015608, 0.724196732, 0.432763249, 0.536893904, -0.687694073, 0.395482183, 0.608827233)
  350.     )
  351.     Tween(LA, "Linear", "Out", 0.2, LeftArmC0 * CF(2.40281224e-07, 2.38418579e-07, 2.98023224e-07, 0.997926712, 0.0621465854, 0.0167354792, -0.0639483929, 0.928053439, 0.366916031, 0.00727114081, -0.367225528, 0.930103421)
  352.     )
  353. end
  354.  
  355. function parryhit1()
  356.     Tween(RJ, "Cubic", "Out", 0, TorsoC0 * CF(0, 0, -0.237365723, 0.997615039, -0.0690237582, 0, 0.0690237582, 0.997615039, 0, 0, 0, 1))
  357.     Tween(NE, "Cubic", "Out", 0, HeadC0 * CF(0, 0, 0, 0.992203534, -0.124628134, 0, 0.124628134, 0.992203534, 0, 0, 0, 1))
  358.     Tween(RA, "Cubic", "Out", 0, RightArmC0 * CF(0.437100291, -0.210086942, -0.490853608, -0.201303929, -0.387932032, 0.899436057, 0.902729988, 0.282938659, 0.324074328, -0.380204141, 0.877185285, 0.293241322))
  359.     Tween(LA, "Cubic", "Out", 0, leftdefault)
  360.     task.wait()
  361.     Tween(RJ, "Cubic", "Out", 0.25/wspeed, TorsoC0 * CF(0, 0, -0.237365723, 0.741440952, 0.671018124, 0, -0.671018124, 0.741440952, 0, 0, 0, 1))
  362.     Tween(NE, "Cubic", "Out", 0.25/wspeed, HeadC0 * CF(0, 0, 0, 0.84392333, -0.536463618, 0, 0.536463618, 0.84392333, 0, 0, 0, 1))
  363.     Tween(RA, "Cubic", "Out", 0.25/wspeed, RightArmC0 * CF(0.275326729, 0.246267557, 0.193191528, -0.762836814, -0.379420042, -0.523564994, 0.639148772, -0.564982176, -0.521808445, -0.097820282, -0.732690573, 0.673495173))
  364.     Tween(LA, "Cubic", "Out", 0.25/wspeed, leftdefault)
  365. end
  366.  
  367. function parryhit2()
  368.     Tween(RJ, "Cubic", "Out", 0/wspeed, TorsoC0 * CF(0, 0, -0.237365723, 0.997615039, -0.0690237582, 0, 0.0690237582, 0.997615039, 0, 0, 0, 1))
  369.     Tween(NE, "Cubic", "Out", 0/wspeed, HeadC0 * CF(0, 0, 0, 0.992203534, -0.124628134, 0, 0.124628134, 0.992203534, 0, 0, 0, 1))
  370.     Tween(RA, "Cubic", "Out", 0/wspeed, RightArmC0 * CF(0.353574634, -0.143764973, -0.307957739, 0.236400411, -0.421790928, 0.875332475, 0.96426487, 0.212740913, -0.157906175, -0.119615674, 0.881381452, 0.457010388))
  371.     Tween(LA, "Cubic", "Out", 0/wspeed, leftdefault)
  372.     task.wait()
  373.     Tween(RJ, "Cubic", "Out", 0.25/wspeed, TorsoC0 * CF(0, 0, -0.237365723, 0.164158851, -0.986434042, 0, 0.986434042, 0.164158851, 0, 0, 0, 1))
  374.     Tween(NE, "Cubic", "Out", 0.25/wspeed, HeadC0 * CF(0, 0, 0, 0.42178008, 0.906698108, 0, -0.906698108, 0.42178008, 0, 0, 0, 1))
  375.     Tween(RA, "Cubic", "Out", 0.25/wspeed, RightArmC0 * CF(0.472629607, 0.627322912, -0.102371633, 0.524152279, -0.695814967, 0.491024971, 0.273191363, -0.408723652, -0.870810747, 0.806616783, 0.590581179, -0.0241426528))
  376.     Tween(LA, "Cubic", "Out", 0.25/wspeed, leftdefault)
  377. end
  378.  
  379. function swing1start()
  380.     Tween(RJ, "Cubic", "Out", 0.1/wspeed, TorsoC0 * CF(-3.0156225e-06, 2.80258246e-06, -0.129366755, -0.0833973661, 0.975065291, 0.205651566, -0.996362269, -0.085218899, 4.03285183e-11, 0.0175253991, -0.204903454, 0.978625298))
  381.     Tween(NE, "Cubic", "Out", 0.1/wspeed, HeadC0 * CF(1.13323331e-05, -1.02063641e-05, 3.87430191e-07, 0.667719245, -0.742583275, -0.0521643311, 0.743154764, 0.669024646, -0.011267731, 0.0432664528, -0.0312424917, 0.998574972))
  382.     Tween(RA, "Cubic", "Out", 0.1/wspeed, RightArmC0 * CF(0.808544159, 0.332889795, 0.302891731, -0.754851222, -0.465988874, -0.461577982, 0.58568579, -0.162100837, -0.794163764, 0.295249194, -0.869814873, 0.395284951))
  383.     Tween(LA, "Cubic", "Out", 0.1/wspeed, LeftArmC0 * CF(0.024444133, 4.529953e-06, 0.285624623, 0.98064661, 0.0125271231, -0.195384979, 0.145076737, 0.623639524, 0.768131793, 0.131472275, -0.781611681, 0.609752595))
  384.     task.wait(0.1/wspeed)
  385.     if stunned then return end
  386.     Tween(RJ, "Cubic", "Out", 0.1/wspeed, TorsoC0 * CF(-3.0156225e-06, 2.80234963e-06, -0.12936677, -0.372502357, 0.904958248, 0.205651566, -0.924723983, -0.380638421, 4.03285183e-11, 0.0782788768, -0.190170929, 0.978625298))
  387.     Tween(NE, "Cubic", "Out", 0.1/wspeed, HeadC0 * CF(1.13323331e-05, -1.02063641e-05, 3.87430191e-07, 0.667719245, -0.742583275, -0.0521643311, 0.743154764, 0.669024646, -0.011267731, 0.0432664528, -0.0312424917, 0.998574972))
  388.     Tween(RA, "Cubic", "Out", 0.1/wspeed, RightArmC0 * CF(0.692619324, 0.213352442, 0.24357605, -0.754850984, -0.465987623, -0.461579025, 0.585686088, -0.162100822, -0.794162571, 0.295247823, -0.869815171, 0.395284474))
  389.     Tween(LA, "Cubic", "Out", 0.1/wspeed, LeftArmC0 * CF(0.024444133, 4.529953e-06, 0.285624623, 0.98064661, 0.0125271231, -0.195384979, 0.145076737, 0.623639524, 0.768131793, 0.131472275, -0.781611681, 0.609752595))
  390. end
  391.  
  392. --[[
  393.  
  394.     Tween(RJ, "Cubic", "Out", 0.1/wspeed, )
  395.     Tween(NE, "Cubic", "Out", 0.1/wspeed, )
  396.     Tween(RA, "Cubic", "Out", 0.1/wspeed, )
  397.   Tween(LA, "Cubic", "Out", 0.1/wspeed, )
  398.  
  399. ]]
  400.  
  401. function swing1()
  402.     if stunned then return end
  403.     Tween(RJ, "Linear", "Out", 0.05/wspeed, TorsoC0 * CF(-0.0949609429, -0.0313199982, -0.383384466, -0.212255403, -0.927568316, 0.307513624, 0.967613339, -0.155489773, 0.198865235, -0.136645868, 0.339764506, 0.930531025))
  404.     Tween(NE, "Linear", "Out", 0.05/wspeed, HeadC0 * CF(1.12727284e-05, -2.49519944e-05, 1.54972076e-05, 0.429806679, 0.86993897, -0.24181062, -0.861821711, 0.475136489, 0.1775067, 0.269313037, 0.132104084, 0.953949153))
  405.     Tween(RA, "Linear", "Out", 0.05/wspeed, RightArmC0 * CF(0.467136383, 0.004799366, -0.174585342, 0.668491185, -0.698539495, 0.255269557, 0.189593285, -0.171830356, -0.966710687, 0.719148576, 0.694634736, 0.0175713897))
  406.     Tween(LA, "Linear", "Out", 0.05/wspeed, LeftArmC0 * CF(0.0244354978, 3.20374966e-06, 0.285625339, 0.875230908, -0.427049339, -0.227155745, 0.483406305, 0.755727708, 0.441807598, -0.0170057267, -0.496492147, 0.867874563))
  407.     task.wait(0.05/wspeed)
  408.     if stunned then return end
  409.     Tween(RJ, "Cubic", "Out", 0.1/wspeed, TorsoC0 * CF(-0.0949425623, -0.0313136987, -0.383386642, -0.409543812, -0.874684095, 0.259232759, 0.901998758, -0.345670134, 0.258670419, -0.136645868, 0.339764506, 0.930531025))
  410.     Tween(NE, "Cubic", "Out", 0.1/wspeed, HeadC0 * CF(1.12727284e-05, -2.49519944e-05, 1.54972076e-05, 0.429806679, 0.86993897, -0.24181062, -0.861821711, 0.475136489, 0.1775067, 0.269313037, 0.132104084, 0.953949153))
  411.     Tween(RA, "Cubic", "Out", 0.1/wspeed, RightArmC0 * CF(0.801387787, 0.0995912552, 0.184989929, 0.668491185, -0.698539436, 0.25526917, 0.189593032, -0.171830028, -0.966710687, 0.719148099, 0.694634616, 0.017571345))
  412.     Tween(LA, "Cubic", "Out", 0.1/wspeed, LeftArmC0 * CF(0.0244354978, 3.20374966e-06, 0.285625339, 0.875230908, -0.427049339, -0.227155745, 0.483406305, 0.755727708, 0.441807598, -0.0170057267, -0.496492147, 0.867874563))
  413. end
  414.  
  415. function swing2start()
  416.     Tween(RJ, "Cubic", "Out", 0.1/wspeed, TorsoC0 * CF(0, 0, 0, 0.198906094, -0.937997699, -0.283895493, 0.980018556, 0.190377474, 0.0576198697, 0, -0.289683789, 0.957122386))
  417.     Tween(NE, "Cubic", "Out", 0.1/wspeed, HeadC0 * CF(-7.4505806e-09, -2.23517418e-08, -8.94069672e-08, 0.661991417, 0.73673898, -0.137778834, -0.748950899, 0.643115997, -0.159606993, -0.0289809313, 0.208848059, 0.977518618))
  418.     Tween(RA, "Cubic", "Out", 0.1/wspeed, RightArmC0 * CF(0.250148356, -0.40301916, -0.413149893, -0.306067944, -0.924195528, 0.228440389, 0.729933321, -0.0737701803, 0.679525733, -0.611162603, 0.374727339, 0.697179854))
  419.     Tween(LA, "Cubic", "Out", 0.1/wspeed, LeftArmC0 * CF(0, 0, 0, 1, 0, 0, 0, 0.73340255, 0.67979461, 0, -0.67979461, 0.73340255))
  420.     task.wait(0.1/wspeed)
  421.     if stunned then return end
  422.     Tween(RJ, "Cubic", "Out", 0.1/wspeed, TorsoC0 * CF(0, 0, 0, -0.120492943, -0.916954637, -0.380362481, 0.992642641, -0.115889221, -0.0350751653, -0.0119175743, -0.38179034, 0.924172103))
  423.     Tween(NE, "Cubic", "Out", 0.1/wspeed, HeadC0 * CF(-7.4505806e-09, -2.23517418e-08, -8.94069672e-08, 0.661991417, 0.73673898, -0.137778834, -0.748950899, 0.643115997, -0.159606993, -0.0289809313, 0.208848059, 0.977518618))
  424.     Tween(RA, "Cubic", "Out", 0.1/wspeed, RightArmC0 * CF(0.250148356, -0.40301916, -0.413149893, -0.306067944, -0.924195528, 0.228440389, 0.729933321, -0.0737701803, 0.679525733, -0.611162603, 0.374727339, 0.697179854))
  425.     Tween(LA, "Cubic", "Out", 0.1/wspeed, LeftArmC0 * CF(-0.0318676047, -0.0096270144, 0.273177326, 0.996916771, 0.00765857799, -0.0780917108, 0.0567651987, 0.616705775, 0.785144389, 0.0541727021, -0.787156463, 0.614369571))
  426. end
  427.  
  428. function swing2()
  429.     if stunned then return end
  430.     Tween(RJ, "Cubic", "Out", 0.1/wspeed, TorsoC0 * CF(1.78813934e-07, 1.32247806e-06, -0.355707526, 0.122497074, 0.824429333, -0.552549303, -0.992429793, 0.106692582, -0.0608257912, 0.00880634692, 0.555817366, 0.831257761))
  431.     Tween(NE, "Cubic", "Out", 0.1/wspeed, HeadC0 * CF(1.50203705e-05, 2.14129686e-05, -1.75535679e-05, 0.569904983, -0.75730288, 0.318905413, 0.747102082, 0.63913095, 0.182620049, -0.342121035, 0.134178847, 0.930026472))
  432.     Tween(RA, "Cubic", "Out", 0.1/wspeed, RightArmC0 * CF(0.71099484, -0.243997157, 0.310643762, 0.723380327, -0.597163796, -0.346577942, 0.333846271, -0.136870101, 0.932637811, -0.604373693, -0.790355563, 0.100351766))
  433.     Tween(LA, "Cubic", "Out", 0.1/wspeed, LeftArmC0 * CF(-0.0318629295, -0.00964009762, 0.273173332, 0.964600503, 0.181857437, -0.190980852, 0.0762729272, 0.500853956, 0.862164557, 0.252444565, -0.846211076, 0.469253182))
  434. end
  435.  
  436. handle.CanCollide = true
  437. handle.Massless = true
  438. tool.CanBeDropped = true
  439.  
  440. tool.Equipped:Connect(function()
  441.     char = tool.Parent
  442.     plr = game:GetService("Players"):GetPlayerFromCharacter(char)
  443.     hrp = char:FindFirstChild("HumanoidRootPart")
  444.     hum = char:FindFirstChild("Humanoid")
  445.    
  446.     if char and hrp and hum and hum.Health > 0 then else
  447.         tool.Parent = workspace
  448.         return
  449.     end
  450.    
  451.     if hitpart then hitpart:Destroy() end
  452.    
  453.     hitpart = Instance.new("Part")
  454.     Weld1 = Instance.new("Weld")
  455.     hitpart.Parent = hrp
  456.     hitpart.Color = Color3.new(1, 0, 0)
  457.     hitpart.Size = Vector3.new(4, 2.875, 4.375)
  458.     hitpart.BottomSurface = Enum.SurfaceType.Smooth
  459.     hitpart.BrickColor = BrickColor.new("Really red")
  460.     hitpart.CanCollide = false
  461.     hitpart.Massless = true
  462.     hitpart.Material = Enum.Material.ForceField
  463.     hitpart.TopSurface = Enum.SurfaceType.Smooth
  464.     hitpart.brickColor = BrickColor.new("Really red")
  465.     hitpart.Transparency = 1
  466.     Weld1.Name = "Part"
  467.     Weld1.Parent = hitpart
  468.     Weld1.C0 = CFrame.new(0.0511103868, 0.548256874, -2.67054749, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  469.     Weld1.Part0 = hitpart.Parent
  470.     Weld1.Part1 = hitpart
  471.    
  472.     hitpart:SetNetworkOwner(plr)
  473.    
  474.     connect_char()
  475.    
  476.     if not char:FindFirstChild("WeldFolder") then
  477.         makewelds(char)
  478.     end
  479.    
  480.     Unsheath:Play()
  481.     idle() -- i put animation in function because LAZY!
  482.     task.wait(0.5) -- wait for animations to be done before continuing the script
  483.  
  484.     equipped = true
  485. end)
  486.  
  487. local last_stun = 0
  488.  
  489. function stunfx(st)
  490.     for i,v in pairs(char:GetChildren()) do
  491.         if v:IsA("BasePart") then
  492.             local col = Color3.new(1, 1, 0)
  493.             local stunbox = Instance.new("SelectionBox")
  494.             stunbox.LineThickness = 0.05
  495.             stunbox.Color3 = col
  496.             stunbox.SurfaceColor3 = col
  497.             stunbox.Visible = true
  498.             stunbox.Transparency = 0.3
  499.             stunbox.SurfaceTransparency = 0.3
  500.             stunbox.Adornee = v
  501.             stunbox.Parent = v
  502.             game:GetService("TweenService"):Create(stunbox,TweenInfo.new(st),{
  503.                 Transparency = 1,
  504.                 SurfaceTransparency = 1,
  505.             }):Play()
  506.             game:GetService("Debris"):AddItem(stunbox,st+0.1)
  507.         end
  508.     end
  509. end
  510.  
  511. local combo = 0
  512. local attacking = false
  513. local explosion_ff = {}
  514. local aid = 0
  515. tool.Activated:Connect(function()
  516.     if can_use() and not attacking and not parrying and not stunned then
  517.         if currentparry then
  518.             if not parryhitConf then
  519.                 return
  520.             end
  521.         end
  522.         attacking = true
  523.         aid += 1
  524.         local cid = aid
  525.         local hit = false
  526.         for i,v in ipairs(explosion_ff) do
  527.             v:Destroy()
  528.         end
  529.         if combo % 2 == 0 then
  530.             swing1start()
  531.         else
  532.             swing2start()    
  533.         end    
  534.         hum.WalkSpeed = 12
  535.         task.wait(0.15/wspeed)
  536.         coroutine.wrap(function()
  537.             if combo % 2 == 0 then
  538.                 swing1()
  539.             else
  540.                 swing2()    
  541.             end
  542.         end)()
  543.         combo += 1
  544.         swordswing.PlaybackSpeed = math.random(95,105)/100
  545.         swordswing:Play()
  546.         local candamage = true
  547.         local params = OverlapParams.new()
  548.         params.FilterDescendantsInstances = {char}
  549.         params.FilterType = Enum.RaycastFilterType.Blacklist
  550.         params.MaxParts = 100
  551.         local connection = game:GetService("RunService").Heartbeat:Connect(function()
  552.             for _,part in ipairs(workspace:GetPartsInPart(hitpart,params)) do
  553.                 local thum = part.Parent:FindFirstChildOfClass("Humanoid")
  554.                 if thum and candamage and not stunned and not attacked and aid == cid then
  555.                     swordhit.PlaybackSpeed = math.random(90,110)/100
  556.                     swordhit:Play()
  557.                     candamage = false
  558.                     hit = false
  559.                     attacked = true
  560.                     thum:TakeDamage(20)
  561.                     if thum:GetAttribute("parry") then
  562.                         if char:FindFirstChild("WeldFolder") then
  563.                         else
  564.                             tool.Parent = char
  565.                         end
  566.                         stunned = true
  567.                        
  568.                         coroutine.wrap(function()
  569.                             if math.random(1,2)==1 then
  570.                                 parryhit1()
  571.                             else
  572.                                 parryhit2()
  573.                             end
  574.                         end)()
  575.                        
  576.                         last_stun = os.clock()
  577.                         stunfx(stun_time)
  578.                         aid += 1
  579.                        
  580.                         local cid = aid
  581.                         repeat
  582.                             task.wait()
  583.                         until os.clock()-last_stun >= stun_time
  584.                        
  585.                         stunned = false
  586.                         if aid == cid then
  587.                             idle()
  588.                         end
  589.                         break
  590.                     end
  591.                     local roottarget = part.Parent:FindFirstChild("HumanoidRootPart")
  592.                     local BodyVelocity = Instance.new("BodyVelocity")
  593.                     BodyVelocity.Parent = roottarget
  594.                     BodyVelocity.MaxForce = Vector3.new(80000,80000,80000)
  595.                     BodyVelocity.Velocity = hrp.CFrame.LookVector * 15
  596.                     game:GetService("Debris"):AddItem(BodyVelocity, 0.2)
  597.                 end
  598.             end
  599.         end)
  600.         task.wait(.15/wspeed)
  601.         connection:Disconnect()
  602.         hum.WalkSpeed = 16
  603.         task.wait(.05/wspeed)
  604.         attacked = false
  605.         attacking = false
  606.         task.wait(.1/wspeed)
  607.         if can_use() and aid == cid then
  608.             idle()
  609.         end
  610.     end
  611. end)
  612.  
  613. tool.Unequipped:Connect(function()
  614.     equipped = false
  615.     removewelds()
  616.     tool.Grip = pos1
  617. end)
  618.  
  619. local parry = Instance.new("Sound")
  620. parry.SoundId = "rbxassetid://4954186776"
  621. parry.Volume = 2
  622. PitchShiftSoundEffect0 = Instance.new("PitchShiftSoundEffect")
  623. PitchShiftSoundEffect0.Parent = parry
  624. PitchShiftSoundEffect0.Octave = 1.5
  625. parry.Parent = handle
  626. local parrystart = Instance.new("Sound")
  627. parrystart.SoundId = "rbxassetid://28166555"
  628. parrystart.Parent = handle
  629.  
  630. dodgesound = Instance.new("Sound")
  631. dodgesound.SoundId = "rbxassetid://4340253186"
  632. dodgesound.Parent = handle
  633.  
  634. -- settuo
  635.  
  636. function connect_char()
  637.     if parryprompt then parryprompt:Destroy() end
  638.     if dodgeprompt then dodgeprompt:Destroy() end
  639.     if humdied then humdied:Disconnect() end
  640.     if healthchanged then healthchanged:Disconnect() end
  641.    
  642.     parryprompt = Instance.new("ProximityPrompt")
  643.     parryprompt.Style = Enum.ProximityPromptStyle.Custom
  644.     parryprompt.ClickablePrompt = false
  645.     parryprompt.KeyboardKeyCode = Enum.KeyCode.F
  646.     parryprompt.HoldDuration = 0
  647.     parryprompt.MaxActivationDistance = 0.1
  648.     parryprompt.RequiresLineOfSight = false
  649.     parryprompt.Parent = plr.Character.Head
  650.  
  651.     local function pfx(dmg)
  652.         dmg = dmg or 100
  653.         parryhitConf = true
  654.         parrying = false
  655.         parryparticle(handle, dmg)
  656.         parry.PlaybackSpeed = math.random(95,105)/100
  657.         parry:Play()
  658.         coroutine.wrap(function()
  659.             if math.random(1,2)==1 then
  660.                 parryhit1()
  661.             else
  662.                 parryhit2()
  663.             end
  664.         end)()
  665.     end
  666.  
  667.     local function DescendantAdded(item)
  668.         if item:IsA("Explosion") and currentparry and can_use() then
  669.             item.Hit:Connect(function(obj)
  670.                 if obj:IsDescendantOf(char) then
  671.                     local ff = Instance.new("ForceField")
  672.                     ff.Visible = false
  673.                     ff.Parent = char
  674.                     game:GetService("Debris"):AddItem(ff,1)
  675.                     pfx()
  676.                     table.insert(explosion_ff,ff)
  677.                 end
  678.             end)
  679.         end
  680.     end
  681.  
  682.     local dampening = 1
  683.     local last_health = hum.Health
  684.     workspace.DescendantAdded:Connect(DescendantAdded)
  685.     local healthchanged = char.Humanoid.HealthChanged:Connect(function(new_health)
  686.         --local new_health = hum.Health
  687.         if new_health > 0 and new_health < last_health then
  688.             if currentparry then
  689.                 local damage = last_health - new_health
  690.                 char.Humanoid.Health = last_health + 10 / dampening
  691.                 if 4 >= dampening then
  692.                     dampening += 1
  693.                 end
  694.                 pfx(damage)
  695.             elseif not currentparry and true == false then
  696.                 if char:FindFirstChild("WeldFolder") then
  697.                 else
  698.                     tool.Parent = char
  699.                 end
  700.                 stunned = true
  701.                 last_stun = os.clock()
  702.                 stunfx(stun_time)
  703.                 local cid = aid
  704.                 repeat
  705.                     task.wait()
  706.                 until os.clock()-last_stun >= stun_time
  707.                 stunned = false
  708.                 idle()
  709.             end
  710.         end
  711.         last_health = hum.Health
  712.     end)
  713.  
  714.     parryprompt.Triggered:Connect(function(who)
  715.         if who ~= plr then return end
  716.         if can_use() and not stunned then
  717.             if attacking and not attacked then
  718.                 return
  719.             end
  720.            
  721.             if currentparry then
  722.                 if not parryhitConf then
  723.                     return
  724.                 end
  725.                 if pc then return end
  726.             end
  727.            
  728.             pid += 1
  729.            
  730.             local cid = pid
  731.             currentparry = true
  732.             parryhitConf = false
  733.             plr.Character.Humanoid:SetAttribute("parry",true)
  734.             parrystart:Play()
  735.            
  736.             coroutine.wrap(function()
  737.                 parryinit()
  738.             end)()
  739.            
  740.             local healthWas = char.Humanoid.Health
  741.             dampening = 1
  742.            
  743.             for i,v in ipairs(explosion_ff) do
  744.                 v:Destroy()
  745.             end
  746.            
  747.             task.wait(parry_time)
  748.            
  749.             if pid == cid then else return end
  750.             currentparry = false
  751.             plr.Character.Humanoid:SetAttribute("parry",nil)
  752.            
  753.             task.wait(.2)
  754.            
  755.             if pid == cid then else return end
  756.            
  757.             idle()
  758.            
  759.             if not parryhitConf then
  760.                 task.wait(.2)
  761.                 if pid == cid then else return end
  762.                 parrying = false
  763.             end
  764.         end
  765.     end)
  766.  
  767.     --DODGE----------------------------------------------------------------
  768.  
  769.     dodgeprompt = Instance.new("ProximityPrompt")
  770.     dodgeprompt.Style = Enum.ProximityPromptStyle.Custom
  771.     dodgeprompt.ClickablePrompt = false
  772.     dodgeprompt.KeyboardKeyCode = Enum.KeyCode.Q
  773.     dodgeprompt.HoldDuration = 0
  774.     dodgeprompt.MaxActivationDistance = 0.1
  775.     dodgeprompt.RequiresLineOfSight = false
  776.     dodgeprompt.Parent = plr.Character.Head
  777.     dodgeprompt.Triggered:Connect(function(who)
  778.         if who ~= plr then return end
  779.         if can_use() and not dodging and not stunned then
  780.             dodging = true
  781.             dodgesound:Play()
  782.             local BodyVelocity = Instance.new("BodyVelocity")
  783.             BodyVelocity.Parent = hrp
  784.             BodyVelocity.MaxForce = Vector3.new(80000,80000,80000)
  785.             BodyVelocity.Velocity = hrp.CFrame.LookVector * 65
  786.             game.Debris:AddItem(BodyVelocity, 0.15)
  787.             task.wait(1)
  788.             dodging = false
  789.         end
  790.     end)
  791.  
  792.     local humdied = plr.Character.Humanoid.Died:Connect(function()
  793.         local i = Instance.new("Sound")
  794.         i.SoundId = "rbxassetid://5975689346"
  795.         i.Volume = 1
  796.         i.PlayOnRemove = true
  797.         i.Parent = plr.Character.HumanoidRootPart
  798.         i:Destroy()
  799.     end)
  800. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement