Roblox/luau_corpus huggingface dataset:
----- Script -----

local function DisableGui (Gift,Daily,Rebirth,Store,Vip,Inventory,CaseStore)
	GiftFrame.Visible = Gift
	DailyRewardFrame.Visible = Daily
	RebirthFrame.Visible = Rebirth
	StoreFrame.Visible = Store
	VipFrame.Visible = Vip
	InventoryFrame.Visible = Inventory
	CaseStoreFrame.Visible = CaseStore
end

GiftFrame.Changed:Connect(function()
	if GiftFrame.Visible == true then
		DisableGui(true,false,false,false,false,false,false)
	end
end)

DailyRewardFrame.Changed:Connect(function()
	if DailyRewardFrame.Visible == true then
		DisableGui(false,true,false,false,false,false,false)
		end
end)

RebirthFrame.Changed:Connect(function()
	if RebirthFrame.Visible == true then
		DisableGui(false,false,true,false,false,false,false)
	end
end)

StoreFrame.Changed:Connect(function()
	if StoreFrame.Visible == true then
		DisableGui(false,false,false,true,false,false,false)
	end
end)

VipFrame.Changed:Connect(function()
	if VipFrame.Visible == true then
		DisableGui(false,false,false,false,true,false,false)
	end
end)

InventoryFrame.Changed:Connect(function()
	if InventoryFrame.Visible == true then
		DisableGui(false,false,false,false,false,true,false)
	end
end)

CaseStoreFrame.Changed:Connect(function()
	if CaseStoreFrame.Visible == true then
		DisableGui(false,false,false,false,false,false,true)
	end
end)
-- Insert inside the tool
local tool = script.Parent
local anim = Instance.new("Animation")
local anim1 = Instance.new("Animation")
anim.Name = "IdleAnim"
anim.AnimationId = "rbxassetid://YourOwnID" -- Idle Animaton ID
anim1.Name = "EquipAnim"
anim1.AnimationId = "rbxassetid://YourOwnID"-- Equip Tool Animaton ID
local track
local track1
-- Decompiled with the Synapse X Luau decompiler.

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local v1 = {};
local u2 = {};
function v1.Get(p1)
	local v2 = u2[p1];
	if v2 then
		local v3 = v2[1];
		local v4 = u1.StatService.Get(v3);
		if v4 then
			local v5 = v4.Pets[v2[2]];
			if v5 and v5.uid == p1 then
				return v5, v3;
			end;
		end;
	end;
	for v6, v7 in pairs(game.Players:GetPlayers()) do
		local v8 = u1.StatService.Get(v7);
		if v8 then

				for v9, v10 in ipairs(v8.Pets) do
				if not v9 then
					break;
				end;
				if v10.uid == p1 then
					u2[p1] = { v7, v9 };
					return v10, v7, v8;
				end;			
			end;
		end;
	end;
end;
function v1.AllEquipped(p2)
	local v12 = {};

		for v13, v14 in ipairs(u1.StatService.Get(p2).Pets) do
		if not v13 then
			break;
		end;
		if v14.e then
			table.insert(v12, v14);
		end;	
	end;
	return v12;
end;
function v1.GetNowStrength(p3)
	local v16 = u1.StatService.Get(p3);
	if not v16 then
		return;
	end;
	local v17 = 0;

		for v18, v19 in ipairs(v16.Pets) do
		if not v18 then
			break;
		end;
		if v19.e then
			v17 = v17 + v19.em;
		end;	
	end;
	return v17;
end;
function v1.GetBestStrength(p4)
	local v21 = u1.StatService.Get(p4);
	if not v21 then
		return;
	end;
	table.sort(v21.Pets, function(p5, p6)
		if math.abs(p5.em - p6.em) < 1 then
			return p5.idt < p6.idt;
		end;
		return p6.em < p5.em;
	end);
	local v22 = 0;
	local v23 = 0;

		for v24, v25 in ipairs(v21.Pets) do
		if not v24 then
			break;
		end;
		if v22 < v21.MaxEquipped then
			v22 = v22 + 1;
			v23 = v23 + v25.em;
		end;	
	end;
	return v23;
end;
function v1.AllBestEquipped(p7)
	if not u1.StatService.Get(p7) then
		return;
	end;
	return v1.GetNowStrength(p7) == v1.GetBestStrength(p7);
end;
task.defer(function()
	while task.wait(300) do
		u2 = {};	
	end;
end);
return v1;
-- Do not edit without experience.
function onPlayerEntered(newPlayer) 
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) 
end 

game.Players.ChildAdded:connect(onPlayerEntered)
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	if plrData.Character.Injuries.Trauma.Value == true then
		return true
	end
	return false
end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 7 -- cooldown for use of the tool again

BoneModelName = "Bone cage" -- name the zone model

HumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- METHODS
function CollectiveWorldModel:_getCombinedResults(methodName, ...)
	local results = workspace[methodName](workspace, ...)
	if worldModel then
		local additionalResults = worldModel[methodName](worldModel, ...)
		for _, result in pairs(additionalResults) do
			table.insert(results, result)
		end
	end
	return results
end

function CollectiveWorldModel:GetPartBoundsInBox(cframe, size, overlapParams)
	return self:_getCombinedResults("GetPartBoundsInBox", cframe, size, overlapParams)
end

function CollectiveWorldModel:GetPartBoundsInRadius(position, radius, overlapParams)
	return self:_getCombinedResults("GetPartBoundsInRadius", position, radius, overlapParams)
end

function CollectiveWorldModel:GetPartsInPart(part, overlapParams)
	return self:_getCombinedResults("GetPartsInPart", part, overlapParams)
end



return CollectiveWorldModel
-- Trim empty datastores and scopes from an entire datastore type:
local function prepareDataStoresForExport(origin)
	local dataPrepared = {}

	for name, scopes in pairs(origin) do
		local exportScopes = {}
		for scope, data in pairs(scopes) do
			local exportData = {}
			for key, value in pairs(data) do
				exportData[key] = value
			end
			if next(exportData) ~= nil then -- Only export datastore when non-empty
				exportScopes[scope] = exportData
			end
		end
		if next(exportScopes) ~= nil then -- Only export scope list when non-empty
			dataPrepared[name] = exportScopes
		end
	end

	if next(dataPrepared) ~= nil then -- Only return datastore type when non-empty
		return dataPrepared
	end
end

local function preprocessKey(key)
	if type(key) == "number" then
		if key ~= key then
			return "NAN"
		elseif key >= math.huge then
			return "INF"
		elseif key <= -math.huge then
			return "-INF"
		end
		return tostring(key)
	end
	return key
end

local function accurateWait(dt)
	dt = math.max(0, dt)
	local left = dt

	while left > 0 do
		left = left - RunService.Heartbeat:Wait()
	end

	return dt - left
end

local function simulateYield()
	if Constants.YIELD_TIME_MAX > 0 then
		accurateWait(rand:NextNumber(Constants.YIELD_TIME_MIN, Constants.YIELD_TIME_MAX))
	end
end

local function simulateErrorCheck(method)
	if Constants.SIMULATE_ERROR_RATE > 0 and rand:NextNumber() <= Constants.SIMULATE_ERROR_RATE then
		simulateYield()
		error(method .. " rejected with error (simulated error)", 3)
	end
end
-- Workspace elements
local Checkpoints = workspace:WaitForChild("Checkpoints")
--[[Drivetrain]]	
	Tune.Config			= "RWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 80		-- 1 - 100%
	Tune.RDiffLockThres	= 20		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= True		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
