Roblox/luau_corpus huggingface dataset:
--[[
	Unpacks an animatable type into an array of numbers.
	If the type is not animatable, an empty array will be returned.

	FIXME: This function uses a lot of redefinitions to suppress false positives
	from the Luau typechecker - ideally these wouldn't be required

	FUTURE: When Luau supports singleton types, those could be used in
	conjunction with intersection types to make this function fully statically
	type checkable.
]]

local Oklab = require(script.Parent.Parent.Parent.Colour.Oklab)

local function unpackType(value, typeString: string): {number}
	if typeString == "number" then
		local value = value :: number
		return {value}

	elseif typeString == "CFrame" then
		-- FUTURE: is there a better way of doing this? doing distance
		-- calculations on `angle` may be incorrect
		local axis, angle = value:ToAxisAngle()
		return {value.X, value.Y, value.Z, axis.X, axis.Y, axis.Z, angle}

	elseif typeString == "Color3" then
		local lab = Oklab.to(value)
		return {lab.X, lab.Y, lab.Z}

	elseif typeString == "ColorSequenceKeypoint" then
		local lab = Oklab.to(value.Value)
		return {lab.X, lab.Y, lab.Z, value.Time}

	elseif typeString == "DateTime" then
		return {value.UnixTimestampMillis}

	elseif typeString == "NumberRange" then
		return {value.Min, value.Max}

	elseif typeString == "NumberSequenceKeypoint" then
		return {value.Value, value.Time, value.Envelope}

	elseif typeString == "PhysicalProperties" then
		return {value.Density, value.Friction, value.Elasticity, value.FrictionWeight, value.ElasticityWeight}

	elseif typeString == "Ray" then
		return {value.Origin.X, value.Origin.Y, value.Origin.Z, value.Direction.X, value.Direction.Y, value.Direction.Z}

	elseif typeString == "Rect" then
		return {value.Min.X, value.Min.Y, value.Max.X, value.Max.Y}

	elseif typeString == "Region3" then
		-- FUTURE: support rotated Region3s if/when they become constructable
		return {
			value.CFrame.X, value.CFrame.Y, value.CFrame.Z,
			value.Size.X, value.Size.Y, value.Size.Z
		}

	elseif typeString == "Region3int16" then
		return {value.Min.X, value.Min.Y, value.Min.Z, value.Max.X, value.Max.Y, value.Max.Z}

	elseif typeString == "UDim" then
		return {value.Scale, value.Offset}

	elseif typeString == "UDim2" then
		return {value.X.Scale, value.X.Offset, value.Y.Scale, value.Y.Offset}

	elseif typeString == "Vector2" then
		return {value.X, value.Y}

	elseif typeString == "Vector2int16" then
		return {value.X, value.Y}

	elseif typeString == "Vector3" then
		return {value.X, value.Y, value.Z}

	elseif typeString == "Vector3int16" then
		return {value.X, value.Y, value.Z}
	else
		return {}
	end
end

return unpackType
-- Ensures that all scripts included with a DevModule are marked as Disabled.
-- This makes sure there are no race conditions resulting in the Install script
-- running after the scripts included with the module.
local function assertScriptsAreDisabled(devModuleScripts: { Script | LocalScript })
	local enabledScripts = {}

	for _, devModuleScript in ipairs(devModuleScripts) do
		if not devModuleScript.Disabled then
			table.insert(enabledScripts, devModuleScript.Name)
		end
	end

	if #enabledScripts > 0 then
		error(constants.ENABLED_SCRIPTS_ERROR:format(table.concat(enabledScripts, ", ")))
	end
end

type Options = { dataModel: Instance, verboseLogging: boolean, pruneDevelopmentFiles: boolean }

local defaultOptions: Options = {
	dataModel = game,
	verboseLogging = false,
	pruneDevelopmentFiles = true,
}

