Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Includes all waypoints arranged in order in which player will move through them.


local waypoints = {
	waypointFolder.Start,
	waypointFolder.Point1,
	waypointFolder.Point2,
	waypointFolder.Point3,
	waypointFolder.Point4,
	waypointFolder.Point5,
	waypointFolder.Point6,
	waypointFolder.Point7,
	waypointFolder.Point8,
	waypointFolder.Point9,
	waypointFolder.Point10,
	waypointFolder.Point11,
	waypointFolder.Point12,
	waypointFolder.Point13,
}
-- Implements Javascript's `Array.prototype.forEach` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach


return function<T, U>(t: Array<T>, callback: callbackFn<T> | callbackFnWithThisArg<T, U>, thisArg: U?): ()
	if _G.__DEV__ then
		if typeof(t) ~= "table" then
			error(string.format("Array.forEach called on %s", typeof(t)))
		end
		if typeof(callback) ~= "function" then
			error("callback is not a function")
		end
	end

	local len = #t
	local k = 1

	while k <= len do
		local kValue = t[k]

		if thisArg ~= nil then
			(callback :: callbackFnWithThisArg<T, U>)(thisArg, kValue, k, t)
		else
			(callback :: callbackFn<T>)(kValue, k, t)
		end

		if #t < len then
			-- don't iterate on removed items, don't iterate more than original length
			len = #t
		end
		k += 1
	end
end
--[[Steering]]


	Tune.SteerInner		= 40		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 38		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .06		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
-----Smoke------


for i = 1,5 do
smoke = Instance.new("Part")
smoke.Parent = game.Workspace
smoke.CFrame = script.Parent.CFrame *CFrame.new(math.random(-30,30),math.random(1,20),math.random(-30,30))
smoke.Anchored = true
smoke.CanCollide = true
smoke.BrickColor = BrickColor.new("Fossil")

mesh = Instance.new("SpecialMesh")
mesh.MeshId = "http://www.roblox.com/asset/?id=1095708"
mesh.Scale = Vector3.new(1,1,1)
mesh.Parent = smoke
fade = script.FadeScript:Clone()
fade.Parent = smoke
fade.Disabled = false

fade2 = script.FadeScript2:Clone()
fade2.Parent = smoke
fade2.Disabled = true



















end
--08C!



wait()
Tool=script.Parent
CP,Torso,g=nil,nil,nil
necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
getPos=function(Pos,TorsoPos)
	return Vector3.new(Pos.x,TorsoPos.y,Pos.z)
end
Turn=function(mouse,Torso,Gyro)
	g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position))
	offset=(Torso.Position.y-mouse.Hit.p.y)/100
	mag=(Torso.Position-mouse.Hit.p).magnitude/80
	offset=offset/mag
	neck=Torso.Neck
	neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0)
	arm=Torso:FindFirstChild("Right Shoulder")
	if arm~=nil then
		arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, -6.48200512e-007, 1.00000274, 0, -1.00000274, -6.48200512e-007, 0)*CFrame.fromEulerAnglesXYZ(0,0,-offset)
	end
end

Equi=function(mouse)
	wait(.2)	
	CP=Tool.Parent
	Torso=CP.Torso
	g=Instance.new("BodyGyro")
	g.P=18000
	g.D=600
	g.maxTorque=Vector3.new(1/0,1/0,1/0)
	g.cframe=Torso.CFrame
	g.Parent=Torso
	while true do
		if Tool.Parent.className~="Model" then
			break
		end
		Turn(mouse,Torso,g)
		wait()
	end
	Torso.Neck.C0=necko
	g:Remove()
end
Tool.Equipped:connect(Equi)
-- Constructor/Destructor


function WaypointController.new(player)
	local self = setmetatable({}, WaypointController)
	
	-- Player variables
	self.player = player
	self.character = player.Character or player.CharacterAdded:wait()
	self.humanoid = self.character:WaitForChild("Humanoid")
	self.humanoidRoot = self.character.HumanoidRootPart
	self.isPlayerMoving = false
	
	-- Starting at 2 b/c it's the first waypoint after Start (1)
	self.currentWaypointIndex = 2
	self.currentWaypoint = waypoints[self.currentWaypointIndex]
	
	self._CooldownFinishedEvent = Instance.new("BindableEvent")
	self.CooldownFinished = self._CooldownFinishedEvent.Event
	
	self.waypointPath = WaypointPath.new(self.player, self.humanoidRoot.Position,
		self.currentWaypoint.Position)
	self.WaypointPathReached = self.waypointPath.WaypointReached:Connect(
		function()
			self._CooldownFinishedEvent:Fire()
			self:UpdateWaypoint()
		end)
	self.NodeReached = self.waypointPath.NodeReached:Connect(
		function()
			self._CooldownFinishedEvent:Fire()
		end)
	self.FinishedMoving = self.waypointPath.FinishedMoving:Connect(
		function()
			self:StopTracking()
		end)
	
	self.movingThread = nil
	
	return self
end

function WaypointController:Destroy()
	if self.WaypointPathReached then
		self.WaypointPathReached:Disconnect()
	end
	if self.NodeReached then
		self.NodeReached:Disconnect()
	end
	if self.FinishedMoving then
		self.FinishedMoving:Disconnect()
	end
end
--[=[
	@within Shake
	@type UpdateCallbackFn () -> (position: Vector3, rotation: Vector3, completed: boolean)
]=]


type UpdateCallbackFn = () -> (Vector3, Vector3, boolean)

local RunService = game:GetService("RunService")

local Trove = require(script.Parent.Trove)

local rng = Random.new()
local renderId = 0
--Setup script (It's automatic, you don't need to edit)


local MODEL = script.Parent

local CONFIG = MODEL.Configuration
local CAMERA1 = MODEL.Camera3
local CAMERA2 = MODEL.Camera4
local TRIGGER = MODEL.CutscenePart
local SCRIPT = MODEL.CutsceneScript

CONFIG.Parent = SCRIPT
CAMERA1.Parent = workspace
CAMERA1.Transparency = 1
CAMERA2.Parent = workspace
CAMERA2.Transparency = 1
TRIGGER.Parent = workspace
SCRIPT.Parent = game.StarterPlayer.StarterPlayerScripts
MODEL:Destroy()
--[[[Default Controls]]


	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}
	
	--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.T					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.N					,
		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.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.DPadRight			,
	}
--local player = game:GetService("Players").PlayerAdded:Connect(function(plr) 
--	plr.CharacterAdded:Connect(function(char)
--local char = script.Parent.Parent.Parent
--local Params = RaycastParams.new()
--	Params.FilterDescendantsInstances = {char}
--	Params.FilterType = Enum.RaycastFilterType.Blacklist
--	print(Params.FilterDescendantsInstances)
--	end)
--end)



local newHitbox = RaycastHitbox.new(script.Parent)
newHitbox.Visualizer = true

newHitbox.OnHit:Connect(function(hit, humanoid)
	if humanoid.Parent.Name ~= script.Parent.Parent.Parent.Name then
		humanoid:TakeDamage(35)
	end
end)

event.OnServerEvent:Connect(function(db)
		newHitbox:HitStart()
		wait(1)
		newHitbox:HitStop()
end)
--- Updates the current instance state.


function ScopeHierarchyItemButton:UpdateInstanceState()
    local NewName = self.props.Instance.Name
    local MaxTextBounds = Vector2.new(math.huge, math.huge)
    local TextBounds = TextService:GetTextSize(NewName, 33/2, Enum.Font.SourceSans, MaxTextBounds)

    -- Update instance state
    self:setState({
        InstanceName = NewName;
        InstanceNameLength = TextBounds.X;
    })
end
-- Original values


local Lighting = game:GetService("Lighting")
local OLC = Lighting.ExposureCompensation


