local G=script.Parent local z=G:WaitForChild("\072\097\110\100\108\101")local o=G:WaitForChild("\082\101\099\101\105\118\101\114")local a=G:WaitForChild("\070\108\097\115\104")local C=a:WaitForChild("\073\109\097\103\101")local E=a:WaitForChild("\073\109\097\103\101\084\119\111")o.OnServerEvent:connect(function(G,o,...)local c={...}if o and c then if o=="\080\108\097\121\083\111\117\110\100"then if z:FindFirstChild(c[1])then z[c[1]]:Play()end elseif o=="\070\108\097\115\104"then(z:WaitForChild("\070\108\097\115\104")).Enabled=c[1];(a:WaitForChild("\069\109\098\101\114\115")).Enabled=c[1];(C:WaitForChild("\070\108\097\115\104")).Rotation=math.random(0,360);(E:WaitForChild("\070\108\097\115\104")).Rotation=math.random(0,360)C.Enabled=c[1]E.Enabled=c[2]elseif o=="\068\097\109\097\103\101"then if c[1]:IsA("\072\117\109\097\110\111\105\100")and type(c[2])=="\110\117\109\098\101\114"then c[1]:TakeDamage(c[2])end end end end)


local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
local Receiver = Tool:WaitForChild("Receiver")
local Flash = Tool:WaitForChild("Flash")
local Spur = Flash:WaitForChild("Image")
local Smoke = Flash:WaitForChild("ImageTwo")

Receiver.OnServerEvent:connect(function (player, action, ...)
	local Data = {...}
	if action and Data then
		if action == "PlaySound" then
			if Handle:FindFirstChild(Data[1]) then
				Handle[Data[1]]:Play()
			end
		elseif action == "Flash" then
			Handle:WaitForChild("Flash").Enabled = Data[1]
			Flash:WaitForChild("Embers").Enabled = Data[1]
			Spur:WaitForChild("Flash").Rotation = math.random(0, 360)
			Smoke:WaitForChild("Flash").Rotation = math.random(0, 360)
			Spur.Enabled = Data[1]
			Smoke.Enabled = Data[2]
		elseif action == "Damage" then
			if Data[1]:IsA("Humanoid") and type(Data[2]) == "number" then
				Data[1]:TakeDamage(Data[2])
			end
		end
	end
end)
