Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_SoundsMisc")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13

script:WaitForChild("Rel")
script:WaitForChild("Start")

script.Parent.Values.Gear.Changed:connect(function() mult=1 end)

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rel",car.DriveSeat,script.Rel.SoundId,0,script.Rel.Volume,true)
handler:FireServer("newSound","Start",car.DriveSeat,script.Start.SoundId,1,script.Start.Volume,false)
handler:FireServer("playSound","Rel")
car.DriveSeat:WaitForChild("Rel")
car.DriveSeat:WaitForChild("Start")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	if script.Parent.Values.PreOn.Value then
		handler:FireServer("playSound","Start")
		wait(1.2)
	else
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		RelVolume = 3*(1 - math.min(((script.Parent.Values.RPM.Value*3)/_Tune.Redline),1))
		RelPitch = (math.max((((script.Rel.SetPitch.Value + script.Rel.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rel.SetPitch.Value)) * on
	end
	if FE then
		handler:FireServer("updateSound","Rel",script.Rel.SoundId,RelPitch,RelVolume)
	else
		car.DriveSeat.Rel.Volume = RelVolume
		car.DriveSeat.Rel.Pitch = RelPitch
	end
end
-- End of OrbitalCamera additions


local PlayersService = game:GetService('Players')
local VRService = game:GetService("VRService")

local RootCameraCreator = require(script.Parent)

local UP_VECTOR = Vector3.new(0, 1, 0)
local XZ_VECTOR = Vector3.new(1, 0, 1)
local ZERO_VECTOR2 = Vector2.new(0, 0)

local VR_PITCH_FRACTION = 0.25

local Vector3_new = Vector3.new
local CFrame_new = CFrame.new
local math_min = math.min
local math_max = math.max
local math_atan2 = math.atan2
local math_rad = math.rad
local math_abs = math.abs

local function clamp(value, minValue, maxValue)
	if maxValue < minValue then
		maxValue = minValue
	end
	return math.clamp(value, minValue, maxValue)
end

local function IsFinite(num)
	return num == num and num ~= 1/0 and num ~= -1/0
end

local function IsFiniteVector3(vec3)
	return IsFinite(vec3.x) and IsFinite(vec3.y) and IsFinite(vec3.z)
end
--Springs--



frontstiffness = 1290 * StiffnessFront /2
frontdamping = 40 *  StiffnessFront 

rearstiffness = 1290 * StiffnessRear /2
reardamping = 40 * StiffnessRear 

minLF = SuspensionTravelF
minLR = SuspensionTravelR
maxL = ((RideHeightRear + RideHeightFront)/2) + 4

ffl = RideHeightFront+2
rfl = RideHeightRear+2

local springFL = Instance.new("SpringConstraint", SFL)
springFL.Attachment0 = SFL.Attachment
springFL.Attachment1 = SSML.Attachment
springFL.Damping = frontdamping
springFL.FreeLength = ffl
springFL.Stiffness = frontstiffness
springFL.Visible = false
springFL.LimitsEnabled = true
springFL.MinLength = minLF
springFL.MaxLength = maxL

local springFR = Instance.new("SpringConstraint", SFR)
springFR.Attachment0 = SFR.Attachment
springFR.Attachment1 = SSMR.Attachment
springFR.Damping = frontdamping
springFR.FreeLength = ffl
springFR.Stiffness = frontstiffness
springFR.Visible = false
springFR.LimitsEnabled = true
springFR.MinLength = minLF
springFR.MaxLength = maxL

local springRL = Instance.new("SpringConstraint", SRL)
springRL.Attachment0 = SRL.Attachment
springRL.Attachment1 = BRL.Attachment
springRL.Damping = reardamping
springRL.FreeLength = rfl
springRL.Stiffness = rearstiffness
springRL.Visible = false
springRL.LimitsEnabled = true
springRL.MinLength = minLR
springRL.MaxLength = maxL

local springRR = Instance.new("SpringConstraint", SRR)
springRR.Attachment0 = SRR.Attachment
springRR.Attachment1 = BRR.Attachment
springRR.Damping = reardamping
springRR.FreeLength = rfl
springRR.Stiffness = rearstiffness
springRR.Visible = false
springRR.LimitsEnabled = true
springRR.MinLength = minLR
springRR.MaxLength = maxL


local XSteeringL = Instance.new("HingeConstraint", SSL)
XSteeringL.Attachment0 = SSL.Attachment
XSteeringL.Attachment1 = SSML.Attachment
XSteeringL.ActuatorType = "Motor"
XSteeringL.LimitsEnabled = true
XSteeringL.LowerAngle = SteeringAngle*-1
XSteeringL.UpperAngle = SteeringAngle
XSteeringL.MotorMaxTorque = 200000

local XSteeringR = Instance.new("HingeConstraint", SSR)
XSteeringR.Attachment0 = SSR.Attachment
XSteeringR.Attachment1 = SSMR.Attachment
XSteeringR.ActuatorType = "Motor"
XSteeringR.LimitsEnabled = true
XSteeringR.LowerAngle = SteeringAngle*-1
XSteeringR.UpperAngle = SteeringAngle
XSteeringR.MotorMaxTorque = 200000

local BGL = Instance.new("BodyGyro")
BGL.Parent = xSSL
BGL.Name = "Gyro"
BGL.D = 180
BGL.MaxTorque = Vector3.new(900, 0, 900)
BGL.P = 300

local BGR = Instance.new("BodyGyro")
BGR.Parent = xSSR
BGR.Name = "Gyro"
BGR.D = 180
BGR.MaxTorque = Vector3.new(900, 0, 900)
BGR.P = 300

local flip = Instance.new("BodyGyro", script.Parent)
flip.Name = "Flip"
flip.D = 1000
flip.MaxTorque = Vector3.new(0,0,0)
flip.P = 30000
--[[
	Gets (or creates) an instance by name.

	This is used to generate [Folder]s and other instances on the fly.

	```lua
		local foo = getOrCreateInstanceOfName("Foo", "Folder")
		print(foo:GetFullName()) -- game.ReplicatedStorage.Foo
	```

	@within Modules
]]


local function getOrCreateInstanceOfName(instanceName: string, instanceType: string, parent: Instance?): Instance
	if not instanceName or not instanceType then
		return nil
	elseif not parent then
		parent = ReplicatedStorage
	end

	local instance = parent:FindFirstChild(instanceName)
	if not instance then
		instance = Instance.new(instanceType)
		instance.Name = instanceName
		instance.Parent = parent
	end

	return instance
end

return getOrCreateInstanceOfName
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --




Elevator:WaitForChild("Direction").Changed:connect(function(val)
    if val == 1 then
		This.Display.ARW1.U.Material = Enum.Material.Neon
		This.Display.ARW1.U.Color = Color3.fromRGB(253, 234, 141)
	else
		This.Display.ARW1.U.Material = Enum.Material.Glass
		This.Display.ARW1.U.Color = Color3.fromRGB(248,248,248)
    end
end)
--			print("PLAYER ALREADY HIT")


		else
		local humanoid = hit.Parent:findFirstChild("Humanoid")
		if humanoid and humanoid~=nil then
			TagHumanoid(humanoid, Owner)
			humanoid:TakeDamage(damage)
			FireScript(humanoid)
			local HitName = humanoid.Parent
			HitName = HitPeople
		else
			damage = damage / 10
			if damage < 1 then
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 400		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7000		--		Use sliders to manipulate values
	Tune.Redline		= 8000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 0			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--------



function module:GetSwordSkin(Skin)
	local inv = game.ReplicatedStorage.Inventory.Swords
    for i,v in pairs(inv.Common:GetChildren()) do
	if v.Name == Skin then
		return v.Value
	else
		for i,v in pairs(inv.Rare:GetChildren()) do
		if v.Name == Skin then
		    return v.Value
		else
			for i,v in pairs(inv.Epic:GetChildren()) do
			if v.Name == Skin then
		        return v.Value
			else
				for i,v in pairs(inv.Legendary:GetChildren()) do
				if v.Name == Skin then
		            return v.Value
				else
				print("Couldn't find the skin info")
				return nil
				end
			end
		end
	end
end
end
end
end
end
		
function module:GetShieldSkin(Skin)
	local inv = game.ReplicatedStorage.Inventory.Shields
    for i,v in pairs(inv.Common:GetChildren()) do
	if v.Name == Skin then
		return v.Value
	else
		for i,v in pairs(inv.Rare:GetChildren()) do
		if v.Name == Skin then
		    return v.Value
		else
			for i,v in pairs(inv.Epic:GetChildren()) do
			if v.Name == Skin then
		        return v.Value
			else
				for i,v in pairs(inv.Legendary:GetChildren()) do
				if v.Name == Skin then
		            return v.Value
				else
				print("Couldn't find the skin info")
				return nil
				end
			end
		end
	end
end
end
end
end
end

return module
-- Make a base cosmetic bullet object. This will be cloned every time we fire off a ray.


local CosmeticBullet = Instance.new("Part")
CosmeticBullet.Material = Enum.Material.Glass
CosmeticBullet.Transparency = .5
CosmeticBullet.Color = Color3.fromRGB(58, 160, 255)
CosmeticBullet.CanCollide = false
CosmeticBullet.CastShadow = false
CosmeticBullet.Anchored = true
CosmeticBullet.Size = Vector3.new(0.2, 0.2, 2.4)

local sphereMesh = Instance.new("SpecialMesh")
sphereMesh.MeshType = Enum.MeshType.Sphere
sphereMesh.Parent = CosmeticBullet
--Wheel Stabilizer Gyro


Tune.FGyroD			= 100
Tune.FGyroMaxTorque	= Vector3.new(1,0,1)
Tune.FGyroP			= 0
Tune.RGyroD			= 100
Tune.RGyroMaxTorque	= Vector3.new(1,0,1)
Tune.RGyroP			= 0
--SecondLogic @ INSPARE


wait(.2)
local out=false
coroutine.resume(coroutine.create(function() 
	local fr = 0
	local trs=1
	while wait(.05) do
		fr = fr+1
		if fr>=10 then fr=0 end
		if not out then
			trs=math.max(0,trs-.05)
		else
			trs=math.min(1,trs+.05)
		end
		for i,v in pairs(script.Parent.Frame:GetChildren()) do
			v.Frame.ImageLabel.ImageTransparency = trs
			v.Frame.ImageLabel.Position=UDim2.new(-(fr%3),0,-math.floor(fr/3),0)
			if out then
				v.BackgroundTransparency=.5+(.5*trs)
				v.Frame.ImageLabel.BackgroundTransparency=trs
			end
		end
		if out then
			script.Parent.IN.TextTransparency=trs
			script.Parent.SPARE.TextTransparency=trs
		end
		if out and trs==1 then
			break
		end
	end
	script.Parent:Destroy()
end))

game:GetService("RunService").RenderStepped:connect(function()
	for i,v in pairs(script.Parent.Frame:GetChildren()) do
		v.Frame.Position = UDim2.new(0,-250-v.Position.X.Offset-script.Parent.Frame.Position.X.Offset,0,-136-v.Position.Y.Offset)
	end
end)

script.Parent.Frame:TweenPosition(UDim2.new(0,-100,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,10)
script.Parent.IN:TweenPosition(UDim2.new(0.5,-74,0.5,100),Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,10)
script.Parent.SPARE:TweenPosition(UDim2.new(0.5,6,0.5,100),Enum.EasingDirection.InOut,Enum.EasingStyle.Linear,10)

script.Parent.Frame.B:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.C:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.D:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -44,0.5, -134),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
wait(.35)
script.Parent.Frame.C:TweenPosition(UDim2.new(0.5, -44,0.5, -44),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.D:TweenPosition(UDim2.new(0.5, -44,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -44,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
wait(.35)
script.Parent.Frame.E:TweenPosition(UDim2.new(0.5, -134,0.5, 46),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,.3)
wait(1)
for i=1,30 do
	for _,v in pairs(script.Parent.Frame:GetChildren()) do
		v.BackgroundTransparency=1-(i/60)
	end
	script.Parent.IN.TextTransparency=1-(i/30)
	script.Parent.SPARE.TextTransparency=1-(i/30)
	wait(.01)
end
wait(1.5)
out=true
---


script.Parent["1"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["2"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["3"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["4"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["5"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["6"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["7"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["8"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["9"].ClickDetector.MouseClick:Connect(kventer)
script.Parent["0"].ClickDetector.MouseClick:Connect(kventer)
--[[ # YAY CONTROLING THE ENTIRE INTRO FROM HERE! # ]]

--
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)

game.ReplicatedStorage.GameTrackIntro:Play()

local settingsFramePos = UDim2.new(0.377,0 , 0.272, 0)

game.Lighting.IntroBlur.Enabled = true

script.IntroGui.Enabled = true

local player = game.Players.LocalPlayer

game.StarterGui["Realism Mod"].Sprint.Enabled = false

local IntroGui = script.IntroGui
local lighting = game.Lighting
IntroGui.ButtonFrame:TweenPosition(UDim2.new(0.4, 0, 0.696, 0), "In", "Sine", 0.5)

IntroGui.ButtonFrame.PlayButton.MouseButton1Click:Connect(function() --[[ PLAY ]]--
	IntroGui.ButtonFrame:TweenPosition(UDim2.new(0, 0, -1, -1), "In", "Sine", 0.5)
	wait(0.5)
	SetValue = true
	game.StarterGui["Realism Mod"].Sprint.Enabled = true
	--[[ THIS PART OF THE SCRIPT USED TO BE A CONTROLLING CAMERA ]]--
	lighting.IntroBlur.Enabled = false
	IntroGui.Enabled = false
	workspace.CurrentCamera.CameraSubject = player.Character.Humanoid
	workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
	workspace.CurrentCamera.CFrame = player.Character.HumanoidRootPart.CFrame
	game.ReplicatedStorage.GameTrackIntro:Stop()
	game.ReplicatedStorage.GameplayAudio:Play()
end)
IntroGui.ButtonFrame.SettingButton.MouseButton1Click:Connect(function() --[[ SETTINGS ]]--
	IntroGui.ButtonFrame:TweenPosition(UDim2.new(0, 0, -1, -1), "InOut", "Sine", 0.5)
	wait(0.5)
	workspace.CurrentCamera.CameraSubject = player.Character.Humanoid
	workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
	workspace.CurrentCamera.CFrame = workspace.IntroCamera2.CFrame
	IntroGui.SettingsFrame:TweenPosition(settingsFramePos, "InOut", "Sine", 0.5)
end)
IntroGui.ButtonFrame.ChangelogButton.MouseButton1Click:Connect(function() --[[ CHANGELOGS ]]--
	IntroGui.ButtonFrame:TweenPosition(UDim2.new(0, 0, -1, -1), "InOut", "Sine", 0.5)
	wait(0.5)
	IntroGui.ChangelogFrame:TweenPosition(settingsFramePos, "InOut", "Sine", 0.5)
	workspace.CurrentCamera.CameraSubject = player.Character.Humanoid
	workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
	workspace.CurrentCamera.CFrame = workspace.IntroCamera3.CFrame
end)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



vars.Wandering.Changed:connect(function(b)
	if vars.Wandering.Value and not vars.Attacking.Value and not vars.Chasing.Value then
		if sdb then 
			removeSound()
		else
			playSound(sr[4])
		end
	end
end)

vars.Attacking.Changed:connect(function(b)
	if vars.Attacking.Value then
		removeSound()
		playSound(sr[1])
	end
end)

vars.Chasing.Changed:connect(function(b)
	if vars.Chasing.Value and not vars.Wandering.Value and not vars.Attacking.Value then
		if sdb then 
			removeSound()
		else
			playSound(sr[2])
		end
	end
end)
--[=[
	Subscribes immediately, fireCallback may return a maid (or a task a maid can handle)
	to clean up

	@param fireCallback function?
	@param failCallback function?
	@param completeCallback function?
	@return MaidTask
]=]


function Observable:Subscribe(fireCallback, failCallback, completeCallback)
	local sub = Subscription.new(fireCallback, failCallback, completeCallback)
	local cleanup = self._onSubscribe(sub)

	if cleanup then
		sub:_giveCleanup(cleanup)
	end

	return sub
end

return Observable
--[[
-- {PoisonApple, PoisonCake, PoisonPorkChop}
local BaseIdUrl = 'http://www.roblox.com/asset/?id='
local IconIds = {'87862872', '87863072', '87871704'}
local MeshIds = {'87862943', '87863104', '87863169'}
local TextureIds = {'87862921', '87863090', '87863148'}
local HandleSizes = {Vector3.new(1.2, 1.2, 1.2), Vector3.new(1.08, 1.11, 1.14), Vector3.new(0.45, 1.82, 1.33)}
--]]



local MyModel = nil
local MyPlayer = nil

uses = 0

local function OnEquipped()
	MyModel = Tool.Parent
	MyPlayer = PlayersService:GetPlayerFromCharacter(MyModel)
end

local function OnActivated()
	if not MyModel or not MyModel:FindFirstChild('Humanoid') or not Tool.Enabled then return end
	Tool.Enabled = false
	
	uses = uses + 1

	ThrowSound:Play()

	local handleClone = ToolHandle:Clone()
	DebrisService:AddItem(handleClone, 30)
	--handleClone.Velocity = (MyModel.Humanoid.TargetPoint - ToolHandle.CFrame.p).unit * THROW_SPEED
	handleClone.Name = 'Food'
	handleClone.Parent = Workspace
	handleClone.Transparency = 0
	handleClone.CanCollide = true
	Instance.new('BodyGyro', handleClone) -- Keeps it upright
	local selfDestructScript = handleClone:FindFirstChild('SelfDestruct')
	if selfDestructScript and selfDestructScript:FindFirstChild('TimeToLive') then
		selfDestructScript.TimeToLive.Value = TIME_TO_LIVE
		selfDestructScript.Disabled = false
	end
	local foodScript = handleClone:FindFirstChild('PoisonedFood')
	if foodScript then
		local creator = Instance.new('ObjectValue', foodScript)
		creator.Name = 'Creator'
		creator.Value = MyPlayer
		foodScript.Disabled = false
	end
	handleClone.CFrame = Tool.Parent:FindFirstChild("HumanoidRootPart").CFrame
	
	if uses >= 3 then
		Tool:Destroy()
	end

	--[[ Load new item (while we wait)
	local index = math.random(3)
	ToolHandle.Mesh.MeshId = BaseIdUrl .. MeshIds[index]
	ToolHandle.Mesh.TextureId = BaseIdUrl .. TextureIds[index]
	ToolHandle.Size = HandleSizes[index] -- This breaks the weld
	MyWeld.Parent = Game.JointsService -- Fix the weld
	Tool.TextureId = BaseIdUrl .. IconIds[index] -- Change the tool icon
	--]]

	wait(COOLDOWN)

	Tool.Enabled = true
	
end

local function OnUnequipped()
	ToolHandle.Transparency = 0
end

Tool.Equipped:connect(OnEquipped)
Tool.Activated:connect(OnActivated)
Tool.Unequipped:connect(OnUnequipped)
--// # key, Wail


mouse.KeyDown:connect(function(key)
	if key=="f" then 
		if veh.Lightbar.middle.Wail.IsPlaying == true then
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
		veh.Lightbar.middle.Wail:Play()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
--[=[
	Ensures the computed version of a value is limited by lifetime instead
	of multiple. Used in conjunction with [Blend.Children] and [Blend.Computed].

	:::warning
	In general, cosntructing new instances like this is a bad idea, so it's recommended against it.
	:::

	```lua
	Blend.New "ScreenGui" {
		Parent = game.Players.LocalPlayer.PlayerGui;
		[Blend.Children] = {
			Blend.Single(Blend.Computed(percentVisible, function()
				-- you generally would not want to do this anyway because this reconstructs a new frame
				-- every frame.

				Blend.New "Frame" {
					Size = UDim2.new(1, 0, 1, 0);
					BackgroundTransparency = 0.5;
				};
			end)
		};
	};
	```

	@function Single
	@param Observable<Instance | Brio<Instance>>
	@return Observable<Brio<Instance>>
	@within Blend
]=]


function Blend.Single(observable)
	return Observable.new(function(sub)
		local maid = Maid.new()

		maid:GiveTask(observable:Subscribe(function(result)
			if Brio.isBrio(result) then
				local copy = BrioUtils.clone(result)
				maid._current = copy
				sub:Fire(copy)
				return copy
			end

			local current = Brio.new(result)
			maid._current = current
			sub:Fire(current)

			return current
		end))

		return maid
	end)
end
-----------------------------------


elseif script.Parent.Parent.Parent.TrafficControl.Value == "=" then

		script.Parent.Parent.Off.Spotlight2.Transparency = 1
script.Parent.Parent.Off.Spotlight3.Transparency = 1
script.Parent.Parent.Off.Part.Transparency = 1
script.Parent.Parent.Off.Union.Transparency = 1
script.Parent.Parent.Off.a1.Transparency = 1

script.Parent.Parent.Front.Spotlight2.Transparency = 0.3
script.Parent.Parent.Front.Spotlight2.Point.Enabled = true
script.Parent.Parent.Front.Spotlight2.Lighto.Enabled = true
script.Parent.Parent.Front.Part.Transparency = 0
script.Parent.Parent.Front.Union.Transparency = 0
script.Parent.Parent.Front.a1.Transparency = 0


script.Parent.Parent.Left.Spotlight2.Transparency = 1
script.Parent.Parent.Left.Spotlight2.Point.Enabled = false
script.Parent.Parent.Left.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Left.Part.Transparency = 1
script.Parent.Parent.Left.Union.Transparency = 1
script.Parent.Parent.Left.a1.Transparency = 1

script.Parent.Parent.Right.Spotlight2.Transparency = 1
script.Parent.Parent.Right.Spotlight2.Point.Enabled = false
script.Parent.Parent.Right.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Right.Part.Transparency = 1
script.Parent.Parent.Right.Union.Transparency = 1
script.Parent.Parent.Right.a1.Transparency = 1
-- << LOCAL FUNCTIONS >>


local function displayHomeArrowIcons(status)
	for a,b in pairs(mainFrame.Pages.Home:GetChildren()) do
		if b:FindFirstChild("Arrow") then
			b.Arrow.Visible = status
		end
	end
end

local function updateDragBar()
	if currentPage.Name == "Home" then
		local forceUpperFrom = main.hdAdminCoreName:find(" ")
		mainFrame.DragBar.Title.Text = main.hdAdminCoreName:sub(1, forceUpperFrom-1).. (main.hdAdminCoreName:sub(forceUpperFrom)):upper()
		mainFrame.DragBar.Back.Visible = false
		mainFrame.DragBar.Title.Position = UDim2.new(0.04, 0, 0.15, 0)
		displayHomeArrowIcons(true)
	else
		mainFrame.DragBar.Title.Text = string.upper(currentPage.Name)
		mainFrame.DragBar.Back.Visible = true
		mainFrame.DragBar.Title.Position = UDim2.new(0.15, 0, 0.15, 0)
		displayHomeArrowIcons(false)
	end
end

local function tweenPages(tweenOutPosition, tweenInPage, instantTween)
	local tweenTime
	if instantTween then
		tweenTime = 0
	else
		tweenTime = 0.3
	end
	local tweenInfoSlide = TweenInfo.new(tweenTime, Enum.EasingStyle.Quad)
	local oldPage = currentPage
	local tweenOut =  main.tweenService:Create(currentPage, tweenInfoSlide, {Position = tweenOutPosition})
	local tweenIn = main.tweenService:Create(tweenInPage, tweenInfoSlide, {Position = UDim2.new(0, 0, 0, 0)})
	if tweenInPage.Name == "Home" then
		tweenInPage.Position = UDim2.new(-1,0,0,0)
	else
		tweenInPage.Position = UDim2.new(1,0,0,0)
		if tweenInPage.Name == "Admin" then
			spawn(function() main:GetModule("PageAdmin"):UpdatePages() end)
		end
	end
	tweenInPage.Visible = true
	tweenOut:Play()
	tweenIn:Play()
	currentPage = tweenInPage
	updateDragBar()
	tweenIn.Completed:Wait()
	oldPage.Visible = false
end
--[=[
	Flat map equivalent for brios. The resulting observables will
	be disconnected at the end of the brio.

	Like [RxBrioUtils.flatMap], but emitted values are wrapped in brios.
	The lifetime of this brio is limited by the lifetime of the
	input brios, which are unwrapped and repackaged.

	@since 3.6.0
	@param project (value: TBrio) -> TProject | Brio<TProject>
	@return (source: Observable<Brio<TBrio>> -> Observable<Brio<TResult>>)
]=]


function RxBrioUtils.flatMapBrio(project)
	return Rx.flatMap(RxBrioUtils.mapBrioBrio(project))
end