Roblox/luau_corpus huggingface dataset:
------------------------------------------------------------------------
--
-- * used only in (lparser) luaY:subexpr()
------------------------------------------------------------------------
function luaK:prefix(fs, op, e)
  local e2 = {}  -- expdesc
  e2.t, e2.f = self.NO_JUMP, self.NO_JUMP
  e2.k = "VKNUM"
  e2.nval = 0
  if op == "OPR_MINUS" then
    if not self:isnumeral(e) then
      self:exp2anyreg(fs, e)  -- cannot operate on non-numeric constants
    end
    self:codearith(fs, "OP_UNM", e, e2)
  elseif op == "OPR_NOT" then
    self:codenot(fs, e)
  elseif op == "OPR_LEN" then
    self:exp2anyreg(fs, e)  -- cannot operate on constants
    self:codearith(fs, "OP_LEN", e, e2)
  else
    assert(0)
  end
end
-- TODO: When Promise is on Wally, remove this in favor of just `script.Parent.Parent:FindFirstChild("Promise")`.
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local ServerStorage = game:GetService("ServerStorage")

local LOCATIONS_TO_SEARCH = {script.Parent.Parent, ReplicatedFirst, ReplicatedStorage, ServerScriptService, ServerStorage}

local function FindFirstDescendantWithNameAndClassName(Parent: Instance, Name: string, ClassName: string)
	for _, Descendant in ipairs(Parent:GetDescendants()) do
		if Descendant:IsA(ClassName) and Descendant.Name == Name then
			return Descendant
		end
	end

	return nil
end

local function GetPromiseLibrary()
	-- I'm not too keen on how this is done.
	-- It's better than the multiple if statements (probably).
	local Plugin = script:FindFirstAncestorOfClass("Plugin")
	if Plugin then
		local Promise = FindFirstDescendantWithNameAndClassName(Plugin, "Promise", "ModuleScript")
		if Promise then
			return true, require(Promise)
		else
			return false
		end
	end

	local Promise
	for _, Location in ipairs(LOCATIONS_TO_SEARCH) do
		Promise = FindFirstDescendantWithNameAndClassName(Location, "Promise", "ModuleScript")
		if Promise then
			break
		end
	end

	if Promise then
		return true, require(Promise)
	else
		return false
	end
end

return GetPromiseLibrary
--////////////////////////////// Methods
--//////////////////////////////////////
local methods = {}
methods.__index = methods

function getClassicChatEnabled()
	if ChatSettings.ClassicChatEnabled ~= nil then
		return ChatSettings.ClassicChatEnabled
	end
	return Players.ClassicChat
end

function getBubbleChatEnabled()
	if ChatSettings.BubbleChatEnabled ~= nil then
		return ChatSettings.BubbleChatEnabled
	end
	return Players.BubbleChat
end

function bubbleChatOnly()
 	return not getClassicChatEnabled() and getBubbleChatEnabled()
end
--FlasherCircuit-- (DO NOT CHANGE!)
Flash = script.Parent.Parent.Parent.ControlBox.FlasherCircuit
-- Public Virtual
-- This function ticks every frame when the state is not active
function BaseState:OffTick(currenTime,dt,stateTime)
	
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.BuyOutfitFromDialogueFolder(player,dialogueFolder)
	
end
-- Define the function to open or close the window with gene-alike effect
local function toggleWindow()
	if window.Visible then
		
		window.Visible = false
		opened.Visible = false
		-- Close the window by tweening back to the button position and size
		window:TweenSizeAndPosition(
			UDim2.new(0, 0, 0, 0),
			UDim2.new(0, aFinderButton.AbsolutePosition.X, 0, aFinderButton.AbsolutePosition.Y),
			'Out',
			'Quad',
			0.5,
			false,
			function()
				window.Visible = false
				msgbar.Fucus.Disabled = true
			end
		)
	end
end
--Repilee 4/21/19
--This script will make any player who is not sitting in the car and doors/windows not opened will muffle.

local body = script.CarSeat.Value

body.MP.OutsideSound.Volume = body.Parent.DriveSeat.Values.MusicVolume.Value
wait(.1)
body.MP.Sound.Volume = 0
wait(.1)
script:Destroy()
-- ROBLOX TODO: declared as an opaque type in flowtype: https://github.com/facebook/flow/blob/422821fd42c09c3ef609c60516fe754b601ea205/lib/react.js#L182
export type React_Portal = any
export type React_Key = string | number

