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




local autoscaling	= true					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 230				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 370				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 400				,
		spInc			= 40				, -- Increment between labelled notches
	}
}
----------------------------------------------------------------------------------------------------
------------------=[ Status UI ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,EnableStatusUI 	= true				--- Don't disabled it...
	,RunWalkSpeed 		= 24
	,NormalWalkSpeed 	= 12
	,SlowPaceWalkSpeed 	= 6	
	,CrouchWalkSpeed 	= 6
	,ProneWalksSpeed 	= 3
	
	,InjuredWalksSpeed 		= 8
	,InjuredCrouchWalkSpeed = 4

	,EnableHunger = false				--- Hunger and Thirst system 		(Removed)
	,HungerWaitTime = 25

	,CanDrown = true 					--- Glub glub glub *ded*
	
	,EnableStamina = true 				--- Weapon Sway based on stamina	(Unused)
	,RunValue = 1						--- Stamina consumption
	,StandRecover = .25					--- Stamina recovery while stading
	,CrouchRecover = .5					--- Stamina recovery while crouching
	,ProneRecover = 1					--- Stamina recovery while lying

	,EnableGPS = false					--- GPS shows your allies around you
	,GPSdistance = 0

	,InteractionMenuKey = Enum.KeyCode.LeftAlt
	
	,BuildingEnabled = false
	,BuildingKey = Enum.KeyCode.RightAlt
-------------------------------------------


local weld2 = Instance.new("Weld")
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(-0.4, 1.25, 0.5) * CFrame.fromEulerAnglesXYZ(math.rad(90),-0.25,0) --Right leg
arms[2].Name = "RDave"
arms[2].CanCollide = true
welds[2] = weld2
-- script



RunService.RenderStepped:Connect(function()
	local currentTime = tick()
	if humanoid.MoveDirection.Magnitude > 0 then -- we are walking
		local bobbleX = math.cos(currentTime * 10) * .15
		local bobbleY = math.abs(math.sin(currentTime * 10)) * .30

		local bobble = Vector3.new(bobbleX, bobbleY, 0)

		humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble, .25)
	else -- we are not walking
		local t = tick()
		local x = math.cos(t * speed) * intensity
		local y = math.sin(t * speed) * intensity

		local cf = CFrame.new(Vector3.new(x, y, 0), Vector3.new(x*0.95, y*0.95, -10)) + camera.CFrame.Position

		camera.CFrame = camera.CFrame:Lerp(cf * camera.CFrame.Rotation, smoothness)	
	end
end)
--[[
	Notes:	
	Transparency Modifier is what is the end result when "zooming in", it can be changed to whatever you like.
	
	Camera Offset is changed to allow the player to see at lower angles without clipping the view with the torso.
	This may or maynot effect certian tools if they change the players camera position IE crouching or crawling.
	
	Use:
	Place into StarterPlayer.StarterChacterScripts
--]]



local character = (game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait())

