Pinkstack/roblox-luau-corpus-text huggingface dataset:
--



local function Dash()
	local character = player.Character
	if character and not debounce then
		debounce = true
		-- now we begin the dash script here

		local humanoid = character.Humanoid
		local HRP = character.HumanoidRootPart -- HRP stands for HumanoidRootPart

		local loadedAnimation = humanoid.Animator:LoadAnimation(DashAnimation)

		local dashDirection = nil
		local moveDirection = humanoid.MoveDirection
		local lookVector = HRP.CFrame.LookVector
		local minusVelocity = -velocity -- in CFrame, if we set Z to positive, player will go move backward
		-- instead of forward

		-- checking if player is on ground, not floating
		local isOnGround = humanoid.FloorMaterial ~= Enum.Material.Air and humanoid.FloorMaterial ~= Enum.Material.Water

		if isOnGround then


			if moveDirection == Vector3.new(0,0,0) then -- if player is not currently moving/walking
				dashDirection = HRP.Position + Vector3.new(lookVector.X, 0, lookVector.Z)
			else -- if player are currently moving/walking
				dashDirection = HRP.Position + Vector3.new(moveDirection.X, 0, moveDirection.Z)
			end

			-- using bodygyro to rotate player to the dash direction smoothly
			local bodyGyro = Instance.new("BodyGyro")
			bodyGyro.Parent = HRP
			bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
			bodyGyro.D = 0 -- D is the dampening
			bodyGyro.P = 500000 -- P is aggressiveness
			bodyGyro.CFrame = CFrame.lookAt(HRP.Position, dashDirection) -- Making player look at the dash direction

			local attachment = Instance.new("Attachment")
			attachment.Parent = HRP

			-- now using VectorForce to move player forward
			local vectorForce = Instance.new("VectorForce")
			vectorForce.Parent = HRP
			-- VectorForce need attachment to tell where is player looking at
			vectorForce.Attachment0 = attachment
			vectorForce.Force = Vector3.new(0,0,minusVelocity) -- now it will move player forward as the settings

			loadedAnimation:Play() -- play the dash animation
			humanoid.AutoRotate = false -- prevent player to rotate by themselves

			wait(duration)

			humanoid.AutoRotate = true

			vectorForce:Destroy()
			bodyGyro:Destroy()
			attachment:Destroy()

			--wait(duration) -- give some time before stopping the dash animation
			loadedAnimation:Stop()

		end


		--
		wait(cooldown)
		debounce = false
	end
end

UserInputService.InputBegan:Connect(function(input)
	if input.KeyCode == key then
		Dash()
	end
end)
--//



function Raycast:Raycast(Origin, Direction)
	local CompletedRaycast = false
	local NumberPenetrations = 0
	local NumberChecks = 0
	local MaxChecks = 10000
	local FinalResult = nil
	
	while not CompletedRaycast do
		local RaycastResult = workspace:Raycast(Origin, Direction, self.Parameters)
		local NormalizedSize = RaycastResult and (RaycastResult.Instance.Size * RaycastResult.Normal)
		local Distance = RaycastResult and Direction.Unit * (RaycastResult.Position - Origin).Magnitude
		
		if NumberChecks == MaxChecks then
			break
		end

		local canCollideCheck, visibilityCheck, penetrateBecauseSmallSize, ignorePart
		
		if RaycastResult == nil then
			break
		else
			local transparency = RaycastResult.Instance.Transparency + (1 * RaycastResult.Instance.localTransparencyModifier)

			visibilityCheck = not self.InvisiblePartsBlockRaycast and transparency >= self.MinTransparencyToBeInvisible
			canCollideCheck = self.AllowCanCollideFalse and RaycastResult.Instance.CanCollide == false
			ignorePart = canCollideCheck or visibilityCheck

			penetrateBecauseSmallSize = NumberPenetrations < self.MaxPenetrations and NormalizedSize.Magnitude <= self.Penetration
		end

		if ignorePart then
			Origin = RaycastResult.Position - RaycastResult.Normal*0.001
			Direction -= Distance
		elseif penetrateBecauseSmallSize then
			NumberPenetrations += 1
			Origin = RaycastResult.Position - RaycastResult.Normal * NormalizedSize.Magnitude * 0.999
			Direction -= Distance
		else
			FinalResult = RaycastResult
			CompletedRaycast = true
			break
		end
		
		NumberChecks += 1
	end

	return FinalResult, NumberPenetrations
end
--Raycasting collision


