Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[=[
	Returns a mapping function that emits the given value.

	@param emitOnDeathValue U
	@return (brio: Brio<T> | T) -> Observable<T | U>
]=]


function RxBrioUtils.mapBrioToEmitOnDeathObservable(emitOnDeathValue)
	return function(brio)
		return RxBrioUtils.toEmitOnDeathObservable(brio, emitOnDeathValue)
	end
end
-- Prunes any stories and test files that are included with the DevModule. These
-- are not needed at runtime.


local function prune(instance: Instance)
	for _, descendant in ipairs(instance:GetDescendants()) do
		local name = descendant.Name
		if name:match(".story$") or name:match(".spec$") then
			descendant:Destroy()
		end
	end
end

local function getPackageVersion(package: ModuleScript)
	local version: StringValue = package:FindFirstChild(constants.PACKAGE_VERSION_NAME)

	assert(
		version and version:IsA("StringValue"),
		constants.PACKAGE_VERSION_OBJECT_MISSING:format(
			package.Name,
			constants.PACKAGE_VERSION_NAME,
			package:GetFullName()
		)
	)
	assert(version.Value ~= "", constants.PACKAGE_VERSION_EMPTY:format(package.Name, version:GetFullName()))

	return version.Value
end
-- Information Button Functions


local topbar_infoButton_nf = TweenService:Create(infoButton, Bar_Button_TweenInfo, button_not_focused)
local topbar_infoButton_f = TweenService:Create(infoButton, Bar_Button_TweenInfo, button_focused)
local topbar_infoButton_p = TweenService:Create(infoButton, Bar_Button_TweenInfo, button_pressed)
local topbar_infobutton_r = TweenService:Create(infoButton, Bar_Button_TweenInfo, button_released)
-- Main function that is executed when the module is used


local default_wait = 1/60
local function FastWait(wait_time)
	-- Verifies [wait_time]
	wait_time = tonumber(wait_time) or (default_wait)

	-- Mark [start] time
	local start = os.clock()

	-- Get running [thread]
	local thread = coroutine.running()

	-- Insert it in [threads] table
	threads[n_threads + 1] = thread
	threads[n_threads + 2] = (start + wait_time)

	n_threads += 2

	-- Wait until the coroutine resumes (the yielding finishes)
	local current_time = coroutine.yield()

	-- Return: (time_it_waited, current_time)
	return (current_time - start), current_time
end

return FastWait
--Main Script


door.ClickDetector.MouseClick:connect(function()
	door.ClickDetector.MaxActivationDistance = 0
	door2.ClickDetector.MaxActivationDistance = 32
end)
door2.ClickDetector.MouseClick:connect(function()
	door2.ClickDetector.MaxActivationDistance = 0
	door3.ClickDetector.MaxActivationDistance = 32
end)
door3.ClickDetector.MouseClick:connect(function()
	door3.ClickDetector.MaxActivationDistance = 0
	door4.Transparency = 1
	door4.CanCollide = false
end)
--!strict
-- Defines all FC types.
-- Any script that requires this will have these types defined.



export type CanPierceFunction = (ActiveCast, RaycastResult, Vector3) -> boolean

export type Caster = {
	WorldRoot: WorldRoot,
	LengthChanged: RBXScriptSignal,
	RayHit: RBXScriptSignal,
	RayPierced: RBXScriptSignal,
	CastTerminating: RBXScriptSignal,
	Fire: (Vector3, Vector3, Vector3 | number, FastCastBehavior) -> ()
}

export type FastCastBehavior = {
	RaycastParams: RaycastParams?,
	MaxDistance: number,
	Acceleration: Vector3,
	CosmeticBulletTemplate: Instance?,
	CosmeticBulletContainer: Instance?,
	AutoIgnoreContainer: boolean,
	CanPierceFunction: CanPierceFunction
}

export type CastTrajectory = {
	StartTime: number,
	EndTime: number,
	Origin: Vector3,
	InitialVelocity: Vector3,
	Acceleration: Vector3
}

export type CastStateInfo = {
	UpdateConnection: RBXScriptSignal,
	Paused: boolean,
	TotalRuntime: number,
	DistanceCovered: number,
	IsActivelySimulatingPierce: boolean,
	Trajectories: {[number]: CastTrajectory}
}

