Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- EDIT THE TEXTS.



CONTENT.Content1.Content.Text = "Content" -- EDIT THE STUFF IN THE QUOTATION MARKS ON YOUR NEW CONTENT.
CONTENT.Content2.Content.Text = "Content"
CONTENT.Content3.Content.Text = "Content"
CONTENT.Content4.Content.Text = "Content"
CONTENT.Content5.Content.Text = "Content"
CONTENT.Content6.Content.Text = "Content"
CONTENT.Content7.Content.Text = "Content"
CONTENT.Content8.Content.Text = "Content"
CONTENT.Content9.Content.Text = "Content"
CONTENT.Content10.Content.Text = "Content"
--How to do:
--Put BassParts in body
--And this script in DriverSeat
--Please make sure to have the songMod installed!



if script.Parent:IsA("VehicleSeat") then
	script.Parent.ChildAdded:connect(function(child)
		if child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
			local p= game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			local g= script.SendBass:Clone()
			g.Parent=p.PlayerGui
			g.src.Value = script.BassEvent
			g.Disabled = false	
		end
	end)
	script.Parent.ChildRemoved:Connect(function(child)
		if child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		end
	end)
end

script.BassEvent.OnServerEvent:Connect(function(plr, bass)
	local car = script.Parent.Parent
	local bassParts = car.Body.BassParts
	for i,v in pairs(bassParts:GetChildren()) do
		if v:IsA("MeshPart") then
			local vectorSize = v:FindFirstChild("VectorSize")
			if bass <= v.MaxBassSize.Value then
				v.Size = Vector3.new(vectorSize.Value.X,bass/v.BassSize.Value,vectorSize.Value.Z)
			else
				v.Size = Vector3.new(vectorSize.Value.X,v.MaxBassSize.Value/v.BassSize.Value,vectorSize.Value.Z)
			end
		end
	end
end)
--[[
	Kinda cringe, but intersection types don't seem to work when exporting, hence the repetition.
]]



export type Grid = {
	Ref: UIGridLayout,
	Paused: boolean,
	Destroyed: boolean,

	DoUpdatePadding: boolean,
	DoUpdateSize: boolean,
	DoUpdateCanvas: boolean,

	UpdateSize: (Grid) -> nil,
	UpdatePadding: (Grid) -> nil,
	UpdateCanvas: (Grid) -> nil,
	Update: (Grid) -> nil,

	Play: (Grid) -> nil,
	Pause: (Grid) -> nil,
	Destroy: (Grid) -> nil
}


export type List = {
	Ref: UIListLayout,
	Paused: boolean,
	Destroyed: boolean,

	DoUpdatePadding: boolean,
	DoUpdateSize: boolean,
	DoUpdateCanvas: boolean,

	UpdateSize: (List) -> nil,
	UpdatePadding: (List) -> nil,
	UpdateCanvas: (List) -> nil,
	Update: (List) -> nil,

	Play: (List) -> nil,
	Pause: (List) -> nil,
	Destroy: (List) -> nil
}


return 0
--[[
	Creates a new list that has no occurrences of the given value.
]]


local function removeValue(list, value)
	local new = {}
	local index = 1

	for i = 1, #list do
		if list[i] ~= value then
			new[index] = list[i]
			index = index + 1
		end
	end

	return new
end

return removeValue
-- framePosition is top left corner
-- returns position, relativePosition, normal


function UICornerUtils.clampPositionToFrame(framePosition, frameSize, radius, point)
	assert(radius > 0, "Bad radius")
	assert(point, "Bad point")

	local px, py = point.x, point.y

	local fpx, fpy = framePosition.x, framePosition.y
	local fsx, fsy = frameSize.x, frameSize.y

	local minx = fpx + radius
	local maxx = fpx + fsx - radius

	local miny = fpy + radius
	local maxy = fpy + fsy - radius

	-- relative position to inner box
	local rpx, rpy

	if minx < maxx then
		rpx = math.clamp(px, minx, maxx)
	else
		rpx = minx
	end

	if miny < maxy then
		rpy = math.clamp(py, miny, maxy)
	else
		rpy = miny
	end

	local position = Vector2.new(rpx, rpy)

	-- project in direction of offset
	local direction = point - position
	if direction.magnitude == 0 then
		-- Shouldn't happen!
		return nil, nil
	end

	local normal = direction.unit
	local outsidePosition = position + normal*radius
	return outsidePosition, normal
