Roblox/luau_corpus huggingface dataset:
--
script.Parent.OnServerEvent:Connect(function(p)
	local Character = p.Character
	local Humanoid = Character.Humanoid
	local RootPart = Character.HumanoidRootPart
	local Slash = RS.Effects.Part3:Clone()
	script.Attack:Play()
	Humanoid.WalkSpeed = 16
	Slash.Parent = FX
	Slash.CFrame = RootPart.CFrame * CFrame.new(0,0,-3)
	local BV = Instance.new("BodyVelocity",Slash)
	BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
	BV.Velocity = p.Character.HumanoidRootPart.CFrame.LookVector * 60
	Slash.Touched:Connect(function(hit)
		if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= p.Name then
			hit.Parent.Humanoid:TakeDamage(Damage)
			local HitEffect = Effects.Hit3.Attachment:Clone()
			local RootPart2 = hit.Parent.HumanoidRootPart
			HitEffect.Parent = RootPart2
			for _,Particles in pairs(HitEffect:GetDescendants()) do
				if Particles:IsA("ParticleEmitter") then
					Particles:Emit(Particles:GetAttribute("EmitCount"))
				end
			end
			HitEffect.Hit:Play()
			local vel = Instance.new("BodyVelocity", RootPart2)
			vel.MaxForce = Vector3.new(1,1,1) * 1000000;
			vel.Parent = RootPart2
			vel.Velocity = Vector3.new(1,1,1) * p.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0
			vel.Name  =  "SmallMoveVel"
			game.Debris:AddItem(vel,1)
			Slash:Destroy()
	end
	wait(1)
	Slash.Anchored = true
	for _,Particles in pairs(Slash.Part.Parent:GetDescendants()) do
		if Particles:IsA("ParticleEmitter") then
			Particles.Enabled = false
		end
		end
		Slash.PointLight.Enabled = false
end)
end)
--[[Brakes]]
	Tune.ABSEnabled		= true		-- Implements ABS
	Tune.ABSThreshold	= 20		-- Slip speed allowed before ABS starts working (in SPS) 

	Tune.FBrakeForce	= 2500		-- Front brake force
	Tune.RBrakeForce	= 200		-- Rear brake force
	Tune.PBrakeForce	= 5000		-- Handbrake force
	
	Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
	Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
	Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]
-- Represents a FastCastBehavior :: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/fcbehavior/
export type FastCastBehavior = {
	RaycastParams: RaycastParams?,
	MaxDistance: number,
	Acceleration: Vector3,
	HighFidelityBehavior: number,
	HighFidelitySegmentSize: number,
	CosmeticBulletTemplate: Instance?,
	CosmeticBulletProvider: any, -- Intended to be a PartCache. Dictated via TypeMarshaller.
	CosmeticBulletContainer: Instance?,
	AutoIgnoreContainer: boolean,
	CanPierceFunction: CanPierceFunction
}
-- Settings
local Configuration = Home:WaitForChild("Configuration")
local SwingPower = Configuration:WaitForChild("SwingPower")

local function SetPhysicalProperties(Part,Density)
	if Part then
		Part.CustomPhysicalProperties = PhysicalProperties.new(Density,Part.Friction,Part.Elasticity)
	end
end

GetAllDescendants = function(instance, func)
	func(instance)
	for _, child in next, instance:GetChildren() do
		GetAllDescendants(child, func)
	end
end

local function SetCharacterToWeight(ToDensity,Char)
	GetAllDescendants(Char,function(d)
		if d and d.Parent and d:IsA("BasePart") then
			SetPhysicalProperties(d,ToDensity)
		end
	end)
end