-- tweens a given object in the path made by the Bezier (position only)
-- works for any object that has the properties given by the property table
function Bezier:CreateVector3Tween(object: Instance | {[any]: any}, propertyTable: {any}, bezierTweenInfo: TweenInfo, RelativeToLength: boolean?): Tween
	
	-- check if there are enough points to calculate a position within the Bezier
	if #self.Points == 0 then
		error("Bezier:CreateVector3Tween() only works if there is at least 1 BezierPoint in the Bezier!")
	end
	
	-- check if the object given is a valid object
	if typeof(object) ~= "Instance" and typeof(object) ~= "table" then
		error("Bezier:CreateVector3Tween() requires an Instance or a table as the first argument!")
	end
	
	-- check if the bezierTweenInfo given is a TweenInfo object
	if not (typeof(bezierTweenInfo) == "TweenInfo") then
		error("Bezier:CreateVector3Tween() requires a TweenInfo object as the third argument!")
	end
	
	-- check if the object given has the vector3 properties given
	local success, foundProperties = pcall(function()
		local foundProperties = true
		for _, propertyName in pairs(propertyTable) do
			if typeof(object[propertyName]) ~= "Vector3" and typeof(object[propertyName]) ~= "nil" then
				foundProperties = false
				break
			end
		end
		return foundProperties
	end)
	
	-- check if the properties were found
	if success and foundProperties then
		local tweenService = game:GetService("TweenService")
		local numValue = Instance.new("NumberValue")
		local tween = tweenService:Create(numValue, bezierTweenInfo, {Value = 1})
		local numValueChangedConnection
		tween.Changed:Connect(function(prop)
			if prop == "PlaybackState" then
				local playbackState = tween.PlaybackState
				if playbackState == Enum.PlaybackState.Playing then
					numValueChangedConnection = numValue.Changed:Connect(function(t)
						for _, propName in pairs(propertyTable) do
							object[propName] = RelativeToLength and self:CalculatePositionRelativeToLength(t) or self:CalculatePositionAt(t)
						end
					end)
				else
					if numValueChangedConnection then
						numValueChangedConnection:Disconnect()
						numValueChangedConnection = nil
					end
				end
			end
		end)
		return tween
	else
		error("Bezier:CreateVector3Tween() requires a matching property table with Vector3 or nil property names for the object as the second argument!")
	end
end
--!strict
local events = require(script.events)
local install = require(script.install)

local DevModuleInstaller: { [string]: any } = {
	verboseLogging = false,
	pruneDevelopmentFiles = true,

	started = events.started.Event,
	finished = events.finished.Event,
}

function DevModuleInstaller.install(devModule: Folder)
	return install(devModule, {
		verboseLogging = DevModuleInstaller.verboseLogging,
		pruneDevelopmentFiles = DevModuleInstaller.pruneDevelopmentFiles,
	})
end

return DevModuleInstaller
--Change the color of the brush when the text box is used
brushSettings.ColorBox.FocusLost:Connect(function(entered)
	
	if entered then
		
		local color = brushSettings.ColorBox.Text
		color = string.gsub(color, " ", "")
		color = string.split(color, ",")
		
		if tonumber(color[1]) and tonumber(color[2]) and tonumber(color[3]) then
			
			currentColor = Color3.fromRGB(color[1], color[2], color[3])
		end
		
		brushSettings.ColorBox.Text = math.floor(currentColor.R * 255 + 0.5) .. ", " .. math.floor(currentColor.G * 255 + 0.5) .. ", " .. math.floor(currentColor.B * 255 + 0.5)

		brushSettings.PaintImage.ImageColor3 = currentColor
	end
end)
--// Tracer Vars
	TracerTransparency = 0;	
	TracerLightEmission = 1;
	TracerTextureLength = 0.1;
	TracerLifetime = 0.0005;
	TracerFaceCamera = true;
	TracerColor = BrickColor.new('White');