end

return UICornerUtils
-- waitChildren/EventFolder does not contain all the remote events, because the server version could be older than the client version.
-- In that case it would not create the new events.
-- These events are accessed directly from DefaultChatSystemChatEvents



local useEvents = {}

local FoundAllEventsEvent = Instance.new("BindableEvent")

function TryRemoveChildWithVerifyingIsCorrectType(child)
	if (waitChildren[child.Name] and child:IsA(waitChildren[child.Name])) then
		waitChildren[child.Name] = nil
		useEvents[child.Name] = child
		numChildrenRemaining = numChildrenRemaining - 1
	end
end

for i, child in pairs(EventFolder:GetChildren()) do
	TryRemoveChildWithVerifyingIsCorrectType(child)
end

if (numChildrenRemaining > 0) then
	local con = EventFolder.ChildAdded:connect(function(child)
		TryRemoveChildWithVerifyingIsCorrectType(child)
		if (numChildrenRemaining < 1) then
			FoundAllEventsEvent:Fire()
		end
	end)

	FoundAllEventsEvent.Event:Wait()
	con:disconnect()

	FoundAllEventsEvent:Destroy()
end

EventFolder = useEvents
--[=[
	@tag Component Class
	@function HeartbeatUpdate
	@param dt number
	@within Component

	If this method is present on a component, then it will be
	automatically connected to `RunService.Heartbeat`.

	:::note Method
	This is a method, not a function. This is a limitation
	of the documentation tool which should be fixed soon.
	:::
	
	```lua
	local MyComponent = Component.new({Tag = "MyComponent"})
	
	function MyComponent:HeartbeatUpdate(dt)
	end
	```
]=]
--[=[
	@tag Component Class
	@function SteppedUpdate
	@param dt number
	@within Component

	If this method is present on a component, then it will be
	automatically connected to `RunService.Stepped`.

	:::note Method
	This is a method, not a function. This is a limitation
	of the documentation tool which should be fixed soon.
	:::
	
	```lua
	local MyComponent = Component.new({Tag = "MyComponent"})
	
	function MyComponent:SteppedUpdate(dt)
	end
	```
]=]
--[=[
	@tag Component Class
	@function RenderSteppedUpdate
	@param dt number
	@within Component
	@client

	If this method is present on a component, then it will be
	automatically connected to `RunService.RenderStepped`. If
	the `[Component].RenderPriority` field is found, then the
	component will instead use `RunService:BindToRenderStep()`
	to bind the function.

	:::note Method
	This is a method, not a function. This is a limitation
	of the documentation tool which should be fixed soon.
	:::
	
	```lua
	-- Example that uses `RunService.RenderStepped` automatically:

	local MyComponent = Component.new({Tag = "MyComponent"})
	
	function MyComponent:RenderSteppedUpdate(dt)
	end
	```
	```lua
	-- Example that uses `RunService:BindToRenderStep` automatically:
	
	local MyComponent = Component.new({Tag = "MyComponent"})

	-- Defining a RenderPriority will force the component to use BindToRenderStep instead
	MyComponent.RenderPriority = Enum.RenderPriority.Camera.Value
	
	function MyComponent:RenderSteppedUpdate(dt)
	end
	```
]=]




function Component:Destroy()
	self[KEY_TROVE]:Destroy()
end


return Component
----- Initialize -----



if IsStudio == true then
	IsLiveCheckActive = true
	task.spawn(function()
		local status, message = pcall(function()
			-- This will error if current instance has no Studio API access:
			DataStoreService:GetDataStore("____PS"):SetAsync("____PS", os.time())
		end)
		local no_internet_access = status == false and string.find(message, "ConnectFail", 1, true) ~= nil
		if no_internet_access == true then
			warn("[ProfileService]: No internet access - check your network connection")
		end
		if status == false and
			(string.find(message, "403", 1, true) ~= nil or -- Cannot write to DataStore from studio if API access is not enabled
				string.find(message, "must publish", 1, true) ~= nil or -- Game must be published to access live keys
				no_internet_access == true) then -- No internet access

			UseMockDataStore = true
			ProfileService._use_mock_data_store = true
			print("[ProfileService]: Roblox API services unavailable - data will not be saved")
		else
			print("[ProfileService]: Roblox API services available - data will be saved")
		end
		IsLiveCheckActive = false
	end)