return {}
--------RIGHT DOOR 1--------
game.Workspace.doorright.l71.BrickColor = BrickColor.new(135)

game.Workspace.doorright.l11.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l12.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l13.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(102)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(102)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(102)
--// F key, HornOn
mouse.KeyDown:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0 
	end
end)
--[[
	Creates a new promise that receives the result of this promise.

	The given callbacks are invoked depending on that result.
]]
function Promise.prototype:_andThen(traceback, successHandler, failureHandler)
	self._unhandledRejection = false

	-- Create a new promise to follow this part of the chain
	return Promise._new(traceback, function(resolve, reject)
		-- Our default callbacks just pass values onto the next promise.
		-- This lets success and failure cascade correctly!

		local successCallback = resolve
		if successHandler then
			successCallback = createAdvancer(
				traceback,
				successHandler,
				resolve,
				reject
			)
		end

		local failureCallback = reject
		if failureHandler then
			failureCallback = createAdvancer(
				traceback,
				failureHandler,
				resolve,
				reject
			)
		end

		if self._status == Promise.Status.Started then
			-- If we haven't resolved yet, put ourselves into the queue
			table.insert(self._queuedResolve, successCallback)
			table.insert(self._queuedReject, failureCallback)
		elseif self._status == Promise.Status.Resolved then
			-- This promise has already resolved! Trigger success immediately.
			successCallback(unpack(self._values, 1, self._valuesLength))
		elseif self._status == Promise.Status.Rejected then
			-- This promise died a terrible death! Trigger failure immediately.
			failureCallback(unpack(self._values, 1, self._valuesLength))
		elseif self._status == Promise.Status.Cancelled then
			-- We don't want to call the success handler or the failure handler,
			-- we just reject this promise outright.
			reject(Error.new({
				error = "Promise is cancelled",
				kind = Error.Kind.AlreadyCancelled,
				context = "Promise created at\n\n" .. traceback,
			}))
		end
	end, self)
end
-- Tweens volume for more dynamic shut off
local function TweenVolume(FromVolume,ToVolume,Duration,ShouldStopAfterTween)
	local CurrentSession = math.random(0,9999999)
	IsTweeningVolumeSession = CurrentSession
	for i=0,1,1/(Duration/0.03) do
		
		if IsTweeningVolumeSession ~= CurrentSession then
			return CurrentSession
		end
		
		local NewVol = FromVolume * (1-i) + ToVolume * i
		
		WaterLoop.Volume = NewVol
		
		wait()
	end
	
	WaterLoop.Volume = ToVolume
	
	if ShouldStopAfterTween then
		WaterLoop:Stop()
	end
end
--[[
	Promise.new, except pcall on a new thread is automatic.
]]
function Promise.defer(callback)
	local traceback = debug.traceback(nil, 2)
	local promise
	promise = Promise._new(traceback, function(resolve, reject, onCancel)
		local connection
		connection = Promise._timeEvent:Connect(function()
			connection:Disconnect()
			local ok, _, result = runExecutor(traceback, callback, resolve, reject, onCancel)

			if not ok then
				reject(result[1])
			end
		end)
	end)

	return promise
end
--health.Changed:connect(function()
--root.Velocity = Vector3.new(0,5000,0)
--end)

local anims = {}
local lastAttack= tick()

local target,targetType

local lastLock = tick()

local fleshDamage = 100
local structureDamage = 250

local path = nil


for _,animObject in next,animations do
anims[animObject.Name] = hum:LoadAnimation(animObject)
end

function Attack(thing,dmg)
if tick()-lastAttack > 2 then
hum:MoveTo(root.Position)
lastAttack = tick()
anims.AntWalk:Stop()
anims.AntMelee:Play()

if thing.ClassName == "Player" then
root.FleshHit:Play()
ant:SetPrimaryPartCFrame(CFrame.new(root.Position,Vector3.new(target.Character.PrimaryPart.Position.X,root.Position.Y,target.Character.PrimaryPart.Position.Z)))

elseif thing.ClassName == "Model" then
root.StructureHit:Play()
end

rep.Events.NPCAttack:Fire(thing,dmg) 
end
end


