Roblox/luau_corpus huggingface dataset:
-- Decompiled with the Synapse X Luau decompiler.

return {
	pitchStiffness = 0.5, 
	yawStiffness = 2.5, 
	autocorrectDelay = 1, 
	autocorrectMinCarSpeed = 16, 
	autocorrectMaxCarSpeed = 32, 
	autocorrectResponse = 0.5, 
	cutoffMinAngularVelYaw = 60, 
	cutoffMaxAngularVelYaw = 180, 
	cutoffMinAngularVelPitch = 15, 
	cutoffMaxAngularVelPitch = 60, 
	pitchBaseAngle = 18, 
	pitchDeadzoneAngle = 12, 
	firstPersonResponseMul = 10, 
	yawReponseDampingRising = 1, 
	yawResponseDampingFalling = 3, 
	pitchReponseDampingRising = 1, 
	pitchResponseDampingFalling = 3, 
	initialZoomRadiusMul = 3, 
	verticalCenterOffset = 0.33
};
--CHANGE THIS TO TRUE IF YOU WANT TO SET THE USERNAME BY YOURSELF. IF FALSE, THE SCRIPT WILL AUTOMATICALLY USE THE GAME OWNER'S NAME.
local defaultOwnerOverride = true
-- lunge and hold
			
local plr = game.Players:GetPlayerFromCharacter(target)

_G.SD[plr.UserId].Data.stats.health = _G.SD[plr.UserId].Data.stats.health - 99
			
			
if _G.SD[plr.UserId].Data.stats.health < 1 then
	plr.Character:BreakJoints()
end
			
shark.Head.SharkEat:Play()

local emitter = game.ReplicatedStorage.Particles.Teeth:Clone()
emitter.Parent = shark.Head
emitter.EmissionDirection = Enum.NormalId.Top
wait()
emitter:Emit(1)
holdOrder = tick()
holdDuration = 2
end

end
end -- end of MakeAMove()
MakeAMove()


