Roblox/luau_corpus huggingface dataset:
--[[
	This object acts as a simple data validation layer for AnalyticsService's FireEvent function.

	But in order for it to work properly, make sure that you have configured
	your PlayFab account and have set up your API key in Studio.

	Be sure to follow the setup instructions here :
	https://developer.roblox.com/en-us/articles/using-the-analytics-service
]]

local AnalyticsService = game:GetService("AnalyticsService")
local HttpService = game:GetService("HttpService")


local PlayFabReporter = {}
PlayFabReporter.__index = PlayFabReporter

function PlayFabReporter.new(reportingService)
	if not reportingService then
		reportingService = AnalyticsService
	end

	local pfr = {
		_reportingService = reportingService
	}
	setmetatable(pfr, PlayFabReporter)

	return pfr
end
--// Modules
local Zone = require(script.Zone) --require(SSS.Modules['Zone'])

local module = {}

module.SpawnHB = function(data)
	local part = data.part
	local cf = data.cf or part.CFrame 
	local Shape = data.Shape or 'Square'
	local size = data.size or Vector3.new(5,5,5)
	local tim = data.tim
	
	local HB = script.Storage[Shape]:Clone()
	HB.Parent = workspace.World.Hitbox
	HB.CFrame = cf 
	HB.Size = size
	
	if tim then
		game.Debris:AddItem(HB, tim)
	end
	
	return HB
end
--!strict
--[=[
	@function reverse
	@within Array

	@param array {T} -- The array to reverse.
	@return {T} -- The reversed array.

	Reverses the order of the items in an array.

	```lua
	local array = { 1, 2, 3 }

	local new = Reverse(array) -- { 3, 2, 1 }
	```
]=]
local function reverse<T>(array: { T }): { T }
	local result = {}

	for index = #array, 1, -1 do
		table.insert(result, array[index])
	end

	return result
end

