-- Decompiled with the Synapse X Luau decompiler.


local v1 = {};
local u1 = nil;
local u2 = require(script.LightningBolt);
function v1.Bolt(p1, p2, p3, p4, p5)
	local v2 = Instance.new("Part");
	v2.Size = Vector3.new(0, 0, 0);
	v2.Transparency = 1;
	v2.Anchored = true;
	v2.CanCollide = false;
	v2.Parent = workspace;
	local v3 = v2:Clone();
	local l__Ignored__4 = workspace.Ignored;
	v2.Parent = l__Ignored__4;
	v3.Parent = l__Ignored__4;
	v2.Position = p1;
	v3.Position = p2;
	local v5 = CFrame.fromAxisAngle((v3.Position - v2.Position).Unit, 2 * math.random(0.1, 10) * math.pi);
	local v6 = Instance.new("Attachment");
	local v7 = Instance.new("Attachment");
	v6.Parent = v2;
	v7.Parent = v3;
	v6.WorldAxis = v5 * v6.WorldAxis;
	v7.WorldAxis = v5 * v7.WorldAxis;
	if p5 == true then
		u1.Explode(v3.Position, 1, 20, Color3.fromRGB(90, 80, 255), Color3.fromRGB(90, 80, 255), Vector3.new(0, 2, 0), p4);
	end;
	local u3 = u2.new(v6, v7, p3);
	coroutine.resume(coroutine.create(function()
		wait(p4);
		u3:Destroy();
		v2:Destroy();
		v3:Destroy();
		v6:Destroy();
		v7:Destroy();
	end));
	return u3;
end;
function v1.Explode(p6, p7, p8, p9, p10, p11, p12, p13)
	local v8 = require(script.LightningBolt.LightningExplosion);
	v8.new(p6, p7, p8, p9, p10, p11);
	return v8;
end;
function v1.Sparks(p14, p15)
	return require(script.LightningBolt.LightningSparks).new(p14, p15);
end;
u1 = v1;
return nil;
