Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[=[
	@class BounceTemplateUtils
	@private
]=]



local BounceTemplate = script.Parent.BounceTemplate

local CREATE_ONLY_LINK = false

local BounceTemplateUtils = {}

function BounceTemplateUtils.isBounceTemplate(instance)
	return instance:GetAttribute("IsBounceTemplate", true) == true
end

function BounceTemplateUtils.getTarget(instance)
	if not BounceTemplateUtils.isBounceTemplate(instance) then
		return nil
	end

	if instance:IsA("ObjectValue") then
		return instance.Value
	else
		local found = instance:FindFirstChild("BounceTarget")
		if found then
			return found.Value
		else
			warn("[BounceTemplateUtils.getTarget] - Bounce template without BounceTarget")
			return nil
		end
	end
end

function BounceTemplateUtils.create(target, linkName)
	assert(typeof(target) == "Instance", "Bad target")
	assert(type(linkName) == "string", "Bad linkName")

	if CREATE_ONLY_LINK then
		return BounceTemplateUtils.createLink(target, linkName)
	end

	local copy = BounceTemplate:Clone()
	copy:SetAttribute("IsBounceTemplate", true)
	copy.Name = linkName

	local objectValue = Instance.new("ObjectValue")
	objectValue.Name = "BounceTarget"
	objectValue.Value = target
	objectValue.Parent = copy

	return copy
end

function BounceTemplateUtils.createLink(target, linkName)
	assert(typeof(target) == "Instance", "Bad target")
	assert(type(linkName) == "string", "Bad linkName")

	local objectValue = Instance.new("ObjectValue")
	objectValue.Name = linkName
	objectValue.Value = target
	objectValue:SetAttribute("IsBounceTemplate", true)

	return objectValue
end

return BounceTemplateUtils
--FR


fSprings[2].Thickness = Settings[1]
fSprings[2].MaxLength = Settings[2]
fSprings[2].MinLength = Settings[3]
fSprings[2].Damping = Settings[4]
fSprings[2].FreeLength = Settings[5]
fSprings[2].LimitsEnabled = Settings[6]
fSprings[2].MaxForce = Settings[7]
fSprings[2].Stiffness = Settings[8]
--[=[
	@within Ser
	@prop Classes table

	A dictionary of classes along with a Serialize and Deserialize function.
	For instance, the default class added is the Option class, which looks
	like the following:

	```lua
	Ser.Classes.Option = {
		Serialize = function(opt) return opt:Serialize() end;
		Deserialize = Option.Deserialize;
	}
	```

	Add to this table in order to extend what classes are automatically
	serialized/deserialized.

	The Ser library checks every object's `ClassName` field in both serialized
	and deserialized data in order to map it to the correct function within
	the Classes table.
]=]


Ser.Classes = {
	Option = {
		Serialize = function(opt) return opt:Serialize() end;
		Deserialize = Option.Deserialize;
	};
}
--Put this script in a mob to make it drop item. Don't forget to enable this script!



local item = Game.ReplicatedStorage.ITEMS:FindFirstChild(script.Item.Value):Clone()
local Humanoid = script.Parent.Human
function PwntX_X() 
local tag = Humanoid:FindFirstChild("creator") 
	if tag ~= nil then 
		if tag.Value ~= nil then 
			if math.random(1, 100) <= script.DropChance.Value then
				local Leaderstats = tag.Value:FindFirstChild("StarterGear") 
				local ll = tag.Value:FindFirstChild("Backpack") 
				if Leaderstats ~= nil and ll~= nil then 
					if script.KeptOnDeath.Value == true then
						item:Clone().Parent = Leaderstats
						item:Clone().Parent = ll
					else
						item:Clone().Parent = ll
					end
					wait(0.1)
					script:Remove()
				end
			end 
		end 
	end 
end 

Humanoid.Died:connect(PwntX_X)
-- Set up the click event handlers for each button


for _, button in ipairs(dock:GetChildren()) do
	if button:IsA("ImageButton") then
		button.MouseButton1Click:Connect(function()
			-- Create the jump tween
			local Click = script.Click
			local jumpTweenInfo = TweenInfo.new(jumpDuration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
			local jumpTween = game:GetService("TweenService"):Create(button, jumpTweenInfo, {
				Size = UDim2.new(button.Size.X.Scale * jumpScale, button.Size.X.Offset,
					button.Size.Y.Scale * jumpScale, button.Size.Y.Offset),
				Position = UDim2.new(button.Position.X.Scale - ((jumpScale - 1) / 2),
					button.Position.X.Offset, button.Position.Y.Scale - ((jumpScale - 1) / 2),
					button.Position.Y.Offset)
			})

			-- Play the jump tween
			jumpTween:Play()
			Click:Play()

			-- Reset the button's size and position after the jump is complete
			jumpTween.Completed:Connect(function()
				button.Size = UDim2.new(button.Size.X.Scale / jumpScale, button.Size.X.Offset,
					button.Size.Y.Scale / jumpScale, button.Size.Y.Offset)
				button.Position = UDim2.new(button.Position.X.Scale + ((jumpScale - 1) / 2),
					button.Position.X.Offset, button.Position.Y.Scale + ((jumpScale - 1) / 2),
					button.Position.Y.Offset)
			end)
		end)
	end
end
-- Sets the mass of the specified part by adjusting its density so that all
-- speeders will have the same mass (using static _DENSITY and _VOLUME)


local function SetMass(part)
	local volume = part.Size.X * part.Size.Y * part.Size.Z
	local newDensity = _DENSITY * _VOLUME / volume
	
	-- Defaults except newDensity (density, friction, elasticity)
	part.CustomPhysicalProperties = PhysicalProperties.new(newDensity, 0.3, 0.5)
end -- SetMass()

local function HandleCollision(collidedPart, part, self)
	local RaceTrack = workspace:FindFirstChild("Racetrack")
	local EnvironmentAssets = workspace:FindFirstChild("Environment Assets")
	local Plants = EnvironmentAssets:FindFirstChild("Plants")
	
	if not collidedPart:IsDescendantOf(self.speeder) and not collidedPart:IsDescendantOf(RaceTrack)
	 and not collidedPart:IsDescendantOf(Plants) and not (collidedPart == workspace.SpeederSpawnLocation) then	
		-- Create particle effect
		local particle = Explosion:Clone()
		particle.CFrame = part.CFrame
		particle.Parent = workspace

		character:Destroy()
		ExplosionSound:Play()
		
		local planeGui = PlayerGui:FindFirstChild("DesktopGui") or 
			PlayerGui:FindFirstChild("ConsoleGui") or
			PlayerGui:FindFirstChild("MobileGui")
		if planeGui then
			planeGui.Enabled = false
		end
	
		local emitterChildren = particle:GetChildren()
	
		for _, child in pairs(emitterChildren) do 
			-- If the child is a particle, then cause it to emit
			if child:IsA("ParticleEmitter") then
				child:Emit(10) 
			end
		end

		-- Destroy particle after PARTICLE_DURATION seconds
		spawn(function() 
			wait(PARTICLE_DURATION) 
			particle:Destroy() 
		end)
		-- Convert speeder to player
		spawn(function() 
			wait(2)
			PlayerConverter:SpeederToPlayer(false)
		end)	
	end
end -- handleCollisions()

local function SetupCollisionDetection(parent, self)
	for _,part in pairs(parent:GetChildren()) do
		if (part:IsA("BasePart") or part:IsA("MeshPart")) and part.Name ~= "Head" and 
			part.Name ~= "UpperTorso" and part.Name ~= "Arrow" then
			part.Touched:Connect(function(collidedPart) HandleCollision(collidedPart, part, self) end)
			SetupCollisionDetection(part, self)
		end
	end
end -- setupCollisionDetection()
--Misc


Tune.RevAccel		= 155		-- RPM acceleration when clutch is off
Tune.RevDecay		= 35		-- RPM decay when clutch is off
Tune.RevBounce		= 400		-- RPM kickback from redline
Tune.IdleThrottle	= 5			-- Percent throttle at idle
Tune.ClutchTol		= 5			-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--[[
	MarketplaceService does not expose a type for the result of GetProductInfo,
	so we have to do it ourselves.

	See the GetProductInfo method for more info:
	https://developer.roblox.com/en-us/api-reference/function/MarketplaceService/GetProductInfo
]]


export type ProductInfo = {
	Name: string,
	Description: string,
	PriceInRobux: number,
	Created: string,
	Updated: string,
	ContentRatingTypeId: number,
	MinimumMembershipLevel: number,
	IsPublicDomain: boolean,

	-- Creator Information
	Creator: {
		CreatorType: string,
		CreatorTargetId: number,
		Name: string,
		Id: number,
	},

	-- Assets
	AssetId: number,
	AssetTypeId: number,
	IsForSale: boolean,
	IsLimited: boolean,
	IsLimitedUnique: boolean,
	IsNew: boolean,
	Remaining: number,
	Sales: number,
	SaleAvailabilityLocations: Enum.ProductLocationRestriction,
	CanBeSoldInThisGame: boolean,
	ProductType: string,

	-- Developer Products and Game Passes
	ProductId: number,
	IconImageAssetId: number,
}
-- GET --



function API:GetPlayerBoothText(TargetId)
	
	local Data = table.find(BoothText, TargetId)
	
	if not Data then
		
		return nil
		
	end
	
	table.remove(BoothText, TargetId)
	
	return Data
	
end

function API:GetPlayerSingText(TargetId)
	
	local Data = table.find(SingText, TargetId)
	
	if not Data then

		return nil

	end
	
	table.remove(SingText, TargetId)
	
	return Data

end

function API:GetPlayerBooth(TargetId)
	
	local Data = table.find(CurrentBooth, TargetId)
	
	if not Data then

		return nil

	end
	
	table.remove(CurrentBooth, TargetId)
	
	return Data

end


return API
-- Thread/Yield storage


local threads = {}
local n_threads = 0

RunService.Stepped:Connect(function(_, delta_time)
	-- Do not execute if no yields are present
	if (n_threads == 0) then return end

	-- Get the [current_time]
	local current_time = os.clock()

	-- Loop through all the running yields
	local thread_index = 1
	while (thread_index < n_threads) do
		-- Fetch the [thread] and its [resume_time]
		local resume_time_index = (thread_index + 1)

		local thread, resume_time = threads[thread_index], threads[resume_time_index]

		-- If the current [index] is nil then break out of the loop
		if (not thread) then break end

		-- Time elapsed since the current yield was started
		local difference = (resume_time - current_time)

		-- If the yield has been completed
		if (difference <= 0) then
			-- Remove it from [threads] table
			if (resume_time_index ~= n_threads) then
				threads[thread_index] = threads[n_threads - 1]
				threads[resume_time_index] = threads[n_threads]

				threads[n_threads - 1] = nil
				threads[n_threads] = nil

				n_threads -= 2

				-- Resume the [thread] (stop the yield)
				coroutine.resume(thread, current_time)

				continue
			else
				threads[thread_index] = nil
				threads[resume_time_index] = nil

				n_threads -= 2

				-- Resume the [thread] (stop the yield)
				coroutine.resume(thread, current_time)
			end
		end
		thread_index += 2
	end
end)
-- Setup animation objects


function scriptChildModified(child)
	local fileList = animNames[child.Name]
	if (fileList ~= nil) then
		configureAnimationSet(child.Name, fileList)
	end
end

script.ChildAdded:connect(scriptChildModified)
script.ChildRemoved:connect(scriptChildModified)


for name, fileList in pairs(animNames) do
	configureAnimationSet(name, fileList)
end
--[=[
	Makes a brio that is limited by the lifetime of its parent (but could be shorter)
	and has the new values given at the beginning of the result

	@since 3.6.0
	@param brio Brio<U>
	@param ... T
	@return Brio<T>
]=]


function BrioUtils.prepend(brio, ...)
	if brio:IsDead() then
		return Brio.DEAD
	end

	local values = brio._values
	local current = {}
	local otherValues = table.pack(...)
	for i=1, otherValues.n do
		current[i] = otherValues[i]
	end
	for i=1, values.n do
		current[otherValues.n+i] = values[i]
	end

	local maid = Maid.new()
	local newBrio = Brio.new(unpack(current, 1, values.n + otherValues.n))

	maid:GiveTask(brio:GetDiedSignal():Connect(function()
		newBrio:Kill()
	end))

	maid:GiveTask(newBrio:GetDiedSignal():Connect(function()
		maid:DoCleaning()
	end))

	return newBrio
end
--[[ The Module ]]

--
local BaseCamera = require(script.Parent:WaitForChild("BaseCamera"))
local LegacyCamera = setmetatable({}, BaseCamera)
LegacyCamera.__index = LegacyCamera

function LegacyCamera.new()
	local self = setmetatable(BaseCamera.new(), LegacyCamera)
	
	self.cameraType = Enum.CameraType.Fixed
	self.lastUpdate = tick()	
	self.lastDistanceToSubject = nil
	
	return self
end

function LegacyCamera:GetModuleName()
	return "LegacyCamera"
end

function LegacyCamera:Test()
	print("LegacyCamera:Test()")
end
--		elseif key == "j" then --Window controls
--		 if pal == false then 
--			palpal.Visible = true
--			pal = true
--		 else pal = false
--			palpal.Visible = false
--		 end


		elseif key == "[" then -- volume down
			if carSeat.Parent.Body.MP.Sound.Volume > 0 then
				handler:FireServer('updateVolume', -0.2)
			end
		elseif key == "]" then -- volume up
			if carSeat.Parent.Body.MP.Sound.Volume < 10 then
				handler:FireServer('updateVolume', 0.2)
			end	
	end
end)

HUB.Limiter.MouseButton1Click:connect(function() --Ignition
 if carSeat.IsOn.Value == false then
	carSeat.IsOn.Value = true
	carSeat.Startup:Play()
	wait(1)
else
	carSeat.IsOn.Value = false
end
end)

TR.SN.MouseButton1Click:connect(function() --Show tracker names
	script.Parent.Names.Value = true
end)

TR.HN.MouseButton1Click:connect(function() --Hide tracker names
	script.Parent.Names.Value = false
end)

winfob.mg.Play.MouseButton1Click:connect(function() --Play the next song
	handler:FireServer('updateSong', winfob.mg.Input.Text)
end)

carSeat.Indicator.Changed:connect(function()
	if carSeat.Indicator.Value == true then
		script.Parent.Indicator:Play()
	else
		script.Parent.Indicator2:Play()
	end
end)

carSeat.LI.Changed:connect(function()
	if carSeat.LI.Value == true then
		carSeat.Parent.Body.Dash.Screen2.SurfaceGui.Frame.Left.Visible = true
		script.Parent.HUB.Left.Visible = true
	else
		carSeat.Parent.Body.Dash.Screen2.SurfaceGui.Frame.Left.Visible = false
		script.Parent.HUB.Left.Visible = false
	end
end)

carSeat.RI.Changed:connect(function()
	if carSeat.RI.Value == true then
		carSeat.Parent.Body.Dash.Screen2.SurfaceGui.Frame.Right.Visible = true
		script.Parent.HUB.Right.Visible = true
	else
		carSeat.Parent.Body.Dash.Screen2.SurfaceGui.Frame.Right.Visible = false
		script.Parent.HUB.Right.Visible = false
	end
end)

for i,v in pairs(script.Parent:getChildren()) do
	if v:IsA('TextButton') then
		v.MouseButton1Click:connect(function()
			if carSeat.Windows:FindFirstChild(v.Name) then
				local v = carSeat.Windows:FindFirstChild(v.Name)
				if v.Value == true then
					handler:FireServer('updateWindows', v.Name, false)
				else
					handler:FireServer('updateWindows', v.Name, true)
				end
			end
		end)
	end
end

while wait() do
	carSeat.Parent.Body.Dash.Screen2.SurfaceGui.Frame.Time.Text = game.Lighting.TimeOfDay
	carSeat.Parent.Body.Dash.Screen.SurfaceGui.Time.Text = game.Lighting.TimeOfDay
	carSeat.Parent.Body.Dash.Screen2.SurfaceGui.Frame.Speed.Text = math.floor(carSeat.Velocity.magnitude*((10/12) * (60/88)))
end
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{44,28,29,31,32,34,35,39,41,30,56,58},t},
[49]={{44,45,49},t},
[16]={n,f},
[19]={{44,28,29,31,32,34,35,39,41,30,56,58,20,19},t},
[59]={{44,28,29,31,32,34,35,39,41,59},t},
[63]={{44,28,29,31,32,34,35,39,41,30,56,58,23,62,63},t},
[34]={{44,28,29,31,32,34},t},
[21]={{44,28,29,31,32,34,35,39,41,30,56,58,20,21},t},
[48]={{44,45,49,48},t},
[27]={{44,28,27},t},
[14]={n,f},
[31]={{44,28,29,31},t},
[56]={{44,28,29,31,32,34,35,39,41,30,56},t},
[29]={{44,28,29},t},
[13]={n,f},
[47]={{44,45,49,48,47},t},
[12]={n,f},
[45]={{44,45},t},
[57]={{44,28,29,31,32,34,35,39,41,30,56,57},t},
[36]={{44,28,29,31,32,33,36},t},
[25]={{44,28,27,26,25},t},
[71]={{44,28,29,31,32,34,35,39,41,59,61,71},t},
[20]={{44,28,29,31,32,34,35,39,41,30,56,58,20},t},
[60]={{44,28,29,31,32,34,35,39,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{44,28,29,31,32,34,35,39,41,59,61,71,72,76,73,75},t},
[22]={{44,28,29,31,32,34,35,39,41,30,56,58,20,21,22},t},
[74]={{44,28,29,31,32,34,35,39,41,59,61,71,72,76,73,74},t},
[62]={{44,28,29,31,32,34,35,39,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{44,28,29,31,32,33,36,37},t},
[2]={n,f},
[35]={{44,28,29,31,32,34,35},t},
[53]={{44,45,49,48,47,52,53},t},
[73]={{44,28,29,31,32,34,35,39,41,59,61,71,72,76,73},t},
[72]={{44,28,29,31,32,34,35,39,41,59,61,71,72},t},
[33]={{44,28,29,31,32,33},t},
[69]={{44,28,29,31,32,34,35,39,41,60,69},t},
[65]={{44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,65},t},
[26]={{44,28,27,26},t},
[68]={{44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67,68},t},
[76]={{44,28,29,31,32,34,35,39,41,59,61,71,72,76},t},
[50]={{44,45,49,48,47,50},t},
[66]={{44,28,29,31,32,34,35,39,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{44,28,27,26,25,24},t},
[23]={{44,28,29,31,32,34,35,39,41,30,56,58,23},t},
[44]={{44},t},
[39]={{44,28,29,31,32,34,35,39},t},
[32]={{44,28,29,31,32},t},
[3]={n,f},
[30]={{44,28,29,31,32,34,35,39,41,30},t},
[51]={{44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64,67},t},
[61]={{44,28,29,31,32,34,35,39,41,59,61},t},
[55]={{44,45,49,48,47,52,53,54,55},t},
[46]={{44,45,49,48,47,46},t},
[42]={{44,28,29,31,32,34,35,38,42},t},
[40]={{44,28,29,31,32,34,35,40},t},
[52]={{44,45,49,48,47,52},t},
[54]={{44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{44,28,29,31,32,34,35,39,41},t},
[17]={n,f},
[38]={{44,28,29,31,32,34,35,38},t},
[28]={{44,28},t},
[5]={n,f},
[64]={{44,28,29,31,32,34,35,39,41,30,56,58,20,19,66,64},t},
}
return r
--[[**
	<description>
	Run this once to combine all keys provided into one "main key".
	Internally, this means that data will be stored in a table with the key mainKey.
	This is used to get around the 2-DataStore2 reliability caveat.
	</description>

	<parameter name = "mainKey">
	The key that will be used to house the table.
	</parameter>

	<parameter name = "...">
	All the keys to combine under one table.
	</parameter>
**--]]


function DataStore2.Combine(mainKey, ...)
	for _, name in pairs({...}) do
		combinedDataStoreInfo[name] = mainKey
	end
end

function DataStore2.ClearCache()
	DataStoreCache = {}
end

function DataStore2:__call(dataStoreName, player)
	assert(typeof(dataStoreName) == "string" and typeof(player) == "Instance", ("DataStore2() API call expected {string dataStoreName, Instance player}, got {%s, %s}"):format(typeof(dataStoreName), typeof(player)))
	if DataStoreCache[player] and DataStoreCache[player][dataStoreName] then
		return DataStoreCache[player][dataStoreName]
	elseif combinedDataStoreInfo[dataStoreName] then
		local dataStore = DataStore2(combinedDataStoreInfo[dataStoreName], player)

		dataStore:BeforeSave(function(combinedData)
			for key in pairs(combinedData) do
				if combinedDataStoreInfo[key] then
					local combinedStore = DataStore2(key, player)
					local value = combinedStore:Get(nil, true)
					if value ~= nil then
						if combinedStore.combinedBeforeSave then
							value = combinedStore.combinedBeforeSave(clone(value))
						end
						combinedData[key] = value
					end
				end
			end

			return combinedData
		end)

		local combinedStore = setmetatable({
			combinedName = dataStoreName,
			combinedStore = dataStore
		}, {
			__index = function(self, key)
				return CombinedDataStore[key] or dataStore[key]
			end
		})

		if not DataStoreCache[player] then
			DataStoreCache[player] = {}
		end

		DataStoreCache[player][dataStoreName] = combinedStore
		return combinedStore
	end

	local dataStore = {}

	dataStore.Name = dataStoreName
	dataStore.UserId = player.UserId

	dataStore.callbacks = {}
	dataStore.beforeInitialGet = {}
	dataStore.afterSave = {}
	dataStore.bindToClose = {}
	dataStore.savingMethod = SavingMethods.OrderedBackups.new(dataStore)

	setmetatable(dataStore, DataStoreMetatable)

	local event, fired = Instance.new("BindableEvent"), false

	game:BindToClose(function()
		if not fired then
			event.Event:wait()
		end

		local value = dataStore:Get(nil, true)

		for _, bindToClose in pairs(dataStore.bindToClose) do
			bindToClose(player, value)
		end
	end)

	local playerLeavingConnection
	playerLeavingConnection = player.AncestryChanged:Connect(function()
		if player:IsDescendantOf(game) then return end
		playerLeavingConnection:Disconnect()
		dataStore:Save()
		event:Fire()
		fired = true

		task.delay(40, function() --Give a long delay for people who haven't figured out the cache :^(
			DataStoreCache[player] = nil
		end)
	end)

	if not DataStoreCache[player] then
		DataStoreCache[player] = {}
	end

	DataStoreCache[player][dataStoreName] = dataStore

	return dataStore
end

return setmetatable(DataStore2, DataStore2)
--[=[
	@within Plasma
	@function highlight
	@param adornee Instance
	@param options? HighlightOptions


	Creates a highlight over an instance with the specified options, using the Roblox [Highlight] instance
]=]


return Runtime.widget(function(adornee, options)
	options = options or {}

	local refs = Runtime.useInstance(function(ref)
		return create("Highlight", {
			[ref] = "highlight",
		})
	end)

	refs.highlight.Adornee = adornee

	Runtime.useEffect(function()
		refs.highlight.OutlineColor = options.outlineColor or Color3.new(1, 1, 1)
		refs.highlight.FillColor = options.fillColor or Color3.new(1, 0, 0)
	end, options.fillColor, options.outlineColor)

	refs.highlight.FillTransparency = options.fillTransparency or 0.5
	refs.highlight.OutlineTransparency = options.outlineTransparency or 0
	refs.highlight.DepthMode = options.depthMode or Enum.HighlightDepthMode.AlwaysOnTop
end)
--[=[
	Constructs a new Spring at the position and target specified, of type T.

	```lua
	-- Linear spring
	local linearSpring = Spring.new(0)

	-- Vector2 spring
	local vector2Spring = Spring.new(Vector2.new(0, 0))

	-- Vector3 spring
	local vector3Spring = Spring.new(Vector3.new(0, 0, 0))
	```

	@param initial T -- The initial parameter is a number or Vector3 (anything with * number and addition/subtraction).
	@param clock? () -> number -- The clock function is optional, and is used to update the spring
	@return Spring<T>
]=]


function Spring.new(initial, clock)
	local target = initial or 0
	clock = clock or os.clock
	return setmetatable({
		_clock = clock;
		_time0 = clock();
		_position0 = target;
		_velocity0 = 0*target;
		_target = target;
		_damper = 1;
		_speed = 1;
	}, Spring)
end
--!strict


local None = require(script.Parent.Parent.Object.None)
type Array<T> = { [number]: T }
type Comparable = (any, any) -> number
local defaultSort = function(a: any, b: any): boolean
	return type(a) .. tostring(a) < type(b) .. tostring(b)
end

local function sort(array: Array<any>, compare: Comparable?)
	-- wrapperCompare interprets compare return value to be compatible with Lua's table.sort
	local wrappedCompare = defaultSort
	if compare ~= nil and compare ~= None then
		if typeof(compare :: any) ~= "function" then
			error("invalid argument to Array.sort: compareFunction must be a function")
		end
		wrappedCompare = function(a, b)
			local result = compare(a, b)
			if typeof(result) ~= "number" then
				-- deviation: throw an error because
				-- it's not clearly defined what is
				-- the behavior when the compare function
				-- does not return a number
				error(("invalid result from compare function, expected number but got %s"):format(typeof(result)))
			end
			return result < 0
		end
	end
	table.sort(array, wrappedCompare)
	return array
end

return sort
--[[
	Fired when Spectating is entered, throwing out a player state update, as well as transitioning the player state
]]


function Transitions.onEnterSpectating(stateMachine, event, from, to, playerComponent)
	Logger.trace(playerComponent.player.Name, " state change: ", from, " -> ", to)
	playerComponent:updateStatus("currentState", to)
	PlayerSpectating.enter(stateMachine, playerComponent)
end
--By Ильяныч...



local lighting = game:GetService("Lighting") -- Переменная для получения Сервиса управления светом

while true do -- Функция цикла
	wait(.01) -- Ожидание (Убери число в скобках для создания минимальнрой задержки)
	lighting.ClockTime = lighting.ClockTime + 0.025 -- Функция смены времени & Поменяй число, чтобы изменить скорость
end -- Конец Функции
-- Get sound id


local get_material = function()
	
	local soundTable = footstepModule:GetTableFromMaterial(humanoid.FloorMaterial)
	local randomSound = footstepModule:GetRandomSound(soundTable)
	
	return randomSound
end

RunService.RenderStepped:Connect(function(delta)
	if timer > 0 then
		timer -= delta
	end
	if timer < 0 and check_movement() then
		footstepsSound.SoundId = get_material()
		footstepsSound.Volume = 0.1
		footstepsSound.Parent = rootPart
		timer = (humanoid.WalkSpeed/16) * 2.25
		print(timer)
	end
end)