Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[=[
	Extracts the locale from the folder, or a locale and table.
	@param first Instance | string
	@param second table?
	@return LocalizationTable
]=]


function JsonToLocalizationTable.toLocalizationTable(first, second)
	if typeof(first) == "Instance" then
		local result = JsonToLocalizationTable.loadFolder(first)
		-- result.Name = ("JSONTable_%s"):format(first.Name)
		return result
	elseif type(first) == "string" and type(second) == "table" then
		local result = JsonToLocalizationTable.loadTable(first, second)
		return result
	else
		error("Bad args")
	end
end
--[=[
	@param fn ConnectionFn
	@return SignalConnection

	Connects a function to the signal, which will be called the next time the signal fires. Once
	the connection is triggered, it will disconnect itself.
	```lua
	signal:Once(function(msg, num)
		print(msg, num)
	end)

	signal:Fire("Hello", 25)
	signal:Fire("This message will not go through", 10)
	```
]=]


function Signal:Once(fn)
	local connection
	local done = false
	connection = self:Connect(function(...)
		if done then
			return
		end
		done = true
		connection:Disconnect()
		fn(...)
	end)
	return connection
end

function Signal:GetConnections()
	local items = {}
	local item = self._handlerListHead
	while item do
		table.insert(items, item)
		item = item._next
	end
	return items
end
--StrobeFunctions-----------------------------------------


script.Parent.Configuration.Strobe.Changed:connect(function()
while script.Parent.Configuration.Strobe.Value == 1 do
		wait(0.01)
colorval = script.Parent.Configuration.Colour.Value
Model.Configuration.LampStatus.Value = 0 
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(Color3.new(35/255,35/255,35/255))
		end
					
end
wait(0.01)

Model.Configuration.LampStatus.Value = 1
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(colorval)
		end
					
end

end	
	
while script.Parent.Configuration.Strobe.Value == 2 do
		wait(0.05)
colorval = script.Parent.Configuration.Colour.Value
Model.Configuration.LampStatus.Value = 0 
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(Color3.new(35/255,35/255,35/255))
		end
					
end
wait(0.05)

Model.Configuration.LampStatus.Value = 1
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(colorval)
		end
					
end

end	

while script.Parent.Configuration.Strobe.Value == 3 do
		wait(1)
colorval = script.Parent.Configuration.Colour.Value
Model.Configuration.LampStatus.Value = 0 
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(Color3.new(35/255,35/255,35/255))
		end
					
end
wait(1)

Model.Configuration.LampStatus.Value = 1
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(colorval)
		end
					
end

end	

while script.Parent.Configuration.Strobe.Value == 4 do
		wait(math.random())
colorval = script.Parent.Configuration.Colour.Value

Model.Configuration.LampStatus.Value = 0
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(Color3.new(35/255,35/255,35/255))
		end
					
end
wait(math.random())


Model.Configuration.LampStatus.Value = 1
for i,v in pairs(Model.Tilt:GetChildren()) do 
		if v.Name == "Lamp" then
			v.BrickColor = BrickColor.new(colorval)

		end
					
end

end	

end)
--Made by Luckymaxer



Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

ServerControl = Tool:WaitForChild("ServerControl")

function InvokeServer(Mode, Value)
	pcall(function()
		ServerControl:InvokeServer(Mode, Value)
	end)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == 0 then
		return
	end
	Mouse.Button1Down:connect(function()
		InvokeServer("Click", true)
	end)
	Mouse.KeyDown:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = true})
	end)
end

function Unequipped()
end

Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
--[=[
	@class MerchBooth
]=]