game:GetService("RunService").RenderStepped:connect(function()
	if (character:FindFirstChild("RightUpperArm") and character:FindFirstChild("LeftUpperArm")) then
-- no touchy


local path
local waypoint
local oldpoints
local isWandering = 0

if canWander then
	spawn(function()
		while isWandering == 0 do
			isWandering = 1
			local desgx, desgz = hroot.Position.x + math.random(-WanderX, WanderX), hroot.Position.z + math.random(-WanderZ, WanderZ)
			human:MoveTo( Vector3.new(desgx, 0, desgz) )
			wait(math.random(4, 6))
			isWandering = 0
		end
	end)
end

while wait() do
	local enemybody = Getbody(hroot.Position)
	if enemybody ~= nil then -- if player detected
		isWandering = 1
		local function checkw(t)
			local ci = 3
			if ci > #t then
				ci = 3
			end
			if t[ci] == nil and ci < #t then
				repeat
					ci = ci + 1
					wait()
				until t[ci] ~= nil
				return Vector3.new(1, 0, 0) + t[ci]
			else
				ci = 3
				return t[ci]
			end
		end

		path = pfs:FindPathAsync(hroot.Position, enemybody.Position)
		waypoint = path:GetWaypoints()
		oldpoints = waypoint
		local connection;

		local direct = Vector3.FromNormalId(Enum.NormalId.Front)
		local ncf = hroot.CFrame * CFrame.new(direct)
		direct = ncf.p.unit
		local rootr = Ray.new(hroot.Position, direct)
		local phit, ppos = game.Workspace:FindPartOnRay(rootr, hroot)

		if path and waypoint or checkw(waypoint) then
			if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Walk then
				human:MoveTo( checkw(waypoint).Position )
				human.Jump = false
			end

			-- CANNOT LET BALDI JUMPS --
			--[[if checkw(waypoint) ~= nil and checkw(waypoint).Action == Enum.PathWaypointAction.Jump then
				human.Jump = true
				connection = human.Changed:connect(function()
					human.Jump = true
				end)
				human:MoveTo( checkw(waypoint).Position )
			else
				human.Jump = false
			end]]

			--[[hroot.Touched:connect(function(p)
				local bodypartnames = GetPlayersbodyParts(enemybody)
				if p:IsA'Part' and not p.Name == bodypartnames and phit and phit.Name ~= bodypartnames and phit:IsA'Part' and rootr:Distance(phit.Position) < 5 then
					connection = human.Changed:connect(function()
						human.Jump = true
					end)
				else
					human.Jump = false
				end
			end)]]

	

		else
			for i = 3, #oldpoints do
				human:MoveTo( oldpoints[i].Position )
			end
		end
	elseif enemybody == nil and canWander then -- if player not detected
		isWandering = 0
		path = nil
		waypoint = nil
		human.MoveToFinished:Wait()
	end
end
-- Fonction pour basculer la visibilité et le mouvement du curseur de la souris


local function toggleMouseVisibilityAndMovement()
	isMouseVisible = not isMouseVisible

	if isMouseVisible then
		Mouse.Icon = defaultMouseIcon
		player.Character.Humanoid.AutoRotate = true
	else
		Mouse.Icon = ""
		player.Character.Humanoid.AutoRotate = false
	end
end
--///////////////// Internal-Use Methods
--//////////////////////////////////////


function methods:InternalDestroy()
	for i, channel in pairs(self.Channels) do
		channel:InternalRemoveSpeaker(self)
	end

	self.eDestroyed:Fire()

	self.EventFolder = nil
	self.eDestroyed:Destroy()
	self.eSaidMessage:Destroy()
	self.eReceivedMessage:Destroy()
	self.eReceivedUnfilteredMessage:Destroy()
	self.eMessageDoneFiltering:Destroy()
	self.eReceivedSystemMessage:Destroy()
	self.eChannelJoined:Destroy()
	self.eChannelLeft:Destroy()
	self.eMuted:Destroy()
	self.eUnmuted:Destroy()
	self.eExtraDataUpdated:Destroy()
	self.eMainChannelSet:Destroy()
	self.eChannelNameColorUpdated:Destroy()
end

function methods:InternalAssignPlayerObject(playerObj)
	self.PlayerObj = playerObj
end

function methods:InternalAssignEventFolder(eventFolder)
	self.EventFolder = eventFolder
end

function methods:InternalSendMessage(messageObj, channelName)
	local success, err = pcall(function()
		self:LazyFire("eReceivedUnfilteredMessage", messageObj, channelName)
		self.EventFolder.OnNewMessage:FireClient(self.PlayerObj, messageObj, channelName)
	end)
	if not success and err then
		print("Error sending internal message: " ..err)
	end
end

function methods:InternalSendFilteredMessage(messageObj, channelName)
	local success, err = pcall(function()
		self:LazyFire("eReceivedMessage", messageObj, channelName)
		self:LazyFire("eMessageDoneFiltering", messageObj, channelName)
		self.EventFolder.OnMessageDoneFiltering:FireClient(self.PlayerObj, messageObj, channelName)
	end)
	if not success and err then
		print("Error sending internal filtered message: " ..err)
	end
end
-- Local private variables and constants


local ZERO_VECTOR2 = Vector2.new(0,0)

local tweenAcceleration = math.rad(220) -- Radians/Second^2
local tweenSpeed = math.rad(0)          -- Radians/Second
local tweenMaxSpeed = math.rad(250)     -- Radians/Second
local TIME_BEFORE_AUTO_ROTATE = 2       -- Seconds, used when auto-aligning camera with vehicles

local INITIAL_CAMERA_ANGLE = CFrame.fromOrientation(math.rad(-15), 0, 0)
local ZOOM_SENSITIVITY_CURVATURE = 0.5
local FIRST_PERSON_DISTANCE_MIN = 0.5
-- ROBLOX deviation END



export type ReporterOnStartOptions = { estimatedTime: number, showStatus: boolean }

export type Context = {
	config: Config_ProjectConfig,
	hasteFS: HasteFS,
	moduleMap: ModuleMap,
	resolver: Resolver,
}

export type Test = { context: Context, duration: number?, path: Config_Path }

export type CoverageWorker = { worker: worker }

export type CoverageReporterOptions = {
	changedFiles: Set<Config_Path>?,
	sourcesRelatedToTestsInChangedFiles: Set<Config_Path>?,
}

export type CoverageReporterSerializedOptions = {
	changedFiles: Array<Config_Path>?,
	sourcesRelatedToTestsInChangedFiles: Array<Config_Path>?,
}

export type OnTestStart = (test: Test) -> Promise<void>

export type OnTestFailure = (test: Test, error_: SerializableError) -> Promise<unknown>

export type OnTestSuccess = (test: Test, result: TestResult) -> Promise<unknown>

export type Reporter = {
	onTestResult: ((
		self: Reporter,
		test: Test,
		testResult: TestResult,
		aggregatedResult: AggregatedResult
	) -> Promise<void> | void)?,
	onTestFileResult: ((
		self: Reporter,
		test: Test,
		testResult: TestResult,
		aggregatedResult: AggregatedResult
	) -> Promise<void> | void)?,
	onTestCaseResult: ((self: Reporter, test: Test, testCaseResult: TestCaseResult) -> Promise<void> | void)?,
	onRunStart: (self: Reporter, results: AggregatedResult, options: ReporterOnStartOptions) -> Promise<void> | void,
	onTestStart: ((self: Reporter, test: Test) -> Promise<void> | void)?,
	onTestFileStart: ((self: Reporter, test: Test) -> Promise<void> | void)?,
	onRunComplete: (self: Reporter, contexts: Set<Context>, results: AggregatedResult) -> Promise<void> | void,
	getLastError: (self: Reporter) -> Error | void,
}

export type SummaryOptions = {
	currentTestCases: Array<{ test: Test, testCaseResult: TestCaseResult }>?,
	estimatedTime: number?,
	roundTime: boolean?,
	width: number?,
}

export type TestRunnerOptions = { serial: boolean }

export type TestRunData = Array<{
	context: Context,
	matches: { allTests: number, tests: Array<Test>, total: number },
}>

export type TestSchedulerContext = {
	firstRun: boolean,
	previousSuccess: boolean,
	changedFiles: Set<Config_Path>?,
}

return exports
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,VRecoil = {16,20}				--- Vertical Recoil
	,HRecoil = {9,11}				--- Horizontal Recoil
	,AimRecover = .75				---- Between 0 & 1
	
	,RecoilPunch = .2
	,VPunchBase = 3.5				--- Vertical Punch
	,HPunchBase = 1.25				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = .25
	,MaxRecoilPower = 3
	,RecoilPowerStepAmount = .5
	
	,MinSpread = 5					--- Min bullet spread value | Studs
	,MaxSpread = 35					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0.75
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1					--- Max sway value based on player stamina | Studs
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --



head.ChildAdded:connect(function(c)
	if c.Name == "Sound" then
		c.Ended:connect(function()
			if sdb == true then
				soundplaying = nil
				nameobj = nil
				c:remove()
				wait(MutterDelay)
				sdb = false
			end
		end)
	end
end)
--[[Weight and CG]]


	Tune.Weight			= 3100		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-- << VARIABLES >>


local frame = main.gui.MainFrame.Pages.Admin
local buyFrame = main.warnings.BuyFrame
local unBan = main.warnings.UnBan
local pages = {
	ranks = frame.Ranks;
	serverRanks = frame["Server Ranks"],
	banland = frame.Banland;
}
local templates = {
	rankTitle = pages.ranks.TemplateRankTitle;
	rankItem = pages.ranks.TemplateRankItem;
	space = pages.ranks.TemplateSpace;
	admin = pages.serverRanks.TemplateAdmin;
	ban = pages.banland.TemplateBan;
	banTitle = pages.banland.TemplateTitle
}
local otherPermissions = {
	{"friends", 		main.ownerName.."'s Friends", 	"For friends of the Owner"};
	{"freeadmin", 		"Free Admin", 					"For everyone"};
	{"vipserverowner", 	"VIP Server Owner", 			"For VIP Server owners"};
	{"vipserverplayer", "VIP Server Player", 			"For VIP Server players"};
}
--[=[
	@private
	@class Utils
]=]



local Utils = {}

local function errorOnIndex(_, index)
	error(("Bad index %q"):format(tostring(index)), 2)
end

local READ_ONLY_METATABLE = {
	__index = errorOnIndex;
	__newindex = errorOnIndex;
}

function Utils.readonly(_table)
	return setmetatable(_table, READ_ONLY_METATABLE)
end

function Utils.copyTable(target)
	local new = {}
	for key, value in pairs(target) do
		new[key] = value
	end
	return new
end

function Utils.count(_table)
	local count = 0
	for _, _ in pairs(_table) do
		count = count + 1
	end
	return count
end

function Utils.getOrCreateValue(parent, instanceType, name, defaultValue)
	assert(typeof(parent) == "Instance", "Bad argument 'parent'")
	assert(type(instanceType) == "string", "Bad argument 'instanceType'")
	assert(type(name) == "string", "Bad argument 'name'")

	local foundChild = parent:FindFirstChild(name)
	if foundChild then
		if not foundChild:IsA(instanceType) then
			warn(("[Utils.getOrCreateValue] - Value of type %q of name %q is of type %q in %s instead")
				:format(instanceType, name, foundChild.ClassName, foundChild:GetFullName()))
		end

		return foundChild
	else
		local newChild = Instance.new(instanceType)
		newChild.Name = name
		newChild.Value = defaultValue
		newChild.Parent = parent

		return newChild
	end
end

function Utils.getValue(parent, instanceType, name, default)
	assert(typeof(parent) == "Instance", "Bad argument 'parent'")
	assert(type(instanceType) == "string", "Bad argument 'instanceType'")
	assert(type(name) == "string", "Bad argument 'name'")

	local foundChild = parent:FindFirstChild(name)
	if foundChild then
		if foundChild:IsA(instanceType) then
			return foundChild.Value
		else
			warn(("[Utils.getValue] - Value of type %q of name %q is of type %q in %s instead")
				:format(instanceType, name, foundChild.ClassName, foundChild:GetFullName()))
			return nil
		end
	else
		return default
	end
end

function Utils.setValue(parent, instanceType, name, value)
	assert(typeof(parent) == "Instance", "Bad argument 'parent'")
	assert(type(instanceType) == "string", "Bad argument 'instanceType'")
	assert(type(name) == "string", "Bad argument 'name'")

	local foundChild = parent:FindFirstChild(name)
	if foundChild then
		if not foundChild:IsA(instanceType) then
			warn(("[Utils.setValue] - Value of type %q of name %q is of type %q in %s instead")
				:format(instanceType, name, foundChild.ClassName, foundChild:GetFullName()))
		end

		foundChild.Value = value
	else
		local newChild = Instance.new(instanceType)
		newChild.Name = name
		newChild.Value = value
		newChild.Parent = parent
	end
end


function Utils.getOrCreateFolder(parent, folderName)
	local found = parent:FindFirstChild(folderName)
	if found then
		return found
	else
		local folder = Instance.new("Folder")
		folder.Name = folderName
		folder.Parent = parent
		return folder
	end
end


return Utils
--Front Suspension


Tune.FSusDamping	= 500		-- Spring Dampening
Tune.FSusStiffness	= 9000		-- Spring Force
Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

Tune.FSusLength		= 2			-- Suspension length (in studs)
Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

Tune.FWsBoneLen		= 5			-- Wishbone Length
Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	--[[Lateral]]		-.4		,	-- positive = outward
	--[[Vertical]]		-.5		,	-- positive = upward
	--[[Forward]]		0		}	-- positive = forward
