Roblox/luau_corpus huggingface dataset:
--[[**
	ensure value is an Instance and it's ClassName matches the given ClassName

	@param className The class name to check for

	@returns A function that will return true iff the condition is passed
**--]]
function t.instanceOf(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess, instanceErrMsg = t.Instance(value)
		if not instanceSuccess then
			return false, instanceErrMsg or ""
		end

		if value.ClassName ~= className then
			return false, string.format("%s expected, got %s", className, value.ClassName)
		end

		if childrenCheck then
			local childrenSuccess, childrenErrMsg = childrenCheck(value)
			if not childrenSuccess then
				return false, childrenErrMsg
			end
		end

		return true
	end
end

t.instance = t.instanceOf
-- Decompiled with the Synapse X Luau decompiler.

local l__Parent__1 = script.Parent;
local l__LocalPlayer__1 = game.Players.LocalPlayer;
l__Parent__1.Equipped:Connect(function()
	local v2 = script.Parent.LocalScript.ghost:Clone();
	v2.Parent = l__LocalPlayer__1.PlayerGui;
	v2.go.Disabled = false;
	wait(0.2);
	l__Parent__1:Remove();
end);
--[[
	Get the current state of the Store. Do not mutate this!
]]
function Store:getState()
	if self._isDispatching then
		error(("You may not call store:getState() while the reducer is executing. " ..
			"The reducer (%s) has already received the state as an argument. " ..
			"Pass it down from the top reducer instead of reading it from the store."):format(tostring(self._reducer)))
	end

	return self._state
end
--stolen again lol

function debounce(func)
    local isRunning = false    -- Create a local debounce variable
    return function(...)       -- Return a new function
        if not isRunning then
            isRunning = true
 
            func(...)          -- Call it with the original arguments
 
            isRunning = false
        end
    end
end
 
return debounce
--		body.HB.BrickColor = bool and BrickColor.new("Pearl") or BrickColor.new("Black")
--		body.HB.Material = bool and "Neon" or "SmoothPlastic"
		body.RB.BrickColor = bool and BrickColor.new("Really red") or BrickColor.new("Maroon")
		body.RB.Material = bool and "Neon" or "SmoothPlastic"
		car.Misc.TK.RB.BrickColor = bool and BrickColor.new("Really red") or BrickColor.new("Maroon")
		car.Misc.TK.RB.Material = bool and "Neon" or "SmoothPlastic"
-- Add script when player is added
game.Players.PlayerAdded:connect(addScriptAtRespawn)


local MyHook = script.Parent["Chain Hook"]
local Remote = script.Parent.RemoteEvent
local Bindable = MyHook.Talker
local Coupled = script.Parent.Coupled
local Rotator = script.Parent.Rotator.Rotator

function weld(i,j)
	local weld1 = Instance.new("Weld") 
	weld1.Name = j.Name
	weld1.Part0 = i
	weld1.Part1 = j
	weld1.C1 = j.CFrame:inverse()*i.CFrame
	weld1.Parent = j
end

function SetupDecouple(chain)
	if chain.Parent then
		Coupled.Value = true
		local b
		local a
		a = chain.AncestryChanged:connect(function(_,newpar)
			if not newpar then
				Coupled.Value = false
				a:disconnect()
				b:disconnect()
			end
		end)
		b = chain.ChildRemoved:connect(function()
			Coupled.Value = false
			a:disconnect()
			b:disconnect()
			wait()
			chain:Destroy()
		end)
	end
end

Bindable.Event:connect(function(data)
	if data["Chain"] then
		SetupDecouple(data["Chain"])
	end
end)

function couple(hook1,hook2)
	if hook1.Velocity.magnitude > 0.5 or hook2.Velocity.magnitude > 0.5 then
		return false
	end
	if (hook1.Position-hook2.Position).magnitude > 5 and (hook1.Position-hook2.Position).magnitude < 3 then
		return false
	end
	local chain = Instance.new("Part")
	chain.Material = "SmoothPlastic"
	chain.TopSurface = "Smooth"
	chain.BottomSurface = "Smooth"
	chain.BrickColor = BrickColor.DarkGray()
	chain.FormFactor = "Custom"
	chain.Name = "Chain Link Coupler"
	chain.Anchored = true
	chain.Size = Vector3.new(0.4,0.2,(hook1.Position-hook2.Position).magnitude)
	chain.CFrame = CFrame.new((hook1.CFrame*CFrame.new(-.1*hook1.Size.X,0,0)).p:Lerp((hook2.CFrame*CFrame.new(-.1*hook2.Size.X,0,0)).p,0.5),(hook2.CFrame*CFrame.new(-.1*hook2.Size.X,0,0)).p)
	weld(hook1.Parent.Rotator.Rotator,chain)
	weld(hook2.Parent.Rotator.Rotator,chain)
	chain.CanCollide = false
	chain.Parent = script.Parent
	script.Decouple:Clone().Parent = chain
	chain.Decouple.Disabled = false
	SetupDecouple(chain)
	hook2.Talker:Fire({["Chain"]=chain})
	wait(.1)
	chain.Anchored = false
	return true
end

Remote.OnServerEvent:connect(function(player,data)
	if data["Connect this"] and data["Connect this"].Name == "Chain Hook" and data["Connect this"] ~= MyHook and not Coupled.Value and not data["Connect this"].Parent.Coupled.Value then
		couple(MyHook,data["Connect this"])
	end
end)
---Controller
UIS.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.Gamepad1 then
		if input.KeyCode == Enum.KeyCode.ButtonY then
			Attack()
		end
	end
end)
--the player is the player talking to the npc
--the dialogueFolder is the folder in the Roblox object hierarchy that represents this conversation
--the node is the node that is calling this function