local module = {
	-- Server APIs
	addItemAsync = addItemAsync(serverStore),
	removeItem = removeItem(serverStore),
	addProximityButton = addProximityButton(serverStore),
	removeProximityButton = removeProximityButton(serverStore),

	-- Client APIs
	configure = configure(clientStore),
	resetConfiguration = resetConfiguration(clientStore),
	setCatalogSort = setCatalogSort(clientStore),
	setEnabled = setEnabled(clientStore),
	setControlKeyCodes = setControlKeyCodes(clientStore),

	-- UI states functions (client only)
	openMerchBooth = uiStatesFunctions.openMerchBooth(clientStore),
	openItemView = uiStatesFunctions.openItemView(clientStore),
	closeMerchBooth = uiStatesFunctions.closeMerchBooth(clientStore),
	toggleCatalogButton = uiStatesFunctions.toggleCatalogButton(clientStore),
	isMerchBoothOpen = uiStatesFunctions.isMerchBoothOpen(clientStore),
	isMerchBoothEnabled = uiStatesFunctions.isMerchBoothEnabled(clientStore),

	-- UI states events (client only)
	merchBoothOpened = uiStatesEvents.merchBoothOpened.Event,
	merchBoothClosed = uiStatesEvents.merchBoothClosed.Event,
	catalogViewOpened = uiStatesEvents.catalogViewOpened.Event,
	catalogViewClosed = uiStatesEvents.catalogViewClosed.Event,
	itemViewOpened = uiStatesEvents.itemViewOpened.Event,
	itemViewClosed = uiStatesEvents.itemViewClosed.Event,

	-- Server and client APIs
	getItems = getItems(serverStore, clientStore),
	itemAdded = itemEvents.itemAdded.Event,
	itemRemoved = itemEvents.itemRemoved.Event,

	-- Enums
	Controls = enums.Controls,
}
--[[
	Calls the given analytics function and passes the given values.
	Every analytics function sends the categoryIndex and subcategoryIndex from the store.
	assetTypeId: optional
]]



local function getUserId(state)
	if state.LocalUserId then
		return state.LocalUserId
	end

	if state.RobloxUser and state.RobloxUser.rbxuid then
		return tostring(state.RobloxUser.rbxuid)
	end

	return nil
end

return function(analyticsFunction, value, assetTypeId)
	return function(store)
		local categoryIndex = store:getState().AvatarExperience.AvatarEditor.Categories.category
		local subcategoryIndex = store:getState().AvatarExperience.AvatarEditor.Categories.subcategory
		local userId = getUserId(store:getState())
		analyticsFunction(value, categoryIndex, subcategoryIndex, assetTypeId, userId)
	end
end
---Simply process a completed message.


local COMPLETED_MESSAGE_PROCESSOR = 1

local module = {}
local methods = {}
methods.__index = methods

function methods:SendSystemMessageToSelf(message, channelObj, extraData)
	local messageData =
	{
		ID = -1,
		FromSpeaker = nil,
		SpeakerUserId = 0,
		OriginalChannel = channelObj.Name,
		IsFiltered = true,
		MessageLength = string.len(message),
		Message = message,
		MessageType = ChatConstants.MessageTypeSystem,
		Time = os.time(),
		ExtraData = extraData,
	}

	channelObj:AddMessageToChannel(messageData)
end

function module.new()
	local obj = setmetatable({}, methods)

	obj.COMMAND_MODULES_VERSION = COMMAND_MODULES_VERSION

	obj.KEY_COMMAND_PROCESSOR_TYPE = KEY_COMMAND_PROCESSOR_TYPE
	obj.KEY_PROCESSOR_FUNCTION = KEY_PROCESSOR_FUNCTION

	obj.IN_PROGRESS_MESSAGE_PROCESSOR = IN_PROGRESS_MESSAGE_PROCESSOR
	obj.COMPLETED_MESSAGE_PROCESSOR = COMPLETED_MESSAGE_PROCESSOR

	return obj
end

return module.new()
--Unlock Script
--Unless you know what you're doing, do not modify this script.


local unlocked = false --This creates a bool for the door's status.
script.Parent.Touched:Connect(function(hit) --This detects a touch on the part.
	if hit.Parent.Name == "Key" and unlocked == false then --This ensures the touching part is a key.
		unlocked = true --This sets the door's status to unlocked.
		script.Parent.Anchored = false --This unanchors the padlock.
		script.Parent.Unlock:Play() --This plays the unlock sound.
		wait(1) --This waits for 1 second to open the door.
		script.Parent.Parent.Parent.Open:Play() --This plays the open sound.
		script.Parent.Parent.Parent.Transparency = 0.25 --This causes the door to be slightly transparent.
		script.Parent.Parent.Parent.CanCollide = false --This causes the door to stop colliding.
		script.Parent.Parent.Parent.DoorScript.Disabled = false --This allows the door script to run.
		script.Parent.Parent.Parent.NPCDoorScript.Disabled = false --This allows the NPC script to run.
	end
end)
--- This will cause a brick to go in motion unanchored or not! ---



