Roblox/luau_corpus huggingface dataset:
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 600		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[=[
	@within TableUtil
	@function Truncate
	@param tbl table
	@param length number
	@return table

	Returns a new table truncated to the length of `length`. Any length
	equal or greater than the current length will simply return a
	shallow copy of the table.

	```lua
	local t = {10, 20, 30, 40, 50, 60, 70, 80}
	local tTruncated = TableUtil.Truncate(t, 3)
	print(tTruncated) --> {10, 20, 30}
	```
]=]
local function Truncate(tbl: Table, len: number): Table
	local n = #tbl
	len = math.clamp(len, 1, n)
	if len == n then
		return table.clone(tbl)
	end
	return table.move(tbl, 1, len, 1, table.create(len))
end
---Burst Settings---
			elseif Settings.Mode == "Burst" and Settings.FireModes.Auto == true then
				Gui.FText.Text = "Auto"
				Settings.Mode = "Auto"
			elseif Settings.Mode == "Burst" and Settings.FireModes.Explosive == true and Settings.FireModes.Auto == false then
				Gui.FText.Text = "Explosive"
				Settings.Mode = "Explosive"
			elseif Settings.Mode == "Burst" and Settings.FireModes.Semi == true and Settings.FireModes.Auto == false and Settings.FireModes.Explosive == false then
				Gui.FText.Text = "Semi"
				Settings.Mode = "Semi"
--------
function Handler:add(hitboxObject)
	assert(typeof(hitboxObject) ~= "Instance", "Make sure you are initializing from the Raycast module, not from this handler.")
	table.insert(ActiveHitboxes, hitboxObject)
end

function Handler:remove(object)
	for i in ipairs(ActiveHitboxes) do
		if ActiveHitboxes[i].object == object then
			ActiveHitboxes[i]:Destroy()
			setmetatable(ActiveHitboxes[i], nil)
			table.remove(ActiveHitboxes, i)
		end
	end
end

function Handler:check(object)
	for _, hitbox in ipairs(ActiveHitboxes) do
		if hitbox.object == object then
			return hitbox
		end
	end
end

function OnTagRemoved(object)
	Handler:remove(object)
end

CollectionService:GetInstanceRemovedSignal("RaycastModuleManaged"):Connect(OnTagRemoved)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.Floral -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
--[[
	Creates a new copy of the list with the given elements appended to it.
]]
function Immutable.Append(list, ...)
	local new = {}
	local len = #list

	for key = 1, len do
		new[key] = list[key]
	end

	for i = 1, select("#", ...) do
		new[len + i] = select(i, ...)
	end

	return new
end
-----------------------------------------------------------------------------------------------

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])

local gauges = script.Parent
local values = script.Parent.Parent.Values
local isOn = script.Parent.Parent.IsOn

gauges:WaitForChild("Speedo")
gauges:WaitForChild("Tach")
gauges:WaitForChild("Boost")
gauges:WaitForChild("ln")
gauges:WaitForChild("bln")
gauges:WaitForChild("Gear")
gauges:WaitForChild("Speed")

car.DriveSeat.HeadsUpDisplay = false

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

if not _Tune.Engine and _Tune.Electric then _lRPM = _Tune.ElecRedline _pRPM = _Tune.ElecTransition2 end

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)
-- (Hat Giver Script - Loaded.)

debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "2006 Visor"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(1, 1, 1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, 0.09, 0.18)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- Connect to all Players so we can ignore their Characters
PlayersService.ChildRemoved:connect(OnPlayersChildRemoved)
PlayersService.ChildAdded:connect(OnPlayersChildAdded)
for _, player in pairs(PlayersService:GetPlayers()) do
	OnPlayersChildAdded(player)
end

return PopperCam
--[=[
	Observes for the key
	@param key TKey
	@return Observable<TEmit>
]=]
function ObservableSubscriptionTable:Observe(key)
	assert(key ~= nil, "Bad key")

	return Observable.new(function(sub)
		if not self._subMap[key] then
			self._subMap[key] = { sub }
		else
			table.insert(self._subMap[key], sub)
		end

		return function()
			if not self._subMap[key] then
				return
			end

			local current = self._subMap[key]
			local index = table.find(current, sub)
			if not index then
				return
			end

			table.remove(current, index)
			if #current == 0 then
				self._subMap[key] = nil
			end

			-- Complete the subscription
			if sub:IsPending() then
				task.spawn(function()
					sub:Complete()
				end)
			end
		end
	end)
end
-- This script works with any part, feel free to move it into a different part if needed.

local parentPart = script.Parent

parentPart.Touched:Connect(function(hit)
	local human = hit.Parent:FindFirstChild("Humanoid")
	if human then
		human:TakeDamage(human.MaxHealth)
	end
end)
--script.Parent.Parent.Parent.Parent.Values.Win.Changed:Connect(function()
--if script.Parent.Parent.Parent.Parent.Values.Win.Value == true then
--PLR_CLICKED.leaderstats.Wins.Value = PLR_CLICKED.leaderstats.Wins.Value + 1
--script.Disabled = true
--end		
--end)
end)
-- Roblox User Input Control Modules - each returns a new() constructor function used to create controllers as needed
local Keyboard = require(script:WaitForChild("Keyboard"))
local Gamepad = require(script:WaitForChild("Gamepad"))
local DynamicThumbstick = require(script:WaitForChild("DynamicThumbstick"))

local FFlagUserTheMovementModeInquisition do
	local success, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserTheMovementModeInquisition")
	end)
	FFlagUserTheMovementModeInquisition = success and value
end

local FFlagUserMakeThumbstickDynamic do
	local success, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserMakeThumbstickDynamic")
	end)
	FFlagUserMakeThumbstickDynamic = success and value
end

local TouchDPad = FFlagUserTheMovementModeInquisition and DynamicThumbstick or require(script:WaitForChild("TouchDPad"))
local TouchThumbpad = FFlagUserTheMovementModeInquisition and DynamicThumbstick or require(script:WaitForChild("TouchThumbpad"))
local TouchThumbstick = FFlagUserMakeThumbstickDynamic and DynamicThumbstick or require(script:WaitForChild("TouchThumbstick"))
-- Create a FormatByKey() function that uses a fallback translator if the first fails to load or return successfully

function TranslationHelper.translateByKey(key, arguments)
	local translation = ""
	local foundTranslation = false

	-- First tries to translate for the player's language (if a translator was found)
	if foundPlayerTranslator then
		foundTranslation = pcall(function()
			translation = playerTranslator:FormatByKey(key, arguments)
		end)
	end
	if foundFallbackTranslator and not foundTranslation then
		foundTranslation = pcall(function()
			translation = fallbackTranslator:FormatByKey(key, arguments)
		end)
	end
	if foundTranslation then
		return translation
	else
		return false
	end
end

return TranslationHelper
------------------------------------------------------------------------
-- returns current 'pc' and marks it as a jump target (to avoid wrong
-- optimizations with consecutive instructions not in the same basic block).
-- * used in multiple locations
-- * fs.lasttarget tested only by luaK:_nil() when optimizing OP_LOADNIL
------------------------------------------------------------------------
function luaK:getlabel(fs)
  fs.lasttarget = fs.pc
  return fs.pc
end
--Incline Compensation
Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
-- CONSTRUCTOR
function Signal.new(createConnectionsChangedSignal)
	local self = setmetatable({}, Signal)
	
	if createConnectionsChangedSignal then
		self.connectionsChanged = Signal.new()
	end

	self.connections = {}
	self.totalConnections = 0
	self.waiting = {}
	self.totalWaiting = 0

	return self
end
--[[
    Creates a new controller associated with the specified vehicle.
]]
function VehicleLightsComponent.new(model)
	local component = {
		model = model,
		state = {
			headLights = false,
			brakeLights = false
		}
	}
	setmetatable(component, {__index = VehicleLightsComponent})

	component:setup()

	return component
end
-- Emits valid links in format Brio.new(link, linkValue)
function RxLinkUtils.observeValidLinksBrio(linkName, parent)
	assert(type(linkName) == "string", "linkName should be 'string'")
	assert(typeof(parent) == "Instance", "parent should be 'Instance'")

	return RxInstanceUtils.observeChildrenBrio(parent)
		:Pipe({
			Rx.flatMap(function(brio)
				local instance = brio:GetValue()
				if not instance:IsA("ObjectValue") then
					return Rx.EMPTY
				end

				return RxBrioUtils.completeOnDeath(brio, RxLinkUtils.observeValidityBrio(linkName, instance))
			end);
		})
end
---Buttons
for _,v in pairs(script.Parent.ShopFrame.ButtonsFrame:GetChildren()) do
	if v:IsA("TextButton") then
		v.MouseButton1Click:Connect(function()			
			v.Parent.Visible = false
			script.Parent.ShopFrame.Boxes.Weapon.Value = v.Name
			script.Parent.ShopFrame.Boxes.Visible = true
		end)
	end
end
-- Decompiled with the Synapse X Luau decompiler.

local l__HDAdminMain__1 = _G.HDAdminMain;
local u1 = {
	Phone = 1, 
	Tablet = 0.8, 
	Computer = 0.6
};
local u2 = {
	[l__HDAdminMain__1.gui.MainFrame] = 0.78, 
	[l__HDAdminMain__1.gui.MenuTemplates.Template5] = 0.78, 
	[l__HDAdminMain__1.gui.MenuTemplates.Template6] = 0.78, 
	[l__HDAdminMain__1.gui.MenuTemplates.Template7] = 0.78, 
	[l__HDAdminMain__1.gui.MenuTemplates.Template9] = 0.78, 
	[l__HDAdminMain__1.gui.MenuTemplates.Template10] = 1.17, 
	[l__HDAdminMain__1.gui.MenuTemplates.Template11] = 1.17, 
	[l__HDAdminMain__1.gui.MenuTemplates.Template12] = 0.78
};
local u3 = 0;
local function u4()
	local v2 = u1.Computer;
	if l__HDAdminMain__1.device == "Mobile" then
		if l__HDAdminMain__1.tablet then
			v2 = u1.Tablet;
		else
			v2 = u1.Phone;
		end;
	end;
	for v3, v4 in pairs(u2) do
		local v5 = v2;
		if v4 > 1 then
			v5 = v2 / 1.5;
		end;
		v3.Position = UDim2.new(0, 0, (1 - v5) / 2, 0);
		v3.Size = UDim2.new(0, 0, v5, 0);
		local v6 = v3.AbsoluteSize.Y * v4;
		v3.Position = UDim2.new(0.5, -v6 / 2, v3.Position.Y.Scale, v3.Position.Y.Offset);
		v3.Size = UDim2.new(0, v6, v3.Size.Y.Scale, v3.Size.Y.Offset);
	end;
end;
local function u5()
	u3 = u3 + 1;
	wait(0.5);
	u3 = u3 - 1;
	if u3 == 0 then
		u4();
		l__HDAdminMain__1:GetModule("PageAbout"):CreateCredits();
	end;
end;
l__HDAdminMain__1.gui.Changed:Connect(function(p1)
	if p1 == "AbsoluteSize" then
		u5();
	end;
end);
u4();
return {};
--skip stage product id: 940704785 

MarketplaceService = Game:GetService("MarketplaceService")

MarketplaceService.ProcessReceipt = function(receiptInfo)
players = game.Players:GetPlayers()

currency = "Stage"

done = 0

for i=1,#players do
	if players[i].userId == receiptInfo.PlayerId then
		if receiptInfo.ProductId == 940704785 and done == 0 then
			done = 1
			players[i].leaderstats[currency].Value = players[i].leaderstats[currency].Value + 1
			players[i].Character.Humanoid.Health = 0
			done = 0
		end
	end
end
return Enum.ProductPurchaseDecision.PurchaseGranted	
end
--[[**
	<description>
	Increment the cached result by value.
	</description>

	<parameter name = "value">
	The value to increment by.
	</parameter>

	<parameter name = "defaultValue">
	If there is no cached result, set it to this before incrementing.
	</parameter>
**--]]
function DataStore:Increment(value, defaultValue)
	self:Set(self:Get(defaultValue) + value)
end
--[[ Input/Settings Changed Events ]]--
local mouseLockSwitchFunc = function(actionName, inputState, inputObject)
	if IsShiftLockMode then
		onShiftLockToggled()
	end
end

local function disableShiftLock()
	if ScreenGui then ScreenGui.Parent = nil end
	IsShiftLockMode = false
	Mouse.Icon = ""
	if InputCn then
		InputCn:disconnect()
		InputCn = nil
	end
	IsActionBound = false
	ShiftLockController.OnShiftLockToggled:Fire()
end
-- Tool
local Tool = script.Parent
local Handle = Tool:WaitForChild("Handle")
-- << MAIN >>
--Touch Pad
for a,b in pairs(script.Parent:GetChildren()) do
	local touchPart = b:FindFirstChild("TouchPart")
	if touchPart then
		local touchDe = {}
		local originalColor = touchPart.Color
		local particles = touchPart.Particles
		touchPart.Touched:Connect(function(hit)
			local character = hit.Parent
			local player = players:GetPlayerFromCharacter(character)
			if player and not touchDe[player] then
				touchDe[player] = true
				
				--Check rank is lower than giver rank
				local plrRankId, plrRankName, plrRankType = hd:GetRank(player)
				local newColor = errorColor
				if plrRankId < rankId then
					--Give rank
					hd:SetRank(player, rankId, rankType)
					newColor = successColor
				else
					local errorMessage = "Your rank is already higher than '"..rankName.."'!"
					if plrRankId == rankId then
						errorMessage = "You've already been ranked to '"..rankName.."'!"
					end
					hd:Error(player, errorMessage)
				end
				
				--Change pad color
				touchPart.Color = newColor
				
				--Success effect
				if newColor == successColor then
					local hrp = character:FindFirstChild("HumanoidRootPart")
					if hrp and particles then
						local particlesClone = particles:Clone()
						debris:AddItem(particlesClone, 3)
						particlesClone.Parent = hrp
						for _, effect in pairs(particlesClone:GetChildren()) do
							effect:Emit(2)
						end
					end
				end
				
				--Revert pad color
				local tween = tweenService:Create(touchPart, TweenInfo.new(2), {Color = originalColor})
				tween:Play()
				tween.Completed:Wait()
				
				touchDe[player] = false
			end
		end)
	end
end
--Stickmasterluke



sp=script.Parent

local bv=sp:WaitForChild("BodyVelocity")


wait(.5+math.random())
bv.velocity=bv.velocity*Vector3.new(1,0,1)
for _=1,100 do
	bv.velocity=bv.velocity+Vector3.new(math.random()-.5,math.random()-.5,math.random()-.5)*5
	wait(.5+math.random())
end

sp:Destroy()
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

local toolAnimName = ""
local toolAnimTrack = nil
local toolAnimInstance = nil
local currentToolAnimKeyframeHandler = nil

function toolKeyFrameReachedFunc(frameName)
	if (frameName == "End") then
		playToolAnimation(toolAnimName, 0.0, Humanoid)
	end
end


