Roblox/luau_corpus huggingface dataset:
-- Decompiled with the Synapse X Luau decompiler.

local l__ReplicatedStorage__1 = game:GetService("ReplicatedStorage");
local u1 = require(l__ReplicatedStorage__1.Packages.Fusion);
local u2 = require(l__ReplicatedStorage__1.GiftInbox.Gift);
return function(p1)
	return u1.New("ScrollingFrame")({
		Size = UDim2.fromScale(1, 1), 
		AutomaticCanvasSize = Enum.AutomaticSize.Y, 
		CanvasSize = UDim2.new(), 
		ScrollingDirection = Enum.ScrollingDirection.Y, 
		ScrollBarThickness = 8, 
		BackgroundTransparency = 1, 
		ScrollBarImageColor3 = Color3.fromRGB(197, 197, 197), 
		[u1.Children] = { u1.New("UIListLayout")({
				Padding = UDim.new(0, 10)
			}), u1.New("UIPadding")({
				PaddingLeft = UDim.new(0.05, 0), 
				PaddingRight = UDim.new(0.05, 0)
			}), u1.ComputedPairs(p1.gifts, function(p2, p3)
				local v2 = table.clone(p3);
				v2.layoutOrder = p2;
				return u2(v2);
			end) }
	});
end;
--[[
	Like andThen, but the value passed into the handler is also the
	value returned from the handler.
]]
function Promise.prototype:tap(tapCallback)
	assert(type(tapCallback) == "function", string.format(ERROR_NON_FUNCTION, "Promise:tap"))
	return self:_andThen(debug.traceback(nil, 2), function(...)
		local callbackReturn = tapCallback(...)

		if Promise.is(callbackReturn) then
			local length, values = pack(...)
			return callbackReturn:andThen(function()
				return unpack(values, 1, length)
			end)
		end

		return ...
	end)
end
Promise.prototype.Tap = Promise.prototype.tap
--	local second=math.floor(((minute*60)%1)*60)
	HourArrow.Rotation = 180+(hour*360)
	MinArrow.Rotation = 180+(mint*6)
--!strict
--[=[
  @function is
  @within Array

  @param object any -- The object to check.
  @return boolean -- Whether the object is an array.

  Checks if the given object is an array.

  ```lua
  local array = { 1, 2, 3 }
  local dictionary = { hello = "world" }
  local mixed = { 1, 2, hello = "world" }

  Array.is(array) -- true
  Array.is(dictionary) -- false
  Array.is(mixed) -- false
  ```
]=]
local function is(object: any): boolean
  return typeof(object) == "table" and #object > 0 and next(object, #object) == nil
end

return is
-- GAMEPASSES
Gamepasses = {
		[29104154] = "VIP";
};
-------------------------
 
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
        if key == "a" then
            	a = true
        elseif key == "d" then
                d = true
        elseif key == "w" then
                w = true
                rwd.Throttle = 1
				rwd.Torque = tq
				lwd.Throttle = 1
				lwd.Torque = ftq
				rrwd.Throttle = 1
				rrwd.Torque = ftq
				rwd.MaxSpeed = 192
				lwd.MaxSpeed = 192
				rrwd.MaxSpeed = 192
                carSeat.Throttle = 1
                carSeat.Torque = 0
                elseif key == "s" then
                s = true    
                carSeat.Throttle = 0
                carSeat.Torque = 0
				rwd.Throttle = -1
				rwd.Torque = brk
				lwd.Throttle = -1
				lwd.Torque = brk
				rrwd.Throttle = -1
				rrwd.Torque = brk
				rwd.MaxSpeed = 25
				lwd.MaxSpeed = 25
				rrwd.MaxSpeed = 25
                end
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)
 
mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then
        rwd.Throttle = 0
        rwd.Torque = 0
	    lwd.Throttle = 0
		lwd.Torque = 0
		rrwd.Throttle = 0
		rrwd.Torque = 0

       carSeat.Throttle = 0
carSeat.Torque = cst
        end
end)   
               
 
 
