local g=false local r={}local J={BrickColor.new("\082\101\097\108\108\121 \114\101\100");BrickColor.new("\076\105\109\101 \103\114\101\101\110"),BrickColor.new("\084\111\111\116\104\112\097\115\116\101")}local Q={Vector3.new(-0.45,0,0),Vector3.new(0,0,0);Vector3.new(.45,0,0)}local O=nil local p local H={function(g,r)g:TakeDamage(1)end,function(g,r)g:TakeDamage(-1)end,function(g,r)if g.Torso then local J=Instance.new("\066\111\100\121\070\111\114\099\101")J.force=r*100 J.Parent=g.Torso g.Sit=true game.Debris:AddItem(J,.2)Delay(.2,function()g.Sit=false end)end end}Tool.Equipped:connect(function(d)Spawn(function()local D=1 if not Tool.Parent:FindFirstChild("\084\111\114\115\111")or not Tool.Parent.Torso:FindFirstChild("\082\105\103\104\116 \083\104\111\117\108\100\101\114")or not Tool.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")then return end LazerSound:Play()p=Tool.Parent.Torso["\082\105\103\104\116 \083\104\111\117\108\100\101\114"]O=p.C0 p.CurrentAngle=0 p.DesiredAngle=0 p.MaxVelocity=0 d.Button1Down:connect(function()D=D+1 if D>#J then D=1 end LazerSound.Pitch=.75+(D*.25)*3 end)g=true while g and Tool.Parent:FindFirstChild("\084\111\114\115\111")do local g=Tool.Parent.Torso.CFrame g=g+g:vectorToWorldSpace(Vector3.new(1,.5,0))local O=d.Hit.p-g.p p.C0=CFrame.new(Vector3.new(),g:vectorToObjectSpace(O))*CFrame.Angles(0,math.pi/2,0)+Vector3.new(1,.5,0)r=CastLightRay(Handle.CFrame.p+Handle.CFrame:vectorToWorldSpace(Q[D]),d.Hit.p,J[D],5,.2,r,H[D])LazerSound.Volume=(math.sin(tick()*3)+1)*.25+.25 wait()end p.C0=O LazerSound:Stop()end)end)Tool.Unequipped:connect(function(J)g=false LazerSound:Stop()for g=1,50,1 do if r[g]then r[g]:Destroy()r[g]=nil end end if p then p.MaxVelocity=.15 p.C0=O end end)
--
local equipped = false
local rayparts = {}
local ColorChoices = {BrickColor.new('Really red'),BrickColor.new('Lime green'),BrickColor.new('Toothpaste')}
local StartOffset = {Vector3.new(-.45,0,0),Vector3.new(0,0,0),Vector3.new(.45,0,0)}
local oldC0 =nil
local nweld
local EffectFunctions = 
{
	function(hum,dir) hum:TakeDamage(1) end,
	function(hum,dir) hum:TakeDamage(-1) end,
	function(hum,dir) 
		if hum.Torso then
			local nforce = Instance.new('BodyForce')
			nforce.force = dir*100
			nforce.Parent = hum.Torso
			hum.Sit = true
			game.Debris:AddItem(nforce,.2)
			Delay(.2,function() hum.Sit = false end)
		end
	end
}
Tool.Equipped:connect(function(mouse)
	--game.Players.LocalPlayer:GetMouse()
	Spawn(function()
		local colorChoice = 1
		if not Tool.Parent:FindFirstChild('Torso') or not Tool.Parent.Torso:FindFirstChild('Right Shoulder') or not Tool.Parent:FindFirstChild('Humanoid') then return end
		LazerSound:Play()
		nweld = Tool.Parent.Torso['Right Shoulder']
		oldC0 = nweld.C0
		nweld.CurrentAngle = 0
		nweld.DesiredAngle = 0
		nweld.MaxVelocity = 0
		mouse.Button1Down:connect(function()
			colorChoice=colorChoice+1
			if colorChoice>#ColorChoices then colorChoice =1 end
			LazerSound.Pitch = .75+((colorChoice*.25)*3)
		end)
		equipped = true
		while equipped and Tool.Parent:FindFirstChild('Torso') do
			local tframe = Tool.Parent.Torso.CFrame
			tframe = tframe + tframe:vectorToWorldSpace(Vector3.new(1, 0.5, 0))
			local taim = mouse.Hit.p -( tframe.p )
			nweld.C0 = (CFrame.new(Vector3.new(),tframe:vectorToObjectSpace(taim))*CFrame.Angles(0,math.pi/2,0))+Vector3.new( 1, 0.5, 0 )
			rayparts = CastLightRay(Handle.CFrame.p+Handle.CFrame:vectorToWorldSpace(StartOffset[colorChoice]),mouse.Hit.p,ColorChoices[colorChoice], 5, .2,rayparts, EffectFunctions[colorChoice])
			LazerSound.Volume = ((math.sin(tick()*3)+1)*.25)+.25
			wait()
		end
		nweld.C0 =oldC0
		LazerSound:Stop()
	end)
end)

Tool.Unequipped:connect(function(mouse)
	equipped= false
	LazerSound:Stop()
	for i=1,50,1 do
		if rayparts[i] then
			rayparts[i]:Destroy()
			rayparts[i]=nil		
		end
	end
	if nweld then
		nweld.MaxVelocity =.15
		nweld.C0 =oldC0
	end
	
end)