while true do
wait()
for i= 1, 270 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,1,0)
wait()
end
for i= 1, 270 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0,-1,0)
wait()
end
end
--[[Status Vars]]



	local snsrs = car.Body.Sensors

	local _IsOn = _Tune.AutoStart
	if _Tune.AutoStart then car.DriveSeat.IsOn.Value=true end
	
	local _GSteerT=0
	local _GSteerC=0
	local _GThrot=0
	local _GBrake=0
	
	local _ClutchOn = true
	local _ClPressing = false
	local _RPM = 0
	local _HP = 0
	local _OutTorque = 0
	local _CGear = 0
	local _PGear = _CGear
	local _spLimit = 0
	
	local _TMode = _Tune.TransModes[1]
	
	local _MSteer = false
	local _SteerL = false
	local _SteerR = false
	local _PBrake = false
	local _TCS = _Tune.TCSEnabled
	local _TCSActive = false
	local _ABS = _Tune.ABSEnabled
	local _ABSActive = false
	
	local FlipWait=tick()
	local FlipDB=false
	
	local _InControls = false

	script.Parent.DriveMode.Changed:Connect(function()
		if script.Parent.DriveMode.Value == "SportPlus" then
		   if _Tune.TCSEnabled and _IsOn then
					_TCS = false
		   end
		else
		   if _Tune.TCSEnabled and _IsOn then
					_TCS = true
		   end			
		end
	end)
--[[ icon_controller:header
## Functions

#### setGameTheme
```lua
IconController.setGameTheme(theme)
```
Sets the default theme which is applied to all existing and future icons.

----
#### setDisplayOrder
```lua
IconController.setDisplayOrder(number)
```
Changes the DisplayOrder of the TopbarPlus ScreenGui to the given value.

----
#### setTopbarEnabled
```lua
IconController.setTopbarEnabled(bool)
```
When set to ``false``, hides all icons created with TopbarPlus. This can also be achieved by calling ``starterGui:SetCore("TopbarEnabled", false)``.

----
#### setGap
```lua
IconController.setGap(integer, alignment)
```
Defines the offset width (i.e. gap) between each icon for the given alignment, ``left``, ``mid``, ``right``, or all alignments if not specified. 

----
#### updateTopbar
```lua
IconController.updateTopbar()
```
Determines how icons should be positioned on the topbar and moves them accordingly.  

----
#### clearIconOnSpawn
```lua
IconController.clearIconOnSpawn(icon)
```
Calls destroy on the given icon when the player respawns. This is useful for scenarious where you wish to cleanup icons that are constructed within a Gui with ``ResetOnSpawn`` set to ``true``. For example:

```lua
-- Place at the bottom of your icon creator localscript
local icons = IconController.getIcons()
for _, icon in pairs(icons) do
	IconController.clearIconOnSpawn(icon)
end
```

----
#### getIcons
```lua
local arrayOfIcons = IconController.getIcons()
```
Returns all icons as an array.

----
#### getIcon
```lua
local icon = IconController.getIcon(name)
```
Returns the icon with the given name (or ``false`` if not found). If multiple icons have the same name, then one will be returned randomly.

----



## Properties
#### topbarEnabled
{read-only}
```lua
local bool = IconController.topbarEnabled
```

----
#### controllerModeEnabled
{read-only}
```lua
local bool = IconController.controllerModeEnabled
```

----
#### leftGap
{read-only}
```lua
local gapNumber = IconController.leftGap --[default: '12']
```

----
#### midGap
{read-only}
```lua
local gapNumber = IconController.midGap --[default: '12']
```

----
#### rightGap
{read-only}
```lua
local gapNumber = IconController.rightGap --[default: '12']
```
--]]
--Control Mapping