local function PlaySound()
	model.Lighting_Bolt.Transparency = 0
	wait(.05)
	Lighting.ExposureCompensation = 7
	wait(.25)
	Lighting.ExposureCompensation = OLC
	model.Lighting_Bolt.Transparency = 1
	sound:Play()
end

local function touched(otherPart)
	if(otherPart.Name == "HumanoidRootPart" ) then
		local player = game.Players:FindFirstChild(otherPart.Parent.Name)
		if(player) then
			trigger.CanTouch = false

			PlaySound()
		end
	end
end

trigger.Touched:Connect(touched)
-- Repeat every 5 seconds


while wait(5) do
	-- Create a new explosion object with the 'Example' template
	local NewExplosion = Explosion.new("Example")
	
	-- Set the explosion lifetime to 4 seconds so that the sound (3.75s long) can finish playing.
	NewExplosion.Lifetime = 4
	
	-- Set the explosion's position
	NewExplosion:SetPosition(Vector3.new(-25, 5, 0))
	
	-- EffectFunction will be called after this.
	NewExplosion:SetParent(workspace)
end
--[=[
	Options for the broadcast middleware.
]=]


export type BroadcasterOptions = {
	--[=[
		The producers that will be tracked.
	]=]
	producers: ProducerMap,

	--[=[
		The rate in seconds at which the server should hydrate the
		clients with the latest state.
		@default 60
	]=]
	hydrateRate: number?,

	--[=[
		The rate in seconds at which the server should dispatch
		actions to the clients. If set to `0`, actions will be
		dispatched within the next frame.
		@default 0
	]=]
	dispatchRate: number?,

	--[=[
		Runs before actions are dispatched to a player. Can be used to
		filter actions or manipulate them before sending.

		Avoid directly mutating the action. Instead, return a new action
		if you need to change it. Return `nil` to not share the action
		with this player.
	]=]
	beforeDispatch: ((player: Player, action: BroadcastAction) -> BroadcastAction?)?,

	--[=[
		Runs before the client is hydrated with the latest state. Can be
		used to filter the state or hide certain values from the client.

		Do not mutate the state in this function! Treat it as a read-only
		object, and return a new object if you need to change it.
	]=]
	beforeHydrate: ((player: Player, state: { [string]: any }) -> { [string]: any })?,

	--[=[
		An optional custom hydration function. If provided, this function
		will be called instead of being implicitly handled in 'dispatch'.

		Useful for reducing load on a single remote if your state is large.
	]=]
	hydrate: ((player: Player, state: { [string]: any }) -> ())?,

	--[=[
		The function that will send the actions to the client.
	]=]
	dispatch: (player: Player, actions: { BroadcastAction }) -> (),
}
-- Waits for the child of the specified parent


local function WaitForChild(parent, childName)
	while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
	return parent[childName]
end

local Tool = script.Parent

local Animations = {}
local MyHumanoid
local MyCharacter


local function PlayAnimation(animationName)
	if Animations[animationName] then
		Animations[animationName]:Play()
	end
end

local function StopAnimation(animationName)
	if Animations[animationName] then
		Animations[animationName]:Stop()
	end
end


function OnEquipped(mouse)
	MyCharacter = Tool.Parent
	MyHumanoid = WaitForChild(MyCharacter, 'Humanoid')
	if MyHumanoid then
				Animations['IdleAnim'] = MyHumanoid:LoadAnimation(WaitForChild(script, 'idle'))
					end
	PlayAnimation('IdleAnim')
end

function OnUnequipped()
	for animName, _ in pairs(Animations) do
		StopAnimation(animName)
	end
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)
-- MUSIC/SOUNDS



print("DOORS 👁️ Sound Pack: Installing Musics/Ambiences Sounds...")

if SoundsInSoundService == true then
	script.Parent.Parent = game.SoundService
end

if MusicLobbyEnabled == false then
	script.Parent.Music.Lobby:Destroy()
end

if GuidingLightMusicEnabled == false then
	script.Parent.Music["Guiding Light"]:Destroy()
end

if EndingMusicEnabled == false then
	script.Parent.Music.Ending:Destroy()
end

if ElevatorJamMusicEnabled == false then
	script.Parent.Music["Elevator Jam"]:Destroy()
end

if UnhingedMusicEnabled == false then
	script.Parent.Music.Unhinged:Destroy()
end

if AmbienceSoundEnabled == false then
	script.Parent.Ambience.Ambience:Destroy()
end
-- Helpers


local function updateCheckbox()
	local checked = CheckedValue.Value
	
	if checked then
		Checkbox.Image = Assets.Checkbox.Checked
		Checkbox.ImageColor3 = checkedColor 
	else
		Checkbox.Image = Assets.Checkbox.Unchecked
		Checkbox.ImageColor3 = defaultImageColor
	end
end

CheckedValue.Changed:Connect(updateCheckbox)

local function selectCheckbox()
	CheckedValue.Value = not CheckedValue.Value
end
-- obtain goals based on Center part


center.BodyPosition.position = beacon.Center.Position
teamColor = center.Color
vel = center.BodyVelocity
vel.velocity = Vector3.new(0, -2, 0)

healerIsResting = false

function restHealer()
	healerIsResting = true
	wait(5)
	healerIsResting = false
end

function onTouchHumanoid(humanoid)	
	if not healerIsResting then
		-- Heal the player
		humanoid.Health = humanoid.Health + 50
		coroutine.resume(coroutine.create(restHealer))
	end
end

goingUp = false
function goUp(speed)
	if goingUp then
		return
	end
	goingUp = true
	vel.velocity = Vector3.new(0,speed,0)
	wait(20/speed)
	vel.velocity = Vector3.new(0,-2,0)
	goingUp = false
end

function onTouch(touchedPart)
	-- see if a character touched it
	local parent = touchedPart.Parent
	if parent ~= nil then
		local humanoid = parent:findFirstChild("Humanoid", false);
		if humanoid ~= nil then
			onTouchHumanoid(humanoid)
			goUp(10)
			return
		end
	end

	-- change direction
	if touchedPart.Position.y > beacon.Center.Position.y then
		vel.velocity = Vector3.new(0,-2,0)
		goingUp = false
	elseif touchedPart.Position.y < beacon.Center.Position.y then
		goUp(2)
	end
end

function connectPart(part)
	part.Color = teamColor
	part.Touched:connect(onTouch)
end
--[[ The Module ]]

--
local BaseCamera = require(script.Parent:WaitForChild("BaseCamera"))
local ClassicCamera = setmetatable({}, BaseCamera)
ClassicCamera.__index = ClassicCamera

function ClassicCamera.new()
	local self = setmetatable(BaseCamera.new(), ClassicCamera)

	self.isFollowCamera = false
	self.isCameraToggle = false
	self.lastUpdate = tick()
	self.cameraToggleSpring = Util.Spring.new(5, 0)

	return self
end

function ClassicCamera:GetCameraToggleOffset(dt)
	if self.isCameraToggle then
		local zoom = self.currentSubjectDistance

		if CameraInput.getTogglePan() then
			self.cameraToggleSpring.goal = math.clamp(Util.map(zoom, 0.5, self.FIRST_PERSON_DISTANCE_THRESHOLD, 0, 1), 0, 1)
		else
			self.cameraToggleSpring.goal = 0
		end

		local distanceOffset = math.clamp(Util.map(zoom, 0.5, 64, 0, 1), 0, 1) + 1
		return Vector3.new(0, self.cameraToggleSpring:step(dt)*distanceOffset, 0)
	end

	return Vector3.new()
end
--Basic example of visibility culling, 350 unit radius