end
--- Tooltip




return function(element, tooltipText)
	--- Cancel if this is on mobile
	if _L.Variables.Mobile then
		return false
	end
	
	--- Variables
	local events = {}
	local tooltip
	local cancel
	
	--- Create tooltip folder (if it doesn't already exist)
	local tooltipFolder = PlayerGui:FindFirstChild("TooltipsFolder")
	if tooltipFolder == nil then
		tooltipFolder = Instance.new("ScreenGui")
		tooltipFolder.Name = "TooltipsFolder"
		tooltipFolder.DisplayOrder = 999
		tooltipFolder.Parent = PlayerGui
	end
	
	--- (Function) remove tooltip
	local function remove()
		if tooltip then
			tooltip:Destroy()
			tooltip = nil
		end
	end
	
	--- (Function) create tooltip
	local function create()
		--- Remove any existing tooltips
		tooltipFolder:ClearAllChildren()
		
		--- Create tooltip
		tooltip = Instance.new("TextLabel")
		tooltip.BorderSizePixel = 0
		tooltip.BackgroundColor3 = Color3.new(0.35, 0.35, 0.35)
		tooltip.TextColor3 = Color3.new(1, 1, 1)
		tooltip.FontSize = Enum.FontSize.Size18
		tooltip.Font = Enum.Font.Highway
		tooltip.Text = tooltipText
		
		--- Calculate size
		local textSize = _L.Services.TextService:GetTextSize(tooltip.Text, tooltip.TextSize, tooltip.Font, Vector2.new(175, 1000))
		tooltip.Size = UDim2.new(0, textSize.X + 4, 0, textSize.Y + 2)
		
		--
		tooltip.Parent = tooltipFolder
		
		--- Main
		while not cancel and tooltip and tooltip.Parent and element do
			--- Get positions
			local mouseX, mouseY = _L.Player.Get("Mouse").X, _L.Player.Get("Mouse").Y
			local guiSizeX, guiSizeY = element.AbsoluteSize.X, element.AbsoluteSize.Y
			local guiPosX, guiPosY = element.AbsolutePosition.X, element.AbsolutePosition.Y
			
			--- Is mouse still over? Should tooltip stay active?
			if (mouseX > guiPosX - 10) and (mouseX < guiPosX + guiSizeX + 10) and (mouseY > guiPosY - 10) and (mouseY < guiPosY + guiSizeY + 10) then
				--- Mouse
				local mouse = _L.Player.Get("Mouse")
				
				--- Change tooltip position (to follow mouse)
				tooltip.Position = UDim2.new(0, (mouse.X + 17), 0, mouse.Y)
			
			else
				--- Mouse is no longer over. CANCEL!
				cancel = true
			end
			
			--- Wait
			_L.Services.RunService.RenderStepped:wait()
		end
		
		--- Dispose
		remove()
	end
	
	--- Mouse events
	events[#events + 1] = element.MouseEnter:Connect(function()
		--- Mouse entered, create tooltip
		remove()
		create()
	end)
	--
	events[#events + 1] = element.MouseLeave:Connect(function()
		--- Mouse exited, remove tooltip
		remove()
	end)
	
	--- Return function to cancel this behavior
	return function()
		--- Clear events
		for _, event in ipairs(events) do
			event:disconnect()
		end
		events = nil
		
		--- Cancel
		cancel = true
	end
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]




local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "MPH"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 160				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "KM/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 260				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 280				,
		spInc			= 30				, -- Increment between labelled notches
	}
}
--[[Steering]]


	Tune.SteeringType	= 'New'		-- New = Precise steering calculations based on real life steering assembly (LuaInt)
									-- Old = Previous steering calculations
	-- New Options
	Tune.SteerRatio		= 15/1		-- Steering ratio of your steering rack, google it for your car
	Tune.LockToLock		= 2.6		-- Number of turns of the steering wheel lock to lock, google it for your car
	Tune.Ackerman		= .9		-- If you don't know what it is don't touch it, ranges from .7 to 1.2

	-- Old Options
	Tune.SteerInner		= 45		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 38		-- Outer wheel steering angle (in degrees)
	
	--Four Wheel Steering (LuaInt)
	Tune.FWSteer			= 'Both'	-- Static, Speed, Both, or None
	Tune.RSteerOuter		= 0		-- Outer rear wheel steering angle (in degrees)
	Tune.RSteerInner		= 0		-- Inner rear wheel steering angle (in degrees)
	Tune.RSteerSpeed		= 60		-- Speed at which 4WS fully activates (Speed), deactivates (Static), or transition begins (Both) (SPS)
	Tune.RSteerDecay		= 330		-- Speed of gradient cutoff (in SPS)

	-- Rear Steer Gyro Tuning
	Tune.RSteerD			= 1000		-- Steering Dampening
	Tune.RSteerMaxTorque	= 50000		-- Steering Force
	Tune.RSteerP			= 100000	-- Steering Aggressiveness
	
	-- General Steering
	Tune.SteerSpeed		= .07		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 330		-- 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			= 100000	-- Steering Aggressiveness