Tune.Controls = {

	--Keyboard Controls
	--Mode Toggles
	ToggleTCS				= Enum.KeyCode.T					,
	ToggleABS				= Enum.KeyCode.Y					,
	ToggleTransMode			= Enum.KeyCode.M					,
	ToggleMouseDrive		= Enum.KeyCode.R					,

	--Primary Controls
	Throttle				= Enum.KeyCode.Up					,
	Brake					= Enum.KeyCode.Down					,
	SteerLeft				= Enum.KeyCode.Left					,
	SteerRight				= Enum.KeyCode.Right				,

	--Secondary Controls
	Throttle2				= Enum.KeyCode.W					,
	Brake2					= Enum.KeyCode.S					,
	SteerLeft2				= Enum.KeyCode.A					,
	SteerRight2				= Enum.KeyCode.D					,

	--Manual Transmission
	ShiftUp					= Enum.KeyCode.E					,
	ShiftDown				= Enum.KeyCode.Q					,
	Clutch					= Enum.KeyCode.LeftShift			,

	--Handbrake
	PBrake					= Enum.KeyCode.P					,

	--Mouse Controls
	MouseThrottle			= Enum.UserInputType.MouseButton1	,
	MouseBrake				= Enum.UserInputType.MouseButton2	,
	MouseClutch				= Enum.KeyCode.W					,
	MouseShiftUp			= Enum.KeyCode.E					,
	MouseShiftDown			= Enum.KeyCode.Q					,
	MousePBrake				= Enum.KeyCode.LeftShift			,

	--Controller Mapping
	ContlrThrottle			= Enum.KeyCode.ButtonR2				,
	ContlrBrake				= Enum.KeyCode.ButtonL2				,
	ContlrSteer				= Enum.KeyCode.Thumbstick1			,
	ContlrShiftUp			= Enum.KeyCode.ButtonY				,
	ContlrShiftDown			= Enum.KeyCode.ButtonX				,
	ContlrClutch			= Enum.KeyCode.ButtonR1				,
	ContlrPBrake			= Enum.KeyCode.ButtonL1				,
	ContlrToggleTMode		= Enum.KeyCode.ButtonB				,
	ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
	ContlrToggleABS			= Enum.KeyCode.ButtonL3				,
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



local path
local waypoint

local chaseName = nil

function GetTorso(part)
	local chars = game.Workspace:GetDescendants()
	local chaseRoot = nil
	local chaseTorso = nil
	local chasePlr = nil
	local chaseHuman = nil
	local mag = SearchDistance
	for i = 1, #chars do
		chasePlr = chars[i]
		if chasePlr:IsA'Model' and not chasePlr:FindFirstChild("Enemy") and chasePlr:FindFirstChild("Seen") then
			chaseHuman = getHumanoid(chasePlr)
			chaseRoot = chasePlr:FindFirstChild'HumanoidRootPart'
			if chaseRoot ~= nil and chaseHuman ~= nil and chaseHuman.Health > 0 and not chaseHuman:FindFirstChild("Enemy") and not chasePlr:FindFirstChild("Helper") then
				if (chaseRoot.Position - part).magnitude < mag then
					chaseName = chasePlr.Name
					chaseTorso = chaseRoot
					mag = (chaseRoot.Position - part).magnitude
				end
			end
		end
	end
	return chaseTorso
end

function GetPlayersBodyParts(t)
	local torso = t
	if torso then
		local figure = torso.Parent
		for _, v in pairs(figure:GetChildren())do
			if v:IsA'Part' then
				return v.Name
			end
		end
	else
		return "HumanoidRootPart"
	end
end
-- functions



function onRunning(speed)
	if isSeated then return end

	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	isSeated = false
	pose = "Jumping"
end

function onClimbing()
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	isSeated = true
	pose = "Seated"
	print("Seated")
end



function moveJump()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 3.14
	LeftShoulder.DesiredAngle = -3.14
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function moveFreeFall()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 1
	LeftShoulder.DesiredAngle = -1
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end


function moveClimb()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = -3.14
	LeftShoulder.DesiredAngle = 3.14
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end

function moveSit()
	print("Move Sit")
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder.DesiredAngle = 3.14 /2
	LeftShoulder.DesiredAngle = -3.14 /2
	RightHip.DesiredAngle = 3.14 /2
	LeftHip.DesiredAngle = -3.14 /2
end

function getTool()
	
	kidTable = Figure:children()
	if (kidTable ~= nil) then
		numKids = #kidTable
		for i=1,numKids do
			if (kidTable[i].className == "Tool") then return kidTable[i] end
		end
	end
	
	return nil
end

function getToolAnim(tool)

	c = tool:children()
	for i=1,#c do
		if (c[i].Name == "toolanim" and c[i].className == "StringValue") then
			return c[i]
		end
	end
	return nil
end

function animateTool()
	
	if (toolAnim == "None") then
------------------------------------------------



local screenGuis = {}
local freeCamEnabled = false

local stateRot = Vector2.new()
local panDeltaGamepad = Vector2.new()
local panDeltaMouse = Vector2.new()

local velSpring = Spring.new(7/9, 1/3, 1, Vector3.new())
local rotSpring = Spring.new(7/9, 1/3, 1, Vector2.new())
local fovSpring = Spring.new(2,   1/3, 1, 0)

local letterbox = LETTERBOX and CreateLetterBox()

local gp_x  = 0
local gp_z  = 0
local gp_l1 = 0
local gp_r1 = 0
local rate_fov = 0

local SpeedModifier = 1
--Tune


OverheatSpeed = .2 --How fast the car will overheat
CoolingEfficiency = .03 --How fast the car will cool down
RunningTemp = 85 --In degrees

Fan = true --Cooling fan
FanTemp = 100 --At what temperature the cooling fan will activate
FanTempAlpha = 95 --At what temperature the cooling fan will deactivate
FanSpeed = .05 --How fast the car will cool down
FanVolume = .2 --Sound volume

BlowupTemp = 115 --At what temperature the engine will blow up

GUI = true --GUI temperature gauge
--Gear Ratios


Tune.FinalDrive		= 4.06			-- Gearing determines top speed and wheel torque
Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
	--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
	--[[Neutral]]	0			,	-- Ratios can also be deleted
	--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
	--[[ 2 ]]		2.04		,
	--[[ 3 ]]		1.38		,
	--[[ 4 ]]		1.03		,
	--[[ 5 ]]		0.81		,
	--[[ 6 ]]		0.64		,
}
Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ Public API ]]