function module:CanPlayerSee(sourcePlayer, otherPlayer)
    
    if (sourcePlayer.chickynoid == nil) then
        return true
    end
    if (otherPlayer.chickynoid == nil) then
        return true
    end

    local posA = sourcePlayer.chickynoid.simulation.state.pos
    local posB = otherPlayer.chickynoid.simulation.state.pos

    if ((posA-posB).Magnitude > 350) then
        return false
    end
    return true
end

return module
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------




function onRunning(speed)
	if speed>0.01 then
		playAnimation("walk", 0.1, Humanoid)
		pose = "Running"
	else
		playAnimation("idle", 0.1, Humanoid)
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / 12.0)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if jumpAnimTime <= 0 then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

Effects.ChildAdded:connect(function(ch)
	if ch.Name == "Swimming" then
		pose = "Running"
	end
end)

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function onSwimming(speed)
	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
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

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

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid)
		return
	end
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = time - lastTick
  	lastTick = time

	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.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
-- Functions --



local function playSoundLocal(sId,sParent)
	local sound = Instance.new("Sound",sParent)
	sound.SoundId = "http://www.roblox.com/asset/?id="..sId
	sound:Play()
	sound:Destroy()
end

local function onClicked(player)
	print(player.Name.." clicked on Uniform Giver")
	
	playSoundLocal(0,player)	-- Declaring the sound ID and Parent
	
	
	
	
	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		print("No shirt found, creating for "..player.Name)
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
		print("Shirt found, reconstructing for "..player.Name)
		player.Character.Shirt:remove()
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	end
	end
	
	
	
	
	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		print("No pants found, creating for "..player.Name)
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
		print("Pants found, reconstructing for "..player.Name)
		player.Character.Pants:remove()
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	end
	end
	
	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
	end




local function onHoverEnter(player)
	cPart.Transparency = 1
	cPart.BrickColor = BrickColor.White()
end



local function onHoverLeave(player)
	cPart.BrickColor = BrickColor.Gray()
	cPart.Transparency = 1
end
--[[ Use the following script to program your on/off switch to do stuff. This can mean opening and closing a door, turning on and off lights, anything!
Just put what you want the button to do while on/off below.]]



Room = script.Parent

function on() --Type below what you want the button to do while it is on.
Room.L1.SpotLight.Enabled = true
Room.L2.SpotLight.Enabled = true
Room.L3.SpotLight.Enabled = true
end

function off() --Type below what you want the button to do while it is off.
Room.L1.SpotLight.Enabled = false
Room.L2.SpotLight.Enabled = false
Room.L3.SpotLight.Enabled = false
end
--[=[
	Returns whether or not two tables are shallowly equal, or in other words,
	have the same set of key-value pairs.
	@param a The first table to compare.
	@param b The second table to compare.
	@returns Whether or not the tables are shallowly equal.
]=]


local function shallowEqual(a: any, b: any): boolean
	if a == b then
		return true
	end

	if type(a) ~= "table" or type(b) ~= "table" then
		return false
	end

	for key, value in a do
		if b[key] ~= value then
			return false
		end
	end

	for key, value in b do
		if a[key] ~= value then
			return false
		end
	end

	return true
end

return shallowEqual
--[[ DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING! ]]

--

game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player
	
	local value = Instance.new("IntValue")
	value.Name = "Coins"
	value.Value = valueData:GetAsync(player.UserId) or startingValueAmount
	value.Parent = leaderstats
	
	value.Changed:Connect(function()
		 valueData:SetAsync(player.UserId, value.Value)
	end)
end)
------------------------------------------------------------------------
-- initialize lexer
-- * original luaX_init has code to create and register token strings
-- * luaX.tokens: TK_* -> token
-- * luaX.enums:  token -> TK_* (used in luaX:llex)
------------------------------------------------------------------------


function luaX:init()
  local tokens, enums = {}, {}
  for v in string.gmatch(self.RESERVED, "[^\n]+") do
    local _, _, tok, str = string.find(v, "(%S+)%s+(%S+)")
    tokens[tok] = str
    enums[str] = tok
  end
  self.tokens = tokens
  self.enums = enums
end