-- Core part:


while true do
	wait()
	wait()
	if curPlayer~=nil then
		if seat.Throttle == 1 then onForward(curPlayer) end
		if seat.Throttle == -1 then onBackward(curPlayer) end
		if seat.Steer == 1 then onTurnRight(curPlayer) end
		if seat.Steer == -1 then onTurnLeft(curPlayer) end
	end
	if djoin==true then onSitUp(curPlayer) end
end
--Supercharger


local Whine_Pitch = 1.8		--max pitch of the whine (not exact so might have to mess with it)
local S_Loudness = 1.3 --volume of the supercharger(s) (not exact volume so you kinda have to experiment with it also)

script:WaitForChild("Whistle")
script:WaitForChild("Whine")
script:WaitForChild("BOV")

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(car.DriveSeat:GetChildren()) do
			for _,a in pairs(script:GetChildren()) do
				if v.Name==a.Name then v:Stop() wait() v:Destroy() end
			end
		end
	end
end)

if not _Tune.Engine then return end
handler:FireServer("newSound","Whistle",car.DriveSeat,script.Whistle.SoundId,0,script.Whistle.Volume,true)
handler:FireServer("newSound","Whine",car.DriveSeat,script.Whine.SoundId,0,script.Whine.Volume,true)
handler:FireServer("newSound","BOV",car.DriveSeat,script.BOV.SoundId,0,script.BOV.Volume,true)
handler:FireServer("playSound","Whistle")
handler:FireServer("playSound","Whine")
car.DriveSeat:WaitForChild("Whistle")
car.DriveSeat:WaitForChild("Whine")
car.DriveSeat:WaitForChild("BOV")
local ticc = tick()
local _TCount = _Tune.Turbochargers
local _SCount = _Tune.Superchargers

while wait() do
	local psi = (((script.Parent.Values.Boost.Value)/((_Tune.T_Boost*_TCount)+(_Tune.S_Boost*_SCount)))*2)
	local tpsi = (((script.Parent.Values.BoostTurbo.Value)/(_Tune.T_Boost*_TCount))*2)
	local spsi = ((script.Parent.Values.BoostSuper.Value)/(_Tune.S_Boost*_SCount))
	--(script.Parent.Values.RPM.Value/_Tune.Redline)
	local WP,WV,BP,BV,HP,HV = 0,0,0,0,0,0
	
	BOVact = math.floor(tpsi*20)
	if _TCount~=0 then
		WP = (tpsi)
		WV = (tpsi/4)*T_Loudness
		
		BP = (1-(-tpsi/20))*BOV_Pitch
		BV = (((-0.5+((tpsi/2)*BOV_Loudness)))*(1 - script.Parent.Values.Throttle.Value))
	
		if BOVact < BOVact2 then if car.DriveSeat.BOV.IsPaused then if FE then handler:FireServer("playSound","BOV") else car.DriveSeat.BOV:Play() end end end
		if BOVact >= BOVact2 then if FE then handler:FireServer("stopSound","BOV") else car.DriveSeat.BOV:Stop() end end
	else
		WP,WV,BP,BV=0,0,0,0
	end
	if _SCount~=0 then
		HP = (script.Parent.Values.RPM.Value/_Tune.Redline)*Whine_Pitch
		HV = (spsi/4)*S_Loudness
	else
		HP,HV = 0,0
	end

	handler:FireServer("updateSound","Whistle",script.Whistle.SoundId,WP,WV)
	handler:FireServer("updateSound","Whine",script.Whine.SoundId,HP,HV)
	handler:FireServer("updateSound","BOV",script.BOV.SoundId,BP,BV)
	
	if (tick()-ticc) >= 0.1 then
		BOVact2 = math.floor(tpsi*20)
		ticc = tick()
	end