function collision_module.Raycast(wl, from, dir)
	local param = RaycastParams.new()
	param.FilterType = Enum.RaycastFilterType.Whitelist
	param.FilterDescendantsInstances = wl
	param.IgnoreWater = true
	local result = workspace:Raycast(from, dir, param)
	if result then
		return result.Instance, result.Position, result.Normal, result.Material
	else
		return nil, from + dir, nil, Enum.Material.Air
	end
end
-- GUI Elements


local gui = script.Parent
local textDisplay = gui.Header
local displayImage = gui.DisplayImage

local scriptAttributes = script:GetAttributes()

local function displayEndScreen(state, transitionTime)
	-- Make the GUI visible
	
	gui.Visible = true
	
	if state == "Victory" then
		textDisplay.Text = gui:GetAttribute("messageVictory")
		displayImage.Image = gui:GetAttribute("imageVictory")
	elseif state == "Defeat" then
		textDisplay.Text = gui:GetAttribute("messageDefeat")
		displayImage.Image = gui:GetAttribute("imageDefeat")
	else
		warn("Invalid end game state fired on client GUI")
	end
	
	wait(transitionTime)
	gui.Visible = false
	
end

ClientEndGame.OnClientEvent:Connect(displayEndScreen)
-- emote bindable hook


if FFlagAnimateScriptEmoteHook then
	script:WaitForChild("PlayEmote").OnInvoke = function(emote)
		-- Only play emotes when idling
		if pose ~= "Standing" then
			return
		end

		if emoteNames[emote] ~= nil then
			-- Default emotes
			playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)

			if userPlayEmoteByIdAnimTrackReturn then
				return true, currentAnimTrack
			else
				return true
			end
		elseif typeof(emote) == "Instance" and emote:IsA("Animation") then
			-- Non-default emotes
			playEmote(emote, EMOTE_TRANSITION_TIME, Humanoid)

			if userPlayEmoteByIdAnimTrackReturn then
				return true, currentAnimTrack
			else
				return true
			end
		end

		-- Return false to indicate that the emote could not be played
		return false
	end
end
-- find player's head pos



	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	local head = vCharacter:findFirstChild("Head")
	if head == nil then return end

	local dir = head.CFrame.LookVector

	--local launch = head.Position + 5 * dir

	--local delta = mouse_pos - launch
	
	--local dy = delta.y
	
	--local new_delta = Vector3.new(delta.x, 0, delta.z)
	--delta = new_delta

	--local dx = delta.magnitude
	--local unit_delta = delta.unit
	
	-- acceleration due to gravity in RBX units
	local g = (-9.81 * 20)

	

	local missile = Pellet:clone()
        

	Tool.Handle.Mesh:clone().Parent = missile
		

	missile.Position = head.Position + 5 * dir
	missile.Velocity = dir * VELOCITY
	missile.RotVelocity = Vector3.new(5,0,0)

	missile.PelletScript.Disabled = false

	missile.Parent = game.Workspace

end


function computeLaunchAngle(dx,dy,grav)
	-- arcane
	-- http://en.wikipedia.org/wiki/Trajectory_of_a_projectile
	
	local g = math.abs(grav)
	local inRoot = (VELOCITY*VELOCITY*VELOCITY*VELOCITY) - (g * ((g*dx*dx) + (2*dy*VELOCITY*VELOCITY)))
	if inRoot <= 0 then
		return .25 * math.pi
	end
	local root = math.sqrt(inRoot)
	local inATan1 = ((VELOCITY*VELOCITY) + root) / (g*dx)

	local inATan2 = ((VELOCITY*VELOCITY) - root) / (g*dx)
	local answer1 = math.atan(inATan1)
	local answer2 = math.atan(inATan2)
	if answer1 < answer2 then return answer1 end
	return answer2
end

function computeDirection(vec)
	local lenSquared = vec.magnitude * vec.magnitude
	local invSqrt = 1 / math.sqrt(lenSquared)
	return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
end




Tool.Enabled = true
function onActivated()
	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end



	local targetPos = humanoid.TargetPoint

	fire(targetPos)
	wait(3)
	
	if (Tool.Parent:FindFirstChild("Torso") ~= nil) then
		Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6
		Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6
	end
		wait(.1)
	Tool.Handle.Transparency=0
	wait(.1)
	Tool.Enabled = true


end

script.Parent.Activated:connect(onActivated)
--[=[
	A boolean which determines if a ScriptConnection is active or not.

	@prop Connected boolean
	@within ScriptConnection

	@readonly
	@ignore
]=]