return reverse
--time changer
local mam --minutes after midnight
local timeShift = 1 --how many minutes you shift every "tick" 3.2 original
local waitTime = 1 --legnth of the tick 1/30 original
local pi = math.pi
--------------------------
script.Parent.Paused.Changed:connect(function()
	if script.Parent.Paused.Value == true then
		for i,v in pairs(script.Parent:GetChildren()) do
			if v:IsA("Sound") then v.Looped = true v:Pause() end
		end
	else
		for i,v in pairs(script.Parent:GetChildren()) do
			if v:IsA("Sound") then 
				if script.Parent.Stopped.Value ~= true then
					v:Play() 
				end
				v.Looped = false
			end
		end
	end
end)
script.Parent.Stopped.Changed:connect(function()
	if script.Parent.Stopped.Value == true then
		script.Parent.Paused.Value = false
		for i,v in pairs(script.Parent:GetChildren()) do
			if v:IsA("Sound") then v:Stop() wait() end
		end
	end
end)
script.Parent.Track.Changed:connect(function()
	if debounce == false then
	debounce = true
	local song = songs[script.Parent.Track.Value]
	script.Parent.TName.Value =  song.Name
	if script.Parent.Stopped.Value ~= true then
		script.Parent.Stopped.Value = true
		wait()
		script.Parent.Play.Value = not script.Parent.Play.Value
	end
	debounce = false
	end
end)
script.Parent.IdPlay.Changed:connect(function()
	if script.Parent.IdPlay.Value~="" then
		script.Parent.Stopped.Value=true
		sound.SoundId = "http://www.roblox.com/asset/?id="..script.Parent.IdPlay.Value
		sound.Volume = script.Parent.Volume.Value/10
		sound.Pitch = 1
		sound.Looped=true
		script.Parent.TName.Value=game:GetService("MarketplaceService"):GetProductInfo(script.Parent.IdPlay.Value).Name
		wait()
		script.Parent.Stopped.Value=false
		sound:Play()
	end
end)
local rgui=script.RadioGui.Draggable.Menu
rgui.CanvasSize=UDim2.new(0,0,0,15*#songs)
for i,v in pairs(songs) do
	for b,a in pairs(v:GetChildren()) do
		content:Preload(a.Id.Value)
	end
	local button=Instance.new("TextButton",rgui)
	button.Name=v.Name
	button.Size=UDim2.new(1,0,0,15)
	button.Position=UDim2.new(0,5,0,(i-1)*15)
	button.BackgroundTransparency=1
	button.Text=v.Name
	button.TextColor3=Color3.new(1,1,1)
	button.FontSize=Enum.FontSize.Size10
	button.TextXAlignment=Enum.TextXAlignment.Left
end
function play()
	script.Parent.Stopped.Value = false 
	script.Parent.Paused.Value = false
	local song = songs[script.Parent.Track.Value]
	script.Parent.TName.Value =  song.Name
	local playing = {}
	for i,v in pairs(song:GetChildren()) do
		sound.Name = v.Name
		sound.SoundId = v.Id.Value
		sound.Volume = 0
		sound.Pitch = 0
		table.insert(playing,sound)
	end
	wait()
	for i,v in pairs(song:GetChildren()) do
		if script.Parent.Stopped.Value ~= true then
			local a = playing[i]
			a:Stop()
			a.Pitch = v.Pitch.Value
			a.Volume = script.Parent.Volume.Value/10
			local dur = v.Duration.Value
			a:Play()
			local t = tick()
			local run = tick()-t
			repeat wait(0.001)
				if script.Parent.Paused.Value == true then
					t = tick()-run
				else
					run = tick()-t
				end
			until run >= dur or script.Parent.Stopped.Value == true
			a:Stop()
		end
	end
	if script.Parent.Stopped.Value ~= true then
		if script.Parent.Autoplay.Value == true then
			local n = script.Parent.Track.Value+1
			if n > #songs then
				n = 1
			end	
			script.Parent.Track.Value = n
		else
			script.Parent.Stopped.Value = true
		end
	end
end
script.Parent.Play.Changed:connect(function() play() end)
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FSusMaxExt		= .3		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RSusMaxExt		= .3		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- find player's head pos

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

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

	local dir = mouse_pos - head.Position
	dir = computeDirection(dir)

	local launch = head.Position + 5 * dir

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

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

	local 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()
        

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

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

	missile.PelletScript.Disabled = false

	missile.Parent = game.Workspace

end


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

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

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




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

	Tool.Enabled = false

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



	local targetPos = humanoid.TargetPoint

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


end

script.Parent.Activated:connect(onActivated)
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(game:GetService("ReplicatedStorage"):WaitForChild("HDAdminSetup")):GetMain();
v1.humanoidRigType = (v1.player.Character or v1.player.CharacterAdded:Wait()):WaitForChild("Humanoid").RigType;
wait(1);
for v2, v3 in pairs(v1.commandSpeeds) do
	if v1.commandsActive[v2] then
		v1.commandsActive[v2] = nil;
		v1:GetModule("cf"):ActivateClientCommand(v2);
	end;
end;
--[[
	
	tweenJoint Function Parameters:
	
	Object Joint - This has to be a weld with a C0 and C1 property
	
	CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
	
	CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
	
	function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
		For example, function(X) return math.sin(math.rad(X)) end
		
	float Duration - This is how long the tweening takes to complete
	
--]]
local RS = game:GetService("RunService")
--// All global vars will be wiped/replaced except script

return function(data, env)
	if env then
		setfenv(1, env)
	end

	local playergui = service.PlayerGui
	local gui = client.UI.Prepare(script.Parent.Parent)
	local label = gui.LABEL
	local str = data.Message

	client.UI.Remove("Notif",script.Parent.Parent)

	if str and type(str)=="string" then
		label.Text = str
		gTable:Ready()
	else
		gui:Destroy()
	end
end
-- Aglin head with Cursor
CEs.Aglin.OnClientEvent:connect(function(Rchr,Answer,NAngles,Time,Turning,Tilt2)
	if Rchr == plr.Character then return end
	
	local neck = Rchr.Torso.Neck
	local tiltweld = Rchr.Tilt.Mtiltweld 
	local fakeneck = Rchr.FakeHead.FakeNeck
	
	if not Tilt2 then
		if not Turning then	
			TweenService:Create(neck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(NAngles[1],NAngles[2],NAngles[3])}):Play()
		end
		TweenService:Create(fakeneck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play()
		TweenService:Create(tiltweld,TweenInfo.new(Time),{C0=CFrame.new(0,0,0) * CFrame.Angles(Answer,0,0)}):Play()
	else
		if not Turning then
			TweenService:Create(neck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(0,0,NAngles[3])}):Play()
		end
		TweenService:Create(fakeneck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(0,0,0)}):Play()
		TweenService:Create(tiltweld,TweenInfo.new(Time),{C0=CFrame.new(0,0,0) * CFrame.Angles(0,0,0)}):Play()
	end	