limitButton.MouseButton1Click:connect(function()
--Horsepower Curve

function curve(RPM)
	RPM=RPM/1000
	return ((-(RPM-PeakRPM)^2)*math.min(HP/(PeakRPM^2),CurveMult^(PeakRPM/HP))+HP)*(RPM-((RPM^Sharpness)/((Sharpness*PeakRPM)^(Sharpness-1))))
end

local PeakCurve = curve(_Tune.PeakRPM)
local Horsepower = math.max(curve(RPM)/(PeakCurve/HP),0)
--SS3.33 Tesla Edit for Tesla Model X by Itzt (This is NOT SS3.33T.)
 
wait(0.1)
local player = game.Players.LocalPlayer
local lightOn = false
local HUB = script.Parent.HUB
local limitButton = HUB.Parent.Gauges.Circle.Zero.Limiter
local carSeat = script.Parent.CarSeat.Value
local mouse = game.Players.LocalPlayer:GetMouse()
local n = Instance.new("Motor")
local m = Instance.new("Motor")
local rwd = carSeat.Parent.Parent.RWD.RWD
local lwd = carSeat.Parent.Parent.LW.VS
local rrwd = carSeat.Parent.Parent.RW.VS
local windows = false
local winfob = HUB.Parent.Windows
local tailLights = carSeat.Parent.Taillights
local gear = 0
local ignition = 0
cc = script.Parent.CC

tq = 3.2
ftq = 3.2
brk = 6.4
cst = 0.2
 
m.Part0 = carSeat.Parent.Parent.Body2.MR
m.Part1 = carSeat.Parent.Parent.RW.SS
m.Parent = carSeat.Parent.Parent.Body2.MR
m.MaxVelocity = 0.05
n.Part0 = carSeat.Parent.Parent.Body2.ML
n.Part1 = carSeat.Parent.Parent.LW.SS
n.Parent = carSeat.Parent.Parent.Body2.ML
n.MaxVelocity = 0.05
 
 
a = false
d = false
w = false
s = false
q = false -- left
e = false -- right
r = false
 
local rightin = false
local leftin = false
--LogMessage = game.ReplicatedStorage.ClientStorage.Console.LogMessage
MapIdInput = script.Parent.MapIDInput
LoadMapButton = script.Parent.LoadMapButton

IsDoingSomething = false

function OnLoadRequested()
	if not IsDoingSomething then
		IsDoingSomething = true
		
		local success, msgs = LoadMapIDRemote:InvokeServer(MapIdInput.Text)
		
		LoadMapButton.BorderColor3 = success and Color3.new(0, 1, 0) or Color3.new(1, 0, 0)
		LoadMapButton.TextColor3 = LoadMapButton.BorderColor3
		
		if success then
			MapIdInput.Text = ""
		end
		
		wait(1)
		
		LoadMapButton.BorderColor3 = Color3.new(0,0,0)
		LoadMapButton.TextColor3 = Color3.new(1, 1, 1)
		
		IsDoingSomething = false
	end
end

LoadMapButton.MouseButton1Click:Connect(OnLoadRequested)
MapIdInput.FocusLost:Connect(function(enterPressed)
	if enterPressed then
		OnLoadRequested()
	end
end)

script.Parent.Visible = GameLib.HasControlPrivileges(Player)
--[=[
	Accepts an array of Promises and returns a new Promise that resolves with an array of in-place Statuses when all input Promises have settled. This is equivalent to mapping `promise:finally` over the array of Promises.

	```lua
	local promises = {
		returnsAPromise("example 1"),
		returnsAPromise("example 2"),
		returnsAPromise("example 3"),
	}

	return Promise.allSettled(promises)
	```

	@param promises {Promise<T>}
	@return Promise<{Status}>
]=]
function Promise.allSettled(promises)
	if type(promises) ~= "table" then
		error(string.format(ERROR_NON_LIST, "Promise.allSettled"), 2)
	end

	-- We need to check that each value is a promise here so that we can produce
	-- a proper error rather than a rejected promise with our error.
	for i, promise in pairs(promises) do
		if not Promise.is(promise) then
			error(string.format(ERROR_NON_PROMISE_IN_LIST, "Promise.allSettled", tostring(i)), 2)
		end
	end

	-- If there are no values then return an already resolved promise.
	if #promises == 0 then
		return Promise.resolve({})
	end

	return Promise._new(debug.traceback(nil, 2), function(resolve, _, onCancel)
		-- An array to contain our resolved values from the given promises.
		local fates = {}
		local newPromises = {}

		-- Keep a count of resolved promises because just checking the resolved
		-- values length wouldn't account for promises that resolve with nil.
		local finishedCount = 0

		-- Called when a single value is resolved and resolves if all are done.
		local function resolveOne(i, ...)
			finishedCount = finishedCount + 1

			fates[i] = ...

			if finishedCount >= #promises then
				resolve(fates)
			end
		end

		onCancel(function()
			for _, promise in ipairs(newPromises) do
				promise:cancel()
			end
		end)

		-- We can assume the values inside `promises` are all promises since we
		-- checked above.
		for i, promise in ipairs(promises) do
			newPromises[i] = promise:finally(
				function(...)
					resolveOne(i, ...)
				end
			)
		end
	end)
end
--local bodyPosition = Instance.new("BodyPosition", car.Chassis)
--bodyPosition.MaxForce = Vector3.new()
--local bodyGyro = Instance.new("BodyGyro", car.Chassis)
--bodyGyro.MaxTorque = Vector3.new()

local function UpdateThruster(thruster)
	-- Raycasting
	local hit, position = Raycast.new(thruster.Position, thruster.CFrame:vectorToWorldSpace(Vector3.new(0, -1, 0)) * stats.Height.Value) --game.Workspace:FindPartOnRay(ray, car)
	local thrusterHeight = (position - thruster.Position).magnitude

	-- Wheel
	local wheelWeld = thruster:FindFirstChild("WheelWeld")
	wheelWeld.C0 = CFrame.new(0, -math.min(thrusterHeight, stats.Height.Value * 0.8) + (wheelWeld.Part1.Size.Y / 2), 0)
	-- Wheel turning
	local offset = car.Chassis.CFrame:inverse() * thruster.CFrame
	local speed = car.Chassis.CFrame:vectorToObjectSpace(car.Chassis.Velocity)
	if offset.Z < 0 then
		local direction = 1
		if speed.Z > 0 then
			direction = -1
		end
		wheelWeld.C0 = wheelWeld.C0 * CFrame.Angles(0, (car.Chassis.RotVelocity.Y / 2) * direction, 0)
	end

	-- Particles
	if hit and thruster.Velocity.magnitude >= 5 then
		wheelWeld.Part1.ParticleEmitter.Enabled = true
	else
		wheelWeld.Part1.ParticleEmitter.Enabled = false
	end
end

car.DriveSeat.Changed:connect(function(property)
	if property == "Occupant" then
		if car.DriveSeat.Occupant then
			car.EngineBlock.Running.Pitch = 1
			car.EngineBlock.Running:Play()
			local player = game.Players:GetPlayerFromCharacter(car.DriveSeat.Occupant.Parent)
			if player then
				car.DriveSeat:SetNetworkOwner(player)
				local localCarScript = script.LocalCarScript:Clone()
				localCarScript.Parent = player.PlayerGui
				localCarScript.Car.Value = car
				localCarScript.Disabled = false
			end
		else
			car.DriveSeat:SetNetworkOwnershipAuto()
			car.EngineBlock.Running:Stop()
		end
	end
end)
--[[
	Helper function that should only be used in tests for the Grid component.
]]

local Roact = require(script.Parent.Parent.Parent.Parent.Roact)

local ITEM_HEIGHT = 100 -- px

local COLORS = {
	Color3.fromRGB(255, 0, 0),
	Color3.fromRGB(0, 255, 0),
	Color3.fromRGB(0, 0, 255),
	Color3.fromRGB(255, 255, 0),
	Color3.fromRGB(255, 0, 255),
	Color3.fromRGB(0, 255, 255),
}

local function getNextColor(index: number): Color3
	while index > #COLORS do
		index = index - #COLORS
	end
	return COLORS[index]
end

local function createGridItems(numItems: number): { any }
	local items = {}

	for i = 1, numItems do
		table.insert(
			items,
			Roact.createElement("Frame", {
				Size = UDim2.new(1, 0, 0, ITEM_HEIGHT),
				BackgroundColor3 = getNextColor(i),
			})
		)
	end

	return items
end

return createGridItems
--New R6 stuff
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")

local Torso = Character:WaitForChild("Torso")
local Neck = Torso:WaitForChild("Neck")

local Waist = HumanoidRootPart:WaitForChild("RootJoint")

local RHip = Torso:WaitForChild("Right Hip")
local LHip = Torso:WaitForChild("Left Hip")

local LHipOriginC0 = LHip.C0
local RHipOriginC0 = RHip.C0

local NeckOriginC0 = Neck.C0
local WaistOriginC0 = Waist.C0

Neck.MaxVelocity = 1/3

RunService.RenderStepped:Connect(function() 
	local CameraCFrame = Camera.CoordinateFrame

	if Character:FindFirstChild("Torso") and Character:FindFirstChild("Head") then
		local TorsoLookVector = Torso.CFrame.lookVector
		local HeadPosition = Head.CFrame.p

		if Neck and Waist then
			if Camera.CameraSubject:IsDescendantOf(Character) or Camera.CameraSubject:IsDescendantOf(Player) then
				local Point = PlayerMouse.Hit.p

				local Distance = (Head.CFrame.p - Point).magnitude
				local Difference = Head.CFrame.Y - Point.Y


				local goalNeckCFrame = CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 1, 0)
				Neck.C0 = Neck.C0:lerp(goalNeckCFrame*NeckOriginC0, 0.5 / 2).Rotation + NeckOriginC0.Position

				local xAxisWaistRotation = -(math.atan(Difference / Distance) * 0.5)
				local yAxisWaistRotation = (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 0.5
				local rotationWaistCFrame = CFrame.Angles(xAxisWaistRotation, yAxisWaistRotation, 0)
				local goalWaistCFrame = rotationWaistCFrame*WaistOriginC0
				Waist.C0 = Waist.C0:lerp(goalWaistCFrame, 0.5 / 2).Rotation + WaistOriginC0.Position


				local currentLegCounterCFrame = Waist.C0*WaistOriginC0:Inverse()

				local legsCounterCFrame = currentLegCounterCFrame:Inverse()

				RHip.C0 =  legsCounterCFrame*RHipOriginC0
				LHip.C0 = legsCounterCFrame*LHipOriginC0
			end
		end
	end	
end)
------------------------------------------------------------
--\Doors Update
------------------------------------------------------------
local DoorsFolder = ACS_Storage:FindFirstChild("Doors")
local CAS = game:GetService("ContextActionService")

local mDistance = 5
local Key = nil

function getNearest()
	local nearest = nil
	local minDistance = mDistance
	local Character = Player.Character or Player.CharacterAdded:Wait()
	
	for I,Door in pairs (DoorsFolder:GetChildren()) do
		if Door.Door:FindFirstChild("Knob") ~= nil then
			local distance = (Door.Door.Knob.Position - Character.Torso.Position).magnitude
		
			if distance < minDistance then
				nearest = Door
				minDistance = distance
			end
		end
	end
	--print(nearest)
	return nearest
end

function Interact(actionName, inputState, inputObj)
	if inputState ~= Enum.UserInputState.Begin then return end
	
	local nearestDoor = getNearest()
	local Character = Player.Character or Player.CharacterAdded:Wait()
	
	if nearestDoor == nil then return end
	
	if (nearestDoor.Door.Knob.Position - Character.Torso.Position).magnitude <= mDistance then
		if nearestDoor ~= nil then
			if nearestDoor:FindFirstChild("RequiresKey") then
				Key = nearestDoor.RequiresKey.Value
			else
				Key = nil
			end
			Evt.DoorEvent:FireServer(nearestDoor,1,Key)
		end
	end
end


function GetNearest(parts, maxDistance,Part)
	local closestPart
	local minDistance = maxDistance
    for _, partToFace in ipairs(parts) do
        local distance = (Part.Position - partToFace.Position).magnitude
        if distance < minDistance then
            closestPart = partToFace
            minDistance = distance
        end
   end
	return closestPart
end

CAS:BindAction("Interact", Interact, false, Enum.KeyCode.G)

Evt.Rappel.PlaceEvent.OnClientEvent:Connect(function(Parte)
	local Alinhar = Instance.new('AlignOrientation')
	Alinhar.Parent = Parte
	Alinhar.PrimaryAxisOnly = true
	Alinhar.RigidityEnabled = true
	Alinhar.Attachment0 = Character.HumanoidRootPart.RootAttachment
	Alinhar.Attachment1 = Camera.BasePart.Attachment
end)

print("ACS 1.7.6")
--local open = workspace.HeladeriaBeach.openPart --RestauranteUDL: Cambiar por nombre Modelo donde están las partes que abren o cierran GUI
--local close = workspace.HeladeriaBeach.closePart --RestauranteUDL: Cambiar por nombre Modelo donde están las partes que abren o cierran GUI
local frame = script.Parent
local closeButton = frame.closeButton
local buy_1 = frame.buy1
local buy_2 = frame.buy2
local buy_3 = frame.buy3
local buy_4 = frame.buy4


local ReplicatedStorage = game:GetService('ReplicatedStorage')
local remoteEvent = ReplicatedStorage:WaitForChild('BuyTool')

frame.Visible = false
--[[
	Determines which paid emotes the user owns and returns them through the
	provided callback

	Parameters:
	player - the player used to check ownership
	callback - the function to call once all paid emotes have been checked
]]
function EmoteManager:getOwnedEmotesAsync(player, callback)
	local ownedEmotes = {}
	local numComplete = 0
	local numEmotes = 0

	-- Since paidEmotes is a dictionary, we have to loop over it to count the items
	for _ in pairs(paidEmotes) do
		numEmotes = numEmotes + 1
	end

	for emoteName, emoteInfo in pairs(paidEmotes) do
		task.spawn(function()
			local success, ownsEmote = pcall(function()
				return self.MarketplaceService:PlayerOwnsAsset(player, emoteInfo.emote)
			end)

			if success then
				if ownsEmote then
					ownedEmotes[emoteName] = emoteInfo
				end
			else
				warn("Error getting asset ownership for", emoteInfo.emote)
			end

			numComplete = numComplete + 1

			if numComplete == numEmotes then
				callback(ownedEmotes)
			end
		end)
	end
end
--[[
	Constructs and returns a new instance, with options for setting properties,
	event handlers and other attributes on the instance right away.
]]

local Package = script.Parent.Parent
local Types = require(Package.Types)
local cleanupOnDestroy = require(Package.Utility.cleanupOnDestroy)
local Children = require(Package.Instances.Children)
local Scheduler = require(Package.Instances.Scheduler)
local defaultProps = require(Package.Instances.defaultProps)
local Compat = require(Package.State.Compat)
local logError = require(Package.Logging.logError)
local logWarn = require(Package.Logging.logWarn)

local WEAK_KEYS_METATABLE = {__mode = "k"}

local ENABLE_EXPERIMENTAL_GC_MODE = false
--------------------------------------------------------
function DeleteIdlePlane() --This deletes any planes that aren't currently being used
	for _,v in pairs(Planekit:GetChildren()) do
		if v.Name == "Plane" then
			v:Destroy()
		end
	end
end

function RegenMain() --This function regens the plane
	local PlaneClone2 = PlaneClone:clone()
	PlaneClone2.Parent = Planekit
	PlaneClone2.Origin.Value = Planekit
	PlaneClone2:MakeJoints()
	return PlaneClone2
end

function RegeneratePlane(Part) --This is the main regenerating function
	local Player = game.Players:GetPlayerFromCharacter(Part.Parent) --This gets the player that touched it
	if Player then
		local Humanoid = Player.Character:FindFirstChild("Humanoid")
		if Humanoid.Health ~= 0 then
			if Active then
				Active = false
				DeleteIdlePlane() --This activates the "DeleteIdlePlane" function
				for i = 0,1,0.2 do --This makes the button transparent
					Main.Transparency = i
					wait()
				end
				if RegenTime >= 1 then
					RegenGui.Parent = Player.PlayerGui --The regengui will be put into the player if the regentime is more than 1
				end
				wait(RegenTime)
				RegenGui.Parent = script --This puts the gui back in the script
				local PlaneClone2 = RegenMain()
				if EnterOnSpawn.Value then --If the EnterOnSpawn value is true...
					coroutine.resume(coroutine.create(function()
						repeat wait() until PlaneClone2.Welded.Value
						while true do
							if PlaneClone2.Welded.Value
							or Humanoid.Health == 0 then
								break
							end
							wait()
						end
						onPlaneWelded(Player,PlaneClone2) --This activates the "onPlaneWelded" function whenever the welded value changes
					end))
				end
				wait(WaitTime)
				for i = 1,0,-0.2 do --This makes the button visible
					Main.Transparency = i
					wait()
				end
				Active = true
			end
		end
	end
end

function onPlaneWelded(Player,Plane) --This function put you into the plane seat the moment the plane is welded
	if Plane and Player then --This checks to make sure there is a plane and a player
		if Player.Character:FindFirstChild("Torso") then
			if Player.Character.Humanoid.Health ~= 0 then
				Player.Character.Torso.CFrame = Plane.MainParts.Seat.CFrame
			end
		end
	end
end

Main.Touched:connect(RegeneratePlane) --This activates the "RegeneratePlane" function when the Main brick is touched
-- Support legacy Primer support on internal FB www
exports.enableLegacyFBSupport = true
-- Server-exposed signals/fields:
PointsService.PointsPerPlayer = {}
PointsService.PointsChanged = Signal.new()
-- Initialization
local lastActivePath = {}

if game.Workspace:FindFirstChild("BasePlate") then
	game.Workspace.BasePlate:Destroy()
end

local tracksModel = Instance.new("Model")
tracksModel.Name = "Tracks"
tracksModel.Parent = game.Workspace

function packagePathModels()
	local pathPackager = require(script.PathPackager)
	while true do
		local pathBase = game.Workspace:FindFirstChild("PathBase", true)
		if pathBase then
			pathPackager:PackageRoom(pathBase)
		else
			break
		end
	end

end

coroutine.wrap(function() packagePathModels() end)()
-- Variables
local player = game.Players.LocalPlayer -- Local player
local humanoid = player.Character:WaitForChild("Humanoid") -- Player's humanoid
local userInputService = game:GetService("UserInputService") -- UserInputService
--stop sound
function module.Stop(humrp, sound)
	local sound = humrp[sound]
	sound:Stop()
end

return module
--

Humanoid.Changed:Connect(function()
if Enum.Material[Humanoid.FloorMaterial.Name] then
script.Parent.CurrentMaterial.Value = Humanoid.FloorMaterial.Name
else
script.Parent.CurrentMaterial.Value = DefaultSound
end
end)

function TurnOffSounds()
for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "Sound" then
v.Playing = false	
end	
end		
end

function MakeSound()
for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "Sound" then
if v.Name ~= script.Parent.CurrentMaterial.Value then
v.Playing = false	
else
if script.Parent.CurrentMaterial.Value  == 'Air' and ToggleAirSound == true then	
v.Playing = true	
v.PlaybackSpeed = Humanoid.WalkSpeed / 12
else
if v.Name ~= 'Air' then
v.Playing = true	
v.PlaybackSpeed = Humanoid.WalkSpeed / 12	
end	
end
end		
end
end
end

function MakeDefaultSound()
for i,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "Sound" then
if v.Name ~= DefaultSound then
v.Playing = false	
else
v.Playing = true	
v.PlaybackSpeed = Humanoid.WalkSpeed / 12	
end		
end
end
end

while wait(1/10) do
local Moving = Humanoid.MoveDirection ~= Vector3.new(0,0,0)
if Moving then
if script.Parent:FindFirstChild(script.Parent.CurrentMaterial.Value) and script.Parent.CurrentMaterial.Value ~= nil then	
MakeSound()
else	
MakeDefaultSound()	
end		
else		
TurnOffSounds()	
end	
end
--EDIT BELOW----------------------------------------------------------------------
settings.PianoSoundRange = 60

settings.KeyAesthetics = true

settings.PianoSounds = {
		"269058581",
		"269058744",
		"269058842",
		"269058899",
		"269058974",
		"269059048"
}
-- check if the player is moving and not climbing
humanoid.Running:Connect(function(speed)
	if humanoid.MoveDirection.Magnitude > 0 and speed > 0 and humanoid:GetState() ~= Enum.HumanoidStateType.Climbing then
		if oldWalkSpeed ~= humanoid.WalkSpeed then
			getSoundProperties()
			update()
		end
		currentSound.Playing = true
		currentSound.Looped = true
	else
		currentSound:Stop()
	end
end)

spawn(function()
	while task.wait() do
		if serverSound.Volume > 0 then
			serverSound.Volume = 0
		end
	end
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.6	-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.460		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		5.00		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		3.20	,
		--[[ 3 ]]		2.14		,
		--[[ 4 ]]		1.72		,
		--[[ 5 ]]		1.31		,
		--[[ 6 ]]		1.00		,
		--[[ 7 ]]		0.82		,
		--[[ 8 ]]		0.64		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)