end
--[[**
	Gets whatever object is stored with the given index, if it exists. This was added since Maid allows getting the job using `__index`.
	@param [t:any] Index The index that the object is stored under.
	@returns [t:any?] This will return the object if it is found, but it won't return anything if it doesn't exist.
**--]]


function Janitor.__index:Get(Index)
	local This = self[IndicesReference]
	if This then
		return This[Index]
	end
end
--[[
PLEASE ADD THE FOLLOWING LINES OF CODE IN THE CONFIGURATION (POINTS.POINTSAWARDED)

function(newPoints,Employee) -- Runs every time points are awarded to anyone. newPoints is the new total value of points the employee has, and Employee is the employee (Player).
	Employee:WaitForChild('leaderstats'):WaitForChild('Points').Value = newPoints
end; -- Recommended only for scripters
--]]
-- constants



local CAMERA	= Workspace.CurrentCamera
local PLAYER	= Players.LocalPlayer

local REMOTES	= ReplicatedStorage:WaitForChild("Remotes")
local ITEMS		= ReplicatedStorage:WaitForChild("Items")
local DROPS		= Workspace:WaitForChild("Drops")
local EFFECTS	= Workspace:WaitForChild("Effects")

local OUTLINE_COLOR	= Color3.fromRGB(249, 142, 190)
local OUTLINE_WIDTH	= 0.3

local UPDATE_RANGE	= 400
--!strict
--[[
	Original Author: TacoBellSaucePackets
	Original Source: https://devforum.roblox.com/t/adonis-g-api-usage/477194/4
	Description: This plugin will give a certain temporary permission level to private server owners
	Place this ModuleScript in Adonis_Loader > Config > Plugins and name it "Server-PrivateServerOwnerAdmin"
--]]
--[[
	Runs all test and reports the results using the given test reporter.

	If no reporter is specified, a reasonable default is provided.

	This function demonstrates the expected workflow with this testing system:
	1. Locate test modules
	2. Generate test plan
	3. Run test plan
	4. Report test results

	This means we could hypothetically present a GUI to the developer that shows
	the test plan before we execute it, allowing them to toggle specific tests
	before they're run, but after they've been identified!
]]


function TestBootstrap:run(roots, reporter, otherOptions)
	reporter = reporter or TextReporter

	otherOptions = otherOptions or {}
	local showTimingInfo = otherOptions["showTimingInfo"] or false
	local runTestsByPath = {}
	local testNamePattern = _G["TESTEZ_TEST_NAME_PATTERN"]
	local testPathPattern = _G["TESTEZ_TEST_PATH_PATTERN"]
	local testPathIgnorePatterns = _G["TESTEZ_TEST_PATH_IGNORE_PATTERNS"]
	local extraEnvironment = otherOptions["extraEnvironment"] or {}

	for testPath in string.gmatch(_G["TESTEZ_RUN_TESTS_PATH"] or "", "([^,]+)") do
		table.insert(runTestsByPath, testPath)
	end

	if type(roots) ~= "table" then
		error(("Bad argument #1 to TestBootstrap:run. Expected table, got %s"):format(typeof(roots)), 2)
	end

	local startTime = tick()

	local modules = {}
	for _, subRoot in ipairs(roots) do
		local newModules = self:getModules(subRoot)

		for _, newModule in ipairs(newModules) do
			table.insert(modules, newModule)
		end
	end

	local afterModules = tick()

	local planArgs = {
		runTestsByPath = runTestsByPath,
		testNamePattern = testNamePattern,
		testPathPattern = testPathPattern,
		testPathIgnorePatterns = testPathIgnorePatterns,
		extraEnvironment = extraEnvironment,
	}

	local plan = TestPlanner.createPlan(modules, planArgs)

	local afterPlan = tick()

	local results = TestRunner.runPlan(plan)
	local afterRun = tick()

	reporter.report(results)
	local afterReport = tick()

	if showTimingInfo then
		local timing = {
			("Took %f seconds to locate test modules"):format(afterModules - startTime),
			("Took %f seconds to create test plan"):format(afterPlan - afterModules),
			("Took %f seconds to run tests"):format(afterRun - afterPlan),
			("Took %f seconds to report tests"):format(afterReport - afterRun),
		}

		print(table.concat(timing, "\n"))
	end

	return results
end

return TestBootstrap
-- Set the DisplayName to the player's display name


local displayNameLabel = displayName
displayNameLabel.Text = player.DisplayName
displaynameprofile.Text = player.DisplayName
usernameprofile.Text = "@"..player.Name

local TextLabel = script.Parent.Parent.Parent.AppManager["App Store"].Date
local TextLabelSht = script.Parent.Parent.Parent.ShutterFrame.Date

local function getCurrentDate()
	local currentDate = os.date("*t")
	local day = currentDate.day
	local month = os.date("%B")
	local formattedDate = string.format("%d %s", day, month)
	return formattedDate
end
--sounds


soundsdisabledfromrefit = {""}
local boltpsound = Instance.new("Sound", handle)
boltpsound.SoundId = "rbxassetid://456267525"
boltpsound.Volume = 0.8
boltpsound.Name = "boltpsound"
boltpsound.RollOffMinDistance = 1
boltpsound.RollOffMaxDistance = 300
local shellsound = Instance.new("Sound", handle)
shellsound.SoundId = "rbxassetid://2712533735"
shellsound.Volume = 0.5
shellsound.Name = "shellsound"
shellsound.RollOffMinDistance = 1
shellsound.RollOffMaxDistance = 300
local magoutsound = Instance.new("Sound", handle)
magoutsound.SoundId = "rbxassetid://268445237"
magoutsound.Volume = 0.8
magoutsound.Name = "magoutsound"
magoutsound.RollOffMinDistance = 1
magoutsound.RollOffMaxDistance = 300
local maginsound = Instance.new("Sound", handle)
maginsound.SoundId = "rbxassetid://2546411966"
maginsound.Volume = 0.8
maginsound.Name = "magoutsound"
maginsound.RollOffMinDistance = 1
maginsound.RollOffMaxDistance = 300
local magreachsound = Instance.new("Sound", handle)
magreachsound.SoundId = "rbxassetid://7329457810"
magreachsound.Volume = 3
magreachsound.Name = "magreachsound"
magreachsound.RollOffMinDistance = 1
magreachsound.RollOffMaxDistance = 300
local shootsound = Instance.new("Sound", handle)
shootsound.SoundId = "rbxassetid://6530496628"
shootsound.Volume = 1.5
shootsound.Name = "shootsound"
shootsound.RollOffMinDistance = 1
shootsound.RollOffMaxDistance = 300
concretesoundtick = tick()
local hitconcrete = Instance.new("Sound", handle)
hitconcrete.SoundId = "rbxassetid://6962153997"
hitconcrete.Volume = 1
hitconcrete.Name = "hitcsound"
hitconcrete.RollOffMinDistance = 1
hitconcrete.RollOffMaxDistance = 200
hitcsounds = {"6962154328", "6962154691", "6962155378", "6962153997"}

function playsound(sound, timep, playbacks, volume)
	pcall(function() -- so the script wont die if someone renames sounds/attempts to play something that isnt a sound
		sound.TimePosition = timep
		sound.PlaybackSpeed = playbacks
		sound.Volume = volume
		sound:Play()
	end)
end
--[=[
	Gets an event that will fire off whenever something is stored at this level
	@return Signal
]=]


function DataStoreStage:GetTopLevelDataStoredSignal()
	if self._topLevelStoreSignal then
		return self._topLevelStoreSignal
	end

	self._topLevelStoreSignal = Signal.new()
	self._maid:GiveTask(self._topLevelStoreSignal)
	return self._topLevelStoreSignal
end
--[=[
	Converts an arbitrary value to a LinearValue if Roblox has not defined this value
	for multiplication and addition.

	@param value T
	@return LinearValue<T> | T
]=]


function SpringUtils.toLinearIfNeeded(value)
	if typeof(value) == "Color3" then
		return LinearValue.new(Color3.new, {value.r, value.g, value.b})
	elseif typeof(value) == "UDim2" then
		return LinearValue.new(UDim2.new, {value.X.Scale, value.X.Offset, value.Y.Scale, value.Y.Offset})
	elseif typeof(value) == "UDim" then
		return LinearValue.new(UDim.new, {value.scale, value.offset})
	else
		return value
	end
end