end)
--Detect when a player is added.
game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function()
		repeat wait() until player.Character
		local char = player.Character
	
		--Insert gui into player.
		local gui = guibase:Clone()
		gui.Parent = player.PlayerGui
	
		--Setup name.
		local mod = Instance.new("Model")
		local hum = Instance.new("Humanoid")
		local head = Instance.new("Part")
	
		--Insert humanoid into model.
		hum.Parent = mod
	
		--Set initial name to be blank.
		mod.Name = ""
	
		--Set head properties.
		head.Size = Vector3.new(1,1,1)
		head.CanCollide = false
		head.Transparency = 0.99
		head.Name = "Head"
		head.Parent = mod
			
		--Finish model setup.
		mod.PrimaryPart = head
		mod.Parent = char
		mod:SetPrimaryPartCFrame(char.Head.CFrame+Vector3.new(0,0.5,0))
		
		--Weld part to character.
		local w = Instance.new("Weld")
		w.Name = ("Weld")
		w.Part0,w.Part1 = head,char.Head
		w.C0 = head.CFrame:inverse()
		w.C1 = char.Head.CFrame:inverse()
		w.Parent = head
		
		--Add server side handling to model.
		local svh = gui.ServerHandler
		svh.Parent = mod
		svh.ServerHandler.Disabled = false
		gui.HandlerPointer.Value = svh
		
		--Enable local handler to finish setup.
		gui.LocalHandler.Disabled = false
	end)
end)
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GraspDetection = require(ReplicatedStorage.GraspDetection)

local Thresholds = script.Parent.Thresholds
local TName, TValue = Thresholds.ThresholdName, Thresholds.ThresholdValue

local THRESHOLDS = GraspDetection.GetThresholds()
local ThresholdIndex = 1

TName.Text = THRESHOLDS[ThresholdIndex]
TValue.Text = GraspDetection.GetThresholdValue(THRESHOLDS[ThresholdIndex])

TName.Activated:Connect(function()
  ThresholdIndex += 1
  
  if ThresholdIndex > #THRESHOLDS then
    ThresholdIndex = 1
  end
  
  TName.Text = THRESHOLDS[ThresholdIndex]
  TValue.Text = GraspDetection.GetThresholdValue(THRESHOLDS[ThresholdIndex])
end)

TValue.FocusLost:Connect(function(enterPressed)
  if not enterPressed then
    return
  end
  
  GraspDetection.UpdateThreshold(THRESHOLDS[ThresholdIndex], tonumber(TValue.Text))
  TValue.Text = GraspDetection.GetThresholdValue(THRESHOLDS[ThresholdIndex])
end)
--[[Steering]]
	Tune.SteerInner		= 75		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 75		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .5		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .5		-- 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			= 7000		-- Steering Aggressiveness
--/Damage Modification
module.DamageMod = 1
module.minDamageMod = 1
-- Place all application constants here.
return {
	CameraTweenTime = 0.75,
	SurfaceArtSelectorItemSize = 200,
	Errors = {
		CanvasFull = "CanvasFull",
		CanvasNotFound = "CanvasNotFound",
		SpotNotAvailable = "SpotNotAvailable",
		SpotNotFound = "SpotNotFound",
		PlayerSpotsNotFound = "PlayerSpotsNotFound",
	},
	Tags = {
		SurfaceCanvas = "SurfaceCanvas",
	},
	Attributes = {
		SurfaceCanvasId = "SurfaceCanvasId",
		SpotIdPrefix = "SurfaceCanvasSpot_",
		SurfaceCanvasFace = "SurfaceCanvasFace",
	},
}
--  Fixed By DT4E  --