export type Class = typeof(setmetatable({
    _active = true,
    _head = nil :: ScriptConnectionNode?,
}, ScriptSignal))

export type ScriptConnection = typeof(setmetatable({
    Connected = true,
    _node = nil :: ScriptConnectionNode?,
}, ScriptConnection))

type ScriptConnectionNode = {
    _signal: Class,
    _connection: ScriptConnection?,
    _handler: (...any) -> (),

    _next: ScriptConnectionNode?,
    _prev: ScriptConnectionNode?,
}

local FreeThread: thread? = nil

local function RunHandlerInFreeThread(handler, ...)
    local thread = FreeThread :: thread
    FreeThread = nil

    handler(...)

    FreeThread = thread
end

local function CreateFreeThread()
    FreeThread = coroutine.running()

    while true do
        RunHandlerInFreeThread(coroutine.yield())
    end
end
--// Adonis Client Loader (Non-ReplicatedFirst Version)



local wait = wait;
local tick = tick;
local pcall = pcall;
local xpcall = xpcall;
local setfenv = setfenv;
local tostring = tostring;

local players = game:GetService("Players");
local player = players.LocalPlayer;
local folder = script.Parent;
local container = folder.Parent;
local Kick = player.Kick;
local module = folder:WaitForChild("Client");
local target = player;
local realPrint = print;
local realWarn = warn;
local DebugMode = false;
local start = tick();

local function print(...)
	if true then
		--realPrint(...)
	end
end

local function warn(str)
	if DebugMode or player.UserId == 1237666 then
		realWarn("ACLI: "..tostring(str))
	end
end

local function Kill(info)
	if DebugMode then warn(info) return end
	pcall(function() Kick(player, info) end) 
	wait(1)
	pcall(function() while not DebugMode and wait() do pcall(function() while true do end end) end end)
end

local function Locked(obj)
	return (not obj and true) or not pcall(function() return obj.GetFullName(obj) end)
end

local function loadingTime()
	warn("LoadingTime Called")
	setfenv(1,{})
	warn(tostring(tick() - start))
end

local function callCheck(child)
	warn("CallCheck: "..tostring(child))
	if Locked(child) then
		warn("Child locked?")
		Kill("ACLI: Locked")
	else
		warn("Child not locked")
		xpcall(function()
			return child[{}]
		end, function()
			if getfenv(1) ~= getfenv(2) then
				Kill("ACLI: Error")
			end
		end)
	end
end

local function doPcall(func, ...)
	local ran,ret = pcall(func, ...)
	if ran then
		return ran,ret
	else
		warn(tostring(ret))
		Kill("ACLI: Error\n"..tostring(ret))
		return ran,ret
	end
end
-- R15 --



function   waitForChild(parent, childName)
	local child = parent:findFirstChild(childName)
	if child then return child end
	while true do
		child = parent.ChildAdded:wait()
		if child.Name==childName then return child end
	end
end

local Figure = script.Parent
local Humanoid = waitForChild(Figure, "Humanoid")
local pose = "Standing"

if ( Humanoid.RigType == Enum.HumanoidRigType.R6 ) then
	-- We dont want this script to run, so we'll just wait until this script is eventually destroyed.
	wait(1);
	repeat wait(100) until 1 == 2
end

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0

local CurrentToyAnimation = nil;

local runAnimTrack = nil
local runAnimKeyframeHandler = nil

local AnimSpeedChangeDebounce = nil;

local animTable = {}
local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
				{ id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
				{ id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
			},
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=507777826", weight = 10 } 
			}, 
	run = 	{
				{ id = "http://www.roblox.com/asset/?id=507767714", weight = 10 } 
			}, 
	swim = 	{
				{ id = "http://www.roblox.com/asset/?id=507784897", weight = 10 } 
			}, 
	swimidle = 	{
				{ id = "http://www.roblox.com/asset/?id=507785072", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=507765000", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=507767968", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=507765644", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=507768133", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
--[[
	Tween Event handler
	Phoenix
]]



local Sender    	 = game:GetService("ReplicatedStorage").Game.Events.Game.Tween
local ServerListener = game:GetService("ServerScriptService").Server.Events.Tween

local CatchUpData = {} -- Instance = {InstanceTweened = Instance, Frame = CFrame}

ServerListener.Event:Connect(function(InstanceToTween, ToCFrame, Time, Data)
	local Ins
	
	if InstanceToTween ~= nil then
		if InstanceToTween:IsA("Model") then
			if InstanceToTween.PrimaryPart then
				Ins = InstanceToTween.PrimaryPart
			end
		else
			Ins = InstanceToTween
		end

		local Players = game:GetService("Players"):GetChildren()

		for I = 1, #Players do
			local Player = Players[I]

			Sender:FireClient(Player, InstanceToTween, ToCFrame, Time, Data)
		end

		wait(Time)

		if InstanceToTween.PrimaryPart then
			InstanceToTween:SetPrimaryPartCFrame(ToCFrame)
		elseif InstanceToTween:IsA("BasePart") then
			InstanceToTween.CFrame = ToCFrame
		else
			print("Attempted to tween a non model Instance: ".. InstanceToTween:GetFullName())
		end
	end	
end)
------------------------------------------------------------------------
-- reads a long string or long comment
------------------------------------------------------------------------


function luaX:read_long_string(ls, Token, sep)
  local cont = 0
  self:save_and_next(ls)  -- skip 2nd '['
  if self:currIsNewline(ls) then  -- string starts with a newline?
    self:inclinenumber(ls)  -- skip it
  end
  while true do
    local c = ls.current
    if c == "EOZ" then
      self:lexerror(ls, Token and "unfinished long string" or
                    "unfinished long comment", "TK_EOS")
    elseif c == "[" then
      --# compatibility code start
      if self.LUA_COMPAT_LSTR then
        if self:skip_sep(ls) == sep then
          self:save_and_next(ls)  -- skip 2nd '['
          cont = cont + 1
          --# compatibility code start
          if self.LUA_COMPAT_LSTR == 1 then
            if sep == 0 then
              self:lexerror(ls, "nesting of [[...]] is deprecated", "[")
            end
          end
          --# compatibility code end
        end
      end
      --# compatibility code end
    elseif c == "]" then
      if self:skip_sep(ls) == sep then
        self:save_and_next(ls)  -- skip 2nd ']'
        --# compatibility code start
        if self.LUA_COMPAT_LSTR and self.LUA_COMPAT_LSTR == 2 then
          cont = cont - 1
          if sep == 0 and cont >= 0 then break end
        end
        --# compatibility code end
        break
      end
    elseif self:currIsNewline(ls) then
      self:save(ls, "\n")
      self:inclinenumber(ls)
      if not Token then ls.buff = "" end -- avoid wasting space
    else  -- default
      if Token then
        self:save_and_next(ls)
      else
        self:nextc(ls)
      end
    end--if c
  end--while
  if Token then
    local p = 3 + sep
    Token.seminfo = string.sub(ls.buff, p, -p)
  end
end
--the guts of the code (DO NOT TOUCH)


local function Chat(message: string, color)
	game:GetService("Chat"):Chat(NPC.Head, message, CC)
end
local function Jump()
	NPC.Humanoid.Jump = true
end
local function Move(pos: Vector3, spawn_thread)
	spawn_thread = spawn_thread or false
	NPC.Humanoid:MoveTo(pos)
	if not spawn_thread then NPC.Humanoid.MoveToFinished:Wait() end
end
local walkpoint = script.Parent.Parent.WalkPoints
local PlayersService = game:GetService("Players");
PlayersService.PlayerAdded:Connect(function(Player)
	Player.Chatted:Connect(function(Message)
		if string.find(string.lower(Message), string.lower(playerchat)) then
			wait(waittime)
--// bolekinds



local debounce = false

script.Parent.Touched:Connect(function(t)
	--local e, s = pcall(function()
	if debounce == false and game.Players:FindFirstChild(t.Parent.Name) then
		debounce = true
		local cash = 1
		if game.ServerStorage.ServerData.contract.Value == true then
			cash = cash + 3
		end
		if game.ServerStorage.ServerData.MsFloppa.Value == true then
			cash = cash + cash
		end
		if game.ServerStorage.ServerData.happy.Value > 100 then
			cash = cash + cash
		end
		if game.ServerStorage.ServerData.happy.Value < 25 then
			cash = cash/2
		end
			game.Players:FindFirstChild(t.Parent.Name).YouCash.Value += cash
		script.Parent:Destroy()
		debounce = false
		end
	--end)
end)
-- ROBLOX TODO: import jest-matcher-utils when available
-- import * as matcherUtils from 'jest-matcher-utils';


local matcherUtils = {} :: any
local JasmineUtils = require(CurrentModule.jasmineUtils)
local equals = JasmineUtils.equals
local hasProperty = JasmineUtils.hasProperty
local isA = JasmineUtils.isA
local isUndefined = JasmineUtils.isUndefined

local getState = require(CurrentModule.jestMatchersObject_extracted).getState
local Types = require(CurrentModule.types)
--[[Super Util]]

--
function WaitForChild(parent,...)
	local debugPrint = false
	for _, i in ipairs({...}) do
		if type(i)=='boolean' then
			debugPrint = i
		else
			while not parent:FindFirstChild(i) do  
				wait(1/30) 
				if debugPrint then
					print(script.Name..':'..parent.Name..' Waiting for '.. i)
				end
			end
			parent=parent[i]
		end
	end
	return parent
end

function ForEach(parent,func)

end

function MakeValue(class,name,value,parent)

end	

function TweenProperty(obj, propName, inita, enda, length,sentinel)

end
-- You don't need to touch anything below this line. All customisable features are above.



local fC = fontColor.Color -- converts brickcolor to color3

game.Workspace.ClientChat.OnClientEvent:connect(function(messageType, message)
	print(message)
	game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{
   		Text = ("["..messageType.."]: "..message);
		Color = fC;
    	Font = font;
    	FontSize = fontSize; 
	})
end)
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------



function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

local lastTick = 0

function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = currentTime - lastTick
  	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, Humanoid)
		if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then		
			if not wasStrafe then
				doForAllRunTracks(function(trackRec, name)
					trackRec.track:AdjustWeight(smallButNotZero, blendTime)
					trackRec.lastWeight = smallButNotZero							
				end)				
			end
			setRunSpeed(0) -- speed doesn't matter if in mouse lock mode
			wasStrafe = true
		else
			if wasStrafe then
				doForAllRunTracks(function(trackRec, name)
					trackRec.track:AdjustWeight(smallButNotZero, blendTime)
					trackRec.lastWeight = smallButNotZero							
				end)
				setRunSpeed(currentAnimSpeed)		
				wasStrafe = false
			end
		end		
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and tool:FindFirstChild("Handle") then
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = currentTime + .3
		end

		if currentTime > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end
--// # key, Priority


mouse.KeyDown:connect(function(key)
	if key=="y" then 
		if veh.Lightbar.middle.Priority.IsPlaying == true then
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Play()
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
------------------------------------------------------------------------
-- Attempt to convert a number by translating '.' decimal points to
-- the decimal point character used by the current locale. This is not
-- needed in Yueliang as Lua's tonumber() is already locale-aware.
-- Instead, the code is here in case the user implements localeconv().
------------------------------------------------------------------------


function luaX:trydecpoint(ls, Token)
  -- format error: try to update decimal point separator
  local old = ls.decpoint
  -- translate the following to Lua if you implement localeconv():
  -- struct lconv *cv = localeconv();
  -- ls->decpoint = (cv ? cv->decimal_point[0] : '.');
  self:buffreplace(ls, old, ls.decpoint)  -- try updated decimal separator
  local seminfo = self:str2d(ls.buff)
  Token.seminfo = seminfo
  if not seminfo then
    -- format error with correct decimal point: no more options
    self:buffreplace(ls, ls.decpoint, ".")  -- undo change (for error message)
    self:lexerror(ls, "malformed number", "TK_NUMBER")
  end
end
--[[
    Modifies a product or asset type (typically from its enum value) into
    something suitable to be displayed on screen:
    - With CamelCase words separated by spaces
    - With the word "Accessory" brought to the beginning, if present (this is to
      mirror the behavior in the Roblox catalog)
]]


local formatProductTypeString = function(input: string)
	local output = string.gsub(input, "(.)(%u)", "%1 %2")
	output = string.gsub(output, "(.*) Accessory", "Accessory | %1")
	output = string.gsub(output, "T Shirt", "T-Shirt")
	return output
end

return formatProductTypeString
--FIRST DOOR


local LMLOP = script.Parent.Door1.Left.LockMechanisms.LM.CFrame
local LMLTGP = script.Parent.Door1.Left.LockMechanisms.LMToGo.CFrame
local RMLOP = script.Parent.Door1.Right.LockMechanisms.LM.CFrame
local RMLTGP = script.Parent.Door1.Right.LockMechanisms.LMToGo.CFrame
local LDOP = script.Parent.Door1.Left.LeftDoor.CFrame
local LDTGP = script.Parent.Door1.Left.ToGoPos.CFrame
local RDOP = script.Parent.Door1.Right.RightDoor.CFrame
local RDTGP = script.Parent.Door1.Right.ToGoPos.CFrame