-- Create component


local Component = Cheer.CreateComponent('BTTooltip', View);

local Connections = {};

function Component.Start()

	-- Hide the view
	View.Visible = false;

	-- Show the tooltip on hover
	Connections.ShowOnEnter = Support.AddGuiInputListener(View.Parent, 'Began', 'MouseMovement', true, Component.Show);
	Connections.HideOnLeave = Support.AddGuiInputListener(View.Parent, 'Ended', 'MouseMovement', true, Component.Hide);

	-- Clear connections when the component is removed
	Component.OnRemove:Connect(ClearConnections);

	-- Return component for chaining
	return Component;

end;

function Component.Show()
	View.Visible = true;
end;

function Component.Hide()
	View.Visible = false;
end;

function ClearConnections()
	-- Clears out temporary connections

	for ConnectionKey, Connection in pairs(Connections) do
		Connection:disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;

return Component.Start();
--First build your Gun, make sure all the parts and Non-Colliding and Not Anchored.
--Second put these parts inside the Tool (Call one of the parts 'Handle' and the rest 'Part'
--Lastly, make/get your gun script and test it out! 



local prev 
local parts = script.Parent["Parachute"]:GetChildren() 

for i = 1,#parts do 
	if (parts[i].className == "Part") or (parts[i].className == "VehicleSeat") then 
		if (prev ~= nil)then 
			local weld = Instance.new("Weld") 
			weld.Part0 = prev 
			weld.Part1 = parts[i] 
			weld.C0 = prev.CFrame:inverse() 
			weld.C1 = parts[i].CFrame:inverse() 
			weld.Parent = prev 
		end 
		prev = parts[i] 
	end 
end
-- Public Methods



function RadioButtonLabelClass:GetValue()
	return self.Button.Circle.Visible
end

function RadioButtonLabelClass:SetValue(bool)
	bool = not not bool
	
	local container = self.Frame.RadioContainer
	local colorA = container.BorderColor3
	local colorB = container.BackgroundColor3
	
	container.Outline.ImageColor3 = bool and colorA or colorB
	container.RadioButton.Circle.Visible = bool
end

function RadioButtonLabelClass:Destroy()
	self._Maid:Sweep()
	self.Frame:Destroy()
end
-- Use the character attribute (updated by the server) as the source of truth for body orientation
-- Intended to be used for replicated characters


function OrientableBody:useAttributeAsSource()
	self:orientFromAttribute()
	self.attributeConnection = self.character:GetAttributeChangedSignal(ATTRIBUTE):Connect(function()
		self:orientFromAttribute()
	end)
end

function OrientableBody:destroy()
	self:applyAngle(self.neck, 0, 0)
	self:applyAngle(self.waist, 0, 0)

	if self.motor then
		self.motor:destroy()
		self.motor = nil
	end
	if self.attributeConnection then
		self.attributeConnection:Disconnect()
		self.attributeConnection = nil
	end
	if self.renderStepConnection then
		self.renderStepConnection:Disconnect()
		self.renderStepConnection = nil
	end
end

return OrientableBody
--[[Transmission]]


	Tune.TransModes		= {"Auto"}												--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "RPM"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		-- Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		-- Automatic downshift point (relative to peak RPM, positive = Under-rev)
	Tune.ShiftTime = .3				-- The time delay in which you initiate a shift and the car changes gear
	
	--Gear Ratios
	
	Tune.FinalDrive		= 0.8		 --		[TRANSMISSION CALCULATIONS FOR NERDS]
	Tune.Ratios			= {			 --		SPEED [SPS]	 = (Wheel diameter(studs) * math.pi * RPM) / (60 * Gear Ratio * Final Drive * Multiplier)
		--[[ R ]]		18.641		,--		WHEEL TORQUE = Engine Torque * Gear Ratio * Final Drive * Multiplier
		--[[ N ]]		0			,
		--[[ 1 ]]		16.641		,
		--[[ 2 ]]		12.342		,
		--[[ 3 ]]		9.812		,
		--[[ 4 ]]		7.765		,
		--[[ 5 ]]		6.272		
	}
	Tune.FDMult			= 1			-- Ratio multiplier (keep this at 1 if car is not struggling with torque)
--[[
	Sets the given emote as locked for the given Player.
]]


local function lockEmote(runService, emoteManager, changeEmoteLock)
	if runService:IsServer() then
		return function(player: Player, emoteName: string): nil
			assert(t.string(emoteName))
			emoteManager:setEmoteIsLockedForPlayer(player, emoteName, true)
		end
	else
		-- Calling lockEmote from the client is deprecated. To preserve
		-- backwards compatibility, a remote event is fired to the new server
		-- side lockEmote function
		return function(emoteName: string): nil
			warn("Calling lockEmote from the client is deprecated. Please call from a server Script instead.")
			changeEmoteLock:FireServer(emoteName, true)
		end
	end
end

return lockEmote