function Move(point)
hum:MoveTo(point)
if not anims.AntWalk.IsPlaying then
anims.AntWalk:Play()
end
end

function ScanForPoint()
local newPoint
local rayDir = Vector3.new(math.random(-100,100)/100,0,math.random(-100,100)/100)
local ray = Ray.new(root.Position,rayDir*math.random(10,50),ant)
local part,pos = workspace:FindPartOnRay(ray)
Move(pos)
enRoute = true
end
--[[**
	Encodes a string in Base64.
	@param [t:string] Input The input string to encode.
	@returns [t:string] The string encoded in Base64.
**--]]
function Base64.Encode(Input)
	local Output = {}
	local Length = 0

	for Index = 1, #Input, 3 do
		local C1, C2, C3 = string.byte(Input, Index, Index + 2)

		local A = bit32_rshift(C1, 2)
		local B = bit32_lshift(bit32_band(C1, 3), 4) + bit32_rshift(C2 or 0, 4)
		local C = bit32_lshift(bit32_band(C2 or 0, 15), 2) + bit32_rshift(C3 or 0, 6)
		local D = bit32_band(C3 or 0, 63)

		Length = Length + 1
		Output[Length] = Alphabet[A + 1]

		Length = Length + 1
		Output[Length] = Alphabet[B + 1]

		Length = Length + 1
		Output[Length] = C2 and Alphabet[C + 1] or 61

		Length = Length + 1
		Output[Length] = C3 and Alphabet[D + 1] or 61
	end

	local NewOutput = {}
	local NewLength = 0
	local IndexAdd4096Sub1

	for Index = 1, Length, 4096 do
		NewLength = NewLength + 1
		IndexAdd4096Sub1 = Index + 4096 - 1

		NewOutput[NewLength] = string.char(table.unpack(
			Output,
			Index,
			IndexAdd4096Sub1 > Length and Length or IndexAdd4096Sub1
		))
	end

	return table.concat(NewOutput)
end
----- Water particle handler -----

function waterOutput()
	if script.Parent.ColdOn.Value == false and script.Parent.HotOn.Value == false then
		showerHead.Enabled = false
		showerSound:Stop()
	else
		showerHead.Enabled = true
		showerSound:Play()	
	end
end

script.Parent.ColdOn.Changed:connect(function()
	waterOutput()
end)

script.Parent.HotOn.Changed:connect(function()
	waterOutput()
end)
-- attempt at welding
script.Parent.Equipped:connect(function()
	local weld1 = Instance.new("WeldConstraint")
	weld1.Parent = script.Parent.Parent:FindFirstChild("RightLowerArm")
	weld1.Part0 = script.Parent.Right.BandR
	script.Parent.Right.BandR.CFrame = script.Parent.Parent:FindFirstChild("RightLowerArm").CFrame * CFrame.Angles(math.rad(-90),math.rad(0) ,0)
	weld1.Part1 = script.Parent.Parent:FindFirstChild("RightLowerArm")

	wait(.15)
	script:Destroy()
end)
--["Walk"] = "rbxassetid://507777826",
	["Walk"] = "http://www.roblox.com/asset/?id=180435792",
	["Idle"] = "http://www.roblox.com/asset/?id=180435792",
	["SwingTool"] = "http://www.roblox.com/asset/?id=180435792"
}
local anims = {}
for animName,animId in next,preAnims do
local anim = Instance.new("Animation")
anim.AnimationId = animId
game:GetService("ContentProvider"):PreloadAsync({anim})
anims[animName] = animController:LoadAnimation(anim)
end



		if not anims["Walk"].IsPlaying then
		anims["Walk"]:Play()
		end
-- Modules
local ReplicatedModuleScripts = ReplicatedStorage:FindFirstChild("ModuleScripts")
local RaceManager = require(ReplicatedModuleScripts:FindFirstChild("RaceManager"))

local displayValues = ReplicatedStorage:WaitForChild("DisplayValues")
local timer = displayValues:WaitForChild("TimeLeft")
local textLabel = script.Parent
--//Animaton//--
local Action = Humanoid:LoadAnimation(Animation)

Action:Play()
--
--
Monster:Initialize()
Monster:InitializeUnique()

while true do
	if not Monster:IsAlive() then
		if Data.IsDead == false then
			Data.IsDead = true
			Data.TimeOfDeath = tick()
			Self.Died:Fire()
		end
		if Data.IsDead == true then
			task.wait(0.5)
			for i, v in pairs(Self:GetDescendants()) do
				if v:IsA("BasePart") then
					v.Anchored = true
					TweenService:Create(v,TweenInfo.new(0.5),{Transparency = 1}):Play()
				end
			end
			Self:Destroy()
			script.Enabled = false
		end
	end
	
	if Monster:IsAlive() then
		Monster:Update()
	end
	
	wait()
end
-- EVENTS
SLING.Parent.ChildAdded:connect(function(newChild)
	print("Child Added")
	if newChild.Name:lower() == WEP_NAME:lower() then
		for i, v in pairs(SLING:GetChildren()) do
			if v.Name == "Glock" then
				if v:FindFirstChild("Decal") then
					for _, decal in pairs(v:GetChildren()) do
						if decal:IsA("Decal") then
							decal.Transparency = 1
						end
					end
				end
				v.Transparency = 1
			end
		end
	end
end)
SLING.Parent.ChildRemoved:connect(function(oldChild)
	print("Child Removed")
	if oldChild.Name:lower() == WEP_NAME:lower() then
		for i, v in pairs(SLING:GetChildren()) do
			if v.Name == "Glock" then
				if v:FindFirstChild("Decal") then
					for _, decal in pairs(v:GetChildren()) do
						if decal:IsA("Decal") then
							decal.Transparency = 0
						end
					end
				end
				v.Transparency = 0
			end
		end
	end
end)
-- t: a runtime typechecker for Roblox

local t = {}

function t.type(typeName)
	return function(value)
		local valueType = type(value)
		if valueType == typeName then
			return true
		else
			return false, string.format("%s expected, got %s", typeName, valueType)
		end
	end
end

function t.typeof(typeName)
	return function(value)
		local valueType = typeof(value)
		if valueType == typeName then
			return true
		else
			return false, string.format("%s expected, got %s", typeName, valueType)
		end
	end
end
--This sound plays when it falls onto the ground, gets hit, or when someone touches it.
--SOOO easy.
function onTouched(hit)
	script.Parent.RAH:play()
end
script.Parent.Touched:connect(onTouched)
-- Hologram announcements
-- JuzzbyXfalcon
-- 23 Nov. 2013

Interval = 5
Content = script.Parent.Base.Content
Footer = script.Parent.Base.Footer
Title = script.Parent.Base.Title

CurIndex = 0
MaxIndex = 1


function Update()
	local function AnimateOut()
		Title:TweenPosition(UDim2.new(0, 0, 0, -50), "Out", "Quart", 0.5, false)
		Footer:TweenPosition(UDim2.new(0,0,1,0), "Out", "Quart", 0.5, false)
		wait(0.3)
		Content:TweenPosition(UDim2.new(1, 0, 0, 60), "Out", "Quart", 0.5, false)
	end

	local function AnimateIn()
		Title:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quart", 0.5, false)
		Footer:TweenPosition(UDim2.new(0,0,1,-25), "Out", "Quart", 0.5, false)
		Content.Position = UDim2.new(-1, 0, 0, 60)
		wait(0.3)
		Content:TweenPosition(UDim2.new(0, 0, 0, 60), "Out", "Quart", 0.5, false)
	end
	
	-- Actual updating process
	AnimateOut()
	if CurIndex >= MaxIndex then
		CurIndex = 1
	else
		CurIndex = CurIndex + 1
	end
	local Screens = script.Parent.Screens:GetChildren()
	wait(0.5)
	Title.Text = "  "..Screens[CurIndex].Title.Value
	Content.Content.Text = Screens[CurIndex].Content.Value
	wait(0.25)
	AnimateIn()
end

function Index()
	MaxIndex = #script.Parent.Screens:GetChildren()
end

Index()
script.Parent.Screens.DescendantAdded:connect(Index)

while true do
	wait(Interval)
	Update()
