Roblox/luau_corpus huggingface dataset:
--[=[
	Works line combineLatest, but allow the transformation of a brio into an observable
	that emits the value, and then nil, on death.

	The issue here is this:

	1. Resources are found with combineLatest()
	2. One resource dies
	3. All resources are invalidated
	4. We still wanted to be able to use most of the resources

	With this method we are able to do this, as we'll re-emit a table with all resoruces
	except the invalidated one.

	@since 3.6.0
	@param observables { [any]: Observable<Brio<T>> | Observable<T> | T }
	@return Observable<{ [any]: T? }>
]=]
function RxBrioUtils.flatCombineLatest(observables)
	assert(type(observables) == "table", "Bad observables")

	local newObservables = {}
	for key, observable in pairs(observables) do
		if Observable.isObservable(observable) then
			newObservables[key] = RxBrioUtils.flattenToValueAndNil(observable)
		else
			newObservables[key] = observable
		end
	end

	return Rx.combineLatest(newObservables)
end
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {};
local l__ReplicatedStorage__2 = game.ReplicatedStorage;
local v3 = require(game.ReplicatedStorage.Modules.Lightning);
local v4 = require(game.ReplicatedStorage.Modules.Xeno);
local v5 = require(game.ReplicatedStorage.Modules.CameraShaker);
local l__TweenService__6 = game.TweenService;
local l__Debris__7 = game.Debris;
function v1.RunStompFx(p1, p2, p3, p4)
	local v8 = game.ReplicatedStorage.KillFX.Sleepy.Sound:Clone();
	v8.Parent = p2;
	v8:Play();
	local v9 = game.ReplicatedStorage.KillFX.Sleepy.pillow:Clone();
	v9.Parent = workspace.Ignored.Animations;
	game.Debris:AddItem(v9, 4);
	coroutine.wrap(function()
		while true do
			v9.CFrame = p2.Parent.Head.CFrame * CFrame.new(0, 0, -0.5);
			task.wait();
			if v9.Parent == nil then
				break;
			end;		
		end;
	end)();
	return nil;
end;
return v1;
------------------------------------------------------------------------
-- codes loading of nil, optimization done if consecutive locations
-- * used in luaK:discharge2reg(), (lparser) luaY:adjust_assign()
------------------------------------------------------------------------
function luaK:_nil(fs, from, n)
  if fs.pc > fs.lasttarget then  -- no jumps to current position?
    if fs.pc == 0 then  -- function start?
      if from >= fs.nactvar then
        return  -- positions are already clean
      end
    else
      local previous = fs.f.code[fs.pc - 1]
      if luaP:GET_OPCODE(previous) == "OP_LOADNIL" then
        local pfrom = luaP:GETARG_A(previous)
        local pto = luaP:GETARG_B(previous)
        if pfrom <= from and from <= pto + 1 then  -- can connect both?
          if from + n - 1 > pto then
            luaP:SETARG_B(previous, from + n - 1)
          end
          return
        end
      end
    end
  end
  self:codeABC(fs, "OP_LOADNIL", from, from + n - 1, 0)  -- else no optimization
end
--[[Steering]]

	function Steering()
		--Mouse Steer
		if _MSteer then
			local msWidth = math.max(1,mouse.ViewSizeX*_Tune.Peripherals.MSteerWidth/200)
			local mdZone = _Tune.Peripherals.MSteerDZone/100
			local mST = ((mouse.X-mouse.ViewSizeX/2)/msWidth)
			if math.abs(mST)<=mdZone then
				_GSteerT = 0
			else
				_GSteerT = (math.max(math.min((math.abs(mST)-mdZone),(1-mdZone)),0)/(1-mdZone))^_Tune.MSteerExp * (mST / math.abs(mST))
			end
		end
		
		--Interpolate Steering
		if _GSteerC < _GSteerT then
			if _GSteerC<0 then
				_GSteerC = math.min(_GSteerT,_GSteerC+_Tune.ReturnSpeed)
			else
				_GSteerC = math.min(_GSteerT,_GSteerC+_Tune.SteerSpeed)
			end
		else
			if _GSteerC>0 then
				_GSteerC = math.max(_GSteerT,_GSteerC-_Tune.ReturnSpeed)
			else
				_GSteerC = math.max(_GSteerT,_GSteerC-_Tune.SteerSpeed)
			end
		end
		
		--Steer Decay Multiplier
		local sDecay = (1-math.min(car.Body.CarName.Value.VehicleSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
		
		--Apply Steering
		for i,v in pairs(car.Wheels:GetChildren()) do
			if v.Name=="F" then
				v.Arm.Steer.CFrame=car.Wheels.F.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerInner*sDecay),0)
			elseif v.Name=="FL" then
				if _GSteerC>= 0 then
					v.Arm.Steer.CFrame=car.Wheels.FL.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerOuter*sDecay),0)
				else
					v.Arm.Steer.CFrame=car.Wheels.FL.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerInner*sDecay),0)
				end
			elseif v.Name=="FR" then
				if _GSteerC>= 0 then
					v.Arm.Steer.CFrame=car.Wheels.FR.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerInner*sDecay),0)
				else
					v.Arm.Steer.CFrame=car.Wheels.FR.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerOuter*sDecay),0)
				end
			end
		end
	end
