null nil true 0 0 0 1 0 0 0 1 0 0 0 1 Tool Giver null true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 0.5 3.4000001 8.5 1 0 0 0 1 0 0 0 1 true 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Smooth Block Model 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0.300000012 0 0 0 1 3 6 1 true 0 3 0 -1 -0 -0 0 0 1 0 1 0 0.00121080875 -0.591039658 -1.50085068 -0.99999994 -0.000312072661 5.38426137e-010 5.38563305e-010 -4.39854791e-010 1 -0.000312072691 0.99999994 4.40022824e-010 Snap RBX3 RBX4 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 2.4999361 3.39272285 9.50010681 1.04808478e-005 -2.31108952e-005 1 -1.26407358e-005 1 2.3111028e-005 -1 -1.26409777e-005 1.04805558e-005 true 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Smooth Block Model 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0.300000012 0 0 0 1 3 6 1 true 0 3 0 -1 -0 -0 0 0 1 0 1 0 2.00076532 -0.598312378 -0.500156403 -0.000322553504 0.99999994 -2.31064096e-005 1.26402956e-005 2.31104896e-005 1 0.99999994 0.000322553242 -1.26477489e-005 Snap RBX7 RBX4 true true -0.5 0.5 0 0 -0.5 0.5 4 0 1 0.497988701 3.09700847 7.49977875 -1.0479228e-005 0.000129475666 -1 4.31596709e-005 1 0.000129475215 1 -4.31583139e-005 -1.04848159e-005 true 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Button 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 1 1 1.20000005 5 true true 0 0 -1.5 0 0 1 1 0 0 0 1 0 ClassicSword rbxasset://Textures/Sword128.png true false Swordscript r = game:service("RunService") local damage = 5 local slash_damage = 10 local lunge_damage = 30 sword = script.Parent.Handle Tool = script.Parent local SlashSound = Instance.new("Sound") SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav" SlashSound.Parent = sword SlashSound.Volume = .7 local LungeSound = Instance.new("Sound") LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav" LungeSound.Parent = sword LungeSound.Volume = .6 local UnsheathSound = Instance.new("Sound") UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav" UnsheathSound.Parent = sword UnsheathSound.Volume = 1 function blow(hit) if (hit.Parent == nil) then return end -- happens when bullet hits sword local humanoid = hit.Parent:findFirstChild("Humanoid") local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter) local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character if humanoid~=nil and humanoid ~= hum and hum ~= nil then -- final check, make sure sword is in-hand local right_arm = vCharacter:FindFirstChild("Right Arm") if (right_arm ~= nil) then local joint = right_arm:FindFirstChild("RightGrip") if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then tagHumanoid(humanoid, vPlayer) humanoid.Health = humanoid.Health - damage wait(1) untagHumanoid(humanoid) end end end end function tagHumanoid(humanoid, player) local creator_tag = Instance.new("ObjectValue") creator_tag.Value = player creator_tag.Name = "creator" creator_tag.Parent = humanoid end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end function attack() damage = slash_damage SlashSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" anim.Parent = Tool end function lunge() damage = lunge_damage LungeSound:play() local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Lunge" anim.Parent = Tool force = Instance.new("BodyVelocity") force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80 force.Parent = Tool.Parent.Torso wait(.25) swordOut() wait(.25) force.Parent = nil wait(.5) swordUp() damage = slash_damage end function swordUp() Tool.GripForward = Vector3.new(-1,0,0) Tool.GripRight = Vector3.new(0,1,0) Tool.GripUp = Vector3.new(0,0,1) end function swordOut() Tool.GripForward = Vector3.new(0,0,1) Tool.GripRight = Vector3.new(0,-1,0) Tool.GripUp = Vector3.new(-1,0,0) end function swordAcross() -- parry end Tool.Enabled = true local last_attack = 0 function onActivated() if not Tool.Enabled then return end Tool.Enabled = false local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end t = r.Stepped:wait() if (t - last_attack < .2) then lunge() else attack() end last_attack = t --wait(.5) Tool.Enabled = true end function onEquipped() UnsheathSound:play() end script.Parent.Activated:connect(onActivated) script.Parent.Equipped:connect(onEquipped) connection = sword.Touched:connect(blow) false true -0.5 0.5 0 0 -0.5 0.5 0 0 199 1 4.00000095 10 0.999999881 0 0 0 0 0.999999881 0 -0.999999881 0 true 0.5 2 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Handle 0.400000006 -0.5 0.5 0 0 0 0 0 -0.5 0.5 0 0 0 0 0 0 1 1 0.800000012 4 true 2 2 rbxasset://fonts/sword.mesh 5 Mesh 0 0 0 1 1 1 rbxasset://textures/SwordTexture.png 1 1 1 true false Local Gui local Tool = script.Parent; enabled = true function onButton1Down(mouse) if not enabled then return end enabled = false mouse.Icon = "rbxasset://textures\\GunWaitCursor.png" wait(.5) mouse.Icon = "rbxasset://textures\\GunCursor.png" enabled = true end function onEquippedLocal(mouse) if mouse == nil then print("Mouse not found") return end mouse.Icon = "rbxasset://textures\\GunCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end Tool.Equipped:connect(onEquippedLocal) true false PutThisScriptInTool local db = false script.Parent.Parent.Touched:connect(function(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if db == false then db = true if (plr == nil) then return end script.Parent:clone().Parent = plr.Backpack wait(2) db = false end end) true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 0.499969482 3.4000051 11.4999809 1 -1.09127263e-009 5.82087989e-011 1.09127263e-009 1 8.79645079e-010 -5.82087989e-011 -8.79645079e-010 1 true 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Smooth Block Model 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0.300000012 0 0 0 1 5 6 1 true 0 3 0 -1 -0 -0 0 0 1 0 1 0 0.00024408102 -0.591030121 1.49913025 -0.99999994 -0.000312072603 -5.52571877e-010 -5.52709323e-010 4.39790288e-010 1 -0.000312072632 0.99999994 -4.39962761e-010 Snap RBX17 RBX4 true true -0.5 0.5 0 0 -0.5 0.5 4 0 199 -1.5000248 3.39263129 9.50001526 1.04808478e-005 -2.31108952e-005 1 -1.26407358e-005 1 2.3111028e-005 -1 -1.26409777e-005 1.04805558e-005 true 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Smooth Block Model 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 3 0 0.300000012 0 0 0 1 3 6 1 true 0 3 0 -1 -0 -0 0 0 1 0 1 0 -1.9991951 -0.598403931 -0.501499176 -0.000322553504 0.99999994 -2.31064096e-005 1.26402956e-005 2.31104896e-005 1 0.99999994 0.000322553242 -1.26477489e-005 Snap RBX20 RBX4 true 0 0 0 1 0 0 0 1 0 0 0 1 Sword null true true -0.5 0.5 0 0 -0.5 0.5 4 0 1001 0.499257565 6.99102974 10.0008507 0.99999994 -5.38563305e-010 0.000312072691 5.38426137e-010 1 4.40022824e-010 -0.000312072661 -4.39854791e-010 0.99999994 true 0.5 1 0.300000012 -0.5 0.5 0 0 -0.5 0.5 0 0 false 256 Head 0 -0.5 0.5 0 0 0 0 0 -0.5 0.5 0 0 0.300000012 0 0 0 1 5 1.20000005 4 true 0 0 Humanoid 0 true false PutThisScriptInTool local db = false script.Parent.Parent.Touched:connect(function(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if db == false then db = true if (plr == nil) then return end script.Parent:clone().Parent = plr.Backpack wait(2) db = false end end)