debris=game:GetService("\068\101\098\114\105\115")r=game:service("\082\117\110\083\101\114\118\105\099\101")local g=18 local J=18 sword=script.Parent.Handle Tool=script.Parent local Q=Instance.new("\083\111\117\110\100")Q.SoundId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\049\053\057\051\051\055\053\054"Q.Parent=sword Q.Volume=1 local O=Instance.new("\083\111\117\110\100")O.SoundId="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\049\053\057\051\051\055\053\054"O.Parent=sword O.Volume=1 local p={23;107,102,11,45;135}function isTurbo(g)return g:FindFirstChild("\073\099\101\072\101\108\109")~=nil end function allThatIce(g,r)local J=5 if r==true then J=10 end for r=1,J,1 do local J=Instance.new("\080\097\114\116")J.BrickColor=BrickColor.new(p[math.random(#p)])J.formFactor=2 J.Size=Vector3.new(1,.4,1)J.Material=Enum.Material.Ice J.TopSurface=0 J.BottomSurface=0 local Q=math.random()*6.28 local O=(Vector3.new(math.cos(Q),0,math.sin(Q))).unit J.Velocity=O*25 J.RotVelocity=O J.Position=(g+Vector3.new(0,math.random()*3,0))+O*2 J.Parent=game.Workspace debris:AddItem(J,60)end end function blow(r)local J=r.Parent:findFirstChild("\072\117\109\097\110\111\105\100")local Q=Tool.Parent local O=game.Players:playerFromCharacter(Q)local p=Q:findFirstChild("\072\117\109\097\110\111\105\100")if J~=nil and(J~=p and p~=nil)then local r=Q:FindFirstChild("\082\105\103\104\116 \065\114\109")if r~=nil then local p=r:FindFirstChild("\082\105\103\104\116\071\114\105\112")if p~=nil and(p.Part0==sword or p.Part1==sword)then tagHumanoid(J,O)if isTurbo(Q)==true then J:TakeDamage(g*1.2)else J:TakeDamage(g)end end end end end function tagHumanoid(g,r)local J=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")J.Value=r J.Name="\099\114\101\097\116\111\114"J.Parent=g debris:AddItem(J,1)end function attack()g=J Q:play()local r=Instance.new("\083\116\114\105\110\103\086\097\108\117\101")r.Name="\116\111\111\108\097\110\105\109"r.Value="\083\108\097\115\104"r.Parent=Tool 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 Tool.Enabled=true function onActivated()if not Tool.Enabled then return end Tool.Enabled=false local g=Tool.Parent local r=g.Humanoid if r==nil then print("\072\117\109\097\110\111\105\100 \110\111\116 \102\111\117\110\100")return end attack()wait(.2)allThatIce(g.Torso.Position+g.Torso.CFrame.lookVector*3,isTurbo(g))wait(1)Tool.Enabled=true end function onEquipped()O:play()end script.Parent.Activated:connect(onActivated)script.Parent.Equipped:connect(onEquipped)connection=sword.Touched:connect(blow)

debris = game:GetService("Debris")
r = game:service("RunService")


local damage = 18


local slash_damage = 18


sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
SlashSound.Parent = sword
SlashSound.Volume = 1


local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=15933756"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1

local blues = {23,107,102,11,45,135}


function isTurbo(character)
	return character:FindFirstChild("IceHelm") ~= nil
end

function allThatIce(pos, isTurbo)

	local count = 5
	if (isTurbo == true) then count = 10 end

	for i=1,count do
		local p = Instance.new("Part")
		p.BrickColor = BrickColor.new(blues[math.random(#blues)])
		p.formFactor = 2
		p.Size = Vector3.new(1,.4,1)
		p.Material = Enum.Material.Ice
		p.TopSurface = 0
		p.BottomSurface = 0
		
		local a = math.random() * 6.28
		local d = Vector3.new(math.cos(a), 0, math.sin(a)).unit
		p.Velocity = d * 25
		p.RotVelocity = d
		p.Position = pos + Vector3.new(0, math.random() * 3, 0) + (d * 2)
		p.Parent = game.Workspace

		debris:AddItem(p, 60)
	end

end


function blow(hit)
	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)
				if (isTurbo(vCharacter) == true) then
					humanoid:TakeDamage(damage * 1.2)
				else
					humanoid:TakeDamage(damage)
				end
			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
	debris:AddItem(creator_tag, 1)
end




function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
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



Tool.Enabled = true

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

	

	attack()
	wait(.2)
	allThatIce(character.Torso.Position + (character.Torso.CFrame.lookVector * 3), isTurbo(character))

	wait(1)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)


