Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Player Stuff
- Pleyur = game.Players:WaitForChild("ChancellorXI")
- Chara = Pleyur.Character
- local moosik = 4 -- 1 for Hopes and Dreams, 2 for Necrofantasia, 3 for Nuclear Fusion,
- BlastQuotes = {"Readying Hikari Blast...","Prepare for your end!","I will purify your soul!"}
- BusterQuotes = {"Preparing Hikari Buster!","Feel the wrath of Light!","This is the true power!"}
- FinalBlastQuotes = {"NOW PERISH!","DIE!","YOU WON'T SURVIVE THIS ONE!","HIKARI BLAST!"}
- EquipBladeQuotes = {"Hikari Blade!","I'll cut you to pieces!","You made a mistake being too close!"}
- SlashFireQuotes = {"DON'T GET AWAY!","SWIFT SLICE!","YOU WON'T RUN!"}
- function chat(string)
- chansu = math.random(1,2)
- if chansu == 1 then
- ch = game:GetService("Chat"):Chat(Chara.Head, string, "Red")
- end
- end
- Chara.Humanoid.MaxHealth = math.huge
- Chara.Humanoid.Health = math.huge
- Chara.Humanoid.WalkSpeed = 40
- local lol = nil
- if Pleyur ~= nil then
- lol = Instance.new("Tool", Pleyur.Backpack)
- lol.Name = "Hikari Blast"
- lol.CanBeDropped = false
- lol2 = Instance.new("Tool", Pleyur.Backpack)
- lol2.Name = "Purity Blast"
- lol2.CanBeDropped = false
- lol3 = Instance.new("Tool", Pleyur.Backpack)
- lol3.Name = "Hikari Blade"
- lol3.CanBeDropped = false
- lol3.GripForward = Vector3.new(-1, 0, 0)
- lol3.GripPos = Vector3.new(0, 0, -2.52)
- lol3.GripRight = Vector3.new(0, 1, 0)
- lol3.GripUp = Vector3.new(0, 0, 1)
- handur2 = Instance.new("Part", lol)
- handur2.Name = "Handle"
- handur2.Size = Vector3.new(.2, .2, .2)
- handur2.Transparency = 1
- handur3 = Instance.new("Part", lol2)
- handur3.Name = "Handle"
- handur3.Size = Vector3.new(.2, .2, .2)
- handur3.Transparency = 1
- handur = Instance.new("Part", lol3)
- handur.Name = "Handle"
- handur.Size = Vector3.new(1, 0.8, 10)
- handur.Reflectance = 10
- handur.BrickColor = BrickColor.new("Institutional white")
- meshhh = Instance.new("SpecialMesh", handur)
- meshhh.MeshType = "FileMesh"
- meshhh.MeshId = "http://www.roblox.com/asset/?id=22771612"
- meshhh.Scale = Vector3.new(0.5,0.5,0.8)
- end
- local transPoints = {
- NumberSequenceKeypoint.new(0,.819,.0375),
- NumberSequenceKeypoint.new(.207,.594,.0187),
- NumberSequenceKeypoint.new(.4,.55,.031),
- NumberSequenceKeypoint.new(.57,.619,.05),
- NumberSequenceKeypoint.new(.76,.8,.0375),
- NumberSequenceKeypoint.new(1,1,0),
- }
- local LAEffectu = Instance.new("ParticleEmitter", Chara["Left Arm"])
- LAEffectu.Texture = "rbxasset://textures/particles/smoke_main.dds"
- LAEffectu.LightEmission = 1
- LAEffectu.Enabled = false
- LAEffectu.Rate = 100000
- LAEffectu.EmissionDirection = "Bottom"
- LAEffectu.Size = NumberSequence.new(1,1)
- LAEffectu.Lifetime = NumberRange.new(.3,.3)
- LAEffectu.RotSpeed = NumberRange.new(1000,1000)
- LAEffectu.Speed = NumberRange.new(10,10)
- LAEffectu.Transparency = NumberSequence.new(transPoints)
- LAEffectu.VelocitySpread = 20
- LAEffectu.LockedToPart = true
- local Slash1 = Instance.new("Animation",script)
- Slash1.AnimationId = "http://www.roblox.com/Asset?ID=218504594"
- local Slash2 = Instance.new("Animation",script)
- Slash2.AnimationId = "http://www.roblox.com/asset/?id=184573779"
- local Slash3 = Instance.new("Animation",script)
- Slash3.AnimationId = "http://www.roblox.com/asset/?id=186934910"
- local Slash4 = Instance.new("Animation",script)
- Slash4.AnimationId = "http://www.roblox.com/asset/?id=218508052"
- local Beam = Instance.new("Animation",script)
- Beam.AnimationId = "http://www.roblox.com/Asset?ID=86504773"
- WhackAnim = Chara.Humanoid:LoadAnimation(Slash1)
- WhackAnim2 = Chara.Humanoid:LoadAnimation(Slash2)
- WhackAnim3 = Chara.Humanoid:LoadAnimation(Slash3)
- WhackAnim4 = Chara.Humanoid:LoadAnimation(Slash4)
- Beam = Chara.Humanoid:LoadAnimation(Beam)
- local SwordEffect = Instance.new("ParticleEmitter", handur)
- SwordEffect.Texture = "rbxasset://textures/particles/smoke_main.dds"
- SwordEffect.LightEmission = 1
- SwordEffect.Enabled = false
- SwordEffect.Rate = 1000000
- SwordEffect.Size = NumberSequence.new(2,2)
- SwordEffect.Lifetime = NumberRange.new(.3,.3)
- SwordEffect.Transparency = NumberSequence.new(transPoints)
- SwordEffect.Speed = NumberRange.new(0,0)
- SwordEffect.RotSpeed = NumberRange.new(1000,1000)
- local chargesnd = Instance.new("Sound")
- chargesnd.Name = "Charge"
- chargesnd.Parent = script
- chargesnd.SoundId = "http://www.roblox.com/asset/?id=2101137"
- chargesnd.Volume = 1
- chargesnd.Pitch = .5
- local shotsnd = Instance.new("Sound")
- shotsnd.Name = "Shoot"
- shotsnd.Parent = script
- shotsnd.SoundId = "http://www.roblox.com/asset/?id=13775494"
- shotsnd.Volume = 1
- shotsnd.Pitch = .7
- local shotsnd2 = Instance.new("Sound")
- shotsnd2.Name = "Shoot2"
- shotsnd2.Parent = script
- shotsnd2.SoundId = "http://www.roblox.com/asset/?id=48618802"
- shotsnd2.Volume = 1
- shotsnd2.Pitch = 1
- local lungesnd = Instance.new("Sound")
- lungesnd.Name = "Lunge"
- lungesnd.Parent = script
- lungesnd.SoundId = "rbxasset://sounds/swordlunge.wav"
- lungesnd.Volume = 1
- lungesnd.Pitch = 1
- local slshsnd = Instance.new("Sound")
- slshsnd.Name = "Slash"
- slshsnd.Parent = lol3
- slshsnd.SoundId = "http://www.roblox.com/Asset?ID=154965962"
- slshsnd.Volume = 1
- slshsnd.Pitch = 1
- local slshsnd2 = Instance.new("Sound")
- slshsnd2.Name = "Slash2"
- slshsnd2.Parent = lol3
- slshsnd2.SoundId = "http://www.roblox.com/Asset?ID=231917758"
- slshsnd2.Volume = 1
- slshsnd2.Pitch = 1
- local hitsnd = Instance.new("Sound")
- hitsnd.Name = "Hit"
- hitsnd.Parent = lol3
- hitsnd.SoundId = "http://www.roblox.com/asset/?id=154965973"
- hitsnd.Volume = 1
- hitsnd.Pitch = 1
- --Godly Effects, bro!-------------------------------------------------------------------------------------------------------------------------
- Void = nil
- VoidParts = {}
- function RayCast(Position, Direction, MaxDistance, IgnoreList)
- return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList)
- end
- local loopsound = Instance.new("Sound")
- loopsound.Name = "LoopSound"
- loopsound.Looped = true
- loopsound.Parent = script
- loopsound.Volume = 1
- if moosik == 1 then --Hopes and Dreams
- loopsound.SoundId = "http://www.roblox.com/asset/?id=328606227"
- loopsound.Pitch = 1
- elseif moosik == 2 then --Necrofantasia
- loopsound.SoundId = "http://www.roblox.com/asset/?id=170884430"
- loopsound.Pitch = .25
- elseif moosik == 3 then --Nuclear Fusion
- loopsound.SoundId = "http://www.roblox.com/asset/?id=170885892"
- loopsound.Pitch = .25
- elseif moosik == 4 then --Victory
- loopsound.SoundId = "http://www.roblox.com/asset/?id=565863302"
- loopsound.Pitch = 1
- end
- script.LoopSound:Play()
- local startsound = Instance.new("Sound")
- startsound.Name = "StartUp"
- startsound.Parent = script
- startsound.SoundId = "rbxasset://Sounds/collide.wav"
- startsound.Volume = 0.5
- startsound.Pitch = 1
- local ex = Instance.new("Explosion", game.Workspace)
- ex.BlastPressure = 0
- ex.Position = Chara:FindFirstChild("Torso").Position
- script.StartUp:Play()
- Humanoid = Chara:FindFirstChild("Humanoid")
- Torso = Chara:FindFirstChild("Torso")
- if not Pleyur or not Humanoid or Humanoid.Health == 0 or not Torso then
- return
- end
- Equipped = true
- Void = Instance.new("Model")
- Void.Name = "Void"
- Angle = 0
- for i = 1, 1 do
- local VoidPart = Instance.new("Part")
- VoidPart.Name = "VoidPart"
- VoidPart.Transparency = 0.2
- VoidPart.BrickColor = BrickColor.new("Institutional white")
- VoidPart.Material = Enum.Material.Plastic
- VoidPart.Shape = Enum.PartType.Block
- VoidPart.TopSurface = Enum.SurfaceType.Smooth
- VoidPart.BottomSurface = Enum.SurfaceType.Smooth
- VoidPart.Anchored = true
- VoidPart.CanCollide = false
- VoidPart.Locked = true
- VoidPart.Size = Vector3.new(10, 0.2, 10)
- local Meshu = Instance.new("SpecialMesh", VoidPart)
- Meshu.MeshType = "FileMesh"
- Meshu.MeshId = "http://www.roblox.com/asset/?id=20329976"
- Meshu.Offset = Vector3.new(0,0,-1)
- Meshu.Scale = Vector3.new(10,4,10)
- VoidPart.Parent = Void
- local Light = Instance.new("PointLight", VoidPart)
- Light.Brightness = 100
- Light.Range = 10
- local Effectu = Instance.new("ParticleEmitter", VoidPart)
- Effectu.LightEmission = 1
- Effectu.Lifetime = NumberRange.new(5,5)
- Effectu.Transparency = NumberSequence.new(transPoints)
- Effectu.RotSpeed = NumberRange.new(100,100)
- Effectu.Speed = NumberRange.new(10,10)
- Effectu.LockedToPart = true
- table.insert(VoidParts, VoidPart)
- end
- Spawn(function()
- while Equipped and Humanoid.Parent and Humanoid.Health > 0 and Chara do
- if Angle == 360 then
- Angle = 0
- end
- Angle = Angle + .25
- local Hit, EndPosition = RayCast(Chara.Torso.Position, Vector3.new(0, -1, 0), (Chara.Torso.Size.Y * 6.5), {Chara})
- if Hit then
- if not Void.Parent then
- Void.Parent = Chara
- end
- for i, v in pairs(VoidParts) do
- v.CFrame = CFrame.new(Chara.Torso.Position.X, EndPosition.Y, Chara.Torso.Position.Z) * CFrame.Angles(0, (Angle + i), 0)
- end
- else
- Void.Parent = nil
- end
- wait()
- end
- end)
- --Hikari Blast-------------------------------------------------------------------------------------------------------------------------
- local r = game:service("RunService")
- local debris = game:GetService("Debris")
- sword = handur2
- Tool = lol
- local damage = 0
- local proc = 40
- local lungeAnim = nil
- function blowprojectile(hit)
- if (hit.Parent == nil) then return end -- happens when bullet hits sword
- local humanoid = nil
- local ceal = hit.Parent:GetChildren()
- for i = 1, #ceal do
- if ceal[i].ClassName == "Humanoid" then
- humanoid = ceal[i]
- end
- end
- 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
- hit:BreakJoints()
- 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(proc)
- local bodyp = humanoid.Parent:GetChildren()
- if humanoid.Health <= 1 then
- for i = 1, #bodyp do
- if bodyp[i].ClassName == "Part" then
- if bodyp[i]:FindFirstChild("Effecto") == nil then
- bodyp[i].Material = "Neon"
- bodyp[i].BrickColor = BrickColor.new("Institutional white")
- local LAE = Instance.new("ParticleEmitter", bodyp[i])
- LAE.Name = "Effecto"
- LAE.Texture = "rbxasset://textures/particles/smoke_main.dds"
- LAE.LightEmission = 1
- LAE.Rate = 20
- LAE.EmissionDirection = "Bottom"
- LAE.Lifetime = NumberRange.new(0.3,0.3)
- LAE.RotSpeed = NumberRange.new(1000,1000)
- LAE.Speed = NumberRange.new(0,0)
- end
- end
- if bodyp[i].Name == "Head" then
- bodyp[i].Mesh:destroy()
- bodyp[i].face:destroy()
- end
- if bodyp[i].ClassName == "Shirt" or bodyp[i].ClassName == "ShirtGraphic" or bodyp[i].ClassName == "Pants" or bodyp[i].ClassName == "CharacterMesh" then
- bodyp[i]:destroy()
- end
- end
- end
- local AE = Instance.new("ParticleEmitter", humanoid.Parent.Torso)
- AE.Name = "HitSwordEff"
- AE.Texture = "rbxasset://textures/particles/sparkles_main.dds"
- AE.LightEmission = 1
- AE.Rate = 10000
- AE.EmissionDirection = "Front"
- AE.Lifetime = NumberRange.new(.5,.5)
- AE.Transparency = NumberSequence.new(transPoints)
- AE.RotSpeed = NumberRange.new(1000,1000)
- AE.Speed = NumberRange.new(50,50)
- AE.VelocitySpread = 100
- wait(1)
- AE:Destroy()
- untagHumanoid(humanoid)
- end
- end
- end
- end
- function fire(v, part)
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local missile = Instance.new("Part")
- missile.CFrame = part.CFrame * CFrame.Angles(math.pi/2,0,0)
- missile.Size = Vector3.new(1,1,1)
- missile.Velocity = v.unit * 100
- missile.BrickColor = BrickColor.new("Institutional white")
- missile.Material = "Neon"
- missile.BottomSurface = 0
- missile.TopSurface = 0
- missile.CanCollide = false
- missile.Elasticity = .05
- missile.Friction = .7
- missile.Name = "Bullet"
- missile.Touched:connect(blowprojectile)
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = "Sphere"
- mesh.Parent = missile
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,137,0)
- force.Parent = missile
- local shs = Instance.new("ParticleEmitter", missile)
- shs.Texture = "rbxasset://textures/particles/smoke_main.dds"
- shs.LightEmission = 1
- shs.Rate = 100000
- shs.EmissionDirection = "Bottom"
- shs.Size = NumberSequence.new(0.5,0.5)
- shs.Lifetime = NumberRange.new(1,1)
- shs.Transparency = NumberSequence.new(transPoints)
- shs.RotSpeed = NumberRange.new(1000,1000)
- shs.Speed = NumberRange.new(0,0)
- -- local force = Instance.new("BodyForce")
- -- force.Name = "BulletFloat"
- -- force.force = Vector3.new(0,98.1,0)
- -- force.Parent = missile
- debris:AddItem(missile,5)
- missile.Parent = game.Workspace
- shotsnd:play()
- end
- function giantfire(v, part)
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local missile = Instance.new("Part")
- missile.CFrame = part.CFrame * CFrame.Angles(math.pi/2,0,0)
- missile.Size = Vector3.new(4,4,4)
- missile.Velocity = v.unit * 100
- missile.BrickColor = BrickColor.new("Institutional white")
- missile.Material = "Neon"
- missile.BottomSurface = 0
- missile.TopSurface = 0
- missile.CanCollide = false
- missile.Elasticity = .05
- missile.Friction = .7
- missile.Name = "Bullet"
- missile.Touched:connect(blowprojectile)
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = "Sphere"
- mesh.Parent = missile
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,9000,0)
- force.Parent = missile
- local shs = Instance.new("ParticleEmitter", missile)
- shs.Texture = "rbxasset://textures/particles/smoke_main.dds"
- shs.LightEmission = 1
- shs.Rate = 100000
- shs.EmissionDirection = "Bottom"
- shs.Size = NumberSequence.new(0.5,0.5)
- shs.Lifetime = NumberRange.new(1,1)
- shs.Transparency = NumberSequence.new(transPoints)
- shs.RotSpeed = NumberRange.new(1000,1000)
- shs.Speed = NumberRange.new(0,0)
- -- local force = Instance.new("BodyForce")
- -- force.Name = "BulletFloat"
- -- force.force = Vector3.new(0,98.1,0)
- -- force.Parent = missile
- debris:AddItem(missile,5)
- missile.Parent = game.Workspace
- shotsnd2:play()
- 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 onActivated()
- if Tool.Enabled then
- Tool.Enabled = false
- -- local character = Chara;
- -- local humanoid = character.Humanoid
- -- if humanoid == nil then
- -- print("Humanoid not found")
- -- return
- -- end
- Beam:Play()
- LAEffectu.Enabled = true
- chargesnd:play()
- chat(BlastQuotes[math.random(1, #BlastQuotes)])
- wait(2)
- for i = 1, 6 do
- wait(0.3)
- fire(Chara.HumanoidRootPart.CFrame.lookVector, Chara["Left Arm"])
- end
- WhackAnim3:Play()
- chat(FinalBlastQuotes[math.random(1, #FinalBlastQuotes)])
- wait(0.6)
- shotsnd.Pitch = 0.5
- giantfire(Chara.HumanoidRootPart.CFrame.lookVector, Chara["Left Arm"])
- wait(0.1)
- shotsnd.Pitch = 0.7
- LAEffectu.Enabled = false
- WhackAnim3:Stop()
- end
- Tool.Enabled = true
- end
- function onEquipped()
- local vCharacter = Chara
- local humanoid = vCharacter:findFirstChild("Humanoid")
- if humanoid ~= nil then end
- end
- Tool.Activated:connect(onActivated)
- Tool.Equipped:connect(onEquipped)
- --Beam of Purity-------------------------------------------------------------------------------------------------------------------------
- --Sword!-------------------------------------------------------------------------------------------------------------------------
- -- Handle to the game service, in case we need to get the time
- r = game:service("RunService")
- -- normal damage, when the Mackerel touches a humanoid object
- local damage = 0
- -- Whack damage
- local whack_damage = 10
- -- Handle to tool
- Mackerel = lol3.Handle
- Tool3 = lol3
- local animstates = 1
- -- When a collision is detected between the player and another character
- function blow(hit)
- if hit == nil or hit.Parent == nil then return end
- local opponent = hit.Parent:findFirstChild("Torso")
- local humanoid = nil
- local ceal = hit.Parent:GetChildren()
- for i = 1, #ceal do
- if ceal[i].ClassName == "Humanoid" then
- humanoid = ceal[i]
- end
- end
- local vCharacter = Tool3.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local myTorso = vCharacter:findFirstChild("Torso")
- 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 Mackerel is in-hand
- hit:BreakJoints()
- local right_arm = vCharacter:FindFirstChild("Right Arm")
- if (right_arm ~= nil) then
- local joint = right_arm:FindFirstChild("RightGrip")
- if (joint ~= nil and (joint.Part0 == Mackerel or joint.Part1 == Mackerel)) then
- tagHumanoid(humanoid, vPlayer)
- humanoid:TakeDamage(damage)
- -- Add body velocity to the opponent to push him when he gets whacked
- -- local bodyVelocity = Instance.new("BodyVelocity")
- -- bodyVelocity.P = 100000
- -- bodyVelocity.maxForce = Vector3.new(bodyVelocity.P, bodyVelocity.P, bodyVelocity.P)
- -- bodyVelocity.velocity = (opponent.Position - myTorso.Position) * 6
- -- bodyVelocity.Parent = opponent
- -- wait(0.5)
- -- if bodyVelocity ~= nil then bodyVelocity:remove() end
- if humanoid.Health <= 1 then
- local bodyp = hit.Parent:GetChildren()
- for i = 1, #bodyp do
- if bodyp[i].ClassName == "Part" then
- if bodyp[i]:FindFirstChild("Effecto") == nil then
- bodyp[i].Material = "Neon"
- bodyp[i].BrickColor = BrickColor.new("Institutional white")
- local LAE = Instance.new("ParticleEmitter", bodyp[i])
- LAE.Name = "Effecto"
- LAE.Texture = "rbxasset://textures/particles/smoke_main.dds"
- LAE.LightEmission = 1
- LAE.Rate = 20
- LAE.EmissionDirection = "Bottom"
- LAE.Lifetime = NumberRange.new(0.3,0.3)
- LAE.RotSpeed = NumberRange.new(1000,1000)
- LAE.Speed = NumberRange.new(0,0)
- end
- end
- if bodyp[i].Name == "Head" then
- bodyp[i].Mesh:destroy()
- bodyp[i].face:destroy()
- end
- if bodyp[i].ClassName == "Shirt" or bodyp[i].ClassName == "ShirtGraphic" or bodyp[i].ClassName == "Pants" or bodyp[i].ClassName == "CharacterMesh" then
- bodyp[i]:destroy()
- end
- end
- end
- Tool3:FindFirstChild("Hit"):play()
- local AE = Instance.new("ParticleEmitter", humanoid.Parent.Torso)
- AE.Name = "HitSwordEff"
- AE.Texture = "rbxasset://textures/particles/sparkles_main.dds"
- AE.LightEmission = 1
- AE.Rate = 10000
- AE.EmissionDirection = "Front"
- AE.Lifetime = NumberRange.new(.3,.3)
- AE.Transparency = NumberSequence.new(transPoints)
- AE.RotSpeed = NumberRange.new(1000,1000)
- AE.Speed = NumberRange.new(50,50)
- AE.VelocitySpread = 100
- wait(0.5)
- AE:Destroy()
- untagHumanoid(humanoid)
- end
- end
- end
- end
- function blowprojectileslash(hit)
- if (hit.Parent == nil) then return end -- happens when bullet hits sword
- local humanoid = nil
- local ceal = hit.Parent:GetChildren()
- for i = 1, #ceal do
- if ceal[i].ClassName == "Humanoid" then
- humanoid = ceal[i]
- end
- end
- local vCharacter = Tool3.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
- hit:BreakJoints()
- -- 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(100)
- if humanoid.Health <= 1 then
- local bodyp = hit.Parent:GetChildren()
- for i = 1, #bodyp do
- if bodyp[i].ClassName == "Part" then
- if bodyp[i]:FindFirstChild("Effecto") == nil then
- bodyp[i].Material = "Neon"
- bodyp[i].BrickColor = BrickColor.new("Institutional white")
- local LAE = Instance.new("ParticleEmitter", bodyp[i])
- LAE.Name = "Effecto"
- LAE.Texture = "rbxasset://textures/particles/smoke_main.dds"
- LAE.LightEmission = 1
- LAE.Rate = 20
- LAE.EmissionDirection = "Bottom"
- LAE.Lifetime = NumberRange.new(.5,.5)
- LAE.Transparency = NumberSequence.new(transPoints)
- LAE.RotSpeed = NumberRange.new(1000,1000)
- LAE.Speed = NumberRange.new(0,0)
- end
- end
- if bodyp[i].Name == "Head" then
- bodyp[i].Mesh:destroy()
- bodyp[i].face:destroy()
- end
- if bodyp[i].ClassName == "Shirt" or bodyp[i].ClassName == "ShirtGraphic" or bodyp[i].ClassName == "Pants" or bodyp[i].ClassName == "CharacterMesh" then
- bodyp[i]:destroy()
- end
- end
- end
- Tool3:FindFirstChild("Hit"):play()
- local AE = Instance.new("ParticleEmitter", humanoid.Parent.Torso)
- AE.Name = "HitSwordEff"
- AE.Texture = "rbxasset://textures/particles/sparkles_main.dds"
- AE.LightEmission = 1
- AE.Rate = 10000
- AE.EmissionDirection = "Front"
- AE.Lifetime = NumberRange.new(0.3,0.3)
- AE.Transparency = NumberSequence.new(transPoints)
- AE.RotSpeed = NumberRange.new(1000,1000)
- AE.Speed = NumberRange.new(50,50)
- AE.VelocitySpread = 100
- wait(1)
- AE:Destroy()
- untagHumanoid(humanoid)
- -- end
- -- end
- end
- end
- function fireslash(v, part)
- local vCharacter = Tool3.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local missile = Instance.new("Part")
- missile.CFrame = part.CFrame * CFrame.Angles(math.pi/2,0,0)
- missile.Size = Vector3.new(1,1,1)
- missile.Velocity = v.unit * 400
- missile.BrickColor = BrickColor.new("Institutional white")
- missile.Material = "Neon"
- missile.BottomSurface = 0
- missile.TopSurface = 0
- missile.CanCollide = false
- missile.Elasticity = .05
- missile.Friction = .7
- missile.Name = "Bullet"
- missile.Touched:connect(blowprojectileslash)
- local mesh = Instance.new("SpecialMesh")
- mesh.MeshType = "Sphere"
- mesh.Scale = Vector3.new(0.1,7,7)
- mesh.Parent = missile
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,137,0)
- force.Parent = missile
- -- local mehss = Instance.new("SpecialMesh", missile)
- -- mehss.MeshType = "FileMesh"
- -- mehss.MeshId = "rbxassetid://65514292"
- -- mehss.Scale = Vector3.new(10,10,1)
- local shs = Instance.new("ParticleEmitter", missile)
- shs.Texture = "rbxasset://textures/particles/sparkles_main.dds"
- shs.LightEmission = 1
- shs.Rate = 20
- shs.EmissionDirection = "Bottom"
- shs.Size = NumberSequence.new(0.5,0.5)
- shs.Lifetime = NumberRange.new(1,1)
- shs.Transparency = NumberSequence.new(transPoints)
- shs.RotSpeed = NumberRange.new(1000,1000)
- shs.Speed = NumberRange.new(0,0)
- -- local force = Instance.new("BodyForce")
- -- force.Name = "BulletFloat"
- -- force.force = Vector3.new(0,98.1,0)
- -- force.Parent = missile
- debris:AddItem(missile,5)
- missile.Parent = game.Workspace
- slshsnd2:play()
- slshsnd:play()
- lungesnd:play()
- end
- -- Tagging and Untagging primarily for the leaderboards
- 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
- -- On, left click!
- function attack()
- damage = whack_damage
- -- Play the sound
- if Tool3:FindFirstChild("Slash") and Tool3:FindFirstChild("Slash2") then Tool3:FindFirstChild("Slash"):Play() Tool3:FindFirstChild("Slash2"):Play() end
- end
- -- Tentative lock
- Tool3.Enabled = true
- function onActivated()
- if not Tool3.Enabled then
- return
- end
- Tool3.Enabled = false
- -- Check if the handle to the Player is still available in the space
- local MyPlayer = Chara
- if MyPlayer == nil then
- return
- end
- -- Check to see if the humanoid is still in the world
- local MyHumanoid= MyPlayer:FindFirstChild("Humanoid")
- if MyHumanoid == nil then
- return
- end
- attack()
- -- Load and play the animation
- SwordEffect.Enabled = true
- if WhackAnim and WhackAnim2 and WhackAnim3 and WhackAnim4 then
- if animstates == 1 then
- WhackAnim:Play()
- animstates = 2
- elseif animstates == 2 then
- WhackAnim2:Play()
- lol3.GripUp = Vector3.new(1,-1,1)
- animstates = 3
- elseif animstates == 3 then
- WhackAnim3:Play()
- animstates = 4
- elseif animstates == 4 then
- WhackAnim4:Play()
- wait(0.3)
- slshsnd2.Pitch = 1.2
- slshsnd:play()
- slshsnd2:play()
- chat(SlashFireQuotes[math.random(1, #SlashFireQuotes)])
- wait(0.3)
- fireslash(Chara.HumanoidRootPart.CFrame.lookVector, Chara.HumanoidRootPart)
- slshsnd2.Pitch = 1
- animstates = 1
- end
- end
- wait(0.5)
- lol3.GripRight = Vector3.new(0,1,0)
- lol3.GripUp = Vector3.new(0,0,1)
- SwordEffect.Enabled = false
- Tool3.Enabled = true
- -- Reset the damage
- damage = 0
- end
- function onEquipped()
- -- Remove the sound if its still playing
- chat(EquipBladeQuotes[math.random(1, #EquipBladeQuotes)])
- Tool3:FindFirstChild("Slash").Volume = 1
- Tool3:FindFirstChild("Slash2").Volume = 1
- if Tool3:FindFirstChild("Slash") and Tool3:FindFirstChild("Slash2") then Tool3:FindFirstChild("Slash"):Stop() Tool3:FindFirstChild("Slash2"):Stop() end
- Tool3.GripRight = Vector3.new(0, 1, 0)
- end
- function onUnequipped()
- -- Remove the sounds and the animations
- Tool3:FindFirstChild("Slash").Volume = 0
- Tool3:FindFirstChild("Slash2").Volume = 0
- if WhackAnim and WhackAnim2 and WhackAnim3 and WhackAnim4 then WhackAnim:Stop() WhackAnim2:Stop() WhackAnim3:Stop() WhackAnim4:Stop() end
- if Tool3:FindFirstChild("Slash") then Tool3:FindFirstChild("Slash"):Stop() end
- end
- Tool3.Activated:connect(onActivated)
- Tool3.Equipped:connect(onEquipped)
- Tool3.Unequipped:connect(onUnequipped)
- connection = Mackerel.Touched:connect(blow)
- --On Death--------------------------------------------------------------------------------------------------
- function onDeath()
- script:Destroy()
- end
- Chara.Humanoid.Died:connect(onDeath)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement