Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- setup emote chat hook


Game.Players.LocalPlayer.Chatted:connect(function(msg)
	local emote = ""
	if (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end
	
	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, 0.1, Humanoid)
	end
--[=[
	If the brio is not dead, will return the values unpacked from the brio.

	:::info
	Calling this while the brio is already dead will throw a error. Values should
	not be used past the lifetime of the brio, and can be considered invalid.
	:::

	```lua
	local brio = Brio.new("a", 1, 2)
	print(brio:GetValue()) --> "a" 1 2
	brio:Kill()

	print(brio:GetValue()) --> ERROR: Brio is dead
	```

	@return any
]=]


function Brio:GetValue()
	assert(self._values, "Brio is dead")

	return unpack(self._values, 1, self._values.n)
end
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote


local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

math.randomseed(tick())

function findExistingAnimationInSet(set, anim)
	if set == nil or anim == nil then
		return 0
	end
	
	for idx = 1, set.count, 1 do 
		if set[idx].anim.AnimationId == anim.AnimationId then
			return idx
		end
	end
	
	return 0
end

function configureAnimationSet(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0	
	animTable[name].connections = {}

	local allowCustomAnimations = true

	--local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end)
	--if not success then
	--	allowCustomAnimations = true
	--end

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		
		local idx = 0
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				local newWeight = 1
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject ~= nil) then
					newWeight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				idx = animTable[name].count
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				animTable[name][idx].weight = newWeight
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildAdded:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildRemoved:connect(function(property) configureAnimationSet(name, fileList) end))
			end
		end
	end
	
	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
		end
	end
	
	-- preload anims
	for i, animType in pairs(animTable) do
		for idx = 1, animType.count, 1 do
			if PreloadedAnims[animType[idx].anim.AnimationId] == nil then
				Humanoid:LoadAnimation(animType[idx].anim)
				PreloadedAnims[animType[idx].anim.AnimationId] = true
			end				
		end
	end
end
--[[for _,v in pairs(TaggedHumanoids) do
	if v and v.Health > 0 then
		UntagHumanoid(v)
		TagHumanoid(v, Creator)
		v:TakeDamage(Properties.LinkDamage * Total) --Let em' have it!!
	end
end]]


for i=1,#Events,1 do
	if Events[i] then
		Events[i]:Disconnect()
	end
end