----------------------------------
------------FUNCTIONS-------------
----------------------------------

function Receive(player, action, ...)
	local args = {...}
	if player == User and action == "play" then
		Connector:FireAllClients("play", User, args[1], Settings.SoundSource.Position, Settings.PianoSoundRange, Settings.PianoSounds, args[2], Settings.IsCustom)
		HighlightPianoKey((args[1] > 61 and 61) or (args[1] < 1 and 1) or args[1],args[3])
	elseif player == User and action == "abort" then
		Deactivate()
		if SeatWeld then
			SeatWeld:remove()
		end
	end
end

function Activate(player)
	Connector:FireClient(player, "activate", Settings.CameraCFrame, Settings.PianoSounds, true)
	User = player
	for i,v in pairs(Piano.Keys.Keys:GetChildren()) do
		local obj = v
		local Properties = {}
		Properties.Transparency = 0
		Tween(obj,Properties,1,false,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
	end
end

function Deactivate()
	if User and User.Parent then
		Connector:FireClient(User, "deactivate")
		User.Character:SetPrimaryPartCFrame(Box.CFrame + Vector3.new(0, 5, 0))
	end
	for i,v in pairs(Piano.Keys.Keys:GetChildren()) do
		local obj = v
		local Properties = {}
		Properties.Transparency = 1
		Tween(obj,Properties,1,false,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
	end
	User = nil
end
--[=[
	Uses the constructor to attach a class or resource to the actual object
	for the lifetime of the subscription of that object.

	```lua
	return Blend.New "Frame" {
		Parent = variables.Parent;
		[Blend.Attached(function(parent)
			local maid = Maid.new()

			print("Got", parent)

			maid:GiveTask(function()
				print("Dead!")
			end)

			return maid
		end)] = true;
	}
	```

	@param constructor T
	@return (parent: Instance) -> Observable<T>
]=]
function Blend.Attached(constructor)
	return function(parent)
		return Observable.new(function(sub)
			local maid = Maid.new()

			local resource = constructor(parent)

			if MaidTaskUtils.isValidTask(resource) then
				maid:GiveTask(resource)
			end

			sub:Fire(resource)

			return maid
		end)
	end;
end
--[=[
	@param object any -- Object to remove
	Removes the object from the Janitor and cleans it up.

	```lua
	local part = Instance.new("Part")
	Janitor:Add(part)
	Janitor:Remove(part)
	```
]=]
function Janitor:Remove(object: any): boolean
	local objects = self._objects
	for i,obj in ipairs(objects) do
		if obj[1] == object then
			local n = #objects
			objects[i] = objects[n]
			objects[n] = nil
			self:_cleanupObject(obj[1], obj[2])
			return true
		end
	end
	return false
end
-- Remote Events
local RE_Character_Appearance_Loaded = Remote_Events.CharacterAppearanceLoaded
-- Uber l33t maths to calcluate the angle needed to throw a projectile a distance, given the altitude of the end point and the projectile's velocity
function AngleOfReach(distance, altitude, velocity)
	local theta = math.atan((velocity^2 + math.sqrt(velocity^4 -200*(200*distance^2 + 2*altitude*velocity^2)))/(200*distance))
	if theta ~= theta then
		theta = math.pi/4
	end
	return(theta)
end
-- table.concat but allows booleans
local function tableConcat(t, sep)
	for i, v in t do
		if type(v) == "boolean" then
			t[i] = tostring(v)
		end
	end
	
	table.concat(t, sep)
	
	return t
end

local function dumpFormatter(dump, start, ending)
	-- "\n\n -- " .. start .. " --\n\n" .. dump .. "\n -- " .. ending .. " --"	
	return `\n\n -- {start} --\n\n{dump}\n -- {ending} --\n`
end

local class = {}

function ErrorFormat(title: string, nonFatal: boolean?, traceback: string?)
	return function(errorMessage: string)
		errorMessage = `{title} {errorMessage}{dumpFormatter(traceback or debug.traceback(nil, 2), "Stack Trace", "Stack End")}`
		
		if nonFatal then
			task.spawn(error, errorMessage, 0)
		else
			error(errorMessage, 0)
		end
	end
end

return ErrorFormat
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .1		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .1		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		0		,	-- positive = outward
	 --[[Vertical]]		-1.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-------------------------
function onClicked()
Car.BodyVelocity.velocity = Vector3.new(0, 3, 0)
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--[[
	Function called upon entering the state - creates the systems, and initialises the game loop.
]]
function ServerGame.onEnter(stateMachine, event, from, to)
	SystemManager.createSystems()

	local engine = SystemManager.getSystemByName("engine")

	local function completeGame()
		stateMachine:finishGame()
	end
	connections.crashedIntoSun = engine.crashedIntoSun:Connect(completeGame)

	connections.escapedSun = engine.escapedSun:Connect(completeGame)

	spawnToolsAsync()
	tagMap()

	coroutine.wrap(
		function()
			while true do
				local waitTime = METEOR_FREQUENCY_PER_PLAYER / 1 + (#Players:GetPlayers() / 5)

				wait(math.random(waitTime / 1.5, waitTime * 1.5))
				if stateMachine.current ~= "game" then
					return
				end

				local shield = SystemManager.getSystemByName("shield")

				if shield:isOn() and math.random(1, 100) > SHIELD_DEFLECT_RATE then
					sendAlert(Constants.Alert.Success, translate("Shields have deflected a meteor!"))
				else
					spawnMeteor()
				end
			end
		end
	)()
end
--[[
	Utility script that holds a cache of player character appearances. Allows the game to load appearances as soon as the player enters the game, thereby reducing
	risk of lengthy Roblox server requests slowing down critial times in the game loop.
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local Logger = require(ReplicatedStorage.Dependencies.GameUtils.Logger)

local CharacterAppearanceCache = {}

local appearanceCache = {}
--// Functions


UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.X then
		if Chatting == true then
			Skip = true
			Sounds.Click:Play()
		end
	end
end)

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.Z then
		if Chatting == true then
			Exit = true
			Sounds.Click:Play()
		end
	end
end)

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.E then
		
		
		if Detected == true then
			local Lines = DetectedNPC:FindFirstChild("Lines")
			
			if Lines then
				Sounds.Click:Play()
				
				Chatting = true
				Detected = false
				
				LineLabel.Text = " "
				
				PromptLabel:TweenSize(UDim2.new(0, 0, 0, 0), "Out", "Linear", 0.2)
				LineLabel:TweenPosition(UDim2.new(0, 0, 0.8, 0), "In", "Linear", 0.2)
				
				wait(0.5)
				
				for i, Line in pairs(Lines:GetChildren()) do
					local Text = Line.Value
					
					for i = 1, #Text do
						LineLabel.Text = string.sub(Text, 1, i)
						Sounds.Talk:Play()
						if Skip == true then
							Skip = false
							LineLabel.Text = Text
							break
						end
						if Exit == true then
							break
						end
						wait(0.07)
					end
					if Exit == true then
						Exit = false
						break
					end
					repeat wait() until Skip == true or Exit == true
					Skip = false
				end
				
				Exit = false
				Skip = false
				
				PromptLabel:TweenSize(UDim2.new(0, 0, 0, 0), "Out", "Linear", 0.2)
				LineLabel:TweenPosition(UDim2.new(0, 0, 1.2, 0), "Out", "Linear", 0.2)
				
				wait(0.5)
				
				Chatting = false
				Detected = false
			end
		end
	end
end)
---Setting events to all buttons

ButtonsPanel.Lights.MouseButton1Click:Connect(function()
	---Checking if the player is in a vehicle
	if Char.Humanoid.SeatPart ~= nil and Char.Humanoid.SeatPart.Parent:FindFirstChild("Stats") then
		
		Char.Humanoid.SeatPart.Parent.VehicleSeat.ChassisMain["Lights"]:FireServer()
	end	
end)	

ButtonsPanel.Flip.MouseButton1Click:Connect(function()
	---Checking if the player is in a vehicle
	if Char.Humanoid.SeatPart ~= nil and Char.Humanoid.SeatPart.Parent:FindFirstChild("Stats") and FlipCD == false then
		FlipCD = true
		local Gyro = Char.Humanoid.SeatPart.Parent.Engine.Stability
		
		Gyro.D = 100
		Gyro.P = 2000
		Gyro.MaxTorque = Vector3.new(1800,0,1800)
		wait(3)
		Gyro.D = 11
		Gyro.P = 11
		Gyro.MaxTorque = Vector3.new(6,6,6)		
		
		wait(5)
		FlipCD = false
	end	
end)
-- Controls the field-of-view of the camera depending on the player's setting.
-- 
-- ForbiddenJ

NormalFov = 70
WideFov = 85

Camera = workspace.CurrentCamera
FovSetting = game.ReplicatedStorage.ClientConfig.WideFOV

function Update()
	Camera.FieldOfView = FovSetting.Value and WideFov or NormalFov
end

FovSetting:GetPropertyChangedSignal("Value"):Connect(Update)

Update()
--tables
local SoundTable = {}
local AnimTable = {}


local function PickThing(ThingToPick)
	if ThingToPick == "Swing" then
		--pick anim
		local SwingA = AnimTable[R:NextInteger(1, #AnimTable)]
		local findA = Tool.Animations:findFirstChild(SwingA)
		return findA
	elseif ThingToPick == "Sound" then
		--pick sound
		local SoundA = SoundTable[R:NextInteger(1, #SoundTable)]
		local findA = Tool.Sounds:findFirstChild(SoundA)
		return findA
	end
end

 --check if trables have been filled
function CheckTables()
	if LoadedTables == false then
		local GetS = Tool.Sounds:GetChildren()
		local GetA = Tool.Animations:GetChildren()
		for i = 1, #GetS do
			if GetS[i].Name ~= "Equip" then --ignore equip sound
				table.insert(SoundTable, tostring(GetS[i].Name))
			end
		end
		for i = 1, #GetA do
			if GetA[i].Name ~= "Equip" then --ignore equip animation
				table.insert(AnimTable, tostring(GetA[i].Name))
			end
		end
		LoadedTables = true
	end
end
--// UI Tween Info
local L_138_ = TweenInfo.new(
	1,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local L_139_ = {
	TextTransparency = 1
}
--[[[Default Controls]]
	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}
		--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				=  Enum.KeyCode.Pause				,
		ToggleABS				=  Enum.KeyCode.Pause						,
		ToggleTransMode			= Enum.KeyCode.M					,
		ToggleMouseDrive		= Enum.KeyCode.Pause				,
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,
		
		--Handbrake
		PBrake					= Enum.KeyCode.P					,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.DPadRight			,
	}
------------------------

function Key(key)
if key then
key = string.lower(key)
if (key=="x") then
if on == 1 then
Tool.Parent.Humanoid.WalkSpeed = CurrentWalkSpeed
on = 0
elseif on == 0 then
Tool.Parent.Humanoid.WalkSpeed = WalkSpeedWhileCrouching
on = 1
end
Crouch(on)
end
end
end
function Equip(mouse)
mouse.KeyDown:connect(Key)
end
script.Parent.Equipped:connect(Equip)
-- Render the map at 0FPS (static since we know it doesn't change)

	for i,d in pairs(workspace:GetDescendants()) do
		local isHum = false
		if d.Parent then
			local hum = d.Parent:FindFirstChild("Humanoid")
			if hum then
				if hum:IsA("Humanoid") then
					isHum = true
				end
			end
		end
		if d:IsA("BasePart") and not d:IsA("Terrain") and not isHum then
			local mapObj_Handler = VF_Handler:RenderObject(d, 30)
		end
	end
--	part.Anchored = true
	part.Position = Vector3.new(x,0.5,z)
--[[
	Returns a list of the keys from the given dictionary.
]]
local function keys(dictionary)
	local new = {}
	local index = 1

	for key in pairs(dictionary) do
		new[index] = key
		index = index + 1
	end

	return new
end

return keys
--- Rainbow FX


return function(gui, property, speed)
	--- Variables
	speed = speed or 1
	--
	local running = true
	
	--- Main
	coroutine.wrap(function()
		local _tick = tick()
		--
		while gui and gui.Parent and running do
			--- Math
			local i = (tick() - _tick) * (1.0 / speed)
			if i >= 1 then  
				_tick = tick()  
				i = 0  
			end
			
			--- Apply
			gui[property] = Color3.fromHSV(i, 1, 1)
			
			--- Wait
			_L.Services.RunService.Stepped:wait()
		end
	end)()
	
	--- Return function to cancel this behavior
	return function()
		running = false
	end
end
--Rescripted by Luckymaxer

Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

Players = game:GetService("Players")

ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")

ClientControl.OnClientInvoke = (function(Mode, Value)
	if Mode == "PlaySound" and Value then
		Value:Play()
	end
end)

function InvokeServer(Mode, Value, arg)
	pcall(function()
		ServerControl:InvokeServer(Mode, Value, arg)
	end)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == 0 then
		return
	end
	Mouse.Button1Down:connect(function()
		InvokeServer("Click", true, Mouse.Hit.p)
	end)
end

local function Unequipped()
	
end

Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
-- The subset of a Promise that React APIs rely on. This resolves a value.
-- This doesn't require a return value neither from the handler nor the
-- then function.
-- ROBLOX FIXME: workaround for Luau recursive type used with different parameters. delete this copy once that issue is resolved.
export type _Thenable<R> = {
	andThen: <U>(
		self: _Thenable<R>,
		onFulfill: (R) -> () | U,
		onReject: (error: any) -> () | U
	) -> (),
}

export type Thenable<R> = {
	andThen: <U>(
		self: Thenable<R>,
		onFulfill: (R) -> () | _Thenable<U> | U,
		onReject: (error: any) -> () | _Thenable<U> | U
		-- ROBLOX FIXME Luau: need union type packs to parse () | Thenable<U>: CLI-49836
	) -> nil | _Thenable<U>,
}

return exports
--Funcion Del AutoClick
local plr = script.Parent.Parent.Parent
local timeAuto = plr.PlayerStats.timeAuto

local lea = plr:WaitForChild("leaderstats")-- Nombre De La Carpeta De Su Sistema De Dinero
local gold = lea:WaitForChild("TimesClicked")-- Nombre De Su Sistema De Dinero
local coin = lea:WaitForChild("Coins")-- Nombre De Su Sistema De Dinero
local boost = plr:WaitForChild("CoinBoost")-- Nombre De Su Sistema De Dinero
local world = plr:WaitForChild("WorldBoost")-- Nombre De Su Sistema De Dinero
local autoclick = false
local autoclickDD = false
function GetAuto()
	gold.Value = gold.Value +1 --Cambiar Por Cuanto Dinero Quieres Que Obtenga
	coin.Value = coin.Value + 1 + 1*boost.Value*world.Value
end

script.Parent.AutoClick.MouseButton1Click:Connect(function()
	if autoclick == false then
		autoclick = true
		script.Parent.AutoClick.Text = "ON"
	else
		autoclick = false
		script.Parent.AutoClick.Text = "OFF"
	end
end)

while wait()do
	if autoclick == true then
		if autoclickDD == false then
			autoclickDD = true
			GetAuto(1)-- Cambia El Tiempo De Espera Al Recargar
			wait(timeAuto.Value)-- Tambien Cambia Para El Tiempo De Espera Al Recargar
			autoclickDD = false
		end
	end
end