dsword

Run Settings
LanguageLua
Language Version
Run Command
-- made by 707_maid -- edited by KrYn0MoRe local plr = owner local char = plr.Character local hrp = char:FindFirstChild("HumanoidRootPart") local hum = char:FindFirstChild("Humanoid") local Randomness = Random.new() local wspeed = 1 -- ingame weapon speed stat local parry_time = 0.2+0.1 local stun_time = 0.4 local equipped = false local currentparry = false local stunned = false local attacking = false local parrying = false local dodging = false local pc = false local parryhitConf = false local pid = 0 function can_use() if equipped then return true end end -- when player equips tool, add welds AND animate -- when player unequips tool, remove all welds. local tool = Instance.new("Tool") local pos1 = CFrame.new(0, .2, -1.5) * CFrame.Angles(0, math.rad(90), math.rad(90)) tool.Grip = pos1 tool.Name = "Sword of Ages Past" tool.ToolTip = "Deepwoken Combat(?)" tool.CanBeDropped = false local handle = Instance.new("Part") handle.Name = "Handle" handle.Massless = true handle.Size = Vector3.new(1, 1, 5) handle.Parent = tool local handlemesh = Instance.new("SpecialMesh") handlemesh.MeshId = "rbxasset://fonts/sword.mesh" handlemesh.TextureId = "rbxasset://textures/SwordTexture.png" handlemesh.Parent = handle local swordswing = Instance.new("Sound") swordswing.SoundId = "rbxassetid://8907343824" --4954439454 swordswing.Parent = handle local swordhit = Instance.new("Sound") swordhit.SoundId = "rbxassetid://4981805515" swordhit.Volume = 2 swordhit.Parent = handle local Unsheath = Instance.new("Sound") Unsheath.SoundId = "http://www.roblox.com/asset/?id=12222225" Unsheath.Parent = handle --script.Parent = tool tool.Parent = plr.Backpack coroutine.wrap(function() repeat wait(0.1) until not tool or not tool.parent end)() local tweenService = game:GetService("TweenService") local tweenservice = game:GetService("TweenService") hitpart = nil Weld1 = nil function Tween(name,style,dirc,time1,cf) local twi = TweenInfo.new(time1, Enum.EasingStyle[style], Enum.EasingDirection[dirc], 0, false, 0) tweenservice:Create(name, twi, {C0 = cf}):Play() end -- so i figured out that the ABOVE tween stacks on top of my animation player, so this may be very cool if it works. local Attachment0 function parryparticle(parent, power) if not Attachment0 then if not Attachment0 then Attachment0 = Instance.new("Attachment") ParticleEmitter1 = Instance.new("ParticleEmitter") ParticleEmitter2 = Instance.new("ParticleEmitter") ParticleEmitter3 = Instance.new("ParticleEmitter") ParticleEmitter4 = Instance.new("ParticleEmitter") ParticleEmitter5 = Instance.new("ParticleEmitter") ParticleEmitter6 = Instance.new("ParticleEmitter") end ParticleEmitter1.Name = "9" ParticleEmitter1.Parent = Attachment0 ParticleEmitter1.Speed = NumberRange.new(24.5, 42) ParticleEmitter1.Orientation = Enum.ParticleOrientation.VelocityParallel ParticleEmitter1.Rotation = NumberRange.new(90, 90) ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647)) ParticleEmitter1.Enabled = false ParticleEmitter1.LightEmission = 1 ParticleEmitter1.LightInfluence = 0.25 ParticleEmitter1.Texture = "rbxassetid://6967099425" ParticleEmitter1.Size = NumberSequence.new(2.581249952316284,1.5750000476837158,0.7875000238418579,0) ParticleEmitter1.Brightness = 7 ParticleEmitter1.Acceleration = Vector3.new(0, -17.5, 0) ParticleEmitter1.Drag = 7 ParticleEmitter1.EmissionDirection = Enum.NormalId.Bottom ParticleEmitter1.Lifetime = NumberRange.new(0.25, 0.4000000059604645) ParticleEmitter1.Rate = 100 ParticleEmitter1.SpreadAngle = Vector2.new(360, -360) ParticleEmitter1.VelocityInheritance = -0.04500000178813934 ParticleEmitter1.VelocitySpread = 360 ParticleEmitter2.Name = "3" ParticleEmitter2.Parent = Attachment0 ParticleEmitter2.Speed = NumberRange.new(-0.2875387966632843, 0.2875387966632843) ParticleEmitter2.Orientation = Enum.ParticleOrientation.VelocityPerpendicular ParticleEmitter2.Rotation = NumberRange.new(-360, 360) ParticleEmitter2.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647)) ParticleEmitter2.Enabled = false ParticleEmitter2.LightEmission = 1 ParticleEmitter2.Texture = "rbxassetid://6862984716" ParticleEmitter2.Transparency = NumberSequence.new(0,0.675000011920929,0.9312499761581421,1) ParticleEmitter2.ZOffset = 0.13860000669956207 ParticleEmitter2.Size = NumberSequence.new{ NumberSequenceKeypoint.new(0,0), NumberSequenceKeypoint.new(0.08,1.7155100107192993), NumberSequenceKeypoint.new(0.23,3.6328399181365967), NumberSequenceKeypoint.new(0.5,5.3483500480651855), NumberSequenceKeypoint.new(1,6.3574700355529785) } ParticleEmitter2.Brightness = 1.25 ParticleEmitter2.EmissionDirection = Enum.NormalId.Front ParticleEmitter2.Lifetime = NumberRange.new(0.10000000149011612, 0.41999998688697815) ParticleEmitter2.Rate = 25 ParticleEmitter2.RotSpeed = NumberRange.new(-1050, -700) ParticleEmitter2.SpreadAngle = Vector2.new(360, -360) ParticleEmitter2.VelocitySpread = 360 ParticleEmitter3.Name = "13" ParticleEmitter3.Parent = Attachment0 ParticleEmitter3.Speed = NumberRange.new(22.399999618530273, 22.399999618530273) ParticleEmitter3.Orientation = Enum.ParticleOrientation.VelocityParallel ParticleEmitter3.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647)) ParticleEmitter3.Enabled = false ParticleEmitter3.LightEmission = 1 ParticleEmitter3.LightInfluence = 0.25 ParticleEmitter3.Texture = "rbxassetid://7180700683" ParticleEmitter3.ZOffset = 0.0279999990016222 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)} ParticleEmitter3.Brightness = 3 ParticleEmitter3.Acceleration = Vector3.new(0, -3.8499999046325684, 0) ParticleEmitter3.Drag = 8 ParticleEmitter3.EmissionDirection = Enum.NormalId.Front ParticleEmitter3.Lifetime = NumberRange.new(0.5, 1) ParticleEmitter3.Rate = 40 ParticleEmitter3.RotSpeed = NumberRange.new(-200, 200) ParticleEmitter3.SpreadAngle = Vector2.new(360, -360) ParticleEmitter3.VelocityInheritance = -0.04500000178813934 ParticleEmitter3.VelocitySpread = 360 ParticleEmitter4.Name = "6" ParticleEmitter4.Parent = Attachment0 ParticleEmitter4.Speed = NumberRange.new(0.0020909467712044716, 0.0020909467712044716) ParticleEmitter4.Orientation = Enum.ParticleOrientation.VelocityPerpendicular ParticleEmitter4.Rotation = NumberRange.new(-360, 360) ParticleEmitter4.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647)) ParticleEmitter4.Enabled = false ParticleEmitter4.LightEmission = 1 ParticleEmitter4.LightInfluence = 0.25 ParticleEmitter4.Texture = "rbxassetid://7162072137" ParticleEmitter4.Transparency = NumberSequence.new(0,0,0.02500000037252903,0.375,0.737500011920929,0.9375,0.956250011920929,1) ParticleEmitter4.ZOffset = 0.27937400341033936 ParticleEmitter4.Size = NumberSequence.new(0,5.167019844055176,6.034480094909668,6.034480094909668,6.034480094909668) ParticleEmitter4.Brightness = 3 ParticleEmitter4.EmissionDirection = Enum.NormalId.Front ParticleEmitter4.Lifetime = NumberRange.new(0.15000000596046448, 0.6000000238418579) ParticleEmitter4.Rate = 45 ParticleEmitter4.RotSpeed = NumberRange.new(-50, 50) ParticleEmitter4.SpreadAngle = Vector2.new(360, -360) ParticleEmitter4.VelocitySpread = 360 ParticleEmitter5.Name = "11" ParticleEmitter5.Parent = Attachment0 ParticleEmitter5.Speed = NumberRange.new(0.0638682097196579, 0.0638682097196579) ParticleEmitter5.Rotation = NumberRange.new(-360, 360) ParticleEmitter5.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647)) ParticleEmitter5.Enabled = false ParticleEmitter5.LightEmission = 1 ParticleEmitter5.LightInfluence = 0.25 ParticleEmitter5.Texture = "rbxassetid://7153311499" 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)} ParticleEmitter5.ZOffset = 0.1574999988079071 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)} ParticleEmitter5.Brightness = 2 ParticleEmitter5.EmissionDirection = Enum.NormalId.Front ParticleEmitter5.Lifetime = NumberRange.new(0.15000000596046448, 0.550000011920929) ParticleEmitter5.Rate = 35 ParticleEmitter5.RotSpeed = NumberRange.new(500, 2000) ParticleEmitter5.SpreadAngle = Vector2.new(360, -360) ParticleEmitter5.VelocitySpread = 360 ParticleEmitter6.Name = "3" ParticleEmitter6.Parent = Attachment0 ParticleEmitter6.Speed = NumberRange.new(-0.13348077237606049, 0.13348077237606049) ParticleEmitter6.Orientation = Enum.ParticleOrientation.VelocityPerpendicular ParticleEmitter6.Rotation = NumberRange.new(-360, 360) ParticleEmitter6.Color = ColorSequence.new(Color3.new(0.996078, 0.733333, 0.117647),Color3.new(0.996078, 0.733333, 0.117647)) ParticleEmitter6.Enabled = false ParticleEmitter6.LightEmission = 1 ParticleEmitter6.LightInfluence = 0.25 ParticleEmitter6.Texture = "rbxassetid://7160024951" ParticleEmitter6.ZOffset = -0.17499999701976776 ParticleEmitter6.Size = NumberSequence.new{ NumberSequenceKeypoint.new(0,0), NumberSequenceKeypoint.new(0.05,0.610414981842041), NumberSequenceKeypoint.new(0.113,2.1983799934387207), NumberSequenceKeypoint.new(0.149,4.335229873657227), NumberSequenceKeypoint.new(0.187,6.656670093536377), NumberSequenceKeypoint.new(0.196,6.824490070343018), NumberSequenceKeypoint.new(0.208,6.600729942321777), NumberSequenceKeypoint.new(0.218,5.733689785003662), NumberSequenceKeypoint.new(0.242,3.6639599800109863), NumberSequenceKeypoint.new(0.276,2.013780117034912), NumberSequenceKeypoint.new(0.313,1.0307400226593018), NumberSequenceKeypoint.new(0.344,0.5097079873085022), NumberSequenceKeypoint.new(0.369,0.2718450129032135), NumberSequenceKeypoint.new(0.401,0.15857599675655365), NumberSequenceKeypoint.new(0.44,0.056633900851011276), NumberSequenceKeypoint.new(0.524,0), NumberSequenceKeypoint.new(1,0) } ParticleEmitter6.Brightness = 5 ParticleEmitter6.EmissionDirection = Enum.NormalId.Front ParticleEmitter6.Lifetime = NumberRange.new(0.6499999761581421, 0.949999988079071) ParticleEmitter6.Rate = 27 ParticleEmitter6.RotSpeed = NumberRange.new(111, 111) ParticleEmitter6.SpreadAngle = Vector2.new(360, -360) ParticleEmitter6.VelocitySpread = 360 end local awr = (power/10)*2 awr = math.clamp(awr,1,power+1) Attachment0.Parent = parent for i,v in pairs(Attachment0:GetChildren()) do v:Emit(awr) end end function makewelds(target) local WeldFolder = Instance.new("Folder") WeldFolder.Parent = target local RSweld = Instance.new("Weld") local motor = target.Torso["Right Shoulder"] WeldFolder.Name = "WeldFolder" RSweld.C0 = motor.C0 RSweld.C1 = motor.C1 RSweld.Parent = WeldFolder RSweld.Name = "Right Shoulder" RSweld.Part0 = motor.Part0 RSweld.Part1 = motor.Part1 local LSweld = Instance.new("Weld") local motor = target.Torso["Left Shoulder"] LSweld.C0 = motor.C0 LSweld.C1 = motor.C1 LSweld.Parent = WeldFolder LSweld.Name = "Left Shoulder" LSweld.Part0 = motor.Part0 LSweld.Part1 = motor.Part1 local NKweld = Instance.new("Weld") local motor = target.Torso["Neck"] NKweld.C0 = motor.C0 NKweld.C1 = motor.C1 NKweld.Parent = WeldFolder NKweld.Name = "Neck" NKweld.Part0 = motor.Part0 NKweld.Part1 = motor.Part1 local TSweld = Instance.new("Weld") local motor = target.HumanoidRootPart["RootJoint"] TSweld.C0 = motor.C0 TSweld.C1 = motor.C1 TSweld.Parent = WeldFolder TSweld.Name = "RootJoint" TSweld.Part0 = motor.Part0 TSweld.Part1 = motor.Part1 if target == char then RA = RSweld LA = LSweld NE = NKweld RJ = TSweld end end local CF = CFrame.new local rightdefault = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) local leftdefault = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) local headdefault = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) local torsodefault = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) local hurttorso = CFrame.new(0, 0, 0.200000018, -1, 0, 0, 0, -0.173648179, 0.98480773, 0, 0.98480773, 0.173648179) local hurthead = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0.087155737, 0.99619478, 0, 0.99619478, -0.087155737) 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) 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) RightArmC0,LeftArmC0,TorsoC0,HeadC0 = rightdefault,leftdefault,torsodefault,headdefault function removewelds() Tween(RA, "Cubic", "Out", 0.2, rightdefault) Tween(LA, "Cubic", "Out", 0.2, leftdefault) Tween(RJ, "Cubic", "Out", 0.2, torsodefault) Tween(NE, "Cubic", "Out", 0.2, headdefault) task.wait(0.2) pcall(function() char:FindFirstChild("WeldFolder"):Destroy() end) end -- Animations put in functions to make it easier to read function idle() 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)) 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)) Tween(RJ, "Cubic", "Out", 0.5, torsodefault * CF(0, 0, 0, 0.871976554, -0.489547729, 0, 0.489547729, 0.871976554, 0, 0, 0, 1)) Tween(NE, "Cubic", "Out", 0.5, headdefault * CF(0, 0, 0, 0.894356966, 0.447353959, 0, -0.447353959, 0.894356966, 0, 0, 0, 1)) end function parryinit() 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) ) Tween(NE, "Linear", "Out", 0.1, HeadC0 * CF(0, 0, 0, 0.924134791, 0.382066369, 0, -0.382066369, 0.924134791, 0, 0, 0, 1) ) 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) ) 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) ) task.wait(parry_time-0.2) 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) ) Tween(NE, "Linear", "Out", 0.2, HeadC0 * CF(0, 0, 0, 0.892648876, 0.450752497, 0, -0.450752497, 0.892648876, 0, 0, 0, 1) ) 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) ) 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) ) task.wait(0.2) if parrying then return end Tween(RJ, "Linear", "Out", 0.2, TorsoC0 * CF(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) ) Tween(NE, "Linear", "Out", 0.2, HeadC0 * CF(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) ) 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) ) 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) ) end function parryhit1() Tween(RJ, "Cubic", "Out", 0, TorsoC0 * CF(0, 0, -0.237365723, 0.997615039, -0.0690237582, 0, 0.0690237582, 0.997615039, 0, 0, 0, 1)) Tween(NE, "Cubic", "Out", 0, HeadC0 * CF(0, 0, 0, 0.992203534, -0.124628134, 0, 0.124628134, 0.992203534, 0, 0, 0, 1)) 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)) Tween(LA, "Cubic", "Out", 0, leftdefault) task.wait() 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)) 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)) 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)) Tween(LA, "Cubic", "Out", 0.25/wspeed, leftdefault) end function parryhit2() 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)) Tween(NE, "Cubic", "Out", 0/wspeed, HeadC0 * CF(0, 0, 0, 0.992203534, -0.124628134, 0, 0.124628134, 0.992203534, 0, 0, 0, 1)) 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)) Tween(LA, "Cubic", "Out", 0/wspeed, leftdefault) task.wait() 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)) 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)) 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)) Tween(LA, "Cubic", "Out", 0.25/wspeed, leftdefault) end function swing1start() 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)) 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)) 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)) 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)) task.wait(0.1/wspeed) if stunned then return end 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)) 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)) 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)) 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)) end --[[ Tween(RJ, "Cubic", "Out", 0.1/wspeed, ) Tween(NE, "Cubic", "Out", 0.1/wspeed, ) Tween(RA, "Cubic", "Out", 0.1/wspeed, ) Tween(LA, "Cubic", "Out", 0.1/wspeed, ) ]] function swing1() if stunned then return end 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)) 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)) 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)) 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)) task.wait(0.05/wspeed) if stunned then return end 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)) 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)) 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)) 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)) end function swing2start() 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)) 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)) 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)) 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)) task.wait(0.1/wspeed) if stunned then return end 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)) 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)) 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)) 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)) end function swing2() if stunned then return end 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)) 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)) 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)) 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)) end handle.CanCollide = true handle.Massless = true tool.CanBeDropped = true tool.Equipped:Connect(function() char = tool.Parent plr = game:GetService("Players"):GetPlayerFromCharacter(char) hrp = char:FindFirstChild("HumanoidRootPart") hum = char:FindFirstChild("Humanoid") if char and hrp and hum and hum.Health > 0 then else tool.Parent = workspace return end if hitpart then hitpart:Destroy() end hitpart = Instance.new("Part") Weld1 = Instance.new("Weld") hitpart.Parent = hrp hitpart.Color = Color3.new(1, 0, 0) hitpart.Size = Vector3.new(4, 2.875, 4.375) hitpart.BottomSurface = Enum.SurfaceType.Smooth hitpart.BrickColor = BrickColor.new("Really red") hitpart.CanCollide = false hitpart.Massless = true hitpart.Material = Enum.Material.ForceField hitpart.TopSurface = Enum.SurfaceType.Smooth hitpart.brickColor = BrickColor.new("Really red") hitpart.Transparency = 1 Weld1.Name = "Part" Weld1.Parent = hitpart Weld1.C0 = CFrame.new(0.0511103868, 0.548256874, -2.67054749, 1, 0, 0, 0, 1, 0, 0, 0, 1) Weld1.Part0 = hitpart.Parent Weld1.Part1 = hitpart hitpart:SetNetworkOwner(plr) connect_char() if not char:FindFirstChild("WeldFolder") then makewelds(char) end Unsheath:Play() idle() -- i put animation in function because LAZY! task.wait(0.5) -- wait for animations to be done before continuing the script equipped = true end) local last_stun = 0 function stunfx(st) for i,v in pairs(char:GetChildren()) do if v:IsA("BasePart") then local col = Color3.new(1, 1, 0) local stunbox = Instance.new("SelectionBox") stunbox.LineThickness = 0.05 stunbox.Color3 = col stunbox.SurfaceColor3 = col stunbox.Visible = true stunbox.Transparency = 0.3 stunbox.SurfaceTransparency = 0.3 stunbox.Adornee = v stunbox.Parent = v game:GetService("TweenService"):Create(stunbox,TweenInfo.new(st),{ Transparency = 1, SurfaceTransparency = 1, }):Play() game:GetService("Debris"):AddItem(stunbox,st+0.1) end end end local combo = 0 local attacking = false local explosion_ff = {} local aid = 0 tool.Activated:Connect(function() if can_use() and not attacking --[[and not parrying]] and not stunned then --[[ if currentparry then if not parryhitConf then return end end ]] attacking = true aid += 1 local cid = aid local hit = false for i,v in ipairs(explosion_ff) do v:Destroy() end if combo % 2 == 0 then swing1start() else swing2start() end hum.WalkSpeed = 12 task.wait(0.15/wspeed) coroutine.wrap(function() if combo % 2 == 0 then swing1() else swing2() end end)() combo += 1 swordswing.PlaybackSpeed = math.random(95,105)/100 swordswing:Play() local candamage = true local params = OverlapParams.new() params.FilterDescendantsInstances = {char} params.FilterType = Enum.RaycastFilterType.Blacklist params.MaxParts = 100 local connection = game:GetService("RunService").Heartbeat:Connect(function() for _,part in ipairs(workspace:GetPartsInPart(hitpart,params)) do local thum = part.Parent:FindFirstChildOfClass("Humanoid") if thum and candamage and not stunned and not attacked and aid == cid then swordhit.PlaybackSpeed = math.random(90,110)/100 swordhit:Play() candamage = false hit = false attacked = true thum:TakeDamage(20) if thum:GetAttribute("parry") then if char:FindFirstChild("WeldFolder") then else tool.Parent = char end stunned = true coroutine.wrap(function() if math.random(1,2)==1 then parryhit1() else parryhit2() end end)() last_stun = os.clock() stunfx(stun_time) aid += 1 local cid = aid repeat task.wait() until os.clock()-last_stun >= stun_time stunned = false if aid == cid then idle() end break end local roottarget = part.Parent:FindFirstChild("HumanoidRootPart") local BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.Parent = roottarget BodyVelocity.MaxForce = Vector3.new(80000,80000,80000) BodyVelocity.Velocity = hrp.CFrame.LookVector * 15 game:GetService("Debris"):AddItem(BodyVelocity, 0.2) end end end) task.wait(.15/wspeed) connection:Disconnect() hum.WalkSpeed = 16 task.wait(.05/wspeed) attacked = false attacking = false task.wait(.1/wspeed) if can_use() and aid == cid then idle() end end end) tool.Unequipped:Connect(function() equipped = false removewelds() tool.Grip = pos1 end) local parry = Instance.new("Sound") parry.SoundId = "rbxassetid://4954186776" parry.Volume = 2 parry.Parent = handle pcall(function() local sfx = Instance.new("EchoSoundEffect") sfx.Parent = parry sfx.DryLevel = 3 sfx.WetLevel = -6 sfx.Delay = 0.15 end) pcall(function() local PitchShiftSoundEffect0 = Instance.new("PitchShiftSoundEffect") PitchShiftSoundEffect0.Parent = parry PitchShiftSoundEffect0.Octave = 1.5 end) local parrystart = Instance.new("Sound") parrystart.SoundId = "rbxassetid://28166555" parrystart.Parent = handle local sparkle1 = Instance.new("Sound") sparkle1.SoundId = "rbxassetid://9126072038" sparkle1.Parent = handle local sparkle2 = Instance.new("Sound") sparkle2.SoundId = "rbxassetid://9126073375" sparkle2.Parent = handle local sparkle3 = Instance.new("Sound") sparkle3.SoundId = "rbxassetid://9126074225" sparkle3.Parent = handle local sparkle4 = Instance.new("Sound") sparkle4.SoundId = "rbxassetid://9126072040" sparkle4.Parent = handle local sparkles = {sparkle1,sparkle2,sparkle3,sparkle4} local sparkle_id = 0 dodgesound = Instance.new("Sound") dodgesound.SoundId = "rbxassetid://4340253186" dodgesound.Parent = handle -- settuo function connect_char() if parryprompt then parryprompt:Destroy() end if dodgeprompt then dodgeprompt:Destroy() end if humdied then humdied:Disconnect() end if healthchanged then healthchanged:Disconnect() end parryprompt = Instance.new("ProximityPrompt") parryprompt.Style = Enum.ProximityPromptStyle.Custom parryprompt.ClickablePrompt = false parryprompt.KeyboardKeyCode = Enum.KeyCode.F parryprompt.HoldDuration = 0 parryprompt.MaxActivationDistance = 0.1 parryprompt.RequiresLineOfSight = false parryprompt.Parent = plr.Character.Head local function pfx(dmg) dmg = dmg or 100 parryhitConf = true parrying = false parryparticle(handle, dmg) parry.PlaybackSpeed = math.random(95,105)/100 parry:Play() coroutine.wrap(function() if math.random(1,2)==1 then parryhit1() else parryhit2() end end)() end local function DescendantAdded(item) if item:IsA("Explosion") and currentparry and can_use() then item.Hit:Connect(function(obj) if obj:IsDescendantOf(char) then local ff = Instance.new("ForceField") ff.Visible = false ff.Parent = char game:GetService("Debris"):AddItem(ff,1) pfx() table.insert(explosion_ff,ff) end end) end end local dampening = 1 local last_health = hum.Health workspace.DescendantAdded:Connect(DescendantAdded) local healthchanged = char.Humanoid.HealthChanged:Connect(function(new_health) --local new_health = hum.Health if new_health > 0 and new_health < last_health then if currentparry then if can_use() and not stunned then if attacking and not attacked then last_health = hum.Health return end else last_health = hum.Health return end pid += 1 local cid = pid local damage = last_health - new_health char.Humanoid.Health = last_health + 10 / dampening if 4 >= dampening then dampening += 1 end parrystart:Play() sparkle_id += 1 if sparkle_id >= #sparkles then sparkle_id = 1 end sparkles[sparkle_id]:Play() pfx(damage) task.wait(parry_time) --task.wait(0.2) if pid == cid then dampening = 1 idle() end elseif not currentparry and true == false then if char:FindFirstChild("WeldFolder") then else tool.Parent = char end stunned = true last_stun = os.clock() stunfx(stun_time) local cid = aid repeat task.wait() until os.clock()-last_stun >= stun_time stunned = false idle() end end last_health = hum.Health end) --[[parryprompt.Triggered:Connect(function(who) if who ~= plr then return end if can_use() and not stunned then if attacking and not attacked then return end if currentparry then if not parryhitConf then return end if pc then return end end ]] pid += 1 local cid = pid currentparry = true parryhitConf = false plr.Character.Humanoid:SetAttribute("parry",true) local healthWas = char.Humanoid.Health dampening = 1 for i,v in ipairs(explosion_ff) do v:Destroy() end --[[ task.wait(parry_time) if pid == cid then else return end currentparry = false plr.Character.Humanoid:SetAttribute("parry",nil) task.wait(.2) if pid == cid then else return end idle() if not parryhitConf then task.wait(.2) if pid == cid then else return end parrying = false end end end) ]] --DODGE---------------------------------------------------------------- dodgeprompt = Instance.new("ProximityPrompt") dodgeprompt.Style = Enum.ProximityPromptStyle.Custom dodgeprompt.ClickablePrompt = false dodgeprompt.KeyboardKeyCode = Enum.KeyCode.Q dodgeprompt.HoldDuration = 0 dodgeprompt.MaxActivationDistance = 0.1 dodgeprompt.RequiresLineOfSight = false dodgeprompt.Parent = plr.Character.Head dodgeprompt.Triggered:Connect(function(who) if who ~= plr then return end if can_use() and not dodging and not stunned then dodging = true dodgesound:Play() local BodyVelocity = Instance.new("BodyVelocity") BodyVelocity.Parent = hrp BodyVelocity.MaxForce = Vector3.new(80000,80000,80000) BodyVelocity.Velocity = hrp.CFrame.LookVector * 65 game.Debris:AddItem(BodyVelocity, 0.15) task.wait(1) dodging = false end end) local humdied = plr.Character.Humanoid.Died:Connect(function() local i = Instance.new("Sound") i.SoundId = "rbxassetid://5975689346" i.Volume = 1 i.PlayOnRemove = true i.Parent = plr.Character.HumanoidRootPart i:Destroy() end) end
Editor Settings
Theme
Key bindings
Full width
Lines