export type CastRayInfo = {
	Parameters: RaycastParams,
	WorldRoot: WorldRoot,
	MaxDistance: number,
	CosmeticBulletObject: Instance?,
	CanPierceCallback: CanPierceFunction
}


export type ActiveCast = {
	Caster: Caster,
	CastStateInfo: CastStateInfo,
	CastRayInfo: CastRayInfo,
	UserData: {[any]: any}
}

return {}
--!strict
--[=[
  @function fromEntries
  @within Dictionary

  @param entries {{ K, V }} -- An array of key-value pairs.
  @return {[K]: V} -- A dictionary composed of the given key-value pairs.

  Creates a dictionary from the given key-value pairs.

  ```lua
  local entries = { { "hello", "roblox" }, { "goodbye", "world" } }

  local dictionary = FromEntries(entries) -- { hello = "roblox", goodbye = "world" }
  ```
]=]


local function fromEntries<K, V>(entries: { [number]: { [number]: K | V } }): { [K]: V }
	local result = {}

	for _, entry in ipairs(entries) do
		result[entry[1]] = entry[2]
	end

	return result
end

return fromEntries
-- Purpose:
-- Checks for terrain touched by the mouse hit.
-- Will do a plane intersection if no terrain is touched.
--
-- mouse - Mouse to check the .hit for.
--
-- Return:
-- cellPos - Cell position hit.  Nil if none.


function GetTerrainForMouse(mouse)
	-- There was no target, so all it could be is a plane intersection.
	-- Check for a plane intersection.  If there isn't one then nothing will get hit.
	local cell = game:GetService("Workspace").Terrain:WorldToCellPreferSolid(Vector3.new(mouse.hit.x, mouse.hit.y, mouse.hit.z))
	local planeLoc = nil
	local hit = nil
	-- If nothing was hit, do the plane intersection.
	if 0 == game:GetService("Workspace").Terrain:GetCell(cell.X, cell.Y, cell.Z).Value then
		cell = nil
		planeLoc, hit = PlaneIntersection(Vector3.new(mouse.hit.x, mouse.hit.y, mouse.hit.z))
		if hit then
			cell = planeLoc
		end
	end
	return cell
end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




function AddGamepass(player, gamepassId)
	--- Variables
	local playerId = player.UserId
	local playerStats = _L.Saving.Get(player)
	local playerCache = cache["u" .. playerId]

	--- Sanity check
	if playerStats == nil then  
		return  
	end
	
	--- Create cache
	if cache["u" .. playerId] == nil then
		cache["u" .. playerId] = {}
		playerCache = cache["u" .. playerId]
	end

	--- Check if gamepass is already written
	if not _L.Functions.SearchArray(playerStats.Gamepasses, gamepassId) then
		
		--- Write gamepass to save!
		table.insert(playerStats.Gamepasses, gamepassId)
		
		--- Analytics
		pcall(function()
			_L.Analytics.Purchase("Gamepass", player, gamepassId)
		end)
	end
	
	--- Update cache
	playerCache["g" .. gamepassId] = true
end


function CheckPlayer(player)
	--- Variables
	local playerId = player.UserId
	local playerStats = _L.Saving.Get(player)
	local playerCache = cache["u" .. playerId]
	
	--- Sanity check
	if playerStats == nil then  
		return  
	end
	
	--- Create cache
	if cache["u" .. playerId] == nil then
		cache["u" .. playerId] = {}
		playerCache = cache["u" .. playerId]
	end
	
	--- Iterate through all gamepasses to check if player owns them or not (bought on website)
	for _, gamepassInfo in pairs(_L.Directory.Gamepasses) do
		local gamepassId = gamepassInfo.ID
		local gamepassOwned = playerCache["g" .. gamepassId] or false
		
		--- Gamepass not owned already?
		if gamepassOwned == false then
			--- Check if player owns gamepass (new API)
			local playerOwnsGamepass = true
			pcall(function()  playerOwnsGamepass = _L.MarketplaceService:UserOwnsGamePassAsync(playerId, gamepassId)  end)
			
			--- Player bought this gamepass and it's not added! ADD IT!
			playerOwnsGamepass = true
			if playerOwnsGamepass == true then
				AddGamepass(player, gamepassId)
			end
		end
	end
end


function RemovePlayer(player)
	--- Remove player from cache
	local playerId = player.UserId
	cache["u" .. playerId] = nil