while true do
script.Parent.BrickColor = BrickColor.new("Bright Blue")
wait(0.15)
script.Parent.BrickColor = BrickColor.new("Lime green")
wait(0.15)
end
----- MAGIC NUMBERS ABOUT THE TOOL -----
-- How much damage a bullet does
local Damage = 20
--[[Drivetrain]]	
	Tune.Config			= "AWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50	-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 50		-- 1 - 100%
	Tune.RDiffLockThres	= 50		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 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)
------------------------------------------------------------------------
-- limits for opcode arguments.
-- we use (signed) int to manipulate most arguments,
-- so they must fit in LUAI_BITSINT-1 bits (-1 for sign)
------------------------------------------------------------------------
-- removed "#if SIZE_Bx < BITS_INT-1" test, assume this script is
-- running on a Lua VM with double or int as LUA_NUMBER

luaP.MAXARG_Bx  = math.ldexp(1, luaP.SIZE_Bx) - 1
luaP.MAXARG_sBx = math.floor(luaP.MAXARG_Bx / 2)  -- 'sBx' is signed

luaP.MAXARG_A = math.ldexp(1, luaP.SIZE_A) - 1
luaP.MAXARG_B = math.ldexp(1, luaP.SIZE_B) - 1
luaP.MAXARG_C = math.ldexp(1, luaP.SIZE_C) - 1
------------------------------------------
--Clear And Enter

function Clear()
print("Cleared")
Input = ""
end

script.Parent.Clear.ClickDetector.MouseClick:connect(Clear)




function Enter()
if Input == Code then
print("Entered")
Input = ""

local door = script.Parent.Parent.Door

door.Anchored = false
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = door.Transparency + 0.1
wait(0.1)
door.Transparency = 0.8
wait(3)--
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = door.Transparency - 0.1
wait(0.1)
door.Transparency = 0



return end
Input = ""
print("Wrong Code")
end




script.Parent.Enter.ClickDetector.MouseClick:connect(Enter)
--~WeaponHelper~--

local debounce = false --I wouldn't touch this at all. Its the "Debounce"--

function onTouch(part) --The function--

local h = part.Parent:findFirstChild("Humanoid") --Find first person who hits--
if (h ~= nil) and debounce == false then --If the person is still alive, then...

debounce = true --Set debounce to: True
h.WalkSpeed = 0 --You must change this if you want to change the walking speed. Just change the number (16 is normal)--
wait(0.3) --Also, you can change the numebr to how long some-one else can touch it.--
debounce = false --Set debounce to: False
end --End--
end --Double check--


script.Parent.Touched:connect(onTouch) --Double check--
-- Connect the PlayerJoined function to the PlayerAdded event of the Players service
Players.PlayerAdded:Connect(PlayerJoined)
--[[ local Workspace = game:GetService("Workspace")
local GuiService = game:GetService("GuiService")

local Camera = Workspace.CurrentCamera
local TopInset, BottomInset = GuiService:GetGuiInset()

local Roact = require("Roact")

local Scale = Roact.PureComponent:extend("Scale")

function Scale:init()
	self:update()

	self.Listener = Camera:GetPropertyChangedSignal("ViewportSize"):Connect(function()
		self:update()
	end)
end

function Scale:update()
	local currentSize = self.props.Size
	local viewportSize = Camera.ViewportSize - (TopInset + BottomInset)

	self:setState({
		Scale = 1 / math.max(
			currentSize.X / viewportSize.X,
			currentSize.Y / viewportSize.Y
		)
	})
end

function Scale:willUnmount()
	self.Listener:Disconnect()
end

function Scale:render()
	return Roact.createElement("UIScale", {
		Scale = self.state.Scale * self.props.Scale
	})
end

Scale.defaultProps = {
	Scale = 1
}

return Scale

 ]]