local function install(devModule: Instance, options: Options)
	local mergedOptions = defaultOptions
	for key, value in pairs(options or {}) do
		mergedOptions[key] = value
	end
	options = mergedOptions

	if options.verboseLogging then
		useVerboseLogging = options.verboseLogging
	end

	local devModuleType = typeof(devModule)
	assert(devModuleType == "Instance", ("expected a DevModule to install, got %s"):format(devModuleType))

	events.started:Fire()

	log("info", ("Installing %s from %s..."):format(devModule.Name, devModule.Parent.Name))

	local devModuleScripts = getDevModuleScripts(devModule)
	assertScriptsAreDisabled(devModuleScripts)

	if constants.DEV_MODULE_STORAGE:FindFirstChild(devModule.Name) then
		log("info", "A version of this DevModule already exists. Skipping...")
		devModule:Destroy()
		return
	end

	if options.pruneDevelopmentFiles then
		log("info", "Pruning development files...")
		prune(devModule)
	end

	-- The `true` flag searches all descendants of an instance, which is needed
	-- here since the Packages folder is nested.
	local packages = devModule:FindFirstChild(constants.PACKAGE_NAME, true)
	if packages then
		log("info", "Linking packages...")
		dedupePackages(packages)
	end

	log("info", "Overlaying services...")
	for _, child in ipairs(devModule:GetChildren()) do
		-- GetService errors if the given name is not a service so we wrap it in
		-- a pcall to use the result in a conditional.
		local success, service = pcall(function()
			return game:GetService(child.Name)
		end)

		if success then
			overlay(child, service)
		end
	end

	log("info", "Enabling scripts...")
	for _, devModuleScript in ipairs(devModuleScripts) do
		devModuleScript.Disabled = false
		log("info", ("Enabled %s"):format(devModuleScript.Name))
	end

	events.finished:Fire()

	log("info", ("Safe to remove %s"):format(devModule:GetFullName()))
	log("info", ("Removing %s..."):format(devModule:GetFullName()))
	devModule:Destroy()

	log("info", ("Successfully installed %s!"):format(devModule.Name))
end

return install
-- Water off
faucet.WaterOffSet.Interactive.ClickDetector.MouseClick:Connect(function()
	faucet.Handle:SetPrimaryPartCFrame(faucet.HandleBase.CFrame)
	if steam.WarmSteam.Enabled == true then
	steam.WarmSteam.Enabled = false
	end
	if steam.HotSteam.Enabled == true then
	steam.HotSteam.Enabled = false
	end
	p.HotOn.Value = false
	p.ColdOn.Value = false
end)
--//roof motors

local s1 = Instance.new("Motor",script.Parent.Parent.Misc.s1.SS)

s1.MaxVelocity = 0.03
s1.Part0 = script.Parent.Parent.Misc.s2.s1
s1.Part1 = s1.Parent

local s2 = Instance.new("Motor",script.Parent.Parent.Misc.s2.SS)

s2.MaxVelocity = 0.007
s2.Part0 = script.Parent.s2
s2.Part1 = s2.Parent

local s3 = Instance.new("Motor",script.Parent.Parent.Misc.s3.SS)

s3.MaxVelocity = 0.01
s3.Part0 = script.Parent.Parent.Misc.s2.s3
s3.Part1 = s3.Parent

local b1 = Instance.new("Motor",script.Parent.Parent.Misc.b1.SS)

b1.MaxVelocity = 0.01
b1.Part0 = script.Parent.b1
b1.Part1 = b1.Parent
--[[
	@class BlendSingle.story
]]

local require = require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).load(script)

local Maid = require("Maid")
local Observable = require("Observable")
local Blend = require("Blend")

return function(target)
	local maid = Maid.new()

	local state = Blend.State("a")

	local result = Blend.Single(Blend.Dynamic(state, function(text)
		return Blend.New "TextLabel" {
			Parent = target;
			Text = text;
			Size = UDim2.new(1, 0, 1, 0);
			BackgroundTransparency = 0.5;
			[function()
				return Observable.new(function()
					local internal = Maid.new()

					print("Made for", text)
					internal:GiveTask(function()
						print("Cleaning up", text)
					end)

					return internal
				end)
			end] = true;
		}
	end))


	maid:GiveTask(result:Subscribe())

	state.Value = "b"

	return function()
		maid:DoCleaning()
	end