local function OnSeatChange(Seat)
	if Seat.Occupant then
		local CurrentThrottle = Seat.Throttle
		local BodyForce = Seat:WaitForChild("BodyForce")
		
		-- Adjust swing when interacted
		if CurrentThrottle == 1 then
			BodyForce.Force = Seat.CFrame.lookVector * SwingPower.Value * 100
		elseif CurrentThrottle == -1 then
			BodyForce.Force = Seat.CFrame.lookVector * SwingPower.Value * -100
		else
			BodyForce.Force = Vector3New()
		end
		
		delay(0.2,function()
			BodyForce.Force = Vector3New()
		end)
		
		-- Make the character weightless for the swing to behave correctly
		if CurrentOccupant == nil then
			CurrentOccupant = Seat.Occupant
			SetCharacterToWeight(0,CurrentOccupant.Parent)
		end
		
	elseif CurrentOccupant then
		-- Set the character's weight back
		SetCharacterToWeight(0.7,CurrentOccupant.Parent)
		CurrentOccupant = nil
	end
end

SwingSeat1.Changed:connect(function()
	OnSeatChange(SwingSeat1)
end)

SwingSeat2.Changed:connect(function()
	OnSeatChange(SwingSeat2)
end)
--Services
local tweenService = game:GetService("TweenService")
local playerService = game:GetService("Players")
--Gear Ratios
Tune.FinalDrive		= 3.21		 --	[TRANSMISSION CALCULATIONS FOR NERDS]
Tune.Ratios			= {			 --		SPEED [SPS]	 = (Wheel diameter(studs) * pi(3.14) * RPM) / (60 * Gear Ratio * Final Drive * Multiplier)
	--[[Reverse]]	5.000		,--		WHEEL TORQUE = Engine Torque * Gear Ratio * Final Drive * Multiplier
	--[[Neutral]]	0			,
	--[[ 1 ]]		3.519      	,
	--[[ 2 ]]		2.320		,
	--[[ 3 ]]		1.700		,
	--[[ 4 ]]		1.400		,
	--[[ 5 ]]		0.907		,
}
Tune.FDMult			= 1.3			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[**
	ensures all values in given table pass check

	@param check The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]
function t.values(check)
	assert(t.callback(check))
	return function(value)
		local tableSuccess = t.table(value)
		if tableSuccess == false then
			return false
		end

		for _, val in pairs(value) do
			local success = check(val)
			if success == false then
				return false
			end
		end

		return true
	end
end
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------

local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.new(1, -1 * ScrollBarWidth, 1, 0)
MainFrame.Position = UDim2.new(0, 0, 0, 0)
MainFrame.BackgroundTransparency = 1
MainFrame.ClipsDescendants = true
MainFrame.Parent = PropertiesFrame

ContentFrame = Instance.new("Frame")
ContentFrame.Name = "ContentFrame"
ContentFrame.Size = UDim2.new(1, 0, 0, 0)
ContentFrame.BackgroundTransparency = 1
ContentFrame.Parent = MainFrame

scrollBar = ScrollBar(false)
scrollBar.PageIncrement = 1
Create(scrollBar.GUI,{
	Position = UDim2.new(1,-ScrollBarWidth,0,0);
	Size = UDim2.new(0,ScrollBarWidth,1,0);
	Parent = PropertiesFrame;
})

scrollBarH = ScrollBar(true)
scrollBarH.PageIncrement = ScrollBarWidth
Create(scrollBarH.GUI,{
	Position = UDim2.new(0,0,1,-ScrollBarWidth);
	Size = UDim2.new(1,-ScrollBarWidth,0,ScrollBarWidth);
	Visible = false;
	Parent = PropertiesFrame;
})

do
	local listEntries = {}
	local nameConnLookup = {}

	function scrollBar.UpdateCallback(self)
		scrollBar.TotalSpace = ContentFrame.AbsoluteSize.Y
		scrollBar.VisibleSpace = MainFrame.AbsoluteSize.Y
		ContentFrame.Position = UDim2.new(ContentFrame.Position.X.Scale,ContentFrame.Position.X.Offset,0,-1*scrollBar.ScrollIndex)
	end

	function scrollBarH.UpdateCallback(self)

	end

	MainFrame.Changed:connect(function(p)
		if p == 'AbsoluteSize' then
			scrollBarH.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.x)
			scrollBarH:Update()
			scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
			scrollBar:Update()
		end
	end)

	local wheelAmount = Row.Height
	PropertiesFrame.MouseWheelForward:connect(function()
		if scrollBar.VisibleSpace - 1 > wheelAmount then
			scrollBar:ScrollTo(scrollBar.ScrollIndex - wheelAmount)
		else
			scrollBar:ScrollTo(scrollBar.ScrollIndex - scrollBar.VisibleSpace)
		end
	end)
	PropertiesFrame.MouseWheelBackward:connect(function()
		if scrollBar.VisibleSpace - 1 > wheelAmount then
			scrollBar:ScrollTo(scrollBar.ScrollIndex + wheelAmount)
		else
			scrollBar:ScrollTo(scrollBar.ScrollIndex + scrollBar.VisibleSpace)
		end
	end)