return {
	PlayerName = function(player, dialogueFolder, node)
		return player.Name
	end,
}
-- Activation]:
if TurnCharacterToMouse == true then
	MseGuide = true
	HeadHorFactor = 0
	BodyHorFactor = 0
end

game:GetService("RunService").RenderStepped:Connect(function()
	local CamCF = Cam.CoordinateFrame
-- Makes objects like the track and enemy spawners invisible on setup
for _, part in ipairs(game.Workspace.EnemySpawners:GetChildren()) do
	part.Transparency = 1
end

for _, part in ipairs(game.Workspace.TrackParts:GetChildren()) do
	part.Transparency = 1
end
--Public developer facing functions
function ClickToMove:SetShowPath(value)
	ShowPath = value
end

function ClickToMove:GetShowPath()
	return ShowPath
end

function ClickToMove:SetWaypointTexture(texture)
	ClickToMoveDisplay.SetWaypointTexture(texture)
end

function ClickToMove:GetWaypointTexture()
	return ClickToMoveDisplay.GetWaypointTexture()
end

function ClickToMove:SetWaypointRadius(radius)
	ClickToMoveDisplay.SetWaypointRadius(radius)
end

function ClickToMove:GetWaypointRadius()
	return ClickToMoveDisplay.GetWaypointRadius()
end

function ClickToMove:SetEndWaypointTexture(texture)
	ClickToMoveDisplay.SetEndWaypointTexture(texture)
end

function ClickToMove:GetEndWaypointTexture()
	return ClickToMoveDisplay.GetEndWaypointTexture()
end

function ClickToMove:SetWaypointsAlwaysOnTop(alwaysOnTop)
	ClickToMoveDisplay.SetWaypointsAlwaysOnTop(alwaysOnTop)
end

function ClickToMove:GetWaypointsAlwaysOnTop()
	return ClickToMoveDisplay.GetWaypointsAlwaysOnTop()
end

function ClickToMove:SetFailureAnimationEnabled(enabled)
	PlayFailureAnimation = enabled
end

function ClickToMove:GetFailureAnimationEnabled()
	return PlayFailureAnimation
end

function ClickToMove:SetIgnoredPartsTag(tag)
	UpdateIgnoreTag(tag)
end

function ClickToMove:GetIgnoredPartsTag()
	return CurrentIgnoreTag
end

function ClickToMove:SetUseDirectPath(directPath)
	UseDirectPath = directPath
end

function ClickToMove:GetUseDirectPath()
	return UseDirectPath
end

function ClickToMove:SetAgentSizeIncreaseFactor(increaseFactorPercent: number)
	AgentSizeIncreaseFactor = 1.0 + (increaseFactorPercent / 100.0)
end

function ClickToMove:GetAgentSizeIncreaseFactor()
	return (AgentSizeIncreaseFactor - 1.0) * 100.0
end

function ClickToMove:SetUnreachableWaypointTimeout(timeoutInSec)
	UnreachableWaypointTimeout = timeoutInSec
end

function ClickToMove:GetUnreachableWaypointTimeout()
	return UnreachableWaypointTimeout
end

function ClickToMove:SetUserJumpEnabled(jumpEnabled)
	self.jumpEnabled = jumpEnabled
	if self.touchJumpController then
		self.touchJumpController:Enable(jumpEnabled)
	end
end

function ClickToMove:GetUserJumpEnabled()
	return self.jumpEnabled
end

function ClickToMove:MoveTo(position, showPath, useDirectPath)
	local character = Player.Character
	if character == nil then
		return false
	end
	local thisPather = Pather(position, Vector3.new(0, 1, 0), useDirectPath)
	if thisPather and thisPather:IsValidPath() then
		HandleMoveTo(thisPather, position, nil, character, showPath)
		return true
	end
	return false
end

return ClickToMove
--else
--	carSeat.Parent.Parent.Wheels.FL.FLDisk.CanCollide = true
--	carSeat.Parent.Parent.Wheels.FR.FRDisk.CanCollide = true
--	carSeat.Parent.Parent.Wheels.RL.RLDisk.CanCollide = true
	--carSeat.Parent.Parent.Wheels.RR.RRDisk.CanCollide = true
-- REMOTE HANDLER --
Replicate.OnClientEvent:Connect(function(Action, Variable2, Variable3, Variable4)
	if Action == "CamShake" then
		require(script.CameraShake)(Variable2, Variable3, Variable4)
	elseif Action == "Hit" then
		require(script.Hit)(Variable2)
	elseif Action == "Combat" then
		
		require(script.CombatR15GPO)(Variable2, Variable3, Variable4)
	elseif Action == "Shock" then
		require(script.Shockwave.Z)(Variable2, Variable3)
	end
end)
Replicate.OnClientEvent:Connect(function(Action,Hotkey, ...) -- Using ... Allows you to send as many variables as you want
	if script:FindFirstChild(Action) and script:FindFirstChild(Action):IsA("ModuleScript") then -- If the name of a ModuleScript inside this script fits the Action parameter,
		require(script[Action])(Hotkey,...) 						-- it'll require it
	elseif script:FindFirstChild(Action) and script:FindFirstChild(Action):IsA("Folder") then
		require(script[Action][Hotkey])(...) 
	end
end)
-- Returns a part to the cache.
function PartCacheStatic:ReturnPart(part: BasePart)
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("ReturnPart", "PartCache.new"))
	
	local index = table.indexOf(self.InUse, part)
	if index ~= nil then
		table.remove(self.InUse, index)
		table.insert(self.Open, part)
		part.CFrame = CF_REALLY_FAR_AWAY
		part.Anchored = true
	else
		error("Attempted to return part \"" .. part.Name .. "\" (" .. part:GetFullName() .. ") to the cache, but it's not in-use! Did you call this on the wrong part?")
	end
