local y=false local u={}local l={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 D={Vector3.new(-0.45,0,0),Vector3.new(0,0,0),Vector3.new(.45,0,0)}local M=nil local t local o={function(y,u)y:TakeDamage(1)end;function(y,u)y:TakeDamage(-1)end,function(y,u)if y.Torso then local l=Instance.new("\066\111\100\121\070\111\114\099\101")l.force=u*3000 l.Parent=y.Torso y.Sit=true game.Debris:AddItem(l,.2)Delay(.2,function()y.Sit=false end)end end}Tool.Equipped:connect(function(K)Spawn(function()local V=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()t=Tool.Parent.Torso["\082\105\103\104\116 \083\104\111\117\108\100\101\114"]M=t.C0 t.CurrentAngle=0 t.DesiredAngle=0 t.MaxVelocity=0 K.Button1Down:connect(function()V=V+1 if V>#l then V=1 end LazerSound.Pitch=.75+(V*.25)*3 end)y=true while y and Tool.Parent:FindFirstChild("\084\111\114\115\111")do local y=Tool.Parent.Torso.CFrame y=y+y:vectorToWorldSpace(Vector3.new(1,.5,0))local M=K.Hit.p-y.p t.C0=CFrame.new(Vector3.new(),y:vectorToObjectSpace(M))*CFrame.Angles(0,math.pi/2,0)+Vector3.new(1,.5,0)u=CastLightRay(Handle.CFrame.p+Handle.CFrame:vectorToWorldSpace(D[V]),K.Hit.p,l[V],5,.2,u,o[V])LazerSound.Volume=(math.sin(tick()*3)+1)*.25+.25 wait()end t.C0=M LazerSound:Stop()end)end)Tool.Unequipped:connect(function(l)y=false LazerSound:Stop()for y=1,50,1 do if u[y]then u[y]:Destroy()u[y]=nil end end if t then t.MaxVelocity=.15 t.C0=M end end)
--[[Running Logic]]
--
local equipped = false
local rayparts = {}
local ColorChoices = { BrickColor.new("Really red"), BrickColor.new("Lime green"), BrickColor.new("Toothpaste") }
local StartOffset = { Vector3.new(-0.45, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0.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 * 3000
			nforce.Parent = hum.Torso
			hum.Sit = true
			game.Debris:AddItem(nforce, 0.2)
			Delay(0.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 = 0.75 + ((colorChoice * 0.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,
				0.2,
				rayparts,
				EffectFunctions[colorChoice]
			)
			LazerSound.Volume = ((math.sin(tick() * 3) + 1) * 0.25) + 0.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 = 0.15
		nweld.C0 = oldC0
	end
end)