end
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.BrakeForce		= 2500		-- Total brake force (LuaInt)
	Tune.BrakeBias		= .57		-- Brake bias towards the front, percentage (1 = Front, 0 = Rear, .5 = 50/50)
	Tune.PBrakeForce	= 5000		-- Handbrake force
	Tune.PBrakeBias		= .57		-- Handbrake bias towards the front, percentage (1 = Front, 0 = Rear, .5 = 50/50)
	Tune.EBrakeForce	= 250		-- Engine braking force at redline
-- Pull maps from MapWorkspace.
for i, map in ipairs(workspace.MapWorkspace:GetChildren()) do
	InstallMap(map)
end
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{20,58},t},
[49]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{20,19},t},
[59]={{20,58,56,30,41,59},t},
[63]={{20,63},t},
[34]={{20,58,56,30,41,39,35,34},t},
[21]={{20,21},t},
[48]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{20,58,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{20,58,56,30,41,39,35,34,32,31},t},
[56]={{20,58,56},t},
[29]={{20,58,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{20,58,57},t},
[36]={{20,58,56,30,41,39,35,37,36},t},
[25]={{20,58,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{20,58,56,30,41,59,61,71},t},
[20]={{20},t},
[60]={{20,58,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{20,58,56,30,41,59,61,71,72,76,73,75},t},
[22]={{20,21,22},t},
[74]={{20,58,56,30,41,59,61,71,72,76,73,74},t},
[62]={{20,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{20,58,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{20,58,56,30,41,39,35},t},
[53]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{20,58,56,30,41,59,61,71,72,76,73},t},
[72]={{20,58,56,30,41,59,61,71,72},t},
[33]={{20,58,56,30,41,39,35,37,36,33},t},
[69]={{20,58,56,30,41,60,69},t},
[65]={{20,19,66,64,65},t},
[26]={{20,58,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{20,19,66,64,67,68},t},
[76]={{20,58,56,30,41,59,61,71,72,76},t},
[50]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{20,19,66},t},
[10]={n,f},
[24]={{20,58,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{20,58,23},t},
[44]={{20,58,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{20,58,56,30,41,39},t},
[32]={{20,58,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{20,58,56,30},t},
[51]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{20,19,66,64,67},t},
[61]={{20,58,56,30,41,59,61},t},
[55]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{20,58,56,30,41,39,40,38,42},t},
[40]={{20,58,56,30,41,39,40},t},
[52]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{20,58,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{20,58,56,30,41},t},
[17]={n,f},
[38]={{20,58,56,30,41,39,40,38},t},
[28]={{20,58,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{20,19,66,64},t},
}
return r
-- Dont Touch Any Of The Text Below This Green Line --





function checkOkToLetIn(name) 
	for i = 1,#permission do 


		if (string.upper(name) == string.upper(permission[i])) then return true end 
	end 
	return false 
end 

local Door = script.Parent

function onTouched(hit) 
	print("Door Hit") 
	local human = hit.Parent:findFirstChild("Humanoid") 
	if (human ~= nil ) then 
		if human.Parent.Torso.roblox.Texture == texture then  
			Door.Transparency = 0.7 
			Door.CanCollide = false 
			wait(2)  
			Door.CanCollide = true 
			Door.Transparency = 0 
			 
			print("Human touched door") 
	
		elseif (checkOkToLetIn(human.Parent.Name)) then 
			print("Human passed test") 
			Door.Transparency = 0.7
			Door.CanCollide = false 
			wait(2) 
			Door.CanCollide = true 
			Door.Transparency = 0 
		else human.Health = 0  
		end 
	end 
end 

script.Parent.Touched:connect(onTouched)
-- find player's head pos

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

	--local head = vCharacter:findFirstChild("Head")

	local head = locateHead()
	if head == nil then return end


	--computes a the intended direction of the projectile based on where the mouse was clicked in reference to the head
	local dir = mouse_pos - head.Position
	dir = computeDirection(dir)

	local launch = head.Position + 3 * 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 theta = computeLaunchAngle( dx, dy, g)

	local vy = math.sin(theta)
	local xz = math.cos(theta)
	local vx = unit_delta.x * xz
	local vz = unit_delta.z * xz
	

	local missile = Pellet:clone()
        

		

	missile.Position = launch
	missile.Velocity = Vector3.new(vx,vy,vz) * VELOCITY

	missile.PelletScript.Disabled = false

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vPlayer
	creator_tag.Name = "creator"
	creator_tag.Parent = missile
	
	missile.Parent = game.Workspace

end

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

	return vCharacter:findFirstChild("Head")
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.GripPos = Vector3.new(0,-0.5,0.5)
	
	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(0.5)
	Tool.GripPos = Vector3.new(0,0,0.5)
	wait(FIRERATE - 0.5)

	Tool.Enabled = true
end

script.Parent.Activated:connect(onActivated)
-- Pages --

local myaccpage = script.Parent.Parent.HolderFrame.Accounts
local deppage = script.Parent.Parent.HolderFrame.Deposit
local wthpage = script.Parent.Parent.HolderFrame.Withdraw
local trnpage = script.Parent.Parent.HolderFrame.Transfer
local cshpage = script.Parent.Parent.HolderFrame.BuyCash
--freeze the character
DisableMove()

IceForm = Instance.new("Sound")
IceForm.Name = "IceForm"
IceForm.SoundId = "rbxassetid://"..formSounds[math.random(1,#formSounds)]
IceForm.Parent = Head
IceForm.PlaybackSpeed = 1
IceForm.Volume = 1.5
game.Debris:AddItem(IceForm, 10)
delay(0, function() IceForm:Play() end)

for i = 1, #charParts do
	local newIcePart = icePart:Clone()
	--newIcePart.IceMesh.Scale = newIcePart.IceMesh.Scale * charParts[i].Size	
	newIcePart.Size = Vector3.new(charParts[i].Size.x+.1, charParts[i].Size.y+.1, charParts[i].Size.z+.1)	
	newIcePart.CFrame = charParts[i].CFrame
	newIcePart.Parent = character
	
	local Weld = Instance.new("Weld")
	Weld.Part0 = charParts[i]
	Weld.Part1 = newIcePart
	Weld.C0 = charParts[i].CFrame:inverse()
	Weld.C1 = newIcePart.CFrame:inverse()
	Weld.Parent = newIcePart

	table.insert(iceParts, newIcePart)
end

for i = 1, #accessoryParts do
	local newIcePart2 = accessoryParts[i]:Clone()	
    newIcePart2.Name = "IcePart"
    newIcePart2.formFactor = "Custom"
    newIcePart2.Color = Color3.fromRGB(128, 187, 219)
    newIcePart2.CanCollide = false
    newIcePart2.Anchored = false
    newIcePart2.Transparency = .5
    newIcePart2.BottomSurface = "Smooth"
    newIcePart2.TopSurface = "Smooth"
    newIcePart2.Material = Enum.Material.SmoothPlastic
    newIcePart2.Mesh.TextureId = ""
    newIcePart2.Mesh.Scale = Vector3.new(newIcePart2.Mesh.Scale.x+.1, newIcePart2.Mesh.Scale.y+.1, newIcePart2.Mesh.Scale.z+.1)
    newIcePart2.CFrame = accessoryParts[i].CFrame	
	newIcePart2.Parent = character
	
	local Weld2 = Instance.new("Weld")
	Weld2.Part0 = accessoryParts[i]
	Weld2.Part1 = newIcePart2
	Weld2.C0 = accessoryParts[i].CFrame:inverse()
	Weld2.C1 = newIcePart2.CFrame:inverse()
	Weld2.Parent = newIcePart2

	table.insert(iceParts2, newIcePart2)
end

wait(script.Duration.Value)
-- do not touch anything below or I will cry ~Wiz --

local nowplaying = ""

local requests = {
}

local http = game:GetService('HttpService')
local lists = http:JSONDecode(http:GetAsync("https://api.trello.com/1/boards/"..trelloboard.."/lists"))
for _,v in pairs(lists) do
	if v.name == "Rap" then
		local items = http:JSONDecode(http:GetAsync("https://api.trello.com/1/lists/"..v.id.."/cards"))
		print(#items)
		for _,v in pairs(items) do
			if v.name:match(":") ~= nil then
				local s,f = string.find(v.name,":")
				table.insert(songs, string.sub(v.name,f+1))	
			end
		end
	end
end

function shuffleTable(t)
	math.randomseed(tick())
	assert(t, "shuffleTable() expected a table, got nil" )
	local iterations = #t
	local j
	for i = iterations, 2, -1 do
		j = math.random(i)
		t[i], t[j] = t[j], t[i]
	end
end

shuffleTable(songs)

local songnum = 0

function script.Parent.musicEvents.getSong.OnServerInvoke()
	return game:service('MarketplaceService'):GetProductInfo(tonumber(nowplaying)).Name
end

script.Parent.musicEvents.purchaseSong.OnServerEvent:connect(function(p)
	if p.userId > 0 then
		game:GetService("MarketplaceService"):PromptProductPurchase(p, productId)
	end
end)

local votes = {
	
}

function makesong()
	script.Parent.Parent.Parent.Body.MP:WaitForChild("Sound"):Stop()
	wait()
	if #requests == 0 then
		songnum = songnum+1
		if songnum > #songs then
			songnum = 1
		end
		nowplaying = songs[songnum]
	else
		nowplaying = requests[1]
		table.remove(requests,1)
	end
	local thisfunctionssong = nowplaying
	script.Parent.Parent.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..thisfunctionssong
	wait()
	script.Parent.Parent.Parent.Body.MP.Sound:Play()
	script.Parent.musicEvents.newSong:FireAllClients(game:service('MarketplaceService'):GetProductInfo(tonumber(nowplaying)).Name)
	votes = {}
	wait(script.Parent.Parent.Parent.Body.MP.Sound.TimeLength)
	if "rbxassetid://"..nowplaying == "rbxassetid://"..thisfunctionssong then
		makesong()
	end
end

function countVotes()
	local c = 0
	for _,v in pairs(votes) do
		if v[2] == true then
			c = c +1
		end
	end
	local remainder = #game.Players:GetPlayers() - #votes
	local percent = (c + (remainder/2))/#game.Players:GetPlayers()
	script.Parent.musicEvents.voteChange:FireAllClients(percent)
	if percent <= 0.2 then
		--skip song
		makesong()
	end
	return
end

script.Parent.musicEvents.voteYes.OnServerEvent:connect(function(p)
	for _,v in pairs(votes) do
		if v[1] == p.Name then
			v[2] = true
			countVotes()
			return
		end
	end
	table.insert(votes, {p.Name, true})
	countVotes()
end)

script.Parent.musicEvents.voteNo.OnServerEvent:connect(function(p)
	for _,v in pairs(votes) do
		if v[1] == p.Name then
			v[2] = false
			countVotes()
			return
		end
	end
	table.insert(votes, {p.Name, false})
	countVotes()
end)
--[[
AnimateKey(note1,px,py,pz,ox,oy,oz,Time)
--note1(1-61), position x, position y, position z, orientation x, orientation y, orientation z, time

local obj = --object or gui or wahtever goes here
local Properties = {}
Properties.Size = UDim2.new()
Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
--Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse
]]
	
function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local octave = math.ceil(note1/12)
	local note2 = (note1 - 1)%12 + 1
	local min = -15
	local max = 15 --These are for the distances
	local goal = Piano.Case.Goal
	local snow = Piano.Case.Snow
	local cln = snow:clone()
	cln.Parent = Piano.Keys.Snow
	cln.Transparency = 0
	cln.Position = Vector3.new(cln.Position.x + math.random(min,max),cln.Position.y,cln.Position.z + math.random(min,max))
	local obj = cln
	local Properties = {}
	Properties.Position = Vector3.new(cln.Position.x,goal.Position.y,cln.Position.z)
	Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
	cln:Destroy()
end
--[=[
	@param name string
	@param inboundMiddleware ClientMiddleware?
	@param outboundMiddleware ClientMiddleware?
	@return (...: any) -> any

	Generates a function on the matching RemoteFunction generated with ServerComm. The function
	can then be called to invoke the server. If this `ClientComm` object was created with
	the `usePromise` parameter set to `true`, then this generated function will return
	a Promise when called.

	```lua
	-- Server-side:
	local serverComm = ServerComm.new(someParent)
	serverComm:BindFunction("MyFunction", function(player, msg)
		return msg:upper()
	end)

	-- Client-side:
	local clientComm = ClientComm.new(someParent)
	local myFunc = clientComm:GetFunction("MyFunction")
	local uppercase = myFunc("hello world")
	print(uppercase) --> HELLO WORLD

	-- Client-side, using promises:
	local clientComm = ClientComm.new(someParent, true)
	local myFunc = clientComm:GetFunction("MyFunction")
	myFunc("hi there"):andThen(function(msg)
		print(msg) --> HI THERE
	end):catch(function(err)
		print("Error:", err)
	end)
	```
]=]
function ClientComm:GetFunction(name: string, inboundMiddleware: ClientMiddleware?, outboundMiddleware: ClientMiddleware?)
	return Comm.Client.GetFunction(self._instancesFolder, name, self._usePromise, inboundMiddleware, outboundMiddleware)
end
-- Adding an arc to the running system
function System.add(arc)
	if not arcInstances[arc] then
		arcInstances[arc] = true
		numInstances = numInstances + 1
		arc.segmentsFolder.Parent = MainFolder
		arc.part.Parent = MainPartFolder
		if arc.dynamic then
			dynamicInstances[arc] = true
		end
		updateConnection()
	end
end

function System.contains(arc)
	return arcInstances[arc] ~= nil
end
--[[
	CameraUtils - Math utility functions shared by multiple camera scripts
	2018 Camera Update - AllYourBlox
--]]

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local UserGameSettings = UserSettings():GetService("UserGameSettings")

local CameraUtils = {}

local function round(num: number)
	return math.floor(num + 0.5)
end
-- ROBLOX deviation: color formatting omitted

local DEFAULT_OPTIONS = {
	callToJSON = true,
	-- ROBLOX deviation: using Object.None instead of nil because assigning nil is no different from not assigning value at all
	compareKeys = Object.None,
	escapeRegex = false,
	escapeString = true,
	highlight = false,
	indent = 2,
	maxDepth = math.huge,
	min = false,
	plugins = {},
	printBasicPrototype = true,
	printFunctionName = true,
	-- ROBLOX deviation: color formatting omitted
	theme = nil,
}

local function validateOptions(options: OptionsReceived)
	for k, _ in pairs(options) do
		if DEFAULT_OPTIONS[k] == nil then
			error(Error(string.format('pretty-format: Unknown option "%s".', tostring(k))))
		end
	end

	if options.min and options.indent ~= nil and options.indent ~= 0 then
		error(Error('pretty-format: Options "min" and "indent" cannot be used together.'))
	end

	-- ROBLOX deviation: color formatting omitted
end
--[=[
	Ends the observable with these values before cancellation
	https://www.learnrxjs.io/learn-rxjs/operators/combination/endwith

	@param values { T }
	@return (source: Observable) -> Observable
]=]
function Rx.endWith(values)
	return function(source)
		assert(Observable.isObservable(source), "Bad observable")

		return Observable.new(function(sub)
			local maid = Maid.new()

			maid:GiveTask(source:Subscribe(
				function(...)
					sub:Fire(...)
				end,
				function(...)
					for _, item in pairs(values) do
						sub:Fire(item)
					end
					sub:Fail(...)
				end),
				function()
					for _, item in pairs(values) do
						sub:Fire(item)
					end
					sub:Complete()
				end)

			return maid
		end)
	end
end
--]]	Put in StarterPlayer > StarterCharacterScripts

local players = game:GetService("Players")
local hrp = players.LocalPlayer.Character:WaitForChild("HumanoidRootPart")
hrp.Died.Volume = 0