end
-- Called when a new character model is created
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
	local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
	local floorChangedSignal = humanoid:GetPropertyChangedSignal("FloorMaterial")
	
	-- Create fire effect to show the player if they are taking damage
	local fire = createFire()
	fire.Parent = humanoidRootPart
	
	-- Connects function to when the floor under the character changes
	signalBindings[character] = floorChangedSignal:Connect(function()
		-- If the character is standing on lava, add them to the list of on fire
		-- characters and turn on the fire effect. Otherwise to the opposite
		if humanoid.FloorMaterial == Enum.Material.CrackedLava then
			charactersOnFire[character] = true
			fire.Enabled = true
		else
			charactersOnFire[character] = nil
			fire.Enabled = false
		end
	end)
end
-- Mobile Input
local function GetMobileInput(step)
	-- Declare & initialize new control inputs
	local yaw, pitch, boost = 0, 0, 0
	
	yaw = guiController.Yaw
	pitch = -guiController.Pitch
	boost = ((UpdateBoost(guiController.Boost, step) and 1) or 0)
	
	-- Throttle is off during countdown
	if countdownGui.TimerFrame.Visible then
		speeder.main.Anchored = true
		boost = -1
		yaw = 0
		pitch = 0
	else
		speeder.main.Anchored = false
	end
	
	-- Set engine input variables	
	engine.BoostInput = boost
	engine.YawInput = yaw
	engine.PitchInput = pitch
end -- GetMobileInput()
--[=[
	Creates a new promise from the given promise that will
	reject after the given `timeoutTime`

	@param timeoutTime number
	@param fromPromise Promise<T>
	@return Promise<T>
]=]
function PromiseUtils.timeout(timeoutTime, fromPromise)
	assert(type(timeoutTime) == "number", "Bad timeoutTime")
	assert(fromPromise, "Bad fromPromise")

	if not fromPromise:IsPending() then
		return fromPromise
	end

	local promise = Promise.new()

	promise:Resolve(fromPromise)

	task.delay(timeoutTime, function()
		promise:Reject()
	end)

	return promise
end

return PromiseUtils
-- SETUP ICON TEMPLATE
local topbarPlusGui = Instance.new("ScreenGui")
topbarPlusGui.Enabled = true
topbarPlusGui.DisplayOrder = 0
topbarPlusGui.IgnoreGuiInset = true
topbarPlusGui.ResetOnSpawn = false
topbarPlusGui.Name = "TopbarPlus"

local activeItems = Instance.new("Folder")
activeItems.Name = "ActiveItems"
activeItems.Parent = topbarPlusGui

local topbarContainer = Instance.new("Frame")
topbarContainer.BackgroundTransparency = 1
topbarContainer.Name = "TopbarContainer"
topbarContainer.Position = UDim2.new(0, 0, 0, 0)
topbarContainer.Size = UDim2.new(1, 0, 0, 36)
topbarContainer.Visible = true
topbarContainer.ZIndex = 1
topbarContainer.Parent = topbarPlusGui
topbarContainer.Active = false

local iconContainer = Instance.new("Frame")
iconContainer.BackgroundTransparency = 1
iconContainer.Name = "IconContainer"
iconContainer.Position = UDim2.new(0, 104, 0, 4)
iconContainer.Visible = false
iconContainer.ZIndex = 1
iconContainer.Parent = topbarContainer
iconContainer.Active = false

local iconButton = Instance.new("TextButton")
iconButton.Name = "IconButton"
iconButton.Visible = true
iconButton.Text = ""
iconButton.ZIndex = 10--2
iconButton.BorderSizePixel = 0
iconButton.AutoButtonColor = false
iconButton.Parent = iconContainer
iconButton.Active = true
iconButton.TextTransparency = 1
iconButton.RichText = true

local iconImage = Instance.new("ImageLabel")
iconImage.BackgroundTransparency = 1
iconImage.Name = "IconImage"
iconImage.AnchorPoint = Vector2.new(0, 0.5)
iconImage.Visible = true
iconImage.ZIndex = 11--3
iconImage.ScaleType = Enum.ScaleType.Fit
iconImage.Parent = iconButton
iconImage.Active = false

local iconLabel = Instance.new("TextLabel")
iconLabel.BackgroundTransparency = 1
iconLabel.Name = "IconLabel"
iconLabel.AnchorPoint = Vector2.new(0, 0.5)
iconLabel.Position = UDim2.new(0.5, 0, 0.5, 0)
iconLabel.Text = ""
iconLabel.RichText = true
iconLabel.TextScaled = false
iconLabel.ClipsDescendants = true
iconLabel.ZIndex = 11--3
iconLabel.Parent = iconButton
iconLabel.Active = false

