local O={TravelTime=1;OrbSpread=25}function Create(O)return function(X)local q=Instance.new(O)for O,X in pairs(X)do if type(O)=="\110\117\109\098\101\114"then X.Parent=q else q[O]=X end end return q end end local X=(script:WaitForChild("\067\104\097\114\097\099\116\101\114")).Value local q=X:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")local P=X:WaitForChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")local o=(script:WaitForChild("\076\105\103\104\116\069\102\102\101\099\116\115")):GetChildren()local t,n=script:WaitForChild("\084\097\114\103\101\116\076\111\099\097\116\105\111\110"),script:WaitForChild("\082\097\110\103\101")local v=script:WaitForChild("\066\101\122\105\101\114\067\117\114\118\101\115")if not t or not n or not v or not P then script:Destroy()end n=n.Value t=P.Position+((t.Value+Vector3.new(0,3,0))-P.Position).Unit*math.clamp(((t.Value+Vector3.new(0,3,0))-P.Position).Magnitude,0,n)local f={Players=game:FindService("\080\108\097\121\101\114\115")or game:GetService("\080\108\097\121\101\114\115"),RunService=game:FindService("\082\117\110\083\101\114\118\105\099\101")or game:GetService("\082\117\110\083\101\114\118\105\099\101");Debris=game:FindService("\068\101\098\114\105\115")or game:GetService("\068\101\098\114\105\115");Lighting=game:FindService("\076\105\103\104\116\105\110\103")or game:GetService("\076\105\103\104\116\105\110\103"),ServerScriptService=game:FindService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101")or game:GetService("\083\101\114\118\101\114\083\099\114\105\112\116\083\101\114\118\105\099\101");ServerStorage=game:FindService("\083\101\114\118\101\114\083\116\111\114\097\103\101")or game:GetService("\083\101\114\118\101\114\083\116\111\114\097\103\101")}v=require(v)local W=Random.new()local l=(Create("\080\097\114\116"))({Locked=true;Anchored=true;CanCollide=false,Shape=Enum.PartType.Ball,Name="\076\105\103\104\116 \079\114\098",Size=Vector3.new(1,1,1)*W:NextNumber(2,3);Material=Enum.Material.Neon,Color=Color3.fromRGB(255,255,203);TopSurface=Enum.SurfaceType.Smooth;BottomSurface=Enum.SurfaceType.Smooth})local K=(Create("\065\116\116\097\099\104\109\101\110\116"))({Position=Vector3.new(0,l.Size.Y/2,0),Name="\065\116\116\097\099\104\109\101\110\116\065";Parent=l})local y=K:Clone()y.Name="\065\116\116\097\099\104\109\101\110\116\066"y.Position=Vector3.new(0,-l.Size.Y/2,0)y.Parent=K.Parent for O=1,#o,1 do o[O].Parent=l o[O].Enabled=true if o[O]:IsA("\084\114\097\105\108")then o[O].Attachment0=K o[O].Attachment1=y end end
--Cool Sword of Light transport process

local Properties = {
	TravelTime = 1,
	OrbSpread = 25,
}

function Create(ty)
	return function(data)
		local obj = Instance.new(ty)
		for k, v in pairs(data) do
			if type(k) == "number" then
				v.Parent = obj
			else
				obj[k] = v
			end
		end
		return obj
	end
end

local Character = script:WaitForChild("Character").Value

local Humanoid = Character:FindFirstChildOfClass("Humanoid")

local Center = Character:WaitForChild("HumanoidRootPart")

local LightEffects = script:WaitForChild("LightEffects"):GetChildren()

local TargetLocation, Range = script:WaitForChild("TargetLocation"), script:WaitForChild("Range") --Assumes this is present

local Bezier = script:WaitForChild("BezierCurves")

if not TargetLocation or not Range or not Bezier or not Center then
	script:Destroy()
end

Range = Range.Value

TargetLocation = Center.Position
	+ ((TargetLocation.Value + Vector3.new(0, 3, 0)) - Center.Position).Unit
		* math.clamp(((TargetLocation.Value + Vector3.new(0, 3, 0)) - Center.Position).Magnitude, 0, Range)

local Services = {
	Players = (game:FindService("Players") or game:GetService("Players")),
	RunService = (game:FindService("RunService") or game:GetService("RunService")),
	Debris = (game:FindService("Debris") or game:GetService("Debris")),
	Lighting = (game:FindService("Lighting") or game:GetService("Lighting")),
	ServerScriptService = (game:FindService("ServerScriptService") or game:GetService("ServerScriptService")),
	ServerStorage = (game:FindService("ServerStorage") or game:GetService("ServerStorage")),
}

Bezier = require(Bezier)

local Seed = Random.new()

local LightBall = Create("Part")({
	Locked = true,
	Anchored = true,
	CanCollide = false,
	Shape = Enum.PartType.Ball,
	Name = "Light Orb",
	Size = Vector3.new(1, 1, 1) * Seed:NextNumber(2, 3),
	Material = Enum.Material.Neon,
	Color = Color3.fromRGB(255, 255, 203),
	TopSurface = Enum.SurfaceType.Smooth,
	BottomSurface = Enum.SurfaceType.Smooth,
})

local AttachmentA = Create("Attachment")({
	Position = Vector3.new(0, LightBall.Size.Y / 2, 0),
	Name = "AttachmentA",
	Parent = LightBall,
})

local AttachmentB = AttachmentA:Clone()
AttachmentB.Name = "AttachmentB"
AttachmentB.Position = Vector3.new(0, -LightBall.Size.Y / 2, 0)
AttachmentB.Parent = AttachmentA.Parent

for i = 1, #LightEffects do
	LightEffects[i].Parent = LightBall
	LightEffects[i].Enabled = true
	if LightEffects[i]:IsA("Trail") then
		LightEffects[i].Attachment0 = AttachmentA
		LightEffects[i].Attachment1 = AttachmentB
	end
end