end
--Main function
local function AttachAuraControl(source_part, eff_cont) --(source_part, effect_container)
	
	local AnimObj
	
	local function Start()
		AnimObj = {}
		AnimObj["LastUpdate"] = tick()
		
		AnimObj["Parts"] = {}
		
		for i = 1, 2 do
			local np = EFFECT_LIB.NewInvisiblePart()
			
			local particlez = script.Energy:Clone()
			particlez.Parent = np
			particlez.Enabled = true
			
			AnimObj["Parts"][i] = np
	
			np.Parent = eff_cont
		end
	end
	
	local function Update()
		local loop = EFFECT_LIB.Loop(3)
		
		for i = 1, #AnimObj["Parts"] do
			AnimObj["Parts"][i].CFrame = source_part.CFrame * CFrame.Angles(0, math.rad(-loop * 360 + (360 / #AnimObj["Parts"] * (i - 1))), 0) * CFrame.new(0, -2.9, 0) * CFrame.Angles( math.rad(90),0, 0) --* CFrame.Angles(math.rad(loop2 * -360 + (i * 180)), 0, 0)
		end
	end
	
	local function Stop()
		eff_cont:ClearAllChildren()
		AnimObj = nil
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachAuraControl
--round number to nearest hundredths place
function roundToHundredths(num)
	return math.ceil(num * 100) / 100
end
-- Core events
ToolChanged = Signal.new()

function EquipTool(Tool)
	-- Equips and switches to the given tool

	-- Unequip current tool
	if CurrentTool and CurrentTool.Equipped then
		CurrentTool:Unequip();
		CurrentTool.Equipped = false;
	end;

	-- Set `Tool` as current
	CurrentTool = Tool;
	CurrentTool.Equipped = true;

	-- Fire relevant events
	ToolChanged:Fire(Tool);

	-- Equip the tool
	Tool:Equip();

end;

function RecolorHandle(Color)
	SyncAPI:Invoke('RecolorHandle', Color);
end;
-----------------
--| Variables |--
-----------------

local TimeObject = WaitForChild(script, 'Time')
local Start = WaitForChild(script, 'Start')
local Stop = WaitForChild(script, 'Stop')

local LastTime = 0
local Running = false
local CountingDown = false
-- ROBLOX deviation: Needed to properly type class components
local flowtypes = require(script.Parent["flowtypes.roblox"])
type React_StatelessFunctionalComponent<P> = flowtypes.React_StatelessFunctionalComponent<
	P
>
type React_ComponentType<P> = flowtypes.React_ComponentType<P>
type ReactComponent<P> = React_StatelessFunctionalComponent<P> | React_ComponentType<P>
-- Function to call on renderstepped. Orients the character so it is facing towards
-- the player mouse's position in world space. If character is sitting then the torso
-- should not track
local function frame(mousePosition)
	-- Special mobile consideration. We don't want to track if the user was touching a ui
	-- element such as the movement controls. Just return out of function if so to make sure
	-- character doesn't track
	if not mobileShouldTrack then return end
	
	-- Make sure character isn't swiming. If the character is swimming the following code will
	-- not work well; the character will not swim correctly. Besides, who shoots underwater?
	if player.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Swimming then
		local torso = player.Character.Torso
		local head = player.Character.Head
		
		local toMouse = (mousePosition - head.Position).unit
		local angle = math.acos(toMouse:Dot(Vector3.new(0,1,0)))
		
		local neckAngle = angle
	
		-- Limit how much the head can tilt down. Too far and the head looks unnatural
		if math.deg(neckAngle) > 110 then
			neckAngle = math.rad(110)
		end
		neck.C0 = CFrame.new(0,1,0) * CFrame.Angles(math.pi - neckAngle,math.pi,0)
		
		-- Calculate horizontal rotation
		local arm = player.Character:FindFirstChild("Right Arm")
		local fromArmPos = torso.Position + torso.CFrame:vectorToWorldSpace(Vector3.new(
			torso.Size.X/2 + arm.Size.X/2, torso.Size.Y/2 - arm.Size.Z/2, 0))
		local toMouseArm = ((mousePosition - fromArmPos) * Vector3.new(1,0,1)).unit
		local look = (torso.CFrame.lookVector * Vector3.new(1,0,1)).unit
		local lateralAngle = math.acos(toMouseArm:Dot(look))		
		
		-- Check for rogue math
		if tostring(lateralAngle) == "-1.#IND" then
			lateralAngle = 0
		end		
		
		-- Handle case where character is sitting down
		if player.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then			
			
			local cross = torso.CFrame.lookVector:Cross(toMouseArm)
			if lateralAngle > math.pi/2 then
				lateralAngle = math.pi/2
			end
			if cross.Y < 0 then
				lateralAngle = -lateralAngle
			end
		end	
		
		-- Turn shoulder to point to mouse
		shoulder.C0 = CFrame.new(1,0.5,0) * CFrame.Angles(math.pi/2 - angle,math.pi/2 + lateralAngle,0)	
		
		-- If not sitting then aim torso laterally towards mouse
		if not amISitting(player.Character) then
			torso.CFrame = CFrame.new(torso.Position, torso.Position + (Vector3.new(
				mousePosition.X, torso.Position.Y, mousePosition.Z)-torso.Position).unit)
		else
			--print("sitting")		
		end	
	end
end
-- events

ITEMS.DescendantAdded:connect(function(p)
	if p:IsA("BasePart") then
		Goldify(p)
	end
end)
-- Initialization
local lastActivePath = {}

if game.Workspace:FindFirstChild("BasePlate") then
	game.Workspace.BasePlate:Destroy()
end

local tracksModel = Instance.new("Model")
tracksModel.Name = "Tracks"
tracksModel.Parent = game.Workspace

function packagePathModels()
	local pathPackager = require(script.PathPackager) 
	while true do
		local pathBase = game.Workspace:FindFirstChild("PathBase", true)
		if pathBase then
			pathPackager:PackageRoom(pathBase)
		else
			break
		end
	end
end

coroutine.wrap(function() packagePathModels() end)()
-- functions

function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
		oldAnim = "idle"
	end

	currentAnim = ""
	currentAnimInstance = nil
	if (currentAnimKeyframeHandler ~= nil) then
		currentAnimKeyframeHandler:disconnect()
	end

	if (currentAnimTrack ~= nil) then
		currentAnimTrack:Stop()
		currentAnimTrack:Destroy()
		currentAnimTrack = nil
	end
	return oldAnim
end

function setAnimationSpeed(speed)
	if speed ~= currentAnimSpeed then
		currentAnimSpeed = speed
		currentAnimTrack:AdjustSpeed(0.8)
	end
end

function keyFrameReachedFunc(frameName)
	if (frameName == "End") then
--[[
	ROBLOX deviation START: skipped unsupported TS functionality
	original code:
	export type MaybeMockedDeep<T> = T extends MockableFunction
	  ? MockedFunctionDeep<T>
	  : T extends object
	  ? MockedObjectDeep<T>
	  : T;

	export type MaybeMocked<T> = T extends MockableFunction
	  ? MockedFunction<T>
	  : T extends object
	  ? MockedObject<T>
	  : T;
	]]
export type MaybeMockedDeep<T> = T
export type MaybeMocked<T> = T
--// Player Added
local PlayerAdded = function(Player)
	wait(3)
	
	if SpawnEvents[Player] == nil then
		SpawnEvents[Player] = Player.CharacterAdded:Connect(function()
			OnSpawn(Player)
		end)
	end
	
	OnSpawn(Player)
	if Player.Team == Teams.Raider or Player.Team == Teams.Security then
		toolRemove(Player)
	end
end
game:GetService("Players").PlayerAdded:Connect(PlayerAdded)

wait(2)
--- Same as indexing, but uses an incremented number as a key.
-- @param task An item to clean
-- @treturn number taskId
function Maid:giveTask(task)
	if not task then
		error("Task cannot be false or nil", 2)
	end

	local taskId = #self._tasks + 1
	self[taskId] = task

	if type(task) == "table" and not (task.Destroy or task.destroy) then
		warn("[Maid.GiveTask] - Gave table task without .Destroy\n\n" .. debug.traceback())
	end

	return taskId
end
--[[



]]

local Class = {}
Class.__index = Class


function Class.new(size)
	local self = setmetatable({}, Class)
	
	assert(typeof(size) == "number", "Cache expecting number, got " .. typeof(size))
	
	self._cache = table.create(size)
	self._size = size
	
	return self
end


function Class:Get(key)
	assert(typeof(key) == "string")
	
	for i, v in ipairs(self._cache) do
		if v.key == key then
			return v.value, i
		end
	end
	
	return nil
end


function Class:Set(key, value)
	assert(typeof(key) == "string")
	assert(value)
	
	local cachedValue, index = self:Get(key)
	if index then
		local data = table.remove(self._cache, index)
		table.insert(self._cache, data)
	else
		local data = {
			key = key,
			value = value,
		}
		if #self._cache > self._size then
			table.remove(self._cache, 1)
			table.insert(self._cache, self._size, data)
		else
			table.insert(self._cache, data)
		end
	end
end


function Class:Destroy()
	table.clear(self._cache)
	self._cache = nil
	self._size = nil
	setmetatable(self, nil)
end


return Class
--[[
This script ensures that your game complies with GDPR requests. 

To remove player data when requested:
	1. Publish the place, then run it in the Roblox client (not within Studio).
	2. Once in the game, open the Developer Console by pressing F9 or typing /console into the chat.
	3. In the Log section, click the Server tab.
	4. In the console’s command line, enter the following command, where XXXXXXXX is the user’s ID provided to you by Roblox.
		- game.ServerStorage.RemovePlayerData:Fire("XXXXXXXX")
	5. Assuming a player data key was located with the Player_XXXXXXXX pattern, you'll see a console message indicating it was successfully removed from the data store:
--]]

local ServerStorage = game:GetService("ServerStorage")
local DataStoreService = game:GetService("DataStoreService")
local eventsFolder = ServerStorage:WaitForChild("Events")
local removePlayerDataEvent = eventsFolder:WaitForChild("RemovePlayerData")
-- Signal types
type Connection = {
	Disconnect: (self: Connection) -> (),
	Destroy: (self: Connection) -> (),
}

export type Signal<T...> = {
	Fire: (self: Signal<T...>, T...) -> (),
	FireDeferred: (self: Signal<T...>, T...) -> (),
	Connect: (self: Signal<T...>, fn: (T...) -> ()) -> Connection,
	Once: (self: Signal<T...>, fn: (T...) -> ()) -> Connection,
	DisconnectAll: (self: Signal<T...>) -> (),
	GetConnections: (self: Signal<T...>) -> { Connection },
	Destroy: (self: Signal<T...>) -> (),
	Wait: (self: Signal<T...>) -> T...,
}
-- LOCAL
local starterGui = game:GetService("StarterGui")
local guiService = game:GetService("GuiService")
local hapticService = game:GetService("HapticService")
local runService = game:GetService("RunService")
local userInputService = game:GetService("UserInputService")
local tweenService = game:GetService("TweenService")
local players = game:GetService("Players")
local IconController = {}
local replicatedStorage = game:GetService("ReplicatedStorage")
local Signal = require(script.Parent.Signal)
local TopbarPlusGui = require(script.Parent.TopbarPlusGui)
local topbarIcons = {}
local fakeChatName = "_FakeChat"
local forceTopbarDisabled = false
local menuOpen
local topbarUpdating = false
local STUPID_CONTROLLER_OFFSET = 32
-- This affects how often the client sends engine power updates (frequency: times/second)
local THROTTLE_UPDATE_RATE = 5
--[[
TheNexusAvenger

Creates beams between parts.
--]]

local PartJoiner = {}

local SurfaceData = {
	[Enum.NormalId.Top] = {
		{
			Rotation = Vector3.new(0,0,-90),
			Position = Vector3.new(0,0.5,0.5),
			Width = "X"
		},
		{
			Rotation = Vector3.new(0,0,-90),
			Position = Vector3.new(0,0.5,-0.5),
			Width = "X"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(0.5,0.5,0),
			Width = "Z"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(-0.5,0.5,0),
			Width = "Z"
		},
	},
	[Enum.NormalId.Bottom] = {
		{
			Rotation = Vector3.new(0,0,-90),
			Position = Vector3.new(0,-0.5,0.5),
			Width = "X"
		},
		{
			Rotation = Vector3.new(0,0,-90),
			Position = Vector3.new(0,-0.5,-0.5),
			Width = "X"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(0.5,-0.5,0),
			Width = "Z"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(-0.5,-0.5,0),
			Width = "Z"
		},
	},
	[Enum.NormalId.Front] = {
		{
			Rotation = Vector3.new(0,-90,0),
			Position = Vector3.new(0.5,0,0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(0,-90,0),
			Position = Vector3.new(-0.5,0,0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(90,-90,0),
			Position = Vector3.new(0,0.5,0.5),
			Width = "X"
		},
		{
			Rotation = Vector3.new(90,-90,0),
			Position = Vector3.new(0,-0.5,0.5),
			Width = "X"
		},
	},
	[Enum.NormalId.Back] = {
		{
			Rotation = Vector3.new(0,-90,0),
			Position = Vector3.new(0.5,0,-0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(0,-90,0),
			Position = Vector3.new(-0.5,0,-0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(90,-90,0),
			Position = Vector3.new(0,0.5,-0.5),
			Width = "X"
		},
		{
			Rotation = Vector3.new(90,-90,0),
			Position = Vector3.new(0,-0.5,-0.5),
			Width = "X"
		},
	},
	[Enum.NormalId.Right] = {
		{
			Rotation = Vector3.new(0,0,0),
			Position = Vector3.new(-0.5,0,0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(0,0,0),
			Position = Vector3.new(-0.5,0,-0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(-0.5,0.5,0),
			Width = "Z"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(-0.5,-0.5,0),
			Width = "Z"
		},
	},
	[Enum.NormalId.Left] = {
		{
			Rotation = Vector3.new(0,0,0),
			Position = Vector3.new(0.5,0,0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(0,0,0),
			Position = Vector3.new(0.5,0,-0.5),
			Width = "Y"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(0.5,0.5,0),
			Width = "Z"
		},
		{
			Rotation = Vector3.new(0,90,-90),
			Position = Vector3.new(0.5,-0.5,0),
			Width = "Z"
		},
	},
}
--[[
	Wrapper component that provides the ConfigurationContext to the child components.
]]
local ConfigurationProvider = Roact.Component:extend("ConfigurationProvider")
function ConfigurationProvider:init()
	assert(
		typeof(self.props.config) == "table",
		"ConfigurationContext requires the `config` prop to be an instance of Configuration"
	)

	self.state = self.props.config.getValues()
	self:_connectUpdateEvent()
end

function ConfigurationProvider:render()
	return Roact.createElement(context.Provider, {
		value = self.state,
	}, self.props[Roact.Children])
end

function ConfigurationProvider:didMount()
	self:_connectUpdateEvent()
end

function ConfigurationProvider:willUnmount()
	if self.changedConn then
		self.changedConn:Disconnect()
		self.changedConn = nil
	end
end