--
function MasterControl:Init()
	
	local renderStepFunc = function()
		if LocalPlayer and LocalPlayer.Character then
			local humanoid = getHumanoid()
			if not humanoid then return end
			
			if humanoid and not humanoid.PlatformStand and isJumping then
				humanoid.Jump = isJumping
			end

			moveFunc(LocalPlayer, moveValue, true)
		end
	end
	
	local success = pcall(function() RunService:BindToRenderStep("MasterControlStep", Enum.RenderPriority.Input.Value, renderStepFunc) end)
	
	if not success then
		if RenderSteppedCon then return end
		RenderSteppedCon = RunService.RenderStepped:connect(renderStepFunc)
	end
end

function MasterControl:Disable()
	local success = pcall(function() RunService:UnbindFromRenderStep("MasterControlStep") end)
	if not success then
		if RenderSteppedCon then
			RenderSteppedCon:disconnect()
			RenderSteppedCon = nil
		end
	end
	
	moveValue = Vector3.new(0,0,0)
	isJumping = false
end

function MasterControl:AddToPlayerMovement(playerMoveVector)
	moveValue = Vector3.new(moveValue.X + playerMoveVector.X, moveValue.Y + playerMoveVector.Y, moveValue.Z + playerMoveVector.Z)
end

function MasterControl:SetIsJumping(jumping)
	isJumping = jumping
end

function MasterControl:DoJump()
	local humanoid = getHumanoid()
	if humanoid then
		humanoid.Jump = true
	end
end

return MasterControl
--[=[
	@param motor Enum.VibrationMotor
	@return boolean
	Returns `true` if the given motor is supported.

	```lua
	-- Pulse the trigger (e.g. shooting a weapon), but fall back to
	-- the large motor if not supported:
	local motor = Enum.VibrationMotor.Large
	if gamepad:IsMotorSupported(Enum.VibrationMotor.RightTrigger) then
		motor = Enum.VibrationMotor.RightTrigger
	end
	gamepad:PulseMotor(motor, 1, 0.1)
	```
]=]


