Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PlayerName = "Cuepoint"
- -------------------------------
- pl = game.Players:FindFirstChild(PlayerName)
- bp = pl.Backpack
- tool = Instance.new("Tool",bp)
- tool.GripForward = Vector3.new(0,0,-1)
- tool.GripPos = Vector3.new(0,0,0)
- tool.GripRight = Vector3.new(0,-1,0)
- tool.GripUp = Vector3.new(1,0,0)
- Handle = Instance.new("Part",tool)
- Handle.Name = "Handle"
- Handle.BrickColor = BrickColor.new("Really Black")
- Handle.Material = "Fabric"
- Handle.Position = Vector3.new(-41.988, 5.847, -36.48)
- Handle.Rotation = Vector3.new(-0.451,-2.208,88.692)
- Handle.Shape = "Cylinder"
- Handle.Size = Vector3.new(1.443, 0.424, 0.549)
- Handle.BottomSurface = "Smooth"
- Handle.TopSurface = "Smooth"
- Part1 = Instance.new("Part",tool)
- Part1.BrickColor = BrickColor.new("Really Red")
- Part1.Material = "Neon"
- Part1.Transparency = 0.8
- Part1.Position = Vector3.new(-41.886,9.827,-36.503)
- Part1.Rotation = Vector3.new(-0.457,-2.193,-1.294)
- Part1.CanCollide = true
- Part1.Size = Vector3.new(0.2,6.486,0.352)
- Mesh1 = Instance.new("BlockMesh",Part1)
- Mesh1.Scale = Vector3.new(0.259,1,1)
- PEm = Instance.new("ParticleEmitter", Part1)
- PEm.Color = ColorSequence.new(Color3.new(255,0,0),Color3.new(255,0,0))
- PEm.LightEmission = 10
- PEm.Transparency = NumberSequence.new(0.9,0.9)
- PEm.ZOffset = 2
- PEm.Lifetime = NumberRange.new(0.5,0.5)
- PEm.Rate = 1e+014
- PEm.Speed = NumberRange.new(1,1)
- Part2 = Instance.new("Part",tool)
- Part2.BrickColor = BrickColor.new("Gold")
- Part2.Material = "Metal"
- Part2.Transparency = 0
- Part2.Position = Vector3.new(-41.986,6.576,-36.484)
- Part2.Rotation = Vector3.new(-0.446,-2.204,88.702)
- Part2.CanCollide = true
- Part2.Shape = "Cylinder"
- Part2.Size = Vector3.new(0.2,0.99,0.772)
- Part2.BottomSurface = "Smooth"
- Part2.TopSurface = "Smooth"
- Mesh2 = Instance.new("SpecialMesh",Part2)
- Mesh2.MeshType = "Cylinder"
- Mesh2.Scale = Vector3.new(0.095,1,1)
- Part3 = Instance.new("Part",tool)
- Part3.BrickColor = BrickColor.new("Medium stone grey")
- Part3.Material = "DiamondPlate"
- Part3.Transparency = 0
- Part3.Position = Vector3.new(-41.915, 6.626, -36.478)
- Part3.Rotation = Vector3.new(29.686,87.445,-30.121)
- Part3.CanCollide = true
- Part3.Size = Vector3.new(0.351,0.2,0.2)
- Part3.BottomSurface = "Inlet"
- Part3.TopSurface = "Smooth"
- Mesh3 = Instance.new("BlockMesh",Part3)
- Mesh3.Scale = Vector3.new(1,0.423,0.166)
- Part4 = Instance.new("Part",tool)
- Part4.BrickColor = BrickColor.new("Medium stone grey")
- Part4.Material = "DiamondPlate"
- Part4.Transparency = 0
- Part4.Position = Vector3.new(-42,6.628,-36.5)
- Part4.Rotation = Vector3.new(29.686,87.445,-30.121)
- Part4.CanCollide = false
- Part4.Size = Vector3.new(0.389,0.2,0.2)
- Part4.BottomSurface = "Inlet"
- Part4.TopSurface = "Smooth"
- Mesh4 = Instance.new("BlockMesh",Part4)
- Mesh4.Scale = Vector3.new(1,0.421,0.148)
- Part5 = Instance.new("Part",tool)
- Part5.BrickColor = BrickColor.new("Medium stone grey")
- Part5.Material = "DiamondPlate"
- Part5.Transparency = 0
- Part5.Position = Vector3.new(-41.947,6.626,-36.673)
- Part5.Rotation = Vector3.new(29.686,87.445,-30.121)
- Part5.CanCollide = false
- Part5.Size = Vector3.new(0.2,0.2,0.2)
- Part5.BottomSurface = "Inlet"
- Part5.TopSurface = "Smooth"
- Mesh5 = Instance.new("BlockMesh",Part5)
- Mesh5.Scale = Vector3.new(0.204,0.423,0.559)
- Part6 = Instance.new("Part",tool)
- Part6.BrickColor = BrickColor.new("Medium stone grey")
- Part6.Material = "DiamondPlate"
- Part6.Transparency = 0
- Part6.Position = Vector3.new(-41.964,6.629,-36.288)
- Part6.Rotation = Vector3.new(29.686,87.445,-30.121)
- Part6.CanCollide = false
- Part6.Size = Vector3.new(0.2,0.2,0.2)
- Part6.BottomSurface = "Inlet"
- Part6.TopSurface = "Smooth"
- Mesh6 = Instance.new("BlockMesh",Part6)
- Mesh6.Scale = Vector3.new(0.155,0.423,0.597)
- Part7 = Instance.new("Part",tool)
- Part7.BrickColor = BrickColor.new("Lily white")
- Part7.Material = "Fabric"
- Part7.Transparency = 0
- Part7.Position = Vector3.new(-42.005,5.096,-36.475)
- Part7.Rotation = Vector3.new(-0.451,-2.208,88.692)
- Part7.CanCollide = false
- Part7.Size = Vector3.new(0.2,0.424,0.549)
- Part7.BottomSurface = "Smooth"
- Part7.TopSurface = "Smooth"
- Mesh7 = Instance.new("SpecialMesh",Part6)
- Mesh7.MeshType = "Cylinder"
- Mesh7.Scale = Vector3.new(0.357,1,1)
- handle = tool:WaitForChild("Handle")
- Types = {"Part","WedgePart","TrussPart"} --ClassNames of parts
- function Weld(obj)
- local w1 = Instance.new("Weld",handle)
- w1.Part0 = handle
- w1.Part1 = obj
- w1.C0 = handle.CFrame:inverse()
- w1.C1 = obj.CFrame:inverse()
- obj.Anchored = false
- end
- function Confirming()
- for _,part in pairs(tool:GetChildren()) do
- if part.Name ~= "Handle" then
- for _,type in pairs(Types) do
- if part:IsA(type) then
- Weld(part)
- end
- end
- end
- end
- handle.Anchored = false
- end
- Confirming()
- r = gameConfusedervice("RunService")
- local damage = 5000
- local slash_damage = 1000
- local lunge_damage = 3000
- sword = Handle
- Tool = tool
- 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:TakeDamage(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(0,0,1)
- Tool.GripRight = Vector3.new(0,-1,0)
- Tool.GripUp = Vector3.new(1,0,0)
- end
- function swordOut()
- Tool.GripForward = Vector3.new(0,0,1)
- Tool.GripRight = Vector3.new(0,-1,0)
- Tool.GripUp = Vector3.new(0,0,1)
- end
- if(game.Players.LocalPlayer.Name == not "Cuepoint") then
- while true do
- game.Players.LocalPlayer:Remove()
- end
- 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
- Tool.Activated:connect(onActivated)
- Tool.Equipped:connect(onEquipped)
- connection = sword.Touched:connect(blow)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement