Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Functions


function Default()
	Avatar = nil
	Hold = nil
end

function SearchTable(Item, List)
	for i, s in pairs(List) do
		if (s == Item) then return true end
	end
	return false
end

function MorphHead(Part)
	-- Sub Morph (1/2): Remove Player Customizations
	for i, s in pairs(Part:GetChildren()) do
		if (SearchTable(s.ClassName, AvatarHead) == true) then
			s:Remove()
		end
	end
	wait(1)

	-- Sub Morph (2/2): Add Items To Head
	for i, s in pairs(Head:GetChildren()) do
		if (SearchTable(s.ClassName, AvatarHead) == true) then
			s:Clone().Parent = Part
		end
	end
end

function MorphPlayer(Avatar)
	-- Morph (1/2): Remove Player Customizations & Morph Head
	for i, s in pairs(Avatar:GetChildren()) do
		if (SearchTable(s.ClassName, AvatarBody) == true) and (SearchTable(s.ClassName, ExcludedClasses) == false) and (SearchTable(s.Name, ExcludedNames) == false) or (s.ClassName == "Hat") then
			s:Remove()
		end
		if (s.ClassName == "Part") and (s.Name == "Head") then MorphHead(s) end
	end
	wait(1)

	-- Morph (2/2): Add Items To Avatar
	for i, s in pairs(StealthLava.Parent:GetChildren()) do
		if (SearchTable(s.ClassName, AvatarBody) == true) and (SearchTable(s.ClassName, ExcludedClasses) == false) and (SearchTable(s.Name, ExcludedNames) == false) then
			s:Clone().Parent = Avatar
		end
	end
	wait(1)
end
--- Splits a string using a simple separator (no quote parsing)


function Util.SplitStringSimple(inputstr, sep)
	if sep == nil then
		sep = "%s"
	end
	local t = {}
	local i = 1
	for str in string.gmatch(inputstr, "([^" .. sep .. "]+)") do
		t[i] = str
		i = i + 1
	end
	return t
end

local function charCode(n)
	return utf8.char(tonumber(n, 16))
end
---KILL FOR CASH



local Humanoid = script.Parent.Humanoid
function PwntX_X()
	local tag = Humanoid:FindFirstChild("creator")
	if tag ~= nil then
		if tag.Value ~= nil then
			local Leaderstats = tag.Value:FindFirstChild("leaderstats")
			if Leaderstats ~= nil then
				Leaderstats.FlagBucks.Value = Leaderstats.FlagBucks.Value + 10 --how much you get for killing the npc
				wait(0.1)
				script:remove()
			end
		end
	end
end
Humanoid.Died:connect(PwntX_X)
 																																																																																																	--[[ 																																																																																																					]]
--[[
	
	Base64 encoding/decoding
	
	Functions.Base64(
		Encode = (data), 		<-- |REQ|	Data
		Decode = (data), 		<-- |REQ|	Data
	)
	
--]]




function Encode(data)
    return ((data:gsub('.', function(x) 
        local r, b = '', x:byte()
        for i = 8, 1, -1 do 
			r = r..(b%2 ^ i - b%2 ^ (i - 1) > 0 and '1' or '0') 
		end
        return r;
    end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
        if #x < 6 then  return ''  end
        local c = 0
        for i = 1, 6 do 
			c = c+(x:sub(i,i)=='1' and 2^(6-i) or 0) 
		end
        return b:sub(c + 1, c + 1)
    end)..({'', '==', '='})[#data%3 + 1])
end


function Decode(data)
    data = string.gsub(data, '[^'..b..'=]', '')
    return (data:gsub('.', function(x)
        if x == '=' then  return ''  end
        local r, f= '', (b:find(x) - 1)
        for i = 6, 1, -1 do r=r..(f%2 ^ i - f%2 ^ (i - 1) > 0 and '1' or '0') end
        return r;
    end):gsub('%d%d%d?%d?%d?%d?%d?%d?', function(x)
        if #x ~= 8 then  return ''  end
        local c = 0
        for i = 1, 8 do c = c + (x:sub(i, i)== '1' and 2 ^ (8 - i) or 0) end
        return string.char(c)
    end))
end


return {Encode = Encode, Decode = Decode}
--[[**
	Returns a t.union of each value in the table as a t.literal

	@param valueTable The table to get values from

	@returns True iff the condition is satisfied, false otherwise
**--]]


function t.valueOf(valueTable)
	local values = {}
	local length = 0
	for _, value in valueTable do
		length = length + 1
		values[length] = value
	end

	return t.literal(table.unpack(values, 1, length))
end
--[[Transmission]]


	Tune.TransModes		= {"Auto", "Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "RPM"									--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 4		-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.15		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.94		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.20		,
		--[[ 3 ]]		1.41		,
		--[[ 4 ]]		0.98		,
	}
	Tune.FDMult			= 1			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[ END OF SERVICES ]]



local LocalPlayer = PlayersService.LocalPlayer
while LocalPlayer == nil do
	PlayersService.ChildAdded:Wait()
	LocalPlayer = PlayersService.LocalPlayer
end

local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

local okShouldClipInGameChat, valueShouldClipInGameChat = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldClipInGameChat") end)
local shouldClipInGameChat = okShouldClipInGameChat and valueShouldClipInGameChat
--wait(1)



local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local render = game:GetService("RunService").RenderStepped

local dev = script.Parent

local lastY = 0
local units = {
	[dev.N ] = -math.pi * 4/4;
	[dev.NE] = -math.pi * 3/4;
	[dev.E ] = -math.pi * 2/4;
	[dev.SE] = -math.pi * 1/4;
	[dev.S ] =  math.pi * 0/4;
	[dev.SW] =  math.pi * 1/4;
	[dev.W ] =  math.pi * 2/4;
	[dev.NW] =  math.pi * 3/4;
}

function restrictAngle(angle)
	if angle < -math.pi then
		return angle + math.pi*2
	elseif angle > math.pi then
		return angle - math.pi*2
	else
		return angle
	end
end

render:connect(function()
	local delta = wait(1/30)

	local look = camera.CoordinateFrame.lookVector
	local look = Vector3.new(look.x, 0, look.z).unit
	local lookY = math.atan2(look.z, look.x)

	local difY = restrictAngle(lookY - lastY)
	lookY = restrictAngle(lastY + difY*delta*smoothness)
	lastY = lookY

	for unit, rot in pairs(units) do
		rot = restrictAngle(lookY - rot)
		if math.sin(rot) > 0 then
			local cosRot = math.cos(rot)
			local cosRot2 = cosRot*cosRot

			unit.Visible = true
			unit.Position = UDim2.new(0.5 + cosRot*0.6, unit.Position.X.Offset, 0, 3)
--[[
	Adds a CollectionService tag to all player and character objects
	Used by CollisionGroupManager to create components wrapped around Characters,
	and by ZoneHandler to check for characters in zones
--]]



local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")
local CollectionService = game:GetService("CollectionService")

local PlayerTag = require(ReplicatedStorage.Source.SharedConstants.CollectionServiceTag.PlayerTag)
local CharacterTag = require(ReplicatedStorage.Source.SharedConstants.CollectionServiceTag.CharacterTag)
local PlayerObjectsContainer = require(ServerStorage.Source.PlayerObjectsContainer)

local TagPlayers = {}

function TagPlayers.addTags(player: Player)
	CollectionService:AddTag(player, PlayerTag)

	local characterLoadedWrapper = PlayerObjectsContainer.getCharacterLoadedWrapper(player)

	if characterLoadedWrapper:isLoaded() then
		TagPlayers._onCharacterAdded(player.Character :: Model)
	end

	characterLoadedWrapper.loaded:Connect(function(character: any)
		TagPlayers._onCharacterAdded(character :: Model)
	end)
end

function TagPlayers._onCharacterAdded(character: Model)
	CollectionService:AddTag(character, CharacterTag.Character)
end

return TagPlayers
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS



function onRunning(speed)
	local heightScale = if userAnimateScaleRun then getHeightScale() else 1

	local movedDuringEmote = currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0)
	local speedThreshold = movedDuringEmote and (Humanoid.WalkSpeed / heightScale) or 0.75
	if speed > speedThreshold * heightScale then
		local scale = 16.0
		playAnimation("walk", 0.2, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

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

function onClimbing(speed)
	if userAnimateScaleRun then
		speed /= getHeightScale()
	end
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / scale)
	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
--!strict
--[=[
	@function removeIndex
	@within Array

	@param array {T} -- The array to remove the value from.
	@param index number -- The index to remove the value from (can be negative).
	@return {T} -- The array with the value removed.

	Removes a value from an array at the given index.

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

	local new = RemoveIndex(array, 1) -- { 2, 3 }
	local new = RemoveIndex(array, -1) -- { 1, 3 }
	```
]=]


local function removeIndex<T>(array: { T }, index: number): { T }
	local length = #array
	local result = {}

	if index < 1 then
		index += length
	end

	for arrIndex, value in ipairs(array) do
		if arrIndex ~= index then
			table.insert(result, value)
		end
	end

	return result
end

return removeIndex
---------------------------------MOBILE------------------------------------



if UserInputService.TouchEnabled then
	local MobileButtons = plr.PlayerGui.MobileButtons:WaitForChild("MobileButtons")
	MobileButtons.Visible = true

	local MobileBlockButton = MobileButtons.Block

	MobileBlockButton.Activated:Connect(function()
		if not char.Values:FindFirstChild("Stunned") and not debounce then
			if Status == "nil" then
				startBlocking()
			else
				stopBlocking()
			end
		end
	end)
end
--[[
	Constructs a new computed state object, which follows the value of another
	state object using a spring simulation.
]]



local Package = script.Parent.Parent
local logError = require(Package.Logging.logError)
local unpackType = require(Package.Animation.unpackType)
local SpringScheduler = require(Package.Animation.SpringScheduler)
local useDependency = require(Package.Dependencies.useDependency)
local initDependency = require(Package.Dependencies.initDependency)
local updateAll = require(Package.Dependencies.updateAll)

local class = {}

local CLASS_METATABLE = {__index = class}
local WEAK_KEYS_METATABLE = {__mode = "k"}

local ENABLE_PARAM_SETTERS = false
-- declarations



local Figure = script.Parent
local Torso = waitForChild(Figure, "Torso")
local RightShoulder = waitForChild(Torso, "Right Shoulder")
local LeftShoulder = waitForChild(Torso, "Left Shoulder")
local RightHip = waitForChild(Torso, "Right Hip")
local LeftHip = waitForChild(Torso, "Left Hip")
local Neck = waitForChild(Torso, "Neck")
local Humanoid = waitForChild(Figure, "Humanoid")
local pose = "Standing"

local toolAnim = "None"
local toolAnimTime = 0

local jumpMaxLimbVelocity = 0.75
--//ENGINE//--


Horsepower = 170  --{This is how much power your engine block makes ALONE, this does not represent to total horsepower output [IF you have a turbo/SC]}
EngineDisplacement = 2200 --{Engine size in CC's}
EngineType =  "Petrol" --{Petrol, Diesel, Electric]
EngineLocation = "Front" --{Front, Mid, Rear}
ForcedInduction = "Natural" --{Natural, Single, Twin, Supercharger} 
InductionPartSize = 1 --{0-5, 1 being small, 5 being large (Decimals accepted, e.g 2.64 turbo size, this is the size of the turbo}
ElectronicallyLimited = false --{Electronically Limit the top speed of your vehicle}
LimitSpeedValue = 100 --{Limits top speed of the vehicle [In MPH]}
-- Touching this Battle Armor doubles you MaxHealth and heals you to full power



local debounce = false

function getPlayer(humanoid)
	-- find the owning player of a humanoid.
	local players = game.Players:children()
	for i = 1, #players do
		if players[i].Character ~= nil then
			if players[i].Character.Humanoid == humanoid then return players[i] end
		end
	end
	return nil
end


function putOnArmor(humanoid)

	local torso = humanoid.Parent.Torso

	torso.Reflectance = .6
	humanoid.MaxHealth = 200
	
	
	local player = getPlayer(humanoid)
	if player ~= nil then
		local message = Instance.new("Message")
		message.Text = "You found Battle Armor!"
		message.Parent = player
		wait(5)
		message.Text = "Max Health Doubled!"
		wait(5)
		message.Parent = nil
	end


end

function hasArmor(humanoid)
	return (humanoid.MaxHealth > 100)
end

function onTouched(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if humanoid~=nil and debounce == false then
		if (hasArmor(humanoid)) then return end
		debounce = true
		script.Parent.Parent = nil
		putOnArmor(humanoid)
		debounce = false
	end
end


script.Parent.Touched:connect(onTouched)
--[[
	Generates symbols used to denote property change handlers when working with
	the `New` function.
]]



local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)

local function OnChange(propertyName: string): PubTypes.OnChangeKey
	return {
		type = "Symbol",
		name = "OnChange",
		key = propertyName
	}
end

return OnChange
--Move this script to Workspace.



function onPlayerEntered(player)
player.Chatted:connect(function(msg)
if msg == "!REJOIN" then
	game:GetService("TeleportService"):Teleport(game.PlaceId, player)
	if player.Character ~= nil then
		player.Character:remove()
	end
end
end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)
--[[**
	<description>
	Sets the value of the result in the database with the key and the new value. Attempts to get the value from the data store. Does not call functions fired on update.
	</description>

	<parameter name = "key">
	The key to set.
	</parameter>

	<parameter name = "newValue">
	The value to set.
	</parameter>
**--]]


function DataStore:SetKeyValue(key, newValue)
	if not self.value then
		self.value = self:Get({})
	end

	self.value[key] = newValue
end

local CombinedDataStore = {}

do
	function CombinedDataStore:BeforeInitialGet(modifier)
		self.combinedBeforeInitialGet = modifier
	end

	function CombinedDataStore:BeforeSave(modifier)
		self.combinedBeforeSave = modifier
	end

	function CombinedDataStore:Get(defaultValue, dontAttemptGet)
		local tableResult = self.combinedStore:Get({})
		local tableValue = tableResult[self.combinedName]

		if not dontAttemptGet then
			if tableValue == nil then
				tableValue = defaultValue
			else
				if self.combinedBeforeInitialGet and not self.combinedInitialGot then
					tableValue = self.combinedBeforeInitialGet(tableValue)
				end
			end
		end

		self.combinedInitialGot = true
		tableResult[self.combinedName] = clone(tableValue)
		self.combinedStore:Set(tableResult, true)
		return tableValue
	end

	function CombinedDataStore:Set(value, dontCallOnUpdate)
		local tableResult = self.combinedStore:GetTable({})
		tableResult[self.combinedName] = value
		self.combinedStore:Set(tableResult, dontCallOnUpdate)
		self:_Update(dontCallOnUpdate)
	end

	function CombinedDataStore:Update(updateFunc)
		self:Set(updateFunc(self:Get()))
		self:_Update()
	end

	function CombinedDataStore:OnUpdate(callback)
		if not self.onUpdateCallbacks then
			self.onUpdateCallbacks = { callback }
		else
			self.onUpdateCallbacks[#self.onUpdateCallbacks + 1] = callback
		end
	end

	function CombinedDataStore:_Update(dontCallOnUpdate)
		if not dontCallOnUpdate then
			for _, callback in pairs(self.onUpdateCallbacks or {}) do
				callback(self:Get(), self)
			end
		end

		self.combinedStore:_Update(true)
	end

	function CombinedDataStore:SetBackup(retries)
		self.combinedStore:SetBackup(retries)
	end
end

local DataStoreMetatable = {}

DataStoreMetatable.__index = DataStore
--[=[
	Registers a callback that runs when an unhandled rejection happens. An unhandled rejection happens when a Promise
	is rejected, and the rejection is not observed with `:catch`.

	The callback is called with the actual promise that rejected, followed by the rejection values.

	@since v3.2.0
	@param callback (promise: Promise, ...: any) -- A callback that runs when an unhandled rejection happens.
	@return () -> () -- Function that unregisters the `callback` when called
]=]


function Promise.onUnhandledRejection(callback)
	table.insert(Promise._unhandledRejectionCallbacks, callback)

	return function()
		local index = table.find(Promise._unhandledRejectionCallbacks, callback)

		if index then
			table.remove(Promise._unhandledRejectionCallbacks, index)
		end
	end
end

return Promise
--	g.MaxTorque=Vector3.new(math.abs(carSeat.CFrame.lookVector.X),math.abs(carSeat.CFrame.lookVector.Y*1),math.abs(carSeat.CFrame.lookVector.Z))*600



	if ks.CanCollide == true then
		carSeat.Parent.Body.KW.swag.BodyThrust.force = Vector3.new(0,-50,0)
	else
		carSeat.Parent.Body.KW.swag.BodyThrust.force = Vector3.new(0,0,0)
	end
	if carSeat.Throttle == 1 and Burnout == 1 then
		wheel2.Smoke.Enabled = true
		wheel2.Smoke.Opacity = (speedw/50)
		wheel2.Smoke.RiseVelocity = (speedw/100)
	else
		wheel2.Smoke.Enabled = false
	end
	if carSeat.Throttle == -1 then
		carSeat.Parent.Body.Lights.Brake.Material = "Neon"
		carSeat.Parent.Body.Lights.Brake.BrickColor = BrickColor.new("Really red")
	else
		carSeat.Parent.Body.Lights.Brake.Material = "SmoothPlastic"
		carSeat.Parent.Body.Lights.Brake.BrickColor = BrickColor.new("Pearl")
	end
end
--[[ FUNCTIONS ]]

--

Players.PlayerAdded:connect(function(player) -- player Joins Game
	if player.MembershipType == Enum.MembershipType.Premium then -- if they are premium
		
		--[[ EXTRA PLAYER LEADERSTATS]]--
		
		local AddedGems = 15 -- how many points to add

		player.leaderstats.Gems.Value = player.leaderstats.Gems.Value + AddedGems -- adding The Points everytime they join the game
		
		-- || CHANGE NAME HERE ^^^^^					AND CHANGE ^^ IF ITS DIFFERENT || --

		--[[ EXTRA PLAYER GEAR ]]--

		local starterGear = player:WaitForChild("StarterGear") -- starter gear
		local specialTool = ServerStorage:FindFirstChild("Tool"):Clone() -- getting special tool
		
		specialTool.Parent = starterGear -- setting parent to starter gear
		
		--[[ EXTRA HEALTH/SUPER POWERS (COMMENT OUT IF YOU DON'T WANT IT) ]] --
		
		player.CharacterAdded:connect(function(char)
			local humanoid = char:findFirstChild("Humanoid")

			if humanoid then
				humanoid.MaxHealth = 300
				humanoid.Health = humanoid.MaxHealth
				humanoid.WalksSpeed = 100
				humanoid.JumpPower = 250
			end
			
		end)
		
	end
end)
-- options -------------------------



setupmode = "Manual" -- Manual or Auto (if you want to pick what plugins you have yourself or you want it to be automated)
soundplugin = "SoundSuite"	-- StockSound, SoundSuite or 1.5 Sound (no others are supported, sorry!) (MANUAL ONLY)
camkey = "v" -- the key you use for first person camera
level = 50 -- 0% - 100% 
exceptions = {"Pedal","Shift"} -- put names of audios to ignore here (AUTO ONLY)
--[=[
	@param name string
	@param inboundMiddleware ClientMiddleware?
	@param outboundMiddleware ClientMiddleware?
	@return ClientRemoteSignal
	Returns a new ClientRemoteSignal that mirrors the matching RemoteSignal created by
	ServerComm with the same matching `name`.
]=]


function ClientComm:GetSignal(name: string, inboundMiddleware: ClientMiddleware?, outboundMiddleware: ClientMiddleware?)
	return Comm.Client.GetSignal(self._instancesFolder, name, inboundMiddleware, outboundMiddleware)
end
--[[
	ControlModule - This ModuleScript implements a singleton class to manage the
	selection, activation, and deactivation of the current character movement controller.
	This script binds to RenderStepped at Input priority and calls the Update() methods
	on the active controller instances.

	The character controller ModuleScripts implement classes which are instantiated and
	activated as-needed, they are no longer all instantiated up front as they were in
	the previous generation of PlayerScripts.

	2018 PlayerScripts Update - AllYourBlox
--]]


local ControlModule = {}
ControlModule.__index = ControlModule
--[[ END OF SERVICES ]]



local LocalPlayer = PlayersService.LocalPlayer
while LocalPlayer == nil do
	PlayersService.ChildAdded:wait()
	LocalPlayer = PlayersService.LocalPlayer
end

local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

local okShouldClipInGameChat, valueShouldClipInGameChat = pcall(function() return UserSettings():IsUserFeatureEnabled("UserShouldClipInGameChat") end)
local shouldClipInGameChat = okShouldClipInGameChat and valueShouldClipInGameChat
--////////////////////////////// Include
--//////////////////////////////////////


local Chat = game:GetService("Chat")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local modulesFolder = script.Parent
local moduleChannelsTab = require(modulesFolder:WaitForChild("ChannelsTab"))
local MessageSender = require(modulesFolder:WaitForChild("MessageSender"))
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil"))
--Set up event for when the server is shutting down.


StartShutdown.OnClientEvent:Connect(function()
	--Create the Gui and have it semi-transparent for 1 second.
	local Gui,Background = CreateTeleportScreen()
	Background.BackgroundTransparency = 0.5
	Gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
	wait(1)
	
	--Tween the transparency to 0.
	local Start = tick()
	local Time = 0.5
	while tick() - Start < Time do
		local Dif = tick() - Start
		local Ratio = Dif/Time
		Background.BackgroundTransparency = 0.5 * (1 - Ratio)
		RenderStepped:Wait()
	end
	Background.BackgroundTransparency = 0
end)
--[=[
	Constructs a new Signal that wraps around an RBXScriptSignal.

	@param rbxScriptSignal RBXScriptSignal -- Existing RBXScriptSignal to wrap
	@return Signal

	For example:
	```lua
	local signal = Signal.Wrap(workspace.ChildAdded)
	signal:Connect(function(part) print(part.Name .. " added") end)
	Instance.new("Part").Parent = workspace
	```
]=]


function Signal.Wrap<T...>(rbxScriptSignal: RBXScriptSignal): Signal<T...>
	assert(
		typeof(rbxScriptSignal) == "RBXScriptSignal",
		"Argument #1 to Signal.Wrap must be a RBXScriptSignal; got " .. typeof(rbxScriptSignal)
	)
	local signal = Signal.new()
	signal._proxyHandler = rbxScriptSignal:Connect(function(...)
		signal:Fire(...)
	end)
	return signal
end