function Gamepad:IsMotorSupported(motor: Enum.VibrationMotor): boolean
	return HapticService:IsMotorSupported(self._gamepad, motor)
end
-- you can mess with these settings


CanToggleMouse = {allowed = true; activationkey = Enum.KeyCode.F;} -- lets you move your mouse around in firstperson
CanViewBody = true 		-- whether you see your body
Sensitivity = 0.6		-- anything higher would make looking up and down harder; recommend anything between 0~1
Smoothness = 0.05		-- recommend anything between 0~1
FieldOfView = 70		-- fov
HeadOffset = CFrame.new(0,0.7,0) -- how far your camera is from your head

local cam = game.Workspace.CurrentCamera
local player = players.LocalPlayer
local m = player:GetMouse()
m.Icon = "http://www.roblox.com/asset/?id=569021388" -- replaces mouse icon
local character = player.Character or player.CharacterAdded:wait()
local human = character.Humanoid
local humanoidpart = character.HumanoidRootPart

local head = character:WaitForChild("Head")
local CamPos,TargetCamPos = cam.CoordinateFrame.p,cam.CoordinateFrame.p 
local AngleX,TargetAngleX = 0,0
local AngleY,TargetAngleY = 0,0

local running = true
local freemouse = false
local defFOV = FieldOfView

local w, a, s, d, lshift = false, false, false, false, false
--CFrame.new ( number x, number y, number z, number R00, number R01, number R02, number R10, number R11, number R12, number R20, number R21, number R22 )
--CFrame:GetComponents ( )	x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22,



local comps = {}

local cf = CFrame.new

local CFrameEasing = {}

local easing = require(script.Easing)

for key, val in pairs(easing) do
	CFrameEasing[key] = function(b, g, t, d, ...)	
		local bX, bY, bZ, bR00, bR01, bR02, bR10, bR11, bR12, bR20, bR21, bR22 = b:GetComponents()
		local gX, gY, gZ, gR00, gR01, gR02, gR10, gR11, gR12, gR20, gR21, gR22 = g:GetComponents()
		return cf(
			easing[key](t, bX, gX - bX, d, ...), easing[key](t, bY, gY - bY, d, ...), easing[key](t, bZ, gZ - bZ, d, ...),		--X, Y, Z
			easing[key](t, bR00, gR00 - bR00, d, ...), easing[key](t, bR01, gR01 - bR01, d, ...), easing[key](t, bR02, gR02 - bR02, d, ...),		--number R00, number R01, number R02
			easing[key](t, bR10, gR10 - bR10, d, ...), easing[key](t, bR11, gR11 - bR11, d, ...), easing[key](t, bR12, gR12 - bR12, d, ...),		--number R10, number R11, number R12
			easing[key](t, bR20, gR20 - bR20, d, ...), easing[key](t, bR21, gR21 - bR21, d, ...), easing[key](t, bR22, gR22 - bR22, d, ...)		--number R20, number R21, number R22
		)
	end	
end

return CFrameEasing
--////////////////////////////// Include
--//////////////////////////////////////


local ChatConstants = require(replicatedModules:WaitForChild("ChatConstants"))
local Util = require(modulesFolder:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization :: any) end)
ChatLocalization = ChatLocalization or {}

if not ChatLocalization.FormatMessageToSend or not ChatLocalization.LocalizeFormattedMessage then
	function ChatLocalization:FormatMessageToSend(key,default) return default end
end
-- Adds sounds to the GUI buttons.
-- 
-- ForbiddenJ



Sound = script.Parent
GuiTarget = script.Parent.Parent
ButtonBindings = {} -- A table of MouseButton1Down connections indexed by their buttons.

function TryBindButton(object)
	if object:IsA("GuiButton") then
		ButtonBindings[object] = object.MouseButton1Down:Connect(function()
			Sound:Play()
		end)
	end
end
for i, item in ipairs(GuiTarget:GetDescendants()) do
	TryBindButton(item)
end
GuiTarget.DescendantAdded:Connect(TryBindButton)
GuiTarget.DescendantRemoving:Connect(function(object)
	if ButtonBindings[object] ~= nil then
		ButtonBindings[object]:Disconnect()
		ButtonBindings[object] = nil
	end
end)