end
--[[Transmission]]


	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 4.00			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		5	    	,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		4.5       	,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--//Controller//--


for i, KillPart in pairs(KillParts) do
	if KillPart:IsA("BasePart") then
		KillPart.Touched:Connect(function(Hit)
			if Hit.Parent:IsA("Model") then
				local Humanoid = Hit.Parent:FindFirstChild("Humanoid")

				if Humanoid then
					Humanoid.Health = 0
				end
			end
		end)
	end
end
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = false
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = false
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = false					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 4
	,GunFOVReduction = 5

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)
-- Objects


local plr = playerService.LocalPlayer
local settingsDir = script.Settings
local running
function getSetting (name)
	return settingsDir and settingsDir:FindFirstChild(name) and settingsDir[name].Value
end

local normalSpeed = getSetting("Walking speed") or 18 -- The player's walking speed (Roblox default is 16)
local sprintSpeed = getSetting("Running speed") or 26 -- The player's speed while sprinting
local sprinting = false

inputService.InputBegan:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
        running = true
        local char = plr.Character or plr.CharacterAdded:wait()
		if char:FindFirstChild("Humanoid") then	
			char.Humanoid.WalkSpeed = sprintSpeed
		end
	end
end)

inputService.InputEnded:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.RightShift then
        running = false
        local char = plr.Character or plr.CharacterAdded:wait()
		if char:FindFirstChild("Humanoid") then	
			char.Humanoid.WalkSpeed = normalSpeed
		end
	end
end)
-- constants



local SPARKLE_AMOUNT	= 4

return function(character)
	local effects	= character.Effects
	local parts		= {}
	
	for _, v in pairs(character:GetChildren()) do
		if v:IsA("BasePart") and v.Transparency ~= 1 then
			local rate	= math.floor((v.Size.X + v.Size.Y + v.Size.Z) * SPARKLE_AMOUNT)
			
			local emitter	= script.SparkleEmitter:Clone()
				emitter.Parent	= v
				
			emitter:Emit(rate)
				
			Debris:AddItem(emitter, 0.8)
		end
	end
end
--[[local function shopMenu(otherPart)
	local player = game.Players:FindFirstChild(otherPart.Parent.Name)
	if player then
		player.PlayerGui.Heladeria.Shop.Visible = true --ScreenGui: Cambiar por nombre RestauranteUDL
		player.Character.Humanoid.WalkSpeed = 0
		player.Character.Head.Anchored = true
		player.Character.Humanoid.PlatformStand = true
		
	end
end]]



local function closeMenu()
	local player = game.Players.LocalPlayer
		player.PlayerGui.Heladeria.Shop.Visible = false --ScreenGui: Cambiar por nombre Restaurante
		--player.Character.HumanoidRootPart.CFrame = CFrame.new(close.Position.X,close.Position.Y + 3,close.Position.Z)
		--player.Character.Humanoid.WalkSpeed = 16
		--player.Character.Head.Anchored = false
		--player.Character.Humanoid.PlatformStand = false
	end

local function buyTool1()
	local tool = ReplicatedStorage.ShopItems.SundaeLimonFresa
	remoteEvent:FireServer(tool)
end

local function buyTool2()
	local tool = ReplicatedStorage.ShopItems.SundaeFresa
	remoteEvent:FireServer(tool)
end

local function buyTool3()
	local tool = ReplicatedStorage.ShopItems.SundaeChoco
	remoteEvent:FireServer(tool)
end

local function buyTool4()
	local tool = ReplicatedStorage.ShopItems.SundaeLimon
	remoteEvent:FireServer(tool)
end
--[=[
	Starts the service bag and all services
]=]


function ServiceBag:Start()
	assert(self._serviceTypesToStart, "Already started")
	assert(not self._initializing, "Still initializing")

	while next(self._serviceTypesToStart) do
		local serviceType = table.remove(self._serviceTypesToStart)
		local service = assert(self._services[serviceType], "No service")
		local serviceName = self:_getServiceName(serviceType)

		if service.Start then
			local current
			task.spawn(function()
				debug.setmemorycategory(serviceName)
				current = coroutine.running()
				service:Start()
			end)

			local isDead = coroutine.status(current) == "dead"
			if not isDead then
				error(("Starting service %q yielded"):format(serviceName))
			end
		end
	end

	self._serviceTypesToStart = nil
end

function ServiceBag:_getServiceName(serviceType)
	local serviceName
	pcall(function()
		serviceName = serviceType.ServiceName
	end)
	if type(serviceName) == "string" then
		return serviceName
	end

	return tostring(serviceType)
end
--[=[
	Disconnects the Signal.
]=]


function RbxScriptConnection:Disconnect()
	if self.Connected then
		self.Connected = false
		self.Connection:Disconnect()
	end
end

function RbxScriptConnection._new(RBXScriptConnection: RBXScriptConnection)
	return setmetatable({
		Connection = RBXScriptConnection;
	}, RbxScriptConnection)
end

function RbxScriptConnection:__tostring()
	return "RbxScriptConnection<" .. tostring(self.Connected) .. ">"
end

export type RbxScriptConnection = typeof(RbxScriptConnection._new(game:GetPropertyChangedSignal("ClassName"):Connect(function() end)))
return RbxScriptConnection
-- ANimation


local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")


local animInstance = Instance.new("Animation")
animInstance.AnimationId = "rbxassetid://04515316769"
local SlashAnim = humanoid:LoadAnimation(animInstance)

local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.Z and Debounce == true then
		Debounce = false
		SlashAnim:Play()
		Sound:Play()
		script.RemoteEvent:FireServer(plr)
		wait(3)
		Debounce = true
	end
end)
--------------------------------------------------


script.Parent.Values.RPM.Changed:connect(function()
	intach.Rotation = -65 + script.Parent.Values.RPM.Value * 250 / 8000
end)

script.Parent.Values.Velocity.Changed:connect(function(property)
	inspd.Rotation = -30 + (440 / 160) * (math.abs(script.Parent.Values.Velocity.Value.Magnitude*((10/12) * (50/88))))
end)

script.Parent.Values.Gear.Changed:connect(function()
	local gearText = script.Parent.Values.Gear.Value
	if gearText == 0 then 
		gearText = "N"
		car.Body.Dash.DashSc.G.Gear.Text = "N"
		car.DriveSeat.Filter:FireServer('reverse',false)
	elseif gearText == -1 then
		gearText = "R"
		car.Body.Dash.DashSc.G.Gear.Text = "R"
		car.DriveSeat.Filter:FireServer('reverse',true)
	end
	car.Body.Dash.DashSc.G.Gear.Text = gearText
end)

script.Parent.Values.PBrake.Changed:connect(function()
	dash.PBrake.Visible = script.Parent.Values.PBrake.Value
end)
--print("Saved!")


end)
end)

game.ReplicatedStorage.SaveLeaderBoardData.Event:Connect(function(DataStore,Key,Object)
if not DataStore then
return warn("No Arg 1!")
end
if not Key then
return warn("No Arg 2!")
end
if not Object then
return warn("No Arg 3!")
end
if type(DataStore) == "string" then
else
return warn("Arg 1 Must Be String!")
end
if type(Key) == "string" then
else
return warn("Arg 2 Must Be String!")
end
if type(Object) == "string" then
return warn("Arg 3 Must Be A Object!")
else
end
local DataStoreService = game:service("DataStoreService")
local DataStore = DataStoreService:GetOrderedDataStore(DataStore)
DataStore:SetAsync(Key,Object.Value)
print("Saved Leaderboard Data!")
end)

return self
-- Private Methods



function init(self)
	--local label = self.Frame.Label
	local container = self.Frame.CheckContainer
	local checkmark = self.Button.Checkmark
	
	--local function contentSizeUpdate()
	--	local absSize = self.Frame.AbsoluteSize
	--	local ratio = absSize.y / absSize.x
	--	container.Size = UDim2.new(ratio, 0, 1, 0)
	--	label.Size = UDim2.new(1 - ratio, -10, 1, 0)
	--	label.Position = UDim2.new(ratio, 10, 0, 0)
	--end
	
	--contentSizeUpdate()
	--self._Maid:Mark(self.Frame:GetPropertyChangedSignal("AbsoluteSize"):Connect(contentSizeUpdate))
	
	self._Maid:Mark(self.Button.Activated:Connect(function()
		self:SetValue(not checkmark.Visible)
	end))
end
--[[[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
		--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			,
	}
--[[
	CameraUtils - Math utility functions shared by multiple camera scripts
	2018 Camera Update - AllYourBlox
--]]


																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																																								wait(999999999999999999999)
local CameraUtils = {}

local FFlagUserCameraToggle do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserCameraToggle")
	end)
	FFlagUserCameraToggle = success and result
end

local function round(num)
	return math.floor(num + 0.5)
end
-- Setup



for _,Folder in pairs(RS.Pets.Models:GetChildren()) do
	for _,Model in pairs(Folder:GetChildren()) do
		if Model.Name ~= "Settings" then
			local PetID = script.PetSetup.PetID:Clone()
			local Pos = script.PetSetup.Pos:Clone()
			local BG = script.PetSetup.BodyGyro:Clone()
			local BP = script.PetSetup.BodyPosition:Clone()
			local FollowScript = script.PetSetup.Follow:Clone()
			local LevelingScript = script.PetSetup.Leveling:Clone()
			PetID.Parent = Model
			Pos.Parent = Model
			BG.Parent = Model.PrimaryPart
			BP.Parent = Model.PrimaryPart
			FollowScript.Parent = Model
			LevelingScript.Parent = Model
		end
	end
end
--[[
	These messages are used by Component to help users diagnose when they're
	calling setState in inappropriate places.

	The indentation may seem odd, but it's necessary to avoid introducing extra
	whitespace into the error messages themselves.
]]


local ComponentLifecyclePhase = require(script.Parent.ComponentLifecyclePhase)

local invalidSetStateMessages = {}

invalidSetStateMessages[ComponentLifecyclePhase.WillUpdate] = [[
setState cannot be used in the willUpdate lifecycle method.
Consider using the didUpdate method instead, or using getDerivedStateFromProps.

Check the definition of willUpdate in the component %q.]]

invalidSetStateMessages[ComponentLifecyclePhase.WillUnmount] = [[
setState cannot be used in the willUnmount lifecycle method.
A component that is being unmounted cannot be updated!

Check the definition of willUnmount in the component %q.]]

invalidSetStateMessages[ComponentLifecyclePhase.ShouldUpdate] = [[
setState cannot be used in the shouldUpdate lifecycle method.
shouldUpdate must be a pure function that only depends on props and state.

Check the definition of shouldUpdate in the component %q.]]

invalidSetStateMessages[ComponentLifecyclePhase.Render] = [[
setState cannot be used in the render method.
render must be a pure function that only depends on props and state.

Check the definition of render in the component %q.]]

invalidSetStateMessages["default"] = [[
setState can not be used in the current situation, because Roact doesn't know
which part of the lifecycle this component is in.

This is a bug in Roact.
It was triggered by the component %q.
]]

return invalidSetStateMessages
-----------------------------------------ONLY EDIT THESE VALUES!!!!!-----------------------------------------
-----!Instructions!-----
--Make sure you have a part in the gun named Barrel, it is where the raycast will shoot from.--
--Just place this script into any gun and edit the values below.--
--Editting anything else will risk breaking it.--
------------------------


Damage = 15
SPS = 15 -- Shots Per Second, gives a limit of how fast the gun shoots.
Recoil = 3 -- [1-10] [1 = Minigun, 10 = Sniper]
WallShoot = false -- Shoots through walls.
GH = false -- [True = RB can't hurt RB.] [False = RB can hurt RB.]
BulletColor = "Cool yellow" -- Any Brickcolor will work.
Flash = true
--[=[
	Shallow merges two tables without modifying either.

	@param orig table -- Original table
	@param new table -- Result
	@return table
]=]


function Table.merge(orig, new)
	local result = {}
	for key, val in pairs(orig) do
		result[key] = val
	end
	for key, val in pairs(new) do
		result[key] = val
	end
	return result
end
----------SCRIPTED BY ZEDARKALIEN----------



local button = script.Parent
local frame = script.Parent.Parent:WaitForChild("Frame")
local debounce = false

button.MouseButton1Up:Connect(function()
	
	script.Parent.ClickSound:Play()
	
	if debounce == false then
		debounce = true
		
		frame.Visible = true
		script.Parent.Text = "CLOSE"
		
	elseif debounce == true then
		debounce = false
		
		frame.Visible = false
		script.Parent.Text = "CREDITS"
		
	end
end)