local q=script.Parent.Beam local O=script.Parent.End local V=script.Parent.Start local d=O.CFrame local u=V.CFrame local U=0 local S=0 local L=0 math.randomseed(tick())local a=math.random()*3+2 local m=math.random()*3+2 local f=math.random()*3+2;(game:GetService("\082\117\110\083\101\114\118\105\099\101")).Stepped:connect(function()U=U+.05 S=S+.1 L=L+.2 local q=math.noise(a,S/35,S/35)*3 local i=math.noise(m*3+2,L/42,L/42)*3 local X=math.noise(f*3+2,L/27,L/27)*3 O.CFrame=(d*CFrame.new(q,0,0))*CFrame.Angles(0,(math.cos(U/2)*X)/3.5-1.5,0)V.CFrame=u*CFrame.Angles(0,(math.sin(U/3.5)/2+i/3.5)-1.5,0)end)
--// Beam flag wavy thing
--// Written by Informable/Autumn
--// Do not distribute without this header

local beam = script.Parent.Beam
local p1 = script.Parent.End
local p2 = script.Parent.Start
local cf1 = p1.CFrame
local cf2 = p2.CFrame
local cos = 0
local noise = 0
local noise2 = 0

math.randomseed(tick())
local seed1 = math.random() * 3 + 2
local seed2 = math.random() * 3 + 2
local seed3 = math.random() * 3 + 2

game:GetService("RunService").Stepped:connect(function()
	cos = cos + 0.05
	noise = noise + 0.1
	noise2 = noise2 + 0.2
	local noiser1 = math.noise(seed1, noise / 35, noise / 35) * 3
	local noiser2 = math.noise(seed2 * 3 + 2, noise2 / 42, noise2 / 42) * 3
	local noiser3 = math.noise(seed3 * 3 + 2, noise2 / 27, noise2 / 27) * 3
	p1.CFrame = cf1 * CFrame.new(noiser1, 0, 0) * CFrame.Angles(0, math.cos(cos / 2) * noiser3 / 3.5 - 1.5, 0)
	p2.CFrame = cf2 * CFrame.Angles(0, math.sin(cos / 3.5) / 2 + noiser2 / 3.5 - 1.5, 0)
end)