--Audio
local soundBank =  game.ServerStorage.Sounds.NPC.Banto:GetChildren()
banto.Health.Changed:connect(function()
    local hitSound = soundBank[math.random(1,#soundBank)]:Clone()
    hitSound.Parent = banto.PrimaryPart
    hitSound.PlayOnRemove = true
    wait()
    hitSound:Destroy()
end)

while true do
    bp.Parent = banto.PrimaryPart
    local goal
    repeat 
    local ray = Ray.new(Vector3.new(origin.p.x+math.random(-tether,tether), banto.PrimaryPart.Position.Y+100, origin.p.z+math.random(-tether,tether)),Vector3.new(0,-130,0))
    local part,pos,norm,mat = workspace:FindPartOnRay(ray,banto)
    if part == workspace.Terrain and mat ~= Enum.Material.Water then
        goal = pos+Vector3.new(0,2.25,0)
    end
    wait()
    until goal
    --Set new goal for banto to MoveTo :)
    walk:Play()
    local pos = banto.PrimaryPart.Position
    local cf = CFrame.new(Vector3.new(pos.X, 0, pos.Z), Vector3.new(goal.X, 0, goal.Z))
    bg.CFrame = cf
    bp.Position = (cf*CFrame.new(0,0,-100)).p
    
    local start = tick()
    repeat task.wait(.5)
    local ray = Ray.new(banto.PrimaryPart.Position, Vector3.new(0,-140,0))
    
    until (banto.PrimaryPart.Position-goal).magnitude < 10 or tick()-start >10
    walk:Stop()
    bp.Parent = nil
    wait(math.random(3,8))
end
-- Gradually regenerates the Humanoid's Health over time.

local REGEN_RATE = 1/200 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = 1 -- Wait this long between each regeneration step.
-- Set up the event handlers for the TextButton icons in the gui.Main frame
local buttons = openGui:GetChildren()
for _, button in ipairs(buttons) do
	if button:IsA("TextButton") then
		button.MouseButton1Click:Connect(function()
			openGui.Visible = false
			toggleWindow(button)
		end)
	end
end
-- ROBLOX deviation: currently no way – type the __call metamethod
-- {
--   __call: (any, any, any?) -> ExpectationResult,
-- -- ROBLOX deviation: [INTERNAL_MATCHER_FLAG]: boolean?
--   [Symbol]: boolean?
-- }

export type ThrowingMatcherFn = (any) -> ()
export type PromiseMatcherFn = (any) -> Promise<nil>

export type Tester = (any, any) -> boolean?

export type MatcherState = {
	assertionCalls: number,
	currentTestName: string?,
	dontThrow: (() -> ())?,
	error: Error?,
	equals: (any, any, Array<Tester>?, boolean?) -> boolean,
	expand: boolean?,
	expectedAssertionsNumber: number?,
	expectedAssertionsNumberError: Error?,
	isExpectingAssertions: boolean?,
	isExpectingAssertionsError: Error?,
	isNot: boolean,
	promise: string,
	suppressedErrors: Array<Error>,
	testPath: any, -- ROBLOX TODO: Config.Path?,
	utils: Object, -- ROBLOX deviation: no easy way to port to Lua: typeof jestMatcherUtils & {
	--   iterableEquality: Tester;
	--   subsetEquality: Tester;
	-- }
}

export type AsymmetricMatcher = {
	asymmetricMatch: (self: AsymmetricMatcher, other: unknown) -> boolean,
	toString: (self: AsymmetricMatcher) -> string,
	getExpectedType: ((self: AsymmetricMatcher) -> string)?,
	toAsymmetricMatcher: ((self: AsymmetricMatcher) -> string)?,
}
-- Recursive table copy.
function Util.DeepCopy(tbl: AnyTable): AnyTable
	local newTbl = table.clone(tbl)
	for k, v in pairs(newTbl) do
		if type(v) == "table" then
			newTbl[k] = Util.DeepCopy(v)
		end
	end
	return newTbl
end
--[[

	VectorUtil.ClampMagnitude(vector, maxMagnitude)
	VectorUtil.AngleBetween(vector1, vector2)
	VectorUtil.AngleBetweenSigned(vector1, vector2, axisVector)


	EXAMPLES:

		ClampMagnitude:

			Clamps the magnitude of a vector so it is only a certain length.

			ClampMagnitude(Vector3.new(100, 0, 0), 15) == Vector3.new(15, 0, 0)
			ClampMagnitude(Vector3.new(10, 0, 0), 20)  == Vector3.new(10, 0, 0)

		
		AngleBetween:

			Finds the angle (in radians) between two vectors.

			v1 = Vector3.new(10, 0, 0)
			v2 = Vector3.new(0, 10, 0)
			AngleBetween(v1, v2) == math.rad(90)

		
		AngleBetweenSigned:

			Same as AngleBetween, but returns a signed value.

			v1 = Vector3.new(10, 0, 0)
			v2 = Vector3.new(0, 0, -10)
			axis = Vector3.new(0, 1, 0)
			AngleBetweenSigned(v1, v2, axis) == math.rad(90)

--]]


local VectorUtil = {}


function VectorUtil.ClampMagnitude(vector, maxMagnitude)
	return (vector.Magnitude > maxMagnitude and (vector.Unit * maxMagnitude) or vector)
end


function VectorUtil.AngleBetween(vector1, vector2)
	return math.acos(math.clamp(vector1.Unit:Dot(vector2.Unit), -1, 1))
end


function VectorUtil.AngleBetweenSigned(vector1, vector2, axisVector)
	local angle = VectorUtil.AngleBetween(vector1, vector2)
	return angle * math.sign(axisVector:Dot(vector1:Cross(vector2)))
end


return VectorUtil
--[=[
	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
--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,
}
--//Settings
BlurAmount = 50 -- Change this to increase or decrease the blur size
--[[
	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