local iconGradient = Instance.new("UIGradient")
iconGradient.Name = "IconGradient"
iconGradient.Enabled = true
iconGradient.Parent = iconButton

local iconCorner = Instance.new("UICorner")
iconCorner.Name = "IconCorner"
iconCorner.Parent = iconButton

local iconOverlay = Instance.new("Frame")
iconOverlay.Name = "IconOverlay"
iconOverlay.BackgroundTransparency = 1
iconOverlay.Position = iconButton.Position
iconOverlay.Size = UDim2.new(1, 0, 1, 0)
iconOverlay.Visible = true
iconOverlay.ZIndex = iconButton.ZIndex + 1
iconOverlay.BorderSizePixel = 0
iconOverlay.Parent = iconContainer
iconOverlay.Active = false

local iconOverlayCorner = iconCorner:Clone()
iconOverlayCorner.Name = "IconOverlayCorner"
iconOverlayCorner.Parent = iconOverlay
--[[Driving Aids]]--
	Tune.ABS 			= true  		-- Avoids brakes locking up, reducing risk of lowside
	Tune.ABSThreshold 	= 30 			-- Slip speed allowed before ABS starts working (in SPS)
	
	Tune.TCS 			= true  		-- Avoids wheelspin, reducing risk of highsides
	Tune.TCSThreshold 	= 30 			-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient 	= 20 			-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit 		= 10 			-- Minimum amount of torque at max reduction (in percent)
	
	Tune.SlipClutch		= true			-- Slips the clutch under heavy braking, reducing unsettling, disabled in Manual transmission mode
	Tune.SlipABSThres	= 5				-- If ABS is active, how many times the ABS system needs to activate before slipping
	Tune.SlipTimeThres	= 0.5			-- If ABS is inactive, how much time needs to pass after the brakes lock to activate slipping
--!strict
local findOr = require(script.Parent.findOr)
local slice = require(script.Parent.slice)

type Array<T> = { [number]: T }

type Pattern = string | Array<string>

local function split(str: string, pattern: Pattern?): Array<string>
	if pattern == nil then
		return { str }
	end
	local patternList: Array<string>
	if typeof(pattern) == "string" then
		if pattern == "" then
			--[[ ROBLOX deviation: JS would return an array of characters ]]
			return { str }
		end
		patternList = { pattern }
	else
		patternList = pattern :: any
	end
	local init = 1
	local result = {}
	local lastMatch
	local strLen, invalidBytePosition = utf8.len(str)
	assert(strLen ~= nil, ("string `%s` has an invalid byte at position %s"):format(str, tostring(invalidBytePosition)))

	repeat
		local match = findOr(str, patternList, init)
		if match ~= nil then
			table.insert(result, slice(str, init, match.index))
			local matchLength = utf8.len(match.match)
			-- Luau FIXME? Luau doesn't understand that str has already been shown to be valid utf8 on line 26 and therefore won't be nil
			init = match.index + matchLength :: number
		else
			table.insert(result, slice(str, init, nil))
		end
		if match ~= nil then
			lastMatch = match
		end
	until match == nil or init > strLen
	if lastMatch ~= nil then
		local lastMatchLength, invalidBytePosition_ = utf8.len(lastMatch.match)
		assert(
			lastMatchLength ~= nil,
			("string `%s` has an invalid byte at position %s"):format(lastMatch.match, tostring(invalidBytePosition_))
		)
		if lastMatch.index + lastMatchLength == strLen + 1 then
			table.insert(result, "")
		end
	end
	return result
end

return split
--EnteredCode
local Digit1 = Object.Parent.Parent.Digit1Panel.DigitNumber
local Digit2 = Object.Parent.Parent.Digit2Panel.DigitNumber
local Digit3 = Object.Parent.Parent.Digit3Panel.DigitNumber
local EnteredCode = Object.Parent.Parent.EnteredCode
--TheNexusAvenger
--Creates buffer and non-buffer rockets.

local RocketCreator = {}

local Resources = require(script.Parent)

local RocketScript = script:WaitForChild("RocketScript")
local PlayerDamagerScript = Resources:GetResource("PlayerDamager")
local ConfigurationScript = Resources:GetResource("Configuration")