end

scrollBar.VisibleSpace = math.ceil(MainFrame.AbsoluteSize.y)
scrollBar:Update()

showProperties(GetSelection())

bindSelectionChanged.Event:connect(function()
	showProperties(GetSelection())
end)

bindSetAwait.Event:connect(function(obj)
	if AwaitingObjectValue then
		AwaitingObjectValue = false
		local mySel = obj
		if mySel then
			pcall(function()
				Set(AwaitingObjectObj, AwaitingObjectProp, mySel)
			end)
		end
	end
end)

propertiesSearch:GetPropertyChangedSignal("Text"):Connect(function()
	showProperties(GetSelection())
end)

bindGetApi.OnInvoke = function()
	return RbxApi
end

bindGetAwait.OnInvoke = function()
	return AwaitingObjectValue
end
-- Set first join time
function Main:SetFirstJoinTime(newTime: number)
	self.FirstJoinTime = newTime
	self.Data.FirstJoinTime = newTime
	return newTime
end
--local ClickerModule = require(343254562)
--local clickEvent = ClickerModule.RemoteEvent
local interactiveParts = {}
local activationDistance = 12
local flushing = false
local water = script.Parent.Parent.Water
local sound = script.Parent.Parent.ToiletBowl.Sound
sound:Play()
wait(0.885)

			for i, v in pairs(script.Parent.Parent:GetChildren()) do
				if v.Name == "WaterSwirl" then
					v.ParticleEmitter.Transparency = NumberSequence.new(0.55)
					v.ParticleEmitter.Rate = 500
				end
end
			
			for i = 1, 4 do
				water.CFrame = water.CFrame * CFrame.new(0, 0.01, 0)
				wait()
			end
			wait(4.05)
			for i = 1, 10 do
				for ii, v in pairs(script.Parent.Parent:GetChildren()) do
					if v.Name == "WaterSwirl" then
						v.ParticleEmitter.Transparency = NumberSequence.new(0.55 + (0.015 * i))
						if i == 10 then
							v.ParticleEmitter.Rate = 0
						end
end
				end
				wait(0)
			end
			wait(1.22)
			for i = 1, 52 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(-0.007, 0, -0.007)
				water.CFrame = water.CFrame * CFrame.new(0, -0.007, 0)
				wait()
			end
			
			if script.Parent.Parent.ToiletUsed.Value == true then
				water.BrickColor = BrickColor.new("Pastel yellow")
			end
			
			wait(0.5)
			
			
			
			script.Parent.Parent.ToiletUsed.Value = false
			water.BrickColor = BrickColor.new("Fog")
			
			for i = 1, 52 do
				water.Mesh.Scale = water.Mesh.Scale + Vector3.new(0.0066, 0, 0.0066)
				water.CFrame = water.CFrame * CFrame.new(0, 0.0066, 0)
				wait()
			end
			water.CFrame = script.Parent.Parent.WaterResetPos.CFrame
			water.Mesh.Scale = Vector3.new(1,0,1)
			flushing = false
			script.Disabled = true
--[=[
	@within TableUtil
	@function Keys
	@param tbl table
	@return table

	Returns an array with all the keys in the table.

	```lua
	local t = {A = 10, B = 20, C = 30}
	local keys = TableUtil.Keys(t)
	print(keys) --> {"A", "B", "C"}
	```

	:::caution Ordering
	The ordering of the keys is never guaranteed. If order is imperative, call
	`table.sort` on the resulting `keys` array.
	```lua
	local keys = TableUtil.Keys(t)
	table.sort(keys)
	```
]=]
local function Keys(tbl: Table): Table
	local keys = table.create(#tbl)
	for k in pairs(tbl) do
		table.insert(keys, k)
	end
	return keys
end
--wait(math.random(0,5)/10)
while true do
	game:GetService("RunService").Stepped:Wait()
	local target = workspace:FindFirstChild(script.Parent.TargetName.Value)--findNearestTorso(script.Parent:WaitForChild("HumanoidRootPart").Position)
	if target ~= nil and target:FindFirstChild("HumanoidRootPart") ~= nil then
		target = target:FindFirstChild("HumanoidRootPart")
		--script.Parent.Humanoid:MoveTo(target.Position, target)
		script.Parent.HumanoidRootPart.CFrame = CFrame.new(script.Parent.HumanoidRootPart.Position,target.Position)
		script.Parent.HumanoidRootPart.CFrame = script.Parent.HumanoidRootPart.CFrame + (script.Parent.HumanoidRootPart.CFrame.LookVector) / Vector3.new(3.5,3.5,3.5)
		if target ~= nil and (target.Position - script.Parent.HumanoidRootPart.Position).Magnitude < 0.5 then
			target.Parent.Humanoid.Health = 0
			script.Parent:Destroy()
			wait()
		end
	end
end
-- Simple realistic suspension script (<100 lines), put inside your car
-- Inside your A-Chassis Tune make sure to change both susAngles to 75 for best results
local Wheels = script.Parent.Wheels:GetChildren()
local fSprings = {Wheels[1]:WaitForChild("Spring"), Wheels[2]:WaitForChild("Spring")} -- FL, FR
local rSprings = {Wheels[3]:WaitForChild("Spring"), Wheels[4]:WaitForChild("Spring")} -- RL, RR


local customSettings = {
	Thickness = 0.12;
	MaxLength = 4; -- Make sure "LimitsEnabled" is true
	MinLength = 0.05; -- Make sure "LimitsEnabled" is true
	Damping = 180; -- For a less responsive suspension increase this value
	FreeLength = 2.5; -- This determines the stance
	LimitsEnabled = false;
	MaxForce = 50000;
	Stiffness = 4500; -- If you have a race car then increase this value
}
-- FEATURE METHODS
function Icon:bindEvent(iconEventName, eventFunction)
	local event = self[iconEventName]
	assert(event and typeof(event) == "table" and event.Connect, "argument[1] must be a valid topbarplus icon event name!")
	assert(typeof(eventFunction) == "function", "argument[2] must be a function!")
	self._bindedEvents[iconEventName] = event:Connect(function(...)
		eventFunction(self, ...)
	end)
	return self
end

function Icon:unbindEvent(iconEventName)
	local eventConnection = self._bindedEvents[iconEventName]
	if eventConnection then
		eventConnection:Disconnect()
		self._bindedEvents[iconEventName] = nil
	end
	return self
end

function Icon:bindToggleKey(keyCodeEnum)
	assert(typeof(keyCodeEnum) == "EnumItem", "argument[1] must be a KeyCode EnumItem!")
	self._bindedToggleKeys[keyCodeEnum] = true
	return self
end

function Icon:unbindToggleKey(keyCodeEnum)
	assert(typeof(keyCodeEnum) == "EnumItem", "argument[1] must be a KeyCode EnumItem!")
	self._bindedToggleKeys[keyCodeEnum] = nil
	return self
end

function Icon:lock()
	self.locked = true
	return self
end

function Icon:unlock()
	self.locked = false
	return self
end

function Icon:setTopPadding(offset, scale)
	local newOffset = offset or 4
	local newScale = scale or 0
	self.topPadding = UDim.new(newScale, newOffset)
	self.updated:Fire()
	return self
end

function Icon:bindToggleItem(guiObjectOrLayerCollector)
	if not guiObjectOrLayerCollector:IsA("GuiObject") and not guiObjectOrLayerCollector:IsA("LayerCollector") then
		error("Toggle item must be a GuiObject or LayerCollector!")
	end
	self.toggleItems[guiObjectOrLayerCollector] = true
	return self
end

function Icon:unbindToggleItem(guiObjectOrLayerCollector)
	self.toggleItems[guiObjectOrLayerCollector] = nil
	return self
end

function Icon:_setToggleItemsVisible(bool, byIcon)
	for toggleItem, _ in pairs(self.toggleItems) do
		if not byIcon or byIcon.toggleItems[toggleItem] == nil then
			local property = "Visible"
			if toggleItem:IsA("LayerCollector") then
				property = "Enabled"
			end
			toggleItem[property] = bool
		end
	end
end

function Icon:give(userdata)
	local valueToGive = userdata
	if typeof(userdata) == "function" then
		local returnValue = userdata(self)
		if typeof(userdata) ~= "function" then
			valueToGive = returnValue
		else
			valueToGive = nil
		end
	end
	if valueToGive ~= nil then
		self._maid:give(valueToGive)
	end
	return self
end
-- Decompiled with the Synapse X Luau decompiler.

client = nil;
cPcall = nil;
Pcall = nil;
Routine = nil;
service = nil;
GetEnv = nil;
gTable = nil;
return function(p1)
	local l__PlayerGui__1 = service.PlayerGui;
	local l__LocalPlayer__2 = service.Players.LocalPlayer;
	local l__Parent__3 = script.Parent.Parent;
	local l__Frame__4 = l__Parent__3:WaitForChild("Frame");
	local l__Main__5 = l__Frame__4:WaitForChild("Main");
	local l__Close__6 = l__Frame__4:WaitForChild("Close");
	local l__Timer__7 = l__Frame__4:WaitForChild("Timer");
	local v8 = p1.OnClick;
	local v9 = p1.OnClose;
	local v10 = p1.OnIgnore;
	local l__Title__11 = p1.Title;
	local v12 = p1.Message or (p1.Text or "");
	local v13 = p1.Time;
	local v14 = p1.Icon or client.MatIcons.Info;
	if v8 and type(v8) == "string" then
		v8 = client.Core.LoadCode(v8, GetEnv());
	end;
	if v9 and type(v9) == "string" then
		v9 = client.Core.LoadCode(v9, GetEnv());
	end;
	if v10 and type(v10) == "string" then
		v10 = client.Core.LoadCode(v10, GetEnv());
	end;
	local v15 = client.UI.Get("NotificationHolder", nil, true);
	if not v15 then
		client.UI.Make("NotificationHolder");
		v15 = client.UI.Get("NotificationHolder", nil, true);
		v15.Object.ScrollingFrame.Active = false;
	end;
	l__Frame__4:WaitForChild("Title").Text = l__Title__11;
	l__Main__5.Text = v12;
	l__Frame__4:WaitForChild("Icon").Image = v14;
	local v16 = {
		Type = "Notification", 
		Title = l__Title__11, 
		Message = v12, 
		Icon = v14 and 0, 
		Time = os.date("%X"), 
		Function = v8
	};
	table.insert(client.Variables.CommunicationsHistory, v16);
	service.Events.CommsCenter:Fire(v16);
	l__Main__5.MouseButton1Click:Connect(function()
		if l__Parent__3 and l__Parent__3.Parent then
			if v8 then
				v8();
			end;
			l__Parent__3:Destroy();
		end;
	end);
	local l__gTable__1 = p1.gTable;
	l__Close__6.MouseButton1Click:Connect(function()
		if l__Parent__3 and l__Parent__3.Parent then
			if v9 then
				v9();
			end;
			l__gTable__1:Destroy();
		end;
	end);
	l__Parent__3.Parent = v15.Object.ScrollingFrame;
	task.spawn(function()
		local v17 = Instance.new("Sound", service.LocalContainer());
		v17.SoundId = "rbxassetid://203785584";
		v17.Volume = 0.2;
		v17:Play();
		wait(0.5);
		v17:Destroy();
	end);
	if v13 then
		l__Timer__7.Visible = true;
		while true do
			l__Timer__7.Text = v13;
			wait(1);
			v13 = v13 - 1;
			if v13 <= 0 then
				break;
			end;
			if not l__Parent__3 then
				break;
			end;
			if not l__Parent__3.Parent then
				break;
			end;		
		end;
		if l__Parent__3 and l__Parent__3.Parent then
			if l__Parent__3 then
				l__Parent__3:Destroy();
			end;
			if v10 then
				v10();
			end;
		end;
	end;
	return nil;
end;
--[=[
	Gives a promise to the maid for clean.

	@param promise Promise<T>
	@return Promise<T>
]=]
function Maid:GivePromise(promise)
	if not promise:IsPending() then
		return promise
	end

	local newPromise = promise.resolved(promise)
	local id = self:GiveTask(newPromise)

	-- Ensure GC
	newPromise:Finally(function()
		self[id] = nil
	end)

	return newPromise
end
-- this script just puts the animator in the humanoid

local modules = game:GetService("ReplicatedStorage"):WaitForChild("Modules", 5)
local humanoid = script.Parent:WaitForChild("Humanoid", 5)
if modules and humanoid then
	local animator = modules:WaitForChild("AnimationSystem", 5)
	if animator then
		animator:Clone().Parent = humanoid
		wait(1)
		script:Destroy()
	end
end
--[[Misc]]
	Tune.LoadDelay		= .3		-- Delay before initializing chassis (in seconds)
	Tune.AutoStart		= false		-- Set to false if using manual ignition plugin
	Tune.AutoFlip		= true		-- Set to false if using manual flip plugin
--< Variables >--
local Speed = 25 -- How fast is the sprinting speed?
local Key = Enum.KeyCode.LeftShift -- Activation Key


UIS.InputBegan:Connect(function(Input, Processed)
	if not Processed then 
		if Input.UserInputType == Enum.UserInputType.Keyboard and Input.KeyCode == Key then 
			Humanoid.WalkSpeed = Speed
		end
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.UserInputType == Enum.UserInputType.Keyboard and Input.KeyCode == Key then 
		Humanoid.WalkSpeed = DefaultWalkingSpeed
	end
end)
--////////////////////////////// Include
--//////////////////////////////////////
local Chat = game:GetService("Chat")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local modulesFolder = script.Parent

local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
-- This script makes everytime a player get damage, the blood will come out --

function MakeBlood()

local blood = Instance.new("Part")
blood.Size = Vector3.new(1,1,1)
blood.Name = "Blood"
blood.Transparency = 1
blood.BrickColor = BrickColor.new("Crimson")
blood.CanCollide = false
blood.BottomSurface = "Smooth"
blood.TopSurface = "Smooth"
blood.Material = "SmoothPlastic"
blood.Velocity = Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))
local billboard = script.BillboardGui:Clone()
billboard.Parent = blood
local gui = script.BloodGui:Clone()
gui.Parent = billboard
game:GetService("Debris"):AddItem(blood, 5)

local CC = math.random(1,2)
--[[
	Manages the camera movement when interacting with a surface art.
]]
local TweenService = game:GetService("TweenService")
local constants = require(script.Parent.Parent.Constants)

local CANVAS_OFFSET_PADDING = 10
local MAX_STUDS_OFFSET = 25
local MIN_STUDS_OFFSET = 5

local CameraModule = {}
CameraModule.__index = CameraModule
--------END RIGHT DOOR --------

game.Workspace.LightedDoorON.Value = false
--[[ 1 ]]	{"Delete","Music ID","Radio","Game Info","Settings"},
--[[ 2 ]]	{"Yes","No"},
--[[ 3 ]]	{"Set","Play","Stop","Back"},
--[[ 4 ]]	{"Preset 1","Preset 2","Preset 3","Preset 4","Back"},
--[[ 5 ]]	{"Filtered","PGS","Players","Back"},
--[[ 6 ]]	{"Power","Dynamics","Background","Back"},
--[[ 7 ]]	{"Valet","Eco","Comfort","Sport","Back"},
--[[ 8 ]]	{"Eco","Comfort","Sport","Back"},
--[[ 9 ]] {"Model","Specs","Transmission","Info","Back"},
--[[ 10 ]]	{"Solar","Lunar","Aurora","Clarity","Back"},
}