local Fusion = require(game.ReplicatedStorage.Packages.Fusion)
local New = Fusion.New
local Children = Fusion.Children
local OnEvent = Fusion.OnEvent
local OnChange = Fusion.OnChange
local State = Fusion.State
local Computed = Fusion.Computed
local Spring = Fusion.Spring


local Workspace = game:GetService("Workspace")
local GuiService = game:GetService("GuiService")

local Camera = Workspace.CurrentCamera
local TopInset, BottomInset = GuiService:GetGuiInset()



local function UIScale(props)
	--props:  Size = v3   Scale = float
	local	ScaleState = State()

	local function update()
		local currentSize = props.Size
		local viewportSize = Camera.ViewportSize - (TopInset + BottomInset)
	
		ScaleState:set(1 / math.max(
			currentSize.X / viewportSize.X,
			currentSize.Y / viewportSize.Y
		))
	end

	update()
	Camera:GetPropertyChangedSignal("ViewportSize"):Connect(update)

	return New "UIScale" {
		Scale = Computed(function()
			return ScaleState:get() * props.Scale
		end)
	}
end


return UIScale
--camera--
repeat wait() until Player.Character
Camera.CameraType = "Scriptable"
Camera.CFrame = game.Workspace.CameraPart.CFrame
--// # key, Wail
mouse.KeyDown:connect(function(key)
	if key=="r" then 
		if veh.Lightbar.middle.Wail.IsPlaying == true then
			veh.Lightbar.middle.Wail:Stop()
			veh.Lightbar.middle.Yelp:Stop()
			veh.Lightbar.middle.Priority:Stop()
			script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
			veh.Lightbar.middle.Wail:Play()
			veh.Lightbar.middle.Yelp:Stop()
			veh.Lightbar.middle.Priority:Stop()
			script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
			script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
			script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)
--[[
	Takes an arbitrary number of callback, and executes them in parallel, returning the results of the first to return.
	If an error is thrown, that error is bubbled up to the main thread.
	When the first callback returns, the rest are cancelled using task.cancel.

	Exposes similar functionality that Promise.race provides for promises, but for asynchronous lua callbacks
--]]

type Callback = () -> ...any

local function waitForFirstAsync(...: Callback)
	local thisThread = coroutine.running()
	local resumed = false
	local errorThrown: any

	local function resume(...: any)
		if resumed then
			return
		end
		resumed = true

		task.spawn(thisThread, ...)
	end

	for _, callback in ipairs({ ... }) do
		task.defer(function()
			-- We are capturing all values returned by pcall into a table so we can resume this thread
			-- with all values if multiple are returned
			local pcallReturnValues = { pcall(callback) }
			if not pcallReturnValues[1] then
				errorThrown = pcallReturnValues[2]
			end

			resume(table.unpack(pcallReturnValues, 2))
		end)
	end

	local returnValues = { coroutine.yield() }

	if errorThrown then
		-- Return the stack trace three callers up to where the function passed into waitForFirstAsync was
		-- declared
		error(errorThrown, 3)
	end

	return table.unpack(returnValues)
end

return waitForFirstAsync
--[=[
	Returns a list of all of the keys that a table has. (In order of pairs)

	@param source table -- Table source to extract keys from
	@return table -- A list with all the keys the table has
]=]
function Table.keys(source)
	local new = {}
	for key, _ in pairs(source) do
		table.insert(new, key)
	end
	return new
end
--[=[
	Loads a folder into a localization table
	@param folder Folder -- A Roblox folder with StringValues containing JSON, named with the localization in mind
]=]
function JsonToLocalizationTable.loadFolder(folder)
	local localizationTable = JsonToLocalizationTable.getOrCreateLocalizationTable()

	for _, item in pairs(folder:GetDescendants()) do
		if item:IsA("StringValue") then
			local localeId = JsonToLocalizationTable.localeFromName(item.Name)
			JsonToLocalizationTable.addJsonToTable(localizationTable, localeId, item.Value)
		elseif item:IsA("ModuleScript") then
			local localeId = JsonToLocalizationTable.localeFromName(item.Name)
			recurseAdd(localizationTable, localeId, "", require(item))
		end
	end
	return localizationTable
end