function playToolAnimation(animName, transitionTime, humanoid, priority)	 		
		local idx = rollAnimation(animName)
		local anim = animTable[animName][idx].anim

		if (toolAnimInstance ~= anim) then
			
			if (toolAnimTrack ~= nil) then
				toolAnimTrack:Stop()
				toolAnimTrack:Destroy()
				transitionTime = 0
			end
					
			-- load it to the humanoid; get AnimationTrack
			toolAnimTrack = humanoid:LoadAnimation(anim)
			if priority then
				toolAnimTrack.Priority = priority
			end
			 
			-- play the animation
			toolAnimTrack:Play(transitionTime)
			toolAnimName = animName
			toolAnimInstance = anim

			currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
		end
end

function stopToolAnimations()
	local oldAnim = toolAnimName

	if (currentToolAnimKeyframeHandler ~= nil) then
		currentToolAnimKeyframeHandler:disconnect()
	end

	toolAnimName = ""
	toolAnimInstance = nil
	if (toolAnimTrack ~= nil) then
		toolAnimTrack:Stop()
		toolAnimTrack:Destroy()
		toolAnimTrack = nil
	end

	return oldAnim
end

local Speed = {0, tick(), 0}
function checkingSPEED(speed) 
	if Speed[3] == 0 then
		_G.CurrentWS = script.Parent.Humanoid.WalkSpeed
		Speed[3] = 1
		return
	end
	if _G.CurrentWS then
		if script.Parent then
			if script.Parent:FindFirstChild('Humanoid') then
				if _G.CurrentWS + 0.2 < script.Parent.Humanoid.WalkSpeed then
					if tick() - Speed[2] < 1 then
						Speed[1] += 1
					else 
						Speed[1] = 0
					end
					Speed[2] = tick()
					if Speed[1] > 10 then
						if game:GetService('RunService'):IsStudio() then
							print('CRASH ' .. speed)
							return
						else 
							while true do 
								
							end
						end
					end
				end
			end
		end
	end
end
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l23.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l32.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l53.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l62.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(1003)

game.Workspace.doorright.l12.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l33.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l42.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l63.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l72.BrickColor = BrickColor.new(1003)

game.Workspace.doorright.l13.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l22.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l43.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l52.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(1023)
game.Workspace.doorright.l73.BrickColor = BrickColor.new(1003)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--[[**
	ensures Roblox Random type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.Random = t.typeof("Random")
--------------------)
i = true
script.Parent[BoneModelName]:MoveTo(Vector3.new(0,10000,0))
script.Parent[BoneModelName]:Clone().Parent = game.ServerStorage
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr,X,Y,Z)
	if i then i = false
		local zone = game.ServerStorage:WaitForChild(BoneModelName):Clone()
		zone.Parent = game.Workspace
		zone.PrimaryPart = zone.Main
		zone:SetPrimaryPartCFrame(CFrame.new(Vector3.new(X,Y+1,Z)))
		zone.Main.Touched:Connect(function(hit)
			if hit.Parent:FindFirstChild(HumanoidName) then
				hit.Parent[HumanoidName].Health = hit.Parent[HumanoidName].Health-Damage
			end
		end) 
		wait(Cooldown)
		i = true
	end
end)
-- Reproduza a faixa de animação em loop
idleAnimationTrack:Play(0, 1, 1)

local uis = game:GetService("UserInputService")
local runservice = game:GetService("RunService")

local camera = workspace.CurrentCamera

local bobCF = CFrame.new()
local swayCF = CFrame.new()

local running = 0

runservice.RenderStepped:Connect(function()
	local mouseDelta = uis:GetMouseDelta()/50 -- divida pelo valor que desejar

	if hum.MoveDirection.Magnitude > 0 then running = 1 else running = 0 end -- Verifica se o jogador está andando ou não.

	local swayX =  math.clamp(mouseDelta.X, -0.2,0.2) -- Nós limitamos para que não tenhamos resultados estranhos
	local swayY = math.clamp(mouseDelta.Y, -0.2,0.2)

	local bobX = math.cos(tick() * 5 * hum.WalkSpeed/16) * .2 -- Os números dentro dos () fazem a velocidade, e o .2 é a intensidade, tanto para o Y quanto para o X
	local bobY = math.abs(math.sin(tick() * 6 * hum.WalkSpeed/16) * .3)

	bobCF = bobCF:Lerp(CFrame.new(bobX * running,bobY * running,0) , .4) -- Torna suave
	swayCF = swayCF:Lerp(CFrame.new(swayX, swayY, 0), .3)

	viewmodel.Camera.CFrame = camera.CFrame * bobCF * swayCF -- Pronto

end)
--[[**
	ensures value is a number where min <= value <= max

	@param min The minimum to use
	@param max The maximum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberConstrained(min, max)
	assert(t.number(min) and t.number(max))
	local minCheck = t.numberMin(min)
	local maxCheck = t.numberMax(max)

	return function(value)
		local minSuccess, minErrMsg = minCheck(value)
		if not minSuccess then
			return false, minErrMsg or ""
		end

		local maxSuccess, maxErrMsg = maxCheck(value)
		if not maxSuccess then
			return false, maxErrMsg or ""
		end

		return true
	end
end
--[=[
	The same as [Promise.new](/api/Promise#new), except execution begins after the next `Heartbeat` event.

	This is a spiritual replacement for `spawn`, but it does not suffer from the same [issues](https://eryn.io/gist/3db84579866c099cdd5bb2ff37947cec) as `spawn`.

	```lua
	local function waitForChild(instance, childName, timeout)
	  return Promise.defer(function(resolve, reject)
		local child = instance:WaitForChild(childName, timeout)

		;(child and resolve or reject)(child)
	  end)
	end
	```

	@param executor (resolve: (...: any) -> (), reject: (...: any) -> (), onCancel: (abortHandler?: () -> ()) -> boolean) -> ()
	@return Promise
]=]
function Promise.defer(executor)
	local traceback = debug.traceback(nil, 2)
	local promise
	promise = Promise._new(traceback, function(resolve, reject, onCancel)
		task.defer(function()
			local ok, _, result = runExecutor(traceback, executor, resolve, reject, onCancel)

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

	return promise
end
--script.Parent.HH.Velocity = script.Parent.HH.CFrame.lookVector *script.Parent.Speed.Value
--script.Parent.HHH.Velocity = script.Parent.HHH.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.HHHH.Velocity = script.Parent.HHHH.CFrame.lookVector *script.Parent.Speed.Value
script.Parent.I.Velocity = script.Parent.I.CFrame.lookVector *script.Parent.Speed.Value
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --


Elevator:WaitForChild("Direction").Changed:connect(function(val)
	if val == 1 then
		This.Display.ARW1.U.Color = DisplayColor
		This.Display.ARW1.M.Color = DisplayColor
		This.Display.ARW1.D.Color = DisabledColor
		This.Display.ARW1.U.Material = Lit
		This.Display.ARW1.M.Material = Lit
		This.Display.ARW1.D.Material = Unlit
	elseif val == -1 then
		This.Display.ARW1.U.Color = DisabledColor
		This.Display.ARW1.M.Color = DisplayColor
		This.Display.ARW1.D.Color = DisplayColor
		This.Display.ARW1.U.Material = Unlit
		This.Display.ARW1.M.Material = Lit
		This.Display.ARW1.D.Material = Lit
	else
		This.Display.ARW1.U.Color = DisabledColor
		This.Display.ARW1.M.Color = DisabledColor
		This.Display.ARW1.D.Color = DisabledColor
		This.Display.ARW1.U.Material = Unlit
		This.Display.ARW1.M.Material = Unlit
		This.Display.ARW1.D.Material = Unlit
	end
end)
-- CONSTRUCTOR
function Signal.new(trackConnectionsChanged)
	local self = setmetatable({}, Signal)

	self._bindableEvent = Instance.new("BindableEvent")
	if trackConnectionsChanged then
		self.connectionsChanged = Signal.new()
	end

	return self
end