local scanSurroundings = coroutine.wrap(function()
while true do
stance = "wander"
local surroundingParts = workspace:FindPartsInRegion3WithIgnoreList(Region3.new(
shark.PrimaryPart.Position+Vector3.new(-60,-3,-60),
shark.PrimaryPart.Position+Vector3.new(60,10,60)),
shark:GetChildren())
for _,v in next,surroundingParts do
if v.Parent:FindFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 and _G.SD[target.UserId].Data.stats.health > 0 then
-- Contructors

function ViewportWindow.new(surfaceGUI)
	local self = setmetatable({}, ViewportWindow)
	
	self.SurfaceGUI = surfaceGUI
	self.Camera = Instance.new("Camera", surfaceGUI)
	self.ViewportFrame = VPF:Clone()
	self.ViewportFrame.Name = "WorldFrame"
	self.ViewportFrame.ZIndex = 2
	self.ViewportFrame.LightDirection = -LIGHTING:GetSunDirection()
	self.ViewportFrame.Ambient = LIGHTING.Ambient
	self.ViewportFrame.LightColor = Color3.new(0, 0, 0)
	self.ViewportFrame.CurrentCamera = self.Camera
	self.ViewportFrame.Parent = surfaceGUI
	
	self.SkyboxFrame = VPF:Clone()
	self.SkyboxFrame.Name = "SkyboxFrame"
	self.SkyboxFrame.ZIndex = 1
	self.SkyboxFrame.LightDirection = -LIGHTING:GetSunDirection()
	self.SkyboxFrame.Ambient = LIGHTING.Ambient
	self.SkyboxFrame.LightColor = Color3.new(0, 0, 0)
	self.SkyboxFrame.CurrentCamera = self.Camera
	self.SkyboxFrame.Parent = surfaceGUI
	
	return self
end

function ViewportWindow.fromPart(part, normalId, parent)
	local surfaceGUI = Instance.new("SurfaceGui")
	surfaceGUI.Face = normalId
	surfaceGUI.CanvasSize = Vector2.new(1024, 1024)
	surfaceGUI.SizingMode = Enum.SurfaceGuiSizingMode.FixedSize
	surfaceGUI.Adornee = part
	surfaceGUI.ClipsDescendants = true
	surfaceGUI.Parent = parent
	
	return ViewportWindow.new(surfaceGUI)
end
-- 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();
-- Cambia el valor de espera (en segundos) según tus necesidades.
local tiempoEspera = 15

wait(tiempoEspera)
disableCanCollide()
------------------------------------------------------------

function ClickDecimal()
	onSecond()
		if (onSec == true and input2Dec == false) then
			input2 = input2.."."
			input2Dec = true
			disp = disp.."."
			script.Parent.Display.Text = disp
		end
		if (onSec == false and input1Dec == false) then
			input1 = input1.."."
			input1Dec = true
			disp = disp.."."
			script.Parent.Display.Text = disp
		end
end

script.Parent.ClDec.MouseButton1Down:connect (ClickDecimal)

function Click0()
	onSecond()
		if (onSec == true) then
			input2 = input2.."0"
		end
		if (onSec == false) then
			input1 = input1.."0"
		end
		disp = disp.."0"
		script.Parent.Display.Text = disp
end

script.Parent.Cl0.MouseButton1Down:connect(Click0)

function Click1()
	onSecond()
		if (onSec == true) then
			input2 = input2.."1"
		end
		if (onSec == false) then
			input1 = input1.."1"
		end
		disp = disp.."1"
		script.Parent.Display.Text = disp
end

script.Parent.Cl1.MouseButton1Down:connect(Click1)

function Click2()
	onSecond()
		if (onSec == true) then
			input2 = input2.."2"
		end
		if (onSec == false) then
			input1 = input1.."2"
		end
		disp = disp.."2"
		script.Parent.Display.Text = disp
end

script.Parent.Cl2.MouseButton1Down:connect(Click2)

function Click3()
	onSecond()
		if (onSec == true) then
			input2 = input2.."3"
		end
		if (onSec == false) then
			input1 = input1.."3"
		end
		disp = disp.."3"
		script.Parent.Display.Text = disp
end

script.Parent.Cl3.MouseButton1Down:connect(Click3)

function Click4()
	onSecond()
		if (onSec == true) then
			input2 = input2.."4"
		end
		if (onSec == false) then
			input1 = input1.."4"
		end
		disp = disp.."4"
		script.Parent.Display.Text = disp
end

script.Parent.Cl4.MouseButton1Down:connect(Click4)

function Click5()
	onSecond()
		if (onSec == true) then
			input2 = input2.."5"
		end
		if (onSec == false) then
			input1 = input1.."5"
		end
		disp = disp.."5"
		script.Parent.Display.Text = disp
end

script.Parent.Cl5.MouseButton1Down:connect(Click5)

function Click6()
	onSecond()
		if (onSec == true) then
			input2 = input2.."6"
		end
		if (onSec == false) then
			input1 = input1.."6"
		end
		disp = disp.."6"
		script.Parent.Display.Text = disp
end

script.Parent.Cl6.MouseButton1Down:connect(Click6)

function Click7()
	onSecond()
		if (onSec == true) then
			input2 = input2.."7"
		end
		if (onSec == false) then
			input1 = input1.."7"
		end
		disp = disp.."7"
		script.Parent.Display.Text = disp
end

script.Parent.Cl7.MouseButton1Down:connect(Click7)

function Click8()
	onSecond()
		if (onSec == true) then
			input2 = input2.."8"
		end
		if (onSec == false) then
			input1 = input1.."8"
		end
		disp = disp.."8"
		script.Parent.Display.Text = disp
end

script.Parent.Cl8.MouseButton1Down:connect(Click8)

function Click9()
	onSecond()
		if (onSec == true) then
			input2 = input2.."9"
		end
		if (onSec == false) then
			input1 = input1.."9"
		end
		disp = disp.."9"
		script.Parent.Display.Text = disp
end

script.Parent.Cl9.MouseButton1Down:connect(Click9)
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 1800		-- Front brake force
	Tune.RBrakeForce	= 1800		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
-- Removes an object's tree node. Called when the object stops existing in the
-- game tree.
local function removeObject(object)
	local objectNode = NodeLookup[object]
	if not objectNode then
		return
	end

	local visible = nodeIsVisible(objectNode)

	Selection:Remove(object,true)

	local parent = objectNode.Parent
	remove(parent,objectNode.Index)
	NodeLookup[object] = nil
	connLookup[object]:disconnect()
	connLookup[object] = nil

	if visible then
		updateList()
	elseif nodeIsVisible(parent) then
		updateScroll()
	end
end
-- Flashing Lights --
function Functions.Flash(Color)
	if Color == nil then return end
	for i = 1,2 do
		wait(0.1)
		DoorLogo.BrickColor = BrickColor.new(Color) 
		wait(0.1)
		DoorLogo.BrickColor = BrickColor.new("Really blue") 
	end
end
--print('stun starting')

if script.Parent.Parent.Parent.CurrentCamera:FindFirstChild("Stun") then
	script.Parent.Parent.Parent.CurrentCamera:FindFirstChild("Stun"):Destroy()
end

local guiMain = Instance.new("ColorCorrectionEffect") 
guiMain.Parent = script.Parent.Parent.Parent.CurrentCamera 
guiMain.Brightness = script.Parent:WaitForChild("Brightness").Value
guiMain.Name = "Stun"

local stunSound = script["stun"..math.random(1, #script:GetChildren())]:Clone()
stunSound.Parent = script
--------LEFT DOOR --------
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(1003)

game.Workspace.doorleft.l12.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1003)

game.Workspace.doorleft.l13.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1003)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------


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

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
		stopAllAnimations()
		moveSit()
		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
-- Variables
local player = Players.LocalPlayer
local character = script.Parent

local npcModel = workspace.LobbyAssets:WaitForChild("NPC")
local animationController = npcModel.AnimationController
local animation = Instance.new("Animation")
local lastWavedAt = 0
local characterIsNear = false
local waveAnimationTrack
--local SecArrow = Clock.Sec

while true do
	local t = os.time()-25200
	local hour=(((t/60)/60)/12)%1
	local minute=(hour*12)%1
	local mint = math.floor(minute*60)
-- Local Variables
local MapSave = game.ServerStorage:FindFirstChild("MapSave")
if not MapSave then
	MapSave = Instance.new("Folder", game.ServerStorage)
	MapSave.Name = "MapSave"
end
local Spawns = { }
--HEYECANLIYT ABONE OLMASSANIZ ÇALIŞMAZ!!!
local StatsName = "TL" -- statsının adı neyse onu buraya yazıyorsunuz
local MaxItems = 10 -- en fazla kaç kişi görünsün tabloda
local MinValueDisplay = 1 -- en az kaç olsun yani taloda kaçın üstünde göstersin
local MaxValueDisplay = 10e15 -- max sınır kaç olsun
local UpdateEvery = 30 -- (saniye cinsinde) ne kadar sürede yenilensin
-------------------
---[[Functions]]---
-------------------


local function UpdateSpeedometer()
	
	if Humanoid.SeatPart ~= nil and Humanoid.SeatPart.Parent:FindFirstChild("Stats") then
		Gui.Enabled = true
		
		local Cached_Magnitude = Char.Head.Velocity.magnitude

		--print(Char.Humanoid.SeatPart.Parent["Stats"].MaxSpeed.Value)
		
		--print(math.ceil())
	
		
		Pointer.Rotation = ( 180 / ( Humanoid.SeatPart.Parent["Stats"].MaxSpeed.Value / ((Cached_Magnitude)*1.62) ) ) ---OLD 1.8
		--print(math.abs(90 - ((Cached_Magnitude)*1.8))/45)
		Pointer.Arc.Size = UDim2.new(4.5 +(math.abs(90 - Pointer.Rotation)/45),0,0.5,0)
		
		Board.Speed.Text = math.floor((Cached_Magnitude)*1.62).." KM/H" ---OLD 1.8
		
		---Changing fov based on speed
		workspace.Camera.FieldOfView = 70 + ((Cached_Magnitude)*0.1)
		
	else
		Gui.Enabled = false
		
		if script.Parent.Parent.Parent:FindFirstChild("TouchGui") then
			script.Parent.Parent.Parent["TouchGui"].Enabled = true
			script.Parent.Parent.MobileControls.Visible = false
			script.Parent.Parent.PCHandbrake.Visible = false
		end
		
	end
end

RunService.Heartbeat:Connect(UpdateSpeedometer)
--only works for R6
game.Players.PlayerAdded:connect(function(player)
		player.CharacterAdded:connect(function(character)
		player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=8667134401" -- Insert your animation's ID here or leave this one, I don't really care--
		end)
end)
--[[
	Constructs a new computed state object which maps pairs of an array using
	a `processor` function.

	Optionally, a `destructor` function can be specified for cleaning up values.
	If omitted, the default cleanup function will be used instead.
]]

local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local Types = require(Package.Types)
local captureDependencies = require(Package.Dependencies.captureDependencies)
local initDependency = require(Package.Dependencies.initDependency)
local useDependency = require(Package.Dependencies.useDependency)
local parseError = require(Package.Logging.parseError)
local logErrorNonFatal = require(Package.Logging.logErrorNonFatal)
local cleanup = require(Package.Utility.cleanup)

local class = {}

local CLASS_METATABLE = {__index = class}
local WEAK_KEYS_METATABLE = {__mode = "k"}
--[[
	
		___      _______                _     
	 Ryyujii's Tune 
]]

local Tune = {}
--[=[
	@return screenPosition: Vector2

	Gets the 2D mouse position on the screen.
]=]
function Mouse:GetPosition()
	return UserInputService:GetMouseLocation()
end
--Electric Only Setup

if not _Tune.Engine and _Tune.Electric then 
	_Tune.Redline = _Tune.E_Redline 
	_Tune.PeakRPM = _Tune.E_Trans2 
	_Tune.Turbochargers = 0
	_Tune.Superchargers = 0
	_Tune.Clutch = false 
	_Tune.IdleRPM = 0 
	_Tune.ClutchType = "Clutch" 
	_Tune.AutoShiftType = "DCT" 
	_Tune.ShiftUpTime = 0.1 
	_Tune.ShiftDnTime = 0.1 
end
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 30
end
--[Main]--
game:GetService("RunService").Heartbeat:connect(function()
	if On.Value then
		if NWUD.Value then
			Pitch=script.Parent.Pitch.Value
		else
			if Pitch<MP.Value then
				Pitch=Pitch+(0.005*((1*MP.Value)-((Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value)*(Pitch*MP.Value))))
			else
				Pitch=MP.Value
			end
		end
		if Hi.Volume<1 then
			Hi.Volume=Hi.Volume+(1*(Hi.Volume))
			Lo.Volume=Lo.Volume+(1*(Lo.Volume))
			Hi.Volume=Hi.Volume+1
			Lo.Volume=Lo.Volume+1
		else
			Hi.Volume=1
			Lo.Volume=1
		end
		script.Parent.LEDClip.Material="Neon"
		script.Parent.LEDClip.BrickColor=BrickColor.new("Persimmon")
	else
		if NWUD.Value then
			Pitch=0
			script.Parent.LEDClip.Material="Metal"
			script.Parent.LEDClip.BrickColor=BrickColor.new("Maroon")
		else
			if Pitch>Lowest then
				if NWD.Value and script.Parent.Mode.Value==0 then
					Pitch=Lowest
				else
					if script.Parent.Mode.Value==0 then
						Pitch=Pitch-(0.0015*Pitch*Pitch)
					else
						if script.Parent.Mode.Value==2 then
							Pitch=Pitch-(0.002*Pitch)
						elseif script.Parent.Mode.Value==3 then
							Pitch=Pitch-(0.0015*Pitch)
						elseif script.Parent.Mode.Value==6 then
							Pitch=Pitch-(0.0015*Pitch*Pitch)
						end
					end
				end
			else
				if script.Parent.Mode.Value==0 then
					script.Parent.Rotate.Value=false
				end
				Hi.Volume=0
				Lo.Volume=0
				Pitch=Lowest
				script.Parent.LEDClip.Material="Metal"
				script.Parent.LEDClip.BrickColor=BrickColor.new("Maroon")
			end
		end
	end
	script.Parent.CurrentPitch.Value=Pitch
	Hi.PlaybackSpeed=Pitch*1
	Lo.PlaybackSpeed=Pitch*1
end)
--[=[
	Retrieves the display name color for a given player (for the Roblox chat)

	@param displayName string
	@return Color3
]=]
function PlayerUtils.getDefaultNameColor(displayName)
	return NAME_COLORS[(hashName(displayName) % #NAME_COLORS) + 1]
end

return PlayerUtils
--[[
	Creates a new monster within the specified room, finding a random clear location to spawn it.
]]
function MonsterManager.spawnMonsterInRoom(room)
	local regions = room:getRegions()
	local region = regions[math.random(1, #regions)]

	spawn(
		function()
			local position = getRandomClearLocationInRegionAsync(region, CLEAR_AREA_TO_SPAWN)

			monsters:add(monsterId, position, interests)

			monsterId = monsterId + 1
		end
	)
end
--!strict

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

local donationProducts = require(script.Parent.DonationProducts)
local instances = script.Parent:WaitForChild("Instances")

local player = Players.LocalPlayer :: Player
local playerGui = player:FindFirstChild("PlayerGui") :: PlayerGui
local leaderboard = script.Parent:WaitForChild("Leaderboard")
local leaderboardGui = leaderboard:WaitForChild("Display"):WaitForChild("LeaderboardGui")

local ROBUX_TEMPLATE = utf8.char(0xE002) .. " %d" -- char code 0xE002 is reserved for the Robux icon
local ASSET_TEMPLATE = "rbxassetid://%d"
---------------------------------------------------

This = script.Parent
Elevator = This.Parent.Parent.Parent.Parent.Parent
Characters = require(script.Characters)
CustomLabel = require(Elevator.CustomLabel)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

This.Parent.Parent.Parent.Parent.Parent:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))		
	SetDisplay(3,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("Matrix"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do 
			for r=1,7 do	
				This.Display["Matrix"..ID]["Row"..i]["D"..r].Visible = (l:sub(r,r) == "1" and true or false)
			end
		end
	end
end
--[[
	Creates a Promise that resolves after given number of seconds.
]]
do
	-- uses a sorted doubly linked list (queue) to achieve O(1) remove operations and O(n) for insert

	-- the initial node in the linked list
	local first
	local connection

	function Promise.delay(seconds)
		assert(type(seconds) == "number", "Bad argument #1 to Promise.delay, must be a number.")
		-- If seconds is -INF, INF, NaN, or less than 1 / 60, assume seconds is 1 / 60.
		-- This mirrors the behavior of wait()
		if not (seconds >= 1 / 60) or seconds == math.huge then
			seconds = 1 / 60
		end

		return Promise._new(debug.traceback(nil, 2), function(resolve, _, onCancel)
			local startTime = Promise._getTime()
			local endTime = startTime + seconds

			local node = {
				resolve = resolve,
				startTime = startTime,
				endTime = endTime,
			}

			if connection == nil then -- first is nil when connection is nil
				first = node
				connection = Promise._timeEvent:Connect(function()
					local threadStart = Promise._getTime()

					while first ~= nil and first.endTime < threadStart do
						local current = first
						first = current.next

						if first == nil then
							connection:Disconnect()
							connection = nil
						else
							first.previous = nil
						end

						current.resolve(Promise._getTime() - current.startTime)
					end
				end)
			else -- first is non-nil
				if first.endTime < endTime then -- if `node` should be placed after `first`
					-- we will insert `node` between `current` and `next`
					-- (i.e. after `current` if `next` is nil)
					local current = first
					local next = current.next

					while next ~= nil and next.endTime < endTime do
						current = next
						next = current.next
					end

					-- `current` must be non-nil, but `next` could be `nil` (i.e. last item in list)
					current.next = node
					node.previous = current

					if next ~= nil then
						node.next = next
						next.previous = node
					end
				else
					-- set `node` to `first`
					node.next = first
					first.previous = node
					first = node
				end
			end

			onCancel(function()
				-- remove node from queue
				local next = node.next

				if first == node then
					if next == nil then -- if `node` is the first and last
						connection:Disconnect()
						connection = nil
					else -- if `node` is `first` and not the last
						next.previous = nil
					end
					first = next
				else
					local previous = node.previous
					-- since `node` is not `first`, then we know `previous` is non-nil
					previous.next = next

					if next ~= nil then
						next.previous = previous
					end
				end
			end)
		end)
	end
	Promise.Delay = Promise.delay
end
--

function CharacterClone:GetLookup()
	local lookup = {}
	local character = self.Character
	for _, item in next, self.Clone:GetChildren() do
		if (item:IsA("BasePart")) then
			item.Anchored = true
			local match = character:FindFirstChild(item.Name)
			lookup[item] = match
		elseif (item:IsA("Accessory")) then
			local match = character:FindFirstChild(item.Name).Handle
			item = item.Handle
			item.Anchored = true
			lookup[item] = match
		elseif (item:IsA("LuaSourceContainer")) then
			item:Destroy()
		end
	end
	return lookup
end

function CharacterClone:Update()
	for fake, real in next, self.Lookup do
		fake.CFrame = real.CFrame
	end
end