for i=1, #Queue, 1 do
	if Queue[i] and Queue[i].Health > 0 then
		UntagHumanoid(Queue[i])
		TagHumanoid(Queue[i], Creator)
		Queue[i]:TakeDamage(Properties.LinkDamage * Total) --Let em' have it!!
		if Queue[i].Health <= 0 then -- Make em disappear!
			for _,v in pairs(GetDescendants(Queue[i].Parent)) do
				pcall(function()
					v.Transparency = 1
				end)
				pcall(function()
					v.Anchored = true
					Deletables[#Deletables+1] = v
					v.Parent = workspace
					v.CanCollide = false
				end)
			end
		end
		pcall(function()
			SparkleQueue[i].Enabled = false	
			SparkleQueue[i].Speed = NumberRange.new(10, 20)
			SparkleQueue[i]:Emit(75)
		end)
		pcall(function()
			Sounds[i]:Play()
		end)
		pcall(function()
			AttachQueue[i]["Constellation_Beam"].Enabled = false
		end)
		wait(.25)
	end
end
-- The argument must be an integer:


function fix(num)
	num = tostring(num)
	num = (num:reverse())
	local newNum = ""
	for i = 1,#num do
		if ((i%3) == 0) then	-- Modulo trick to determine if a number is divisible by 3
			newNum = (newNum .. num:sub(i,i) .. ",")
		else
			newNum = (newNum .. num:sub(i,i))
		end
	end
	newNum = newNum:reverse()
	if (newNum:sub(1,1) == ",") then
		newNum = newNum:sub(2)	-- Quick-fix to correct a mistake in the loop above
	end
	return newNum	-- Returns a string, NOT a number!
end

function count()
	if (active) then
		awaiting = (awaiting+1)
		return
	end
	active = true
	wait()	-- When using 'DescendantRemoving,' the brick removing isn't always gone by the time the function is called, so this gives it some time to be removed
	baseParts = {}	-- Clear table
	local function scan(parent)
		for _,v in pairs(parent:GetChildren()) do	-- Easiest way to get all parts is to quickly scan through with loops
			if (v:IsA("BasePart")) then
				table.insert(baseParts,v)
			end
			if (((#baseParts%1000) == 0) and (#baseParts ~= 0)) then	-- Add in a quick wait every 1k bricks to stop an unneccessary lag-attack
				wait()
			end
			scan(v)
		end
	end
	scan(game.Workspace)
	local n = #baseParts
	script.Parent.Count.Text = (fix(n) .. (n == 1 and " Brick" or " Bricks"))	-- Not many people realize what you can do with 'and' and 'or'
	for i = 1,awaiting do
		count()
	end
	awaiting = 0
	active = false
end

function setup()	-- Yes, I add pointless functions to capture events. It feels more organized
	count()
	game.Workspace.DescendantAdded:connect(count)
	game.Workspace.DescendantRemoving:connect(count)
end

setup()
-- Roblox character sound script



local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local SOUND_DATA = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
	},
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}

 -- wait for the first of the passed signals to fire
local function waitForFirst(...)
	local shunt = Instance.new("BindableEvent")
	local slots = {...}

	local function fire(...)
		for i = 1, #slots do
			slots[i]:Disconnect()
		end

		return shunt:Fire(...)
	end

	for i = 1, #slots do
		slots[i] = slots[i]:Connect(fire)
	end

	return shunt.Event:Wait()
end
----  \/Traffic\/


model = script.Parent
wait(0.5)
currentP = "Off"
script.Parent.Events.Traffic.OnServerEvent:Connect( function(player, pattern)
	if script.Parent.Values.Traffic.Value == 0 then
		script.Parent.Values.Traffic.Value = 1
	elseif script.Parent.Values.Traffic.Value == 1 then
		script.Parent.Values.Traffic.Value = 2
	elseif script.Parent.Values.Traffic.Value == 2 then
		script.Parent.Values.Traffic.Value = 3
	elseif script.Parent.Values.Traffic.Value == 3 then
		script.Parent.Values.Traffic.Value = 4
	elseif script.Parent.Values.Traffic.Value == 4 then
		script.Parent.Values.Traffic.Value = 0
	end
end)
--{ id = "slash.xml", weight = 10 } 


},
toollunge = {
{ id = "http://www.roblox.com/asset/?id=129967478", weight = 10 } 
},
wave = {
{ id = "http://www.roblox.com/asset/?id=128777973", weight = 10 } 
},
point = {
{ id = "http://www.roblox.com/asset/?id=128853357", weight = 10 } 
},
dance1 = {
{ id = "http://www.roblox.com/asset/?id=182435998", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491037", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491065", weight = 10 } 
},
dance2 = {
{ id = "http://www.roblox.com/asset/?id=182436842", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491248", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491277", weight = 10 } 
},
dance3 = {
{ id = "http://www.roblox.com/asset/?id=182436935", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491368", weight = 10 }, 
{ id = "http://www.roblox.com/asset/?id=182491423", weight = 10 } 
},
laugh = {
{ id = "http://www.roblox.com/asset/?id=129423131", weight = 10 } 
},
cheer = {
{ id = "http://www.roblox.com/asset/?id=129423030", weight = 10 } 
},
}
local dances = {"dance1", "dance2", "dance3"}
--- Used to mute a speaker so that this speaker does not see their messages.


function methods:AddMutedSpeaker(speakerName)
	self.MutedSpeakers[speakerName:lower()] = true
end

function methods:RemoveMutedSpeaker(speakerName)
	self.MutedSpeakers[speakerName:lower()] = false
end

function methods:IsSpeakerMuted(speakerName)
	return self.MutedSpeakers[speakerName:lower()]
end
---Semi Settings---		


			if Settings.Mode == "Semi" and Settings.FireModes.Burst == true then
				Gui.FText.Text = "Burst"
				Settings.Mode = "Burst"
			elseif Settings.Mode == "Semi" and Settings.FireModes.Burst == false and Settings.FireModes.Auto == true then
				Gui.FText.Text = "Auto"
				Settings.Mode = "Auto"
			elseif Settings.Mode == "Semi" and Settings.FireModes.Burst == false and Settings.FireModes.Auto == false and Settings.FireModes.Explosive == true then
				Gui.FText.Text = "Explosive"
				Settings.Mode = "Explosive"
--- Calls self:FlushAutoExecBuffer at the end of the frame


function Registry:FlushAutoExecBufferDeferred()
	if self.AutoExecFlushConnection then
		return
	end

	self.AutoExecFlushConnection = RunService.Heartbeat:Connect(function()
		self.AutoExecFlushConnection:Disconnect()
		self.AutoExecFlushConnection = nil
		self:FlushAutoExecBuffer()
	end)
end
-- anon Image ID http://www.roblox.com/Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&aid=4823036


local GameData = {}

for _, Script in next, script:GetDescendants() do
	if Script:IsA("ModuleScript") then
		for Key, Data in next, require(Script) do
			GameData[Key] = Data
		end
	end
end

return GameData
--[[**
	<description>
	Takes a function to be called when :Get() is first called and there is a value in the data store. This function must return a value to set to. Used for deserializing.
	</description>

	<parameter name = "modifier">
	The modifier function.
	</parameter>
**--]]


function DataStore:BeforeInitialGet(modifier)
	table.insert(self.beforeInitialGet, modifier)
end
--<Local Functions>--



local function CreateSound(soundID, volume, parent)
	local sound = Instance.new("Sound", parent);
	sound.Volume = 0;
	sound.Name = "_PlayOnTouchedSound";
	sound.SoundId = "rbxassetid://".. soundID;
	sound.Looped = true;
	
	sound:Play()
	
	repeat
		sound.Volume = sound.Volume + .1;
		wait(.1);
	until
		sound.Volume >= volume;
end;
-- @outline // RUNNERS



function Ping.Update()
	if tick() - LastUpdate < REQUEST_INTERVAL then return end
	
	LastUpdate = tick()
	for _,v in pairs(game.Players:GetChildren()) do
		Ping.UpdatePlayer(v)
	end
end

function Ping.Init()
	System.Remotes.ConnectEvent("Ping", function(plr, Code)
		if type(Code) ~= "number" or not Pool[plr] or Pool[plr].Code == -1 or Pool[plr].Code ~= Code then return end
		
		Pool[plr].Value = tick() - Pool[plr].Time
		Pool[plr].Code = -1
	end)
	
	game.Players.PlayerAdded:Connect(function(plr)
		Pool[plr] = {
			Code = -1,
			Value = 0,
			Time = tick()
		}
	end)
	
	game.Players.PlayerRemoving:Connect(function(plr)
		Pool[plr] = nil
	end)
end

function Ping.ClientInit()
	Pool[game.Players.LocalPlayer] = {Value = 0}
	System.Remotes.ConnectEvent("Ping", function(tbl)
		Pool[game.Players.LocalPlayer] = {Value = tbl.Value}
		
		System.Remotes.FireServer("Ping", tbl.Code)
	end)
end

return Ping
-- Left Legs


character.Constraint.ConstraintLeftUpperLeg.Attachment0 = LUL
character.Constraint.ConstraintLeftUpperLeg.Attachment1 = LULRig
character.Constraint.ConstraintLeftLowerLeg.Attachment0 = LLL
character.Constraint.ConstraintLeftLowerLeg.Attachment1 = LLLRig
character.Constraint.ConstraintLeftFoot.Attachment0 = LF
character.Constraint.ConstraintLeftFoot.Attachment1 = LFRig
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 415	--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 900		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 9200		--		Use sliders to manipulate values
	Tune.Redline		= 9700
	Tune.EqPoint		= 7250
	Tune.PeakSharpness	= 9.5
	Tune.CurveMult		= 0.15
	
	--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)
--////////////////////////////// Include
--//////////////////////////////////////


local Chat = game:GetService("Chat")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local modulesFolder = script.Parent
local moduleChatChannel = require(modulesFolder:WaitForChild("ChatChannel"))
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil"))
--------LEFT DOOR --------


game.Workspace.doorleft.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(106)

game.Workspace.doorleft.l21.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(21)

game.Workspace.doorleft.l31.BrickColor = BrickColor.new(133)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(133)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(133)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(133)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(133)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(133)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(106)
----------------------------------------------------------------------------------------------------
-----------------=[ General ]=----------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	 TeamKill = true					--- Enable TeamKill?
	,TeamDmgMult = 1					--- Between 0-1 | This will make you cause less damage if you hit your teammate
	
	,ReplicatedBullets = true			--- Keep in mind that some bullets will pass through surfaces...
	
	,AntiBunnyHop = true				--- Enable anti bunny hop system?
	,JumpCoolDown = 1.5					--- Seconds before you can jump again
	,JumpPower = 0						--- Jump power, default is 50
	
	,RealisticLaser = true				--- True = Laser line is invisible
	,ReplicatedLaser = true				
	,ReplicatedFlashlight = true
	
	,EnableRagdoll = true				--- Enable ragdoll death?
	,TeamTags = true					--- Aaaaaaa
	,HitmarkerSound = false				--- GGWP MLG 360 NO SCOPE xD
	,Crosshair = true					--- Crosshair for Hipfire shooters and arcade modes
	,CrosshairOffset = 5				--- Crosshair size offset
--[[Steering]]


	Tune.SteerInner		= 45		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 38		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .18		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .2		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 330		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
--[[
	Internal method used by the reconciler to clean up any resources held by
	this component instance.
]]


function Component:__unmount()
	if config.internalTypeChecks then
		internalAssert(Type.of(self) == Type.StatefulComponentInstance, "Invalid use of `__unmount`")
	end

	local internalData = self[InternalData]
	local virtualNode = internalData.virtualNode
	local reconciler = internalData.reconciler

	if self.willUnmount ~= nil then
		internalData.lifecyclePhase = ComponentLifecyclePhase.WillUnmount
		self:willUnmount()
	end

	for _, childNode in pairs(virtualNode.children) do
		reconciler.unmountVirtualNode(childNode)
	end
end
--[=[
	@param promise Promise
	@return Promise
	Gives the promise to the trove, which will cancel the promise if the trove is cleaned up or if the promise
	is removed. The exact promise is returned, thus allowing chaining.

	```lua
	trove:AddPromise(doSomethingThatReturnsAPromise())
		:andThen(function()
			print("Done")
		end)
	-- Will cancel the above promise (assuming it didn't resolve immediately)
	trove:Clean()

	local p = trove:AddPromise(doSomethingThatReturnsAPromise())
	-- Will also cancel the promise
	trove:Remove(p)
	```

	:::caution Promise v4 Only
	This is only compatible with the [roblox-lua-promise](https://eryn.io/roblox-lua-promise/) library, version 4.
	:::
]=]


function Trove:AddPromise(promise)
	AssertPromiseLike(promise)
	if promise:getStatus() == "Started" then
		promise:finally(function()
			return self:_findAndRemoveFromObjects(promise, false)
		end)
		self:Add(promise, "cancel")
	end
	return promise
end
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,Distance = 0
	,BDrop = 0
	,BSpeed = 0

	,SuppressMaxDistance = 0	--- Studs
	,SuppressTime = 0			--- Seconds

	,BulletWhiz = false
	,BWEmitter = 0
	,BWMaxDistance = 0
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(0,0,0)

	,Tracer = false
	,TracerColor = Color3.fromRGB(0,0,0)
	,TracerLightEmission = 0
	,TracerLightInfluence = 0
	,TracerLifeTime = 0
	,TracerWidth = 0
	,RandomTracer = false
	,TracerEveryXShots = 0
	,TracerChance = 0
	
	,BulletLight = false
	,BulletLightBrightness = 0
	,BulletLightColor = Color3.fromRGB(0,0,0)
	,BulletLightRange = 0

	,ExplosiveHit = false
	,ExPressure = 0
	,ExpRadius = 0
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 0

	,LauncherDamage = 0
	,LauncherRadius = 0
	,LauncherPressure = 0
	,LauncherDestroyJointRadiusPercent = 0
---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 



input.InputChanged:connect(function(inputObject)
	
	if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
		local delta = Vector2.new(inputObject.Delta.x/Sensitivity,inputObject.Delta.y/Sensitivity) * Smoothness

		local X = TargetAngleX - delta.y 
		TargetAngleX = (X >= 80 and 80) or (X <= -80 and -80) or X 
		TargetAngleY = (TargetAngleY - delta.x) %360 
	end	
	
end)

input.InputBegan:connect(function(inputObject)
	
	if inputObject.UserInputType == Enum.UserInputType.Keyboard then
		if inputObject.KeyCode == CanToggleMouse.activationkey then
			if CanToggleMouse.allowed and freemouse == false then
				freemouse = true
			else
				freemouse = false
			end
		end
	end
	
	if inputObject.UserInputType == Enum.UserInputType.Keyboard then
		if inputObject.KeyCode == Enum.KeyCode.W then
			w = true
		end
		
		if inputObject.KeyCode == Enum.KeyCode.A then
			a = true
		end
		
		if inputObject.KeyCode == Enum.KeyCode.S then
			s = true
		end
		
		if inputObject.KeyCode == Enum.KeyCode.D then
			d = true
		end
		
		if inputObject.KeyCode == Enum.KeyCode.LeftShift then
			lshift = true
		end
	end
end)

input.InputEnded:connect(function(inputObject)
	if inputObject.UserInputType == Enum.UserInputType.Keyboard then
		if inputObject.KeyCode == Enum.KeyCode.W then
			w = false
		end
		
		if inputObject.KeyCode == Enum.KeyCode.A then
			a = false
		end
		
		if inputObject.KeyCode == Enum.KeyCode.S then
			s = false
		end
		
		if inputObject.KeyCode == Enum.KeyCode.D then
			d = false
		end
		
		if inputObject.KeyCode == Enum.KeyCode.LeftShift then
			lshift = false
		end
	end
end)
--// Recoil Settings	


	gunrecoil = -0.3; -- How much the gun recoils backwards when not aiming
	camrecoil = 1.56; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.3; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 1.63; -- How much the camera flicks when aiming
	
	CamShake = 2; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 3; -- THIS IS ALSO NEW!!!!
	
	Kickback = 0.2; -- Upward gun rotation when not aiming
	AimKickback = 0.2; -- Upward gun rotation when aiming
--[=[
	Shorthand for `Promise:andThen(nil, failureHandler)`.

	Returns a Promise that resolves if the `failureHandler` worked without encountering an additional error.

	:::warning
	Within the failure handler, you should never assume that the rejection value is a string. Some rejections within the Promise library are represented by [[Error]] objects. If you want to treat it as a string for debugging, you should call `tostring` on it first.
	:::


	@param failureHandler (...: any) -> ...any
	@return Promise<...any>
]=]


function Promise.prototype:catch(failureHandler)
	assert(failureHandler == nil or isCallable(failureHandler), string.format(ERROR_NON_FUNCTION, "Promise:catch"))
	return self:_andThen(debug.traceback(nil, 2), nil, failureHandler)
end
--Var


local isOpen = false

local MainMenuOpen = {}

function MainMenuOpen:ManipUI()
    isOpen = not isOpen 
    MainFrame.Visible = isOpen
end

function MainMenuOpen:Setup(UI, Main)
    Button = UI
    MainFrame = Main.MainMenu

    Button.MainToggle.MouseButton1Down:Connect(function()
        self:ManipUI()
    end)
end

return MainMenuOpen