return module
--------|    Reference    |--------
local isStudio = _L.Services.RunService:IsStudio()
-- Hitpoints platform takes until game is over
GameSettings.PlatformHealthDifficulty = {
	Easy = 8,
	Normal = 6,
	Hard = 6
}
--[[Steering]]
	Tune.SteerInner		= 39		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 41		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .05		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
----------------------------------
------------FUNCTIONS-------------
----------------------------------

function ShowPiano()
	PianoGui:TweenPosition(
		UDim2.new(0.5, -355, 1, -230),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Sine,
		.5,
		true
	)
end
function HidePiano()
	PianoGui:TweenPosition(
		UDim2.new(0.5, -380, 1, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Sine,
		.5,
		true
	)
end
function ShowSheets()
	SheetsGui:TweenPosition(
		UDim2.new(0.5, -200, 1, -520),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Sine,
		.5,
		true
	)
end
function HideSheets()
	SheetsGui:TweenPosition(
		UDim2.new(0.5, -200, 1, 0),
		Enum.EasingDirection.Out,
		Enum.EasingStyle.Sine,
		.5,
		true
	)
end

function ToggleSheets()
	SheetsVisible = not SheetsVisible
	if SheetsVisible then
		ShowSheets()
	else
		HideSheets()
	end
end

function IsBlack(note)
	if note%12 == 2 or note%12 == 4 or note%12 == 7 or note%12 == 9 or note%12 == 11 then
		return true
	end
end

function HighlightPianoKey(note)
	if note < 62 and note > 0 then
		local keyGui = PianoGui.Keys[note]
		if IsBlack(note) then
			keyGui.BackgroundColor3 = Color3.new(50/255, 50/255, 50/255)
		else
			keyGui.BackgroundColor3 = Color3.new(200/255, 200/255, 200/255)
		end
		delay(.5, function() RestorePianoKey(note) end)
	else
		delay(.5, function() RestorePianoKey(note) end)
	end
end
function RestorePianoKey(note)
	if note < 62 and note > 0 then
		local keyGui = PianoGui.Keys[note]
		if IsBlack(note) then
			keyGui.BackgroundColor3 = Color3.new(0, 0, 0)
		else
			keyGui.BackgroundColor3 = Color3.new(1, 1, 1)
		end
	end
end

function PianoKeyPressed(Object, note)
		local type = Object.UserInputType.Name
		if type == "MouseButton1" or type == "Touch" then
			PlayNoteClient(note)
		end
end

function ExitButtonPressed(Object)
	local type = Object.UserInputType.Name
	if type == "MouseButton1" or type == "Touch" then
		Deactivate()
	end
end

function SheetsButtonPressed(Object)
	local type = Object.UserInputType.Name
	if type == "MouseButton1" or type == "Touch" then
		ToggleSheets()
	end
end

function ToggleCaps()
	ShiftLock = not ShiftLock
	if ShiftLock then
		PianoGui.CapsButton.BackgroundColor3 = Color3.new(1, 170/255, 0)
		PianoGui.CapsButton.BorderColor3 = Color3.new(154/255, 103/255, 0)
		PianoGui.CapsButton.TextColor3 = Color3.new(1, 1, 1)
	else
		PianoGui.CapsButton.BackgroundColor3 = Color3.new(140/255, 140/255, 140/255)
		PianoGui.CapsButton.BorderColor3 = Color3.new(68/255, 68/255, 68/255)
		PianoGui.CapsButton.TextColor3 = Color3.new(180/255, 180/255, 180/255)
	end
end

function CapsButtonPressed(Object)
	local type = Object.UserInputType.Name
	if type == "MouseButton1" or type == "Touch" then
		ToggleCaps()
	end
end