Prompt: --[[ The Module ]]

Response:
--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local Keyboard = setmetatable({}, BaseCharacterController)
Keyboard.__index = Keyboard

function Keyboard.new(CONTROL_ACTION_PRIORITY)
	local self = setmetatable(BaseCharacterController.new(), Keyboard)

	self.CONTROL_ACTION_PRIORITY = CONTROL_ACTION_PRIORITY

	self.textFocusReleasedConn = nil
	self.textFocusGainedConn = nil
	self.windowFocusReleasedConn = nil

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0

	self.jumpEnabled = true

	return self
end

function Keyboard:Enable(enable: boolean)
	if not UserInputService.KeyboardEnabled then
		return false
	end

	if enable == self.enabled then
		-- Module is already in the state being requested. True is returned here since the module will be in the state
		-- expected by the code that follows the Enable() call. This makes more sense than returning false to indicate
		-- no action was necessary. False indicates failure to be in requested/expected state.
		return true
	end

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0
	self.moveVector = ZERO_VECTOR3
	self.jumpRequested = false
	self:UpdateJump()

	if enable then
		self:BindContextActions()
		self:ConnectFocusEventListeners()
	else
		self:UnbindContextActions()
		self:DisconnectFocusEventListeners()
	end

	self.enabled = enable
	return true
end

function Keyboard:UpdateMovement(inputState)
	if inputState == Enum.UserInputState.Cancel then
		self.moveVector = ZERO_VECTOR3
	else
		self.moveVector = Vector3.new(self.leftValue + self.rightValue, 0, self.forwardValue + self.backwardValue)
	end
end

function Keyboard:UpdateJump()
	self.isJumping = self.jumpRequested
end

function Keyboard:BindContextActions()

	-- Note: In the previous version of this code, the movement values were not zeroed-out on UserInputState. Cancel, now they are,
	-- which fixes them from getting stuck on.
	-- We return ContextActionResult.Pass here for legacy reasons.
	-- Many games rely on gameProcessedEvent being false on UserInputService.InputBegan for these control actions.
	local handleMoveForward = function(actionName, inputState, inputObject)
		self.forwardValue = (inputState == Enum.UserInputState.Begin) and -1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleMoveBackward = function(actionName, inputState, inputObject)
		self.backwardValue = (inputState == Enum.UserInputState.Begin) and 1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleMoveLeft = function(actionName, inputState, inputObject)
		self.leftValue = (inputState == Enum.UserInputState.Begin) and -1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleMoveRight = function(actionName, inputState, inputObject)
		self.rightValue = (inputState == Enum.UserInputState.Begin) and 1 or 0
		self:UpdateMovement(inputState)
		return Enum.ContextActionResult.Pass
	end

	local handleJumpAction = function(actionName, inputState, inputObject)
		self.jumpRequested = self.jumpEnabled and (inputState == Enum.UserInputState.Begin)
		self:UpdateJump()
		return Enum.ContextActionResult.Pass
	end

	-- TODO: Revert to KeyCode bindings so that in the future the abstraction layer from actual keys to
	-- movement direction is done in Lua
	ContextActionService:BindActionAtPriority("moveForwardAction", handleMoveForward, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterForward)
	ContextActionService:BindActionAtPriority("moveBackwardAction", handleMoveBackward, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterBackward)
	ContextActionService:BindActionAtPriority("moveLeftAction", handleMoveLeft, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterLeft)
	ContextActionService:BindActionAtPriority("moveRightAction", handleMoveRight, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterRight)
	ContextActionService:BindActionAtPriority("jumpAction", handleJumpAction, false,
		self.CONTROL_ACTION_PRIORITY, Enum.PlayerActions.CharacterJump)
end

function Keyboard:UnbindContextActions()
	ContextActionService:UnbindAction("moveForwardAction")
	ContextActionService:UnbindAction("moveBackwardAction")
	ContextActionService:UnbindAction("moveLeftAction")
	ContextActionService:UnbindAction("moveRightAction")
	ContextActionService:UnbindAction("jumpAction")
end

function Keyboard:ConnectFocusEventListeners()
	local function onFocusReleased()
		self.moveVector = ZERO_VECTOR3
		self.forwardValue  = 0
		self.backwardValue = 0
		self.leftValue = 0
		self.rightValue = 0
		self.jumpRequested = false
		self:UpdateJump()
	end

	local function onTextFocusGained(textboxFocused)
		self.jumpRequested = false
		self:UpdateJump()
	end

	self.textFocusReleasedConn = UserInputService.TextBoxFocusReleased:Connect(onFocusReleased)
	self.textFocusGainedConn = UserInputService.TextBoxFocused:Connect(onTextFocusGained)
	self.windowFocusReleasedConn = UserInputService.WindowFocused:Connect(onFocusReleased)
end

function Keyboard:DisconnectFocusEventListeners()
	if self.textFocusReleasedConn then
		self.textFocusReleasedConn:Disconnect()
		self.textFocusReleasedConn = nil
	end
	if self.textFocusGainedConn then
		self.textFocusGainedConn:Disconnect()
		self.textFocusGainedConn = nil
	end
	if self.windowFocusReleasedConn then
		self.windowFocusReleasedConn:Disconnect()
		self.windowFocusReleasedConn = nil
	end
end

return Keyboard


Prompt: --// All global vars will be wiped/replaced except script

Response:
return function(data, env)
	if env then
		setfenv(1, env)
	end

	local gui = script.Parent.Parent--client.UI.Prepare(script.Parent.Parent)
	local frame = gui.Frame
	local frame2 = frame.Frame
	local msg = frame2.Message
	local ttl = frame2.Title

	local gIndex = data.gIndex
	local gTable = data.gTable

	local title = data.Title
	local message = data.Message
	local scroll = data.Scroll
	local tim = data.Time

	local gone = false

	if not data.Message or not data.Title then gTable:Destroy() end

	ttl.Text = title
	msg.Text = message
	ttl.TextTransparency = 1
	msg.TextTransparency = 1
	ttl.TextStrokeTransparency = 1
	msg.TextStrokeTransparency = 1
	frame.BackgroundTransparency = 1

	local fadeSteps = 10
	local blurSize = 10
	local textFade = 0.1
	local strokeFade = 0.5
	local frameFade = 0.3

	local blurStep = blurSize/fadeSteps
	local frameStep = frameFade/fadeSteps
	local textStep = 0.1
	local strokeStep = 0.1

	local function fadeIn()
		gTable:Ready()
		for i = 1,fadeSteps do
			if msg.TextTransparency>textFade then
				msg.TextTransparency = msg.TextTransparency-textStep
				ttl.TextTransparency = ttl.TextTransparency-textStep
			end
			if msg.TextStrokeTransparency>strokeFade then
				msg.TextStrokeTransparency = msg.TextStrokeTransparency-strokeStep
				ttl.TextStrokeTransparency = ttl.TextStrokeTransparency-strokeStep
			end
			if frame.BackgroundTransparency>frameFade then
				frame.BackgroundTransparency = frame.BackgroundTransparency-frameStep
				frame2.BackgroundTransparency = frame.BackgroundTransparency
			end
			service.Wait("Stepped")
		end
	end

	local function fadeOut()
		if not gone then
			gone = true
			for i = 1,fadeSteps do
				if msg.TextTransparency<1 then
					msg.TextTransparency = msg.TextTransparency+textStep
					ttl.TextTransparency = ttl.TextTransparency+textStep
				end
				if msg.TextStrokeTransparency<1 then
					msg.TextStrokeTransparency = msg.TextStrokeTransparency+strokeStep
					ttl.TextStrokeTransparency = ttl.TextStrokeTransparency+strokeStep
				end
				if frame.BackgroundTransparency<1 then
					frame.BackgroundTransparency = frame.BackgroundTransparency+frameStep
					frame2.BackgroundTransparency = frame.BackgroundTransparency
				end
				service.Wait("Stepped")
			end
			service.UnWrap(gui):Destroy()
		end
	end

	gTable.CustomDestroy = function()
		fadeOut()
	end

	fadeIn()
	if not tim then
		local _,time = message:gsub(" ","")
		time = math.clamp(time/2,4,11)+1
		wait(time)
	else
		wait(tim)
	end
	if not gone then
		fadeOut()
	end
end


Prompt: --Shockwave--

Response:
local function AttachParticleControl(source_part)

	local prtc = nil

	local function Start()
		prtc = script.Wave:clone()
		prtc.Parent = source_part
	end

	local function Update()

	end

	local function Stop()
		if prtc ~= nil then
			prtc:destroy()
			prtc = nil
		end
	end

	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachParticleControl


Prompt: -- ROBLOX deviation: Added _process arg to mock global node process for testing

Response:
function DefaultReporter.new(globalConfig: Config_GlobalConfig, _process: NodeProcessMock?): DefaultReporter
	local self = setmetatable((BaseReporter.new(_process) :: any) :: DefaultReporterPrivate, DefaultReporter)
	-- ROBLOX deviation: we need to store _isInteractive per reporter to not override isInteractive globally
	self._isInteractive = jestUtilModule.isInteractive

	-- ROBLOX deviation START: Added for tests otherwise isInteractive = false
	if _process ~= nil and _process.env.IS_INTERACTIVE ~= nil then
		self._isInteractive = _process.env.IS_INTERACTIVE
	end
	-- ROBLOX deviation END

	-- ROBLOX deviation START: Need a copy of stdout/stderr write since
	-- they get overwritten in _wrapStdio.
	local function defaultWrite()
		local writable = Writeable.new()

		return function(_self: Writeable, message: string)
			writable:write(message)
		end
	end
	--[[
		ROBLOX FIXME Luau START: added explicit type declaration.
		Otherwise Luau can't seem to unify 2 function type declaration
		and infers this as an union of function types which is not considered callable by CLI's analyze
	]]
	local _stdoutWrite: (Writeable, string) -> () = if _process and _process.stdout
		then _process.stdout.write
		else defaultWrite()
	local _stderrWrite: (Writeable, string) -> () = if _process and _process.stderr
		then _process.stderr.write
		else defaultWrite()
	-- ROBLOX FIXME Luau END
	-- ROBLOX deviation END

	self._globalConfig = globalConfig
	self._clear = ""
	self._out = function(_self: Writeable, message: string)
		_stdoutWrite(self._process.stdout, message)
	end
	self._err = function(_self: Writeable, message: string)
		_stderrWrite(self._process.stderr, message)
	end
	self._status = Status.new()
	self._bufferedOutput = Set.new()
	self:__wrapStdio(self._process.stdout)
	self:__wrapStdio(self._process.stderr)
	self._status:onChange(function()
		self:__clearStatus()
		self:__printStatus()
	end)

	return (self :: any) :: DefaultReporter
end

function DefaultReporter:__wrapStdio(stream: Writeable): ()
	local write = stream.write

	local buffer: Array<string> = {}
	local timeout: Timeout | nil = nil

	local function flushBufferedOutput()
		local string_ = Array.join(buffer, "")
		buffer = {}

		-- This is to avoid conflicts between random output and status text
		self:__clearStatus()
		if Boolean.toJSBoolean(string_) then
			write(stream, string_)
		end
		self:__printStatus()
		self._bufferedOutput:delete(flushBufferedOutput)
	end

	self._bufferedOutput:add(flushBufferedOutput)

	local function debouncedFlush()
		-- If the process blows up no errors would be printed.
		-- There should be a smart way to buffer stderr, but for now
		-- we just won't buffer it.
		if stream == self._process.stderr then
			flushBufferedOutput()
		elseif not Boolean.toJSBoolean(timeout) then
			timeout = setTimeout(function()
				flushBufferedOutput()
				timeout = nil
			end, 100)
		end
	end

	stream.write = function(_self: Writeable, chunk: string)
		table.insert(buffer, chunk)
		debouncedFlush()
		return true
	end
end

function DefaultReporter:forceFlushBufferedOutput(): ()
	Set.forEach(self._bufferedOutput, function(flushBufferedOutput)
		flushBufferedOutput()
	end)
end

function DefaultReporter:__clearStatus(): ()
	-- ROBLOX deviation: we need to store _isInteractive per reporter to not override isInteractive globally
	if self._isInteractive then
		if self._globalConfig.useStderr then
			self:_err(self._clear)
		else
			self:_out(self._clear)
		end
	end
end

function DefaultReporter:__printStatus(): ()
	local ref = self._status:get()
	local content, clear = ref.content, ref.clear
	self._clear = clear
	-- ROBLOX deviation: we need to store _isInteractive per reporter to not override isInteractive globally
	if self._isInteractive then
		if self._globalConfig.useStderr then
			self:_err(content)
		else
			self:_out(content)
		end
	end
end

function DefaultReporter:onRunStart(aggregatedResults: AggregatedResult, options: ReporterOnStartOptions): ()
	self._status:runStarted(aggregatedResults, options)
end

function DefaultReporter:onTestStart(test: Test): ()
	self._status:testStarted(test.path, test.context.config)
end

function DefaultReporter:onTestCaseResult(test: Test, testCaseResult: TestCaseResult): ()
	self._status:addTestCaseResult(test, testCaseResult)
end

function DefaultReporter:onRunComplete(): ()
	self:forceFlushBufferedOutput()
	self._status:runFinished()
	self._process.stdout.write = self._out
	self._process.stderr.write = self._err
	clearLine(self._process.stderr)
end

function DefaultReporter:onTestResult(test: Test, testResult: TestResult, aggregatedResults: AggregatedResult): ()
	self:testFinished(test.context.config, testResult, aggregatedResults)
	if not testResult.skipped then
		self:printTestFileHeader(testResult.testFilePath, test.context.config, testResult)
		self:printTestFileFailureMessage(testResult.testFilePath, test.context.config, testResult)
	end
	self:forceFlushBufferedOutput()
end

function DefaultReporter:testFinished(
	config: Config_ProjectConfig,
	testResult: TestResult,
	aggregatedResults: AggregatedResult
): ()
	self._status:testFinished(config, testResult, aggregatedResults)
end

function DefaultReporter:printTestFileHeader(
	_testPath: Config_Path,
	config: Config_ProjectConfig,
	result: TestResult
): ()
	self:log(getResultHeader(result, self._globalConfig, config))
	if result.console ~= nil then
		self:log("  " .. TITLE_BULLET .. "Console\n\n" .. getConsoleOutput(result.console, config, self._globalConfig))
	end
end

function DefaultReporter:printTestFileFailureMessage(
	_testPath: Config_Path,
	_config: Config_ProjectConfig,
	result: TestResult
): ()
	if Boolean.toJSBoolean(result.failureMessage) then
		self:log(result.failureMessage)
	end
	local didUpdate = self._globalConfig.updateSnapshot == "all"
	local snapshotStatuses = getSnapshotStatus(result.snapshot, didUpdate)
	Array.forEach(snapshotStatuses, self.log, self)
end

exports.default = DefaultReporter

return exports


Prompt:
-- ROBLOX upstream: https://github.com/facebook/jest/blob/v27.4.7/packages/jest-snapshot/src/colors.ts
-- /**
--  * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
--  *
--  * This source code is licensed under the MIT license found in the
--  * LICENSE file in the root directory of this source tree.
--  */


Prompt: -- connect events

Response:
Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)


Prompt:
--[[
p1.Parent = nil
p2.Parent = nil
p3.Parent = nil
p4.Parent = nil
]]

Response:
	if not enabled then
		return
	end
	enabled = false
	mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

	wait(5)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	enabled = true

end

function onEquippedLocal(mouse)

	if mouse == nil then
		print("Mouse not found")
		return
	end

	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
	--mouse.Button1Up:connect(function() unButton1Down(mouse) end)
end


Prompt: -------------Motor6Ding Section------------------------

Response:
Character.Humanoid.Died:connect(function()
	Stand()
	_G.Proned = false
	_G.Crouched = false
	_G.Sprinting = false
end)

game:GetService("RunService").RenderStepped:connect(function()
	Mouse.TargetFilter = game.Workspace
	if not _G.Viewing then
	local HRPCF =  HumanoidRootPart.CFrame * CFrame.new(0, 1.5, 0)* CFrame.new(Humanoid.CameraOffset)
	if Lean then
		HRPCF = HRPCF
	end
	Neck.C0 =  Torso.CFrame:toObjectSpace(HRPCF)
	Neck.C1 =  CFrame.Angles(-math.asin(Camera.CoordinateFrame.lookVector.y), 0, 0)
	elseif _G.Viewing then
	Character.Torso.Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	Character.Torso.Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
	end
	if player.PlayerScripts.CameraScript.RootCamera:FindFirstChild("Sensitivity") then
		if Aiming then
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = Player.PlayerGui.MouseSensitivity.Frame.Data.Value
		else
			player.PlayerScripts.CameraScript.RootCamera.Sensitivity.Value = 1
		end
	Mouse.Button2Down:connect(function()
		if not Aiming then
			Aiming = true
		end
	end)
	Mouse.Button2Up:connect(function()
		if Aiming then
			Aiming = false
		end
	end)
	end
end)


Prompt:
--[[
	Roact
]]

Response:
local element = Roact.createElement(App)

Roact.mount(element, playerGui, "App")


Prompt: --Folders

Response: local controllersFolder = player:WaitForChild("PlayerScripts"):WaitForChild("Controllers")


Prompt: -- Main --

Response:
Players.PlayerAdded:Connect(function(plr)
	local DonatedStore = Datastore2("Donated", plr)
	local RaisedStore = Datastore2("Raised", plr)

	local Leaderstats = Instance.new("Folder") -- Create leaderstats obv
	Leaderstats.Name = 'leaderstats'

	local Donated = Instance.new("IntValue", Leaderstats)
	Donated.Value = DonatedStore:Get(0) -- Get is basically adding the argumented amount to your saved data
	Donated.Name = "Donated"

	local Raised = Instance.new("IntValue", Leaderstats)
	Raised.Name = "Raised"
	Raised.Value = RaisedStore:Get(0) -- Same thing as above

	DonatedStore:OnUpdate(function(NewDonated)
		Donated.Value = NewDonated
	end)

	RaisedStore:OnUpdate(function(NewRaised) -- Same as above
		Raised.Value = NewRaised
	end)

	Leaderstats.Parent = plr -- Set leaderstats parent AFTER assigning everything

end)


Prompt: --// Give the Player the Given Table

Response:
local Give; Give = function(Player, Table, Retain)
	for Index, Element in pairs(Table) do
		if Index == "Tools" then
			for _, Tool in pairs(Element) do
				if not Player.Backpack:FindFirstChild(Tool) then
					GiveTool(Player, Tool, Retain)
				end
			end
		end
	end
end


Prompt: -- Zoom related functions

Response:
function ShoulderCamera:isZoomed()
	return self.zoomState
end

function ShoulderCamera:setHideToolWhileZoomed(hide)
	self.hideToolWhileZoomed = hide
end

function ShoulderCamera:setZoomFactor(zoomFactor)
	self.currentZoomFactor = zoomFactor
	local nominalFOVRadians = math.rad(self.fieldOfView)
	local nominalImageHeight = math.tan(nominalFOVRadians / 2)
	local zoomedImageHeight = nominalImageHeight / self.currentZoomFactor
	self.zoomedFOV = math.deg(math.atan(zoomedImageHeight) * 2)
	self:updateZoomState()
end

function ShoulderCamera:resetZoomFactor()
	self:setZoomFactor(self.defaultZoomFactor)
end

function ShoulderCamera:setForceZoomed(zoomed)
	if self.forcedZoomed == zoomed then return end
	self.forcedZoomed = zoomed
	self:updateZoomState()
end

function ShoulderCamera:setZoomedFromInput(zoomedFromInput)
	if self.zoomedFromInput == zoomedFromInput or (self.currentHumanoid and self.currentHumanoid:GetState() == Enum.HumanoidStateType.Dead) then
		return
	end

	self.zoomedFromInput = zoomedFromInput
	self:updateZoomState()
end

function ShoulderCamera:updateZoomState()
	local isZoomed = self.forcedZoomed
	if self.canZoom and not self.forcedZoomed then
		isZoomed = self.zoomedFromInput
	end

	if not self.enabled or not self.currentTool then
		isZoomed = false
	end

	self.zoomState = isZoomed

	self.currentMouseRadsPerPixel = isZoomed and self.zoomedMouseRadsPerPixel or self.mouseRadsPerPixel
	self.currentTouchSensitivity = isZoomed and self.zoomedTouchSensitivity or self.touchSensitivity

	if self.currentCamera then
		self.desiredFieldOfView = self:getCurrentFieldOfView()
	end
end

function ShoulderCamera:onZoomAction(actionName, inputState, inputObj)
	if not self.enabled or not self.canZoom or not self.currentCamera or not self.currentCharacter then
		self:setZoomedFromInput(false)
		return Enum.ContextActionResult.Pass
	end

	self:setZoomedFromInput(inputState == Enum.UserInputState.Begin)
	return Enum.ContextActionResult.Sink
end


Prompt: -- Wait for torso (assume everything else will load at the same time)

Response: waitFor( getCharacter(), "UpperTorso" );


Prompt:
--[[**
	ensures Roblox UDim2 type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]

Response: t.UDim2 = primitive("UDim2")


Prompt:
--[[

	Plugins for this gun kit are basically functions that will run at specific times, i.e. When a key is pressed, when the gun is
	fired, when the gun is aimed, etc.

	HOW TO USE IT:

		KEYDOWN PLUGIN:

			Let's say you wanted to toggle a laser whenever you press the "v" key:

			You would create a table like the example below
			The first element would be "Key = INSERT_KEY_HERE"
			The second element would be "Description = INSERT_DESCRIPTION_HERE"
			The third element would be "Plugin = INSERT_FUNCTION_HERE"

			So whenever you press the "v" key, the plugin function will run

			Pretty useful if you want to add extra code to the script without actually having to modify the script

			NOTE: Only the keydown plugin requires this table. Every other plugin just needs a function

		EVERY OTHER PLUGIN:

			Let's say you wanted to make a shell eject whenever the gun was fired:

			You would add function called "Plugin = INSERT_FUNCTION_HERE"

			That's it; If you want other stuff to happen when the gun is fired, you would either put it all into 1 function, or
			you would add more Plugins to the "Firing" table. Like so:

			Firing = {
				Plugin = function()
					--Code
				end;
				Plugin = function()
					--Code
				end;
				Plugin = function()
					--Code
				end;
			};

	That's really it, you just need to know some basic scripting to use it. If you have more questions, pm me.

	NOTE: The plugins run seperate from the code in the Gun_Main. For example, if you have a plugin that ejects a shell 1 second
	after the gun is fired, the gun's firing speed won't be affected in any way.

--]]

Response:
local Gun = script.Parent

local Plugins = {

	KeyDown = {
		{ --This is a plugin for a toggleable laser
			Key = "v"; --This is the key you press to activate the plugin
			Description = "Toggle Laser"; --This is what the description of the key will be in the controls
			Plugin = function() --This is the actual plugin function
				local Laser = Gun:WaitForChild("Laser") --These few lines wait for the necessary bricks/models
				local Handle = Gun:WaitForChild("Handle")
				local ignoreCode = Gun.clientMain:WaitForChild("ignoreCode")
				local ignoreModel = game.Workspace:WaitForChild("ignoreModel_"..ignoreCode.Value)

				local PlyrName = game.Players:GetPlayerFromCharacter(Gun.Parent).Name
				local playerFolder = ignoreModel:WaitForChild("gunIgnore_"..PlyrName)

				local RS = game:GetService("RunService")

				local function createLaserDot() --This function creates the red laser dot
					local laserDot = Instance.new("Part")
					laserDot.Transparency = 1
					laserDot.Name = "laserDot"
					laserDot.Anchored = true
					laserDot.CanCollide = false
					laserDot.FormFactor = Enum.FormFactor.Custom
					laserDot.Size = Vector3.new(0.25, 0.25, 1)

					local laserGui = Instance.new("SurfaceGui")
					laserGui.CanvasSize = Vector2.new(100, 100)
					laserGui.Parent = laserDot

					local laserImage = Instance.new("ImageLabel")
					laserImage.BackgroundTransparency = 1
					laserImage.Size = UDim2.new(1, 0, 1, 0)
					laserImage.Image = "http://www.roblox.com/asset/?id=131394739"
					laserImage.Parent = laserGui

					--[[local laserLight = Instance.new("SurfaceLight")
					laserLight.Angle = 180
					laserLight.Brightness = math.huge
					laserLight.Color = Color3.new(1, 0, 0)
					laserLight.Face = Enum.NormalId.Back
					laserLight.Range = 5
					laserLight.Shadows = true
					laserLight.Parent = laserDot]]

					return laserDot
				end

				local function getHitSurfaceCFrame(Pos, Obj) --This function returns the proper cframe based on the face that the position is on
					local surfaceCF = {
						{"Back", Obj.CFrame * CFrame.new(0, 0, Obj.Size.z)};
						{"Bottom", Obj.CFrame * CFrame.new(0, -Obj.Size.y, 0)};
						{"Front", Obj.CFrame * CFrame.new(0, 0, -Obj.Size.z)};
						{"Left", Obj.CFrame * CFrame.new(-Obj.Size.x, 0, 0)};
						{"Right", Obj.CFrame * CFrame.new(Obj.Size.x, 0, 0)};
						{"Top", Obj.CFrame * CFrame.new(0, Obj.Size.y, 0)}
					}
					local closestDist = math.huge
					local closestSurface = nil
					for _,v in pairs(surfaceCF) do
						local surfaceDist = (Pos - v[2].p).magnitude
						if surfaceDist < closestDist then
							closestDist = surfaceDist
							closestSurface = v
						end
					end

					local surfaceDir = CFrame.new(Obj.CFrame.p, closestSurface[2].p)
					local surfaceDist = surfaceDir.lookVector * ((Obj.CFrame.p - closestSurface[2].p).magnitude / 2 - 0.25)
					local surfaceOffset = Pos - closestSurface[2].p + surfaceDist
					local surfaceCFrame = surfaceDir + surfaceDist + surfaceOffset

					return surfaceCFrame
				end

				local laserDot = createLaserDot() --The code is cleaner when the laser creating code is in a function

				Laser.Transparency = (Laser.Transparency == 1 and 0 or 1) --Toggles the laser on or off

				while math.floor(Laser.Transparency) == 0 do --This loop will keep running as long as the laser is visible
					if (not game.Players:GetPlayerFromCharacter(Gun.Parent)) then break end --This checks if the gun is a child of the character

					local newRay = Ray.new(Laser.Position, Handle.CFrame.lookVector * 999)
					local H, P = game.Workspace:FindPartOnRay(newRay, ignoreModel)

					local Distance = (P - Laser.Position).magnitude
					Laser.Mesh.Offset = Vector3.new(0, Distance / 2, 0)
					Laser.Mesh.Scale = Vector3.new(0.075, Distance / 0.2, 0.075)

					if H then
						laserDot.CFrame = getHitSurfaceCFrame(P, H) --If the laser hits a part then position the dot on the part
						laserDot.Parent = playerFolder
					else
						laserDot.Parent = nil --If the laser doesn't hit a part then temporarily remove the laser dor
					end

					RS.RenderStepped:wait()
				end

				laserDot:Destroy() --These lines reset the laser if the laser is transparent or the gun was deselected
				Laser.Transparency = 1
				Laser.Mesh.Offset = Vector3.new()
				Laser.Mesh.Scale = Vector3.new(0.075, 0, 0.075)
			end;
		};

		{ --This is a plugin for a toggleable flashlight
			Key = "z";
			Description = "Toggle Flashlight";
			Plugin = function()
				local Flashlight = Gun:WaitForChild("Flashlight")
				if Flashlight then
					for _, Light in pairs(Flashlight:GetChildren()) do
						if Light.Name == "Light" then
							Light.Enabled = (not Light.Enabled)
						end
					end
				end
			end
		};
	};

	KeyUp = {

	};

	Firing = {
		Plugin = function()
			--Put code here
		end;
	};

	Aimed = {
		Plugin = function()
			--Put code here
		end;
	};

	UnAimed = {
		Plugin = function()
			--Put code here
		end;
	};

	OnEquipped = {
		Plugin = function()
			--Put code here
		end
	};

	OnUnEquipped = {
		Plugin = function()
			--Put code here
		end
	};

}

return Plugins


Prompt: -- Looks for a folder within workspace.Terrain that contains elements to visualize casts.

Response:
local function GetFastCastVisualizationContainer(): Instance
	local fcVisualizationObjects = workspace.Terrain:FindFirstChild(FC_VIS_OBJ_NAME)
	if fcVisualizationObjects ~= nil then
		return fcVisualizationObjects
	end

	fcVisualizationObjects = Instance.new("Folder")
	fcVisualizationObjects.Name = FC_VIS_OBJ_NAME
	fcVisualizationObjects.Archivable = false -- TODO: Keep this as-is? You can't copy/paste it if this is false. I have it false so that it doesn't linger in studio if you save with the debug data in there.
	fcVisualizationObjects.Parent = workspace.Terrain
	return fcVisualizationObjects
end


Prompt: --- ExpNeed

Response:
   ExpNeed.Value = ExpNeed1:GetAsync(Plr.UserId) or ExpNeed.Value
	   ExpNeed1:SetAsync(Plr.UserId, ExpNeed.Value)
      ExpNeed.Changed:connect(function()
	   ExpNeed1:SetAsync(Plr.UserId, ExpNeed.Value)
   end)


Response:
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


Prompt: --!strict

Response:
return function(TextService)
	--[[
		Takes a string and converts it into pages of text that fit within the given constraints

		Parameters:
		text: The text to paginate
		containerHeight: The height of the container the text should fit into
		containerWidth: The width of the container the text should fit into
		textSize: The size of the text
		font: The font used to display the text

		Returns:
		An array of strings representing the pages of text
	]]
	local function paginate(
		text: string,
		containerHeight: number,
		containerWidth: number,
		textSize: number,
		font: Enum.Font
	): { string }
		local paginatedText = {}

		local textBounds = Vector2.new(containerWidth, math.huge)

		-- Add to the string until it is too large, then paginate and start again
		local workingString = ""
		local word = ""

		if text:find(" ") then
			-- Iterate over words
			for first, last in utf8.graphemes(text) do
				local grapheme = text:sub(first, last)

				if grapheme:match("%s") then
					-- See if this word pushes the text size over the limit
					local newString = workingString .. word
					local bounds = TextService:GetTextSize(newString, textSize, font, textBounds)

					if bounds.Y > containerHeight then
						-- If the word made workingString go over the limit,
						-- add the workingString without the word
						table.insert(paginatedText, workingString)

						-- Set the new working string to the word
						workingString = word
					else
						-- Otherwise add the word to the workingString
						workingString = newString
					end

					word = grapheme
				else
					word = word .. grapheme
				end
			end

			-- Add the remaining words to the paginated list
			local newString = workingString .. word
			local bounds = TextService:GetTextSize(newString, textSize, font, textBounds)
			if bounds.Y > containerHeight then
				table.insert(paginatedText, workingString)
				table.insert(paginatedText, word)
			else
				table.insert(paginatedText, newString)
			end
		else
			-- Iterate over graphemes
			for first, last in utf8.graphemes(text) do
				local grapheme = text:sub(first, last)

				local newString = workingString .. grapheme
				local bounds = TextService:GetTextSize(newString, textSize, font, textBounds)
				if bounds.Y > containerHeight then
					table.insert(paginatedText, workingString)
					workingString = grapheme
				else
					workingString = newString
				end
			end

			table.insert(paginatedText, workingString)
		end

		return paginatedText
	end

	return paginate
end


Prompt:
--function ClassZombie:SetWaypoints(Goal)
--	local g = 1
--	local arr = ClassZombie:FindWay(Goal)
--	for k, v in pairs(arr) do
--		wait(1)
--		local part = game.ReplicatedStorage.WayPoint:Clone()
--		part.Position = Vector3.new(math.floor(v.Position.X),6,math.floor(v.Position.Z))
--		part.Parent = script.Parent.WayPoints
--		part.Name = g
--		g = g + 1
--	end
--	return script.Parent.WayPoints:GetChildren()
--end


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 2871		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		15		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible

	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]

	Tune.AxleSize		= 2.17			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members


Prompt: -- init chat bubble tables

Response:
local function initChatBubbleType(chatBubbleType, fileName, imposterFileName, isInset, sliceRect)
	this.ChatBubble[chatBubbleType] = createChatBubbleMain(fileName, sliceRect)
	this.ChatBubbleWithTail[chatBubbleType] = createChatBubbleWithTail(fileName, UDim2.new(0.5, -CHAT_BUBBLE_TAIL_HEIGHT, 1, isInset and -1 or 0), UDim2.new(0, 30, 0, CHAT_BUBBLE_TAIL_HEIGHT), sliceRect)
	this.ScalingChatBubbleWithTail[chatBubbleType] = createScaledChatBubbleWithTail(fileName, 0.5, UDim2.new(-0.5, 0, 0, isInset and -1 or 0), sliceRect)
end

initChatBubbleType(BubbleColor.WHITE,	"ui/dialog_white",	"ui/chatBubble_white_notify_bkg", 	false,	Rect.new(5,5,15,15))
initChatBubbleType(BubbleColor.BLUE,	"ui/dialog_blue",	"ui/chatBubble_blue_notify_bkg",	true, 	Rect.new(7,7,33,33))
initChatBubbleType(BubbleColor.RED,		"ui/dialog_red",	"ui/chatBubble_red_notify_bkg",		true,	Rect.new(7,7,33,33))
initChatBubbleType(BubbleColor.GREEN,	"ui/dialog_green",	"ui/chatBubble_green_notify_bkg",	true,	Rect.new(7,7,33,33))

function this:SanitizeChatLine(msg)
	if getMessageLength(msg) > MaxChatMessageLengthExclusive then
		local byteOffset = utf8.offset(msg, MaxChatMessageLengthExclusive + getMessageLength(ELIPSES) + 1) - 1
		return string.sub(msg, 1, byteOffset)
	else
		return msg
	end
end

local function createBillboardInstance(adornee)
	local billboardGui = Instance.new("BillboardGui")
	billboardGui.Adornee = adornee
	billboardGui.Size = UDim2.new(0, BILLBOARD_MAX_WIDTH, 0, BILLBOARD_MAX_HEIGHT)
	billboardGui.StudsOffset = Vector3.new(0, 1.5, 2)
	billboardGui.Parent = BubbleChatScreenGui

	local billboardFrame = Instance.new("Frame")
	billboardFrame.Name = "BillboardFrame"
	billboardFrame.Size = UDim2.new(1, 0, 1, 0)
	billboardFrame.Position = UDim2.new(0, 0, -0.5, 0)
	billboardFrame.BackgroundTransparency = 1
	billboardFrame.Parent = billboardGui

	local billboardChildRemovedCon = nil
	billboardChildRemovedCon = billboardFrame.ChildRemoved:connect(function()
		if #billboardFrame:GetChildren() <= 1 then
			billboardChildRemovedCon:disconnect()
			billboardGui:Destroy()
		end
	end)

	this:CreateSmallTalkBubble(BubbleColor.WHITE).Parent = billboardFrame

	return billboardGui
end

function this:CreateBillboardGuiHelper(instance, onlyCharacter)
	if instance and not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then
		if not onlyCharacter then
			if instance:IsA("BasePart") then
				-- Create a new billboardGui object attached to this player
				local billboardGui = createBillboardInstance(instance)
				this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui
				return
			end
		end

		if instance:IsA("Model") then
			local head = instance:FindFirstChild("Head")
			if head and head:IsA("BasePart") then
				-- Create a new billboardGui object attached to this player
				local billboardGui = createBillboardInstance(head)
				this.CharacterSortedMsg:Get(instance)["BillboardGui"] = billboardGui
			end
		end
	end
end

local function distanceToBubbleOrigin(origin)
	if not origin then return 100000 end

	return (origin.Position - game.Workspace.CurrentCamera.CoordinateFrame.Position).magnitude
end

local function isPartOfLocalPlayer(adornee)
	if adornee and PlayersService.LocalPlayer.Character then
		return adornee:IsDescendantOf(PlayersService.LocalPlayer.Character)
	end
end

function this:SetBillboardLODNear(billboardGui)
	local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee)
	billboardGui.Size = UDim2.new(0, BILLBOARD_MAX_WIDTH, 0, BILLBOARD_MAX_HEIGHT)
	billboardGui.StudsOffset = Vector3.new(0, isLocalPlayer and 1.5 or 2.5, isLocalPlayer and 2 or 0.1)
	billboardGui.Enabled = true
	local billChildren = billboardGui.BillboardFrame:GetChildren()
	for i = 1, #billChildren do
		billChildren[i].Visible = true
	end
	billboardGui.BillboardFrame.SmallTalkBubble.Visible = false
end

function this:SetBillboardLODDistant(billboardGui)
	local isLocalPlayer = isPartOfLocalPlayer(billboardGui.Adornee)
	billboardGui.Size = UDim2.new(4, 0, 3, 0)
	billboardGui.StudsOffset = Vector3.new(0, 3, isLocalPlayer and 2 or 0.1)
	billboardGui.Enabled = true
	local billChildren = billboardGui.BillboardFrame:GetChildren()
	for i = 1, #billChildren do
		billChildren[i].Visible = false
	end
	billboardGui.BillboardFrame.SmallTalkBubble.Visible = true
end

function this:SetBillboardLODVeryFar(billboardGui)
	billboardGui.Enabled = false
end

function this:SetBillboardGuiLOD(billboardGui, origin)
	if not origin then return end

	if origin:IsA("Model") then
		local head = origin:FindFirstChild("Head")
		if not head then origin = origin.PrimaryPart
		else origin = head end
	end

	local bubbleDistance = distanceToBubbleOrigin(origin)

	if bubbleDistance < NEAR_BUBBLE_DISTANCE then
		this:SetBillboardLODNear(billboardGui)
	elseif bubbleDistance >= NEAR_BUBBLE_DISTANCE and bubbleDistance < MAX_BUBBLE_DISTANCE then
		this:SetBillboardLODDistant(billboardGui)
	else
		this:SetBillboardLODVeryFar(billboardGui)
	end
end

function this:CameraCFrameChanged()
	for index, value in pairs(this.CharacterSortedMsg:GetData()) do
		local playerBillboardGui = value["BillboardGui"]
		if playerBillboardGui then this:SetBillboardGuiLOD(playerBillboardGui, index) end
	end
end

function this:CreateBubbleText(message, shouldAutoLocalize)
	local bubbleText = Instance.new("TextLabel")
	bubbleText.Name = "BubbleText"
	bubbleText.BackgroundTransparency = 1

	if UserFixBubbleChatText then
		bubbleText.Size = UDim2.fromScale(1, 1)
	else
		bubbleText.Position = UDim2.new(0, CHAT_BUBBLE_WIDTH_PADDING / 2, 0, 0)
		bubbleText.Size = UDim2.new(1, -CHAT_BUBBLE_WIDTH_PADDING, 1, 0)
	end

	bubbleText.Font = CHAT_BUBBLE_FONT
	bubbleText.ClipsDescendants = true
	bubbleText.TextWrapped = true
	bubbleText.FontSize = CHAT_BUBBLE_FONT_SIZE
	bubbleText.Text = message
	bubbleText.Visible = false
	bubbleText.AutoLocalize = shouldAutoLocalize

	if UserFixBubbleChatText then
		local padding = Instance.new("UIPadding")
		padding.PaddingTop = UDim.new(0, CHAT_BUBBLE_PADDING)
		padding.PaddingRight = UDim.new(0, CHAT_BUBBLE_PADDING)
		padding.PaddingBottom = UDim.new(0, CHAT_BUBBLE_PADDING)
		padding.PaddingLeft = UDim.new(0, CHAT_BUBBLE_PADDING)
		padding.Parent = bubbleText
	end

	return bubbleText
end

function this:CreateSmallTalkBubble(chatBubbleType)
	local smallTalkBubble = this.ScalingChatBubbleWithTail[chatBubbleType]:Clone()
	smallTalkBubble.Name = "SmallTalkBubble"
	smallTalkBubble.AnchorPoint = Vector2.new(0, 0.5)
	smallTalkBubble.Position = UDim2.new(0, 0, 0.5, 0)
	smallTalkBubble.Visible = false
	local text = this:CreateBubbleText("...")
	text.TextScaled = true
	text.TextWrapped = false
	text.Visible = true
	text.Parent = smallTalkBubble

	return smallTalkBubble
end

function this:UpdateChatLinesForOrigin(origin, currentBubbleYPos)
	local bubbleQueue = this.CharacterSortedMsg:Get(origin).Fifo
	local bubbleQueueSize = bubbleQueue:Size()
	local bubbleQueueData = bubbleQueue:GetData()
	if #bubbleQueueData <= 1 then return end

	for index = (#bubbleQueueData - 1), 1, -1 do
		local value = bubbleQueueData[index]
		local bubble = value.RenderBubble
		if not bubble then return end
		local bubblePos = bubbleQueueSize - index + 1

		if bubblePos > 1 then
			local tail = bubble:FindFirstChild("ChatBubbleTail")
			if tail then tail:Destroy() end
			local bubbleText = bubble:FindFirstChild("BubbleText")
			if bubbleText then bubbleText.TextTransparency = 0.5 end
		end

		local udimValue = UDim2.new( bubble.Position.X.Scale, bubble.Position.X.Offset,
									1, currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT)
		bubble:TweenPosition(udimValue, Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.1, true)
		currentBubbleYPos = currentBubbleYPos - bubble.Size.Y.Offset - CHAT_BUBBLE_TAIL_HEIGHT
	end
end

function this:DestroyBubble(bubbleQueue, bubbleToDestroy)
	if not bubbleQueue then return end
	if bubbleQueue:Empty() then return end

	local bubble = bubbleQueue:Front().RenderBubble
	if not bubble then
		bubbleQueue:PopFront()
	 	return
	end

	spawn(function()
		while bubbleQueue:Front().RenderBubble ~= bubbleToDestroy do
			wait()
		end

		bubble = bubbleQueue:Front().RenderBubble

		local timeBetween = 0
		local bubbleText = bubble:FindFirstChild("BubbleText")
		local bubbleTail = bubble:FindFirstChild("ChatBubbleTail")

		while bubble and bubble.ImageTransparency < 1 do
			timeBetween = wait()
			if bubble then
				local fadeAmount = timeBetween * CHAT_BUBBLE_FADE_SPEED
				bubble.ImageTransparency = bubble.ImageTransparency + fadeAmount
				if bubbleText then bubbleText.TextTransparency = bubbleText.TextTransparency + fadeAmount end
				if bubbleTail then bubbleTail.ImageTransparency = bubbleTail.ImageTransparency + fadeAmount end
			end
		end

		if bubble then
			bubble:Destroy()
			bubbleQueue:PopFront()
		end
	end)
end

function this:CreateChatLineRender(instance, line, onlyCharacter, fifo, shouldAutoLocalize)
	if not instance then return end

	if not this.CharacterSortedMsg:Get(instance)["BillboardGui"] then
		this:CreateBillboardGuiHelper(instance, onlyCharacter)
	end

	local billboardGui = this.CharacterSortedMsg:Get(instance)["BillboardGui"]
	if billboardGui then
		local chatBubbleRender = this.ChatBubbleWithTail[line.BubbleColor]:Clone()
		chatBubbleRender.Visible = false
		local bubbleText = this:CreateBubbleText(line.Message, shouldAutoLocalize)

		bubbleText.Parent = chatBubbleRender
		chatBubbleRender.Parent = billboardGui.BillboardFrame

		line.RenderBubble = chatBubbleRender

		local currentTextBounds = TextService:GetTextSize(
				bubbleText.Text, CHAT_BUBBLE_FONT_SIZE_INT, CHAT_BUBBLE_FONT,
				Vector2.new(BILLBOARD_MAX_WIDTH, BILLBOARD_MAX_HEIGHT))
		local numOflines = (currentTextBounds.Y / CHAT_BUBBLE_FONT_SIZE_INT)

		if UserFixBubbleChatText then
			-- Need to use math.ceil to round up on retina displays
			local width = math.ceil(currentTextBounds.X + CHAT_BUBBLE_PADDING * 2)
			local height = numOflines * CHAT_BUBBLE_LINE_HEIGHT

			-- prep chat bubble for tween
			chatBubbleRender.Size = UDim2.fromOffset(0, 0)
			chatBubbleRender.Position = UDim2.fromScale(0.5, 1)

			chatBubbleRender:TweenSizeAndPosition(
				UDim2.fromOffset(width, height),
				UDim2.new(0.5, -width / 2, 1, -height),
				Enum.EasingDirection.Out,
				Enum.EasingStyle.Elastic,
				0.1,
				true,
				function()
					bubbleText.Visible = true
				end
			)

			-- todo: remove when over max bubbles
			this:SetBillboardGuiLOD(billboardGui, line.Origin)
			this:UpdateChatLinesForOrigin(line.Origin, -height)
		else
			local bubbleWidthScale = math.max((currentTextBounds.X + CHAT_BUBBLE_WIDTH_PADDING) / BILLBOARD_MAX_WIDTH, 0.1)

			-- prep chat bubble for tween
			chatBubbleRender.Size = UDim2.new(0, 0, 0, 0)
			chatBubbleRender.Position = UDim2.new(0.5, 0, 1, 0)

			local newChatBubbleOffsetSizeY = numOflines * CHAT_BUBBLE_LINE_HEIGHT

			chatBubbleRender:TweenSizeAndPosition(UDim2.new(bubbleWidthScale, 0, 0, newChatBubbleOffsetSizeY),
													UDim2.new( (1 - bubbleWidthScale) / 2, 0, 1, -newChatBubbleOffsetSizeY),
													Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.1, true,
													function() bubbleText.Visible = true end)

			-- todo: remove when over max bubbles
			this:SetBillboardGuiLOD(billboardGui, line.Origin)
			this:UpdateChatLinesForOrigin(line.Origin, -newChatBubbleOffsetSizeY)
		end

		delay(line.BubbleDieDelay, function()
			this:DestroyBubble(fifo, chatBubbleRender)
		end)
	end
end

function this:OnPlayerChatMessage(sourcePlayer, message, targetPlayer)

	if not this:BubbleChatEnabled() then return end

	local localPlayer = PlayersService.LocalPlayer
	local fromOthers = localPlayer ~= nil and sourcePlayer ~= localPlayer

	local safeMessage = this:SanitizeChatLine(message)

	local line = createPlayerChatLine(sourcePlayer, safeMessage, not fromOthers)

	if sourcePlayer and line.Origin then
		local fifo = this.CharacterSortedMsg:Get(line.Origin).Fifo
		fifo:PushBack(line)
		--Game chat (badges) won't show up here
		this:CreateChatLineRender(sourcePlayer.Character, line, true, fifo, false)
	end
end

function this:OnGameChatMessage(origin, message, color)
	-- Prevents conflicts with the new bubble chat if it is enabled
	if UserRoactBubbleChatBeta or (UserPreventOldBubbleChatOverlap and ChatService.BubbleChatEnabled) then
		return
	end

	local localPlayer = PlayersService.LocalPlayer
	local fromOthers = localPlayer ~= nil and (localPlayer.Character ~= origin)

	local bubbleColor = BubbleColor.WHITE

	if color == Enum.ChatColor.Blue then bubbleColor = BubbleColor.BLUE
	elseif color == Enum.ChatColor.Green then bubbleColor = BubbleColor.GREEN
	elseif color == Enum.ChatColor.Red then bubbleColor = BubbleColor.RED end

	local safeMessage = this:SanitizeChatLine(message)
	local line = createGameChatLine(origin, safeMessage, not fromOthers, bubbleColor)

	this.CharacterSortedMsg:Get(line.Origin).Fifo:PushBack(line)
	if UserShouldLocalizeGameChatBubble then
		this:CreateChatLineRender(origin, line, false, this.CharacterSortedMsg:Get(line.Origin).Fifo, true)
	else
		this:CreateChatLineRender(origin, line, false, this.CharacterSortedMsg:Get(line.Origin).Fifo, false)
	end
end

function this:BubbleChatEnabled()
	if UserRoactBubbleChatBeta or (UserPreventOldBubbleChatOverlap and ChatService.BubbleChatEnabled) then
		return false
	end
	local clientChatModules = ChatService:FindFirstChild("ClientChatModules")
	if clientChatModules then
		local chatSettings = clientChatModules:FindFirstChild("ChatSettings")
		if chatSettings then
			chatSettings = require(chatSettings)
			if chatSettings.BubbleChatEnabled ~= nil then
				return chatSettings.BubbleChatEnabled
			end
		end
	end
	return PlayersService.BubbleChat
end

function this:ShowOwnFilteredMessage()
	local clientChatModules = ChatService:FindFirstChild("ClientChatModules")
	if clientChatModules then
		local chatSettings = clientChatModules:FindFirstChild("ChatSettings")
		if chatSettings then
			chatSettings = require(chatSettings)
			return chatSettings.ShowUserOwnFilteredMessage
		end
	end
	return false
end

function findPlayer(playerName)
	for i,v in pairs(PlayersService:GetPlayers()) do
		if v.Name == playerName then
			return v
		end
	end
end

ChatService.Chatted:connect(function(origin, message, color) this:OnGameChatMessage(origin, message, color) end)

local cameraChangedCon = nil
if game.Workspace.CurrentCamera then
	cameraChangedCon = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(function(prop) this:CameraCFrameChanged() end)
end

game.Workspace.Changed:Connect(function(prop)
	if prop == "CurrentCamera" then
		if cameraChangedCon then cameraChangedCon:disconnect() end
		if game.Workspace.CurrentCamera then
			cameraChangedCon = game.Workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(function(prop) this:CameraCFrameChanged() end)
		end
	end
end)

local AllowedMessageTypes = nil

function getAllowedMessageTypes()
	if AllowedMessageTypes then
		return AllowedMessageTypes
	end
	local clientChatModules = ChatService:FindFirstChild("ClientChatModules")
	if clientChatModules then
		local chatSettings = clientChatModules:FindFirstChild("ChatSettings")
		if chatSettings then
			chatSettings = require(chatSettings)
			if chatSettings.BubbleChatMessageTypes then
				AllowedMessageTypes = chatSettings.BubbleChatMessageTypes
				return AllowedMessageTypes
			end
		end
		local chatConstants = clientChatModules:FindFirstChild("ChatConstants")
		if chatConstants then
			chatConstants = require(chatConstants)
			AllowedMessageTypes = {chatConstants.MessageTypeDefault, chatConstants.MessageTypeWhisper}
		end
		return AllowedMessageTypes
	end
	return {"Message", "Whisper"}
end

function checkAllowedMessageType(messageData)
	local allowedMessageTypes = getAllowedMessageTypes()
	for i = 1, #allowedMessageTypes do
		if allowedMessageTypes[i] == messageData.MessageType then
			return true
		end
	end
	return false
end

local ChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local OnMessageDoneFiltering = ChatEvents:WaitForChild("OnMessageDoneFiltering")
local OnNewMessage = ChatEvents:WaitForChild("OnNewMessage")

OnNewMessage.OnClientEvent:connect(function(messageData, channelName)
	if not checkAllowedMessageType(messageData) then
		return
	end

	local sender = findPlayer(messageData.FromSpeaker)
	if not sender then
		return
	end

	if not messageData.IsFiltered or messageData.FromSpeaker == LocalPlayer.Name then
		if messageData.FromSpeaker ~= LocalPlayer.Name or this:ShowOwnFilteredMessage() then
			return
		end
	end

	this:OnPlayerChatMessage(sender, messageData.Message, nil)
end)

OnMessageDoneFiltering.OnClientEvent:connect(function(messageData, channelName)
	if not checkAllowedMessageType(messageData) then
		return
	end

	local sender = findPlayer(messageData.FromSpeaker)
	if not sender then
		return
	end

	if messageData.FromSpeaker == LocalPlayer.Name and not this:ShowOwnFilteredMessage() then
		return
	end

	this:OnPlayerChatMessage(sender, messageData.Message, nil)
end)


Prompt: --!nonstrict

Response:
local Type = require(script.Parent.Type)
local ElementKind = require(script.Parent.ElementKind)
local ElementUtils = require(script.Parent.ElementUtils)
local Children = require(script.Parent.PropMarkers.Children)
local Symbol = require(script.Parent.Symbol)
local internalAssert = require(script.Parent.internalAssert)

local config = require(script.Parent.GlobalConfig).get()

local InternalData = Symbol.named("InternalData")


Prompt: --Sick Tunes--

Response:
local function AttachParticleControl(source_part)

	local prtc = nil

	local function Start()
		prtc = script.SickNotes:clone()
		prtc.Parent = source_part
	end

	local function Update()

	end

	local function Stop()
		if prtc ~= nil then
			prtc:destroy()
			prtc = nil
		end
	end

	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachParticleControl


Prompt:
--[[ LICENSE
lua-bit-numberlua License

===============================================================================

Copyright (C) 2008, David Manura.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

===============================================================================
--]]


Prompt: -----------------------------------Checks if the area where the tree is regenerating has parts on it ---------------

Response:
			local p = tree:GetChildren()
			--print (#p)
			local PPC = tree:GetPrimaryPartCFrame()
			--GetPartBoundsInBox Defines
			local filterObjects = {}
			local maxObjectsAllowed = math.huge
			local overlapParams = OverlapParams.new()
			overlapParams.CollisionGroup = "Default"
			overlapParams.FilterDescendantsInstances = filterObjects
			overlapParams.FilterType = Enum.RaycastFilterType.Blacklist
			overlapParams.MaxParts = maxObjectsAllowed
			local boundsbox = Vector3.new(12,31,12)
			local boundsboxCenter = CFrame.new(PPC.X, PPC.Y + 16.5, PPC.Z)
			local regenbox = workspace:GetPartBoundsInBox(boundsboxCenter, boundsbox, overlapParams)
			-- print (#regenbox)
			if #regenbox <= #p then


Prompt: -- player added event

Response:
players.PlayerAdded:connect(function()
	adjust()
end)


Prompt:
--Right	0
--Top	1
--Back	2
--Left	3
--Bottom	4
--Front	5

Response:
v = 1
s = 0
osi = 0
print(s)
if s == 0 or s == 3 then
	osi = p.Size.x - 1
elseif s == 1 or s == 4 then
	osi = p.Size.y - 1
elseif s == 2 or s == 5 then
	osi = p.Size.z - 1
end

function open()
	for i = 1, osi, v do
		local r = p:Resize(s, -v)
		if not r then
			repeat
				wait(0.1)
			until
				p:Resize(s, -v) == true
		end
		wait(0.1)
	end
end

function close()
	for i = 1, osi, v do
		local r = p:Resize(s, v)
		if not r then
			repeat
				wait(0.1)
			until
				p:Resize(s, v) == true
		end
		wait(0.1)
	end
end

script.Parent.opened.Changed:connect(function (v)
	if v then
		open()
	else
		close()
	end
end)


Prompt: -- variables:

Response:
wait()

v3 = Vector3
v2 = nil

function wt() wait() end -- Smooth

load = 0

repeat wt'' load = load + 1 until load < 2
load = load + 4

velo = 20
s_ = v3.new(script.Parent.Size.x, script.Parent.Size.y, script.Parent.Size.z)
scale = 4

function_ = true

print(v3, 'load: '..load, '')


Prompt: -- RANK, RANK NAMES & SPECIFIC USERS

Response:
Ranks = {
	{6,	"Owner",		};
	{5,	"HeadAdmin",	{"",0},	};
	{4,	"Admin",		{"",0},	};
	{3,	"Mod",			{"",0},	};
	{2,	"VIP",			{"",0},	};
	{1,	"NonAdmin",		};
};


Prompt: -- Luke

Response:
local model = script.Parent
local cache = {}
local closeTime = 0

local OPEN_TIME = 3

function openDoor()
	local currentTime = tick()
	if currentTime > closeTime then	-- This means the door is currently closed
		closeTime = currentTime + OPEN_TIME

		-- Open
		--todo: play sound
		for part,transparency in pairs(cache) do
			if part then
				part.Transparency = 1
			end
		end

		-- Wait
		while closeTime > tick() do
			wait(closeTime-tick())
		end

		-- Close
		--todo: play sound
		for part,transparency in pairs(cache) do
			if part and part.Parent then
				part.Transparency = transparency
			end
		end

	else
		-- If currently open, the hold door open for longer
		closeTime = currentTime + OPEN_TIME
	end
end

function touched(hit)
	if hit and hit.Parent then
		local humanoid = hit.Parent:FindFirstChildOfClass('Humanoid')
		if humanoid and humanoid.Health > 0 then
			openDoor()
		end
	end
end

for _,part in pairs(model:GetChildren()) do
	if part:IsA('BasePart') then
		part.Touched:connect(touched)
		cache[part] = part.Transparency
	end
end


Response:
	script.Parent.Handle3.Hinge1.Transparency = 1
	script.Parent.Handle3.Interactive1.Transparency = 1
	script.Parent.Handle3.Part1.Transparency = 1
	wait(0.03)
	script.Parent.Handle1.Hinge1.Transparency = 0
	script.Parent.Handle1.Interactive1.Transparency = 0
	script.Parent.Handle1.Part1.Transparency = 0


Response:
local RootPart = char:WaitForChild("HumanoidRootPart")
local RootJoint = RootPart.RootJoint
RootJoint.C0 = CFrame.new()
RootJoint.C1 = CFrame.new()

local Aiming = false

local ZoomDistance = 40

local NV

local L_150_ = {}

local L_153_ = {}
L_153_.cornerPeek = SpringMod.new(0)
L_153_.cornerPeek.d = 0.8
L_153_.cornerPeek.s = 16
L_153_.peekFactor = math.rad(-15)
L_153_.dirPeek = 0


Prompt: --Automatic Gauge Scaling

Response:
script.Parent.Parent.Values.RPM.Changed:connect(function()
	script.Parent["02"].BackgroundColor3 = Color3.new(math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/2000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/2000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/2000)))
	script.Parent["03"].BackgroundColor3 = Color3.new(math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/3000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/3000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/3000)))
	script.Parent["04"].BackgroundColor3 = Color3.new(math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/4000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/4000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/4000)))
	script.Parent["05"].BackgroundColor3 = Color3.new(math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/5000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/5000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/5000)))
	script.Parent["06"].BackgroundColor3 = Color3.new(math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/6000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/6000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/6000)))
	script.Parent["07"].BackgroundColor3 = Color3.new(math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/7000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/7000)),math.max(0.15,math.floor(script.Parent.Parent.Values.RPM.Value/7000)))
	script.Parent["08"].BackgroundColor3 = Color3.new(math.max(0.2,math.floor(script.Parent.Parent.Values.RPM.Value/8000)),0,0)
	script.Parent["09"].BackgroundColor3 = Color3.new(math.max(0.2,math.floor(script.Parent.Parent.Values.RPM.Value/9000)),0,0)
	script.Parent["10"].BackgroundColor3 = Color3.new(math.max(0.2,math.floor(script.Parent.Parent.Values.RPM.Value/10000)),0,0)
	script.Parent.Base.Rev.Rotation = -167+(math.max((1/9),((script.Parent.Parent.Values.RPM.Value/9000)-(1/9))))*138
	script.Parent.Base.Rev.ImageColor3 = Color3.new(1,(1-((script.Parent.Parent.Values.RPM.Value/9000)*8-7)),(1-((script.Parent.Parent.Values.RPM.Value/9000)*8-7)))
end)

script.Parent.Parent.Values.Gear.Changed:connect(function()
	local gearText = script.Parent.Parent.Values.Gear.Value
	local gearTextA = ""
	local gearTextB = ""
	if gearText == -1 then
		gearText = "R"
		gearTextB = "N1234567"
	elseif gearText == 0 then
		gearText = "N"
		gearTextA = "R"
		gearTextB = "1234567"
	elseif gearText == 1 then
		gearTextA = "RN"
		gearTextB = "234567"
	elseif gearText == 2 then
		gearTextA = "RN1"
		gearTextB = "34567"
	elseif gearText == 3 then
		gearTextA = "RN12"
		gearTextB = "4567"
	elseif gearText == 4 then
		gearTextA = "RN123"
		gearTextB = "567"
	elseif gearText == 5 then
		gearTextA = "RN1234"
		gearTextB = "67"
	elseif gearText == 6 then
		gearTextA = "RN12345"
		gearTextB = "7"
	elseif gearText == 7 then
		gearTextA = "RN123456"
	end
	script.Parent.Gear.Text = gearText
	script.Parent.GearA.Text = gearTextA
	script.Parent.GearB.Text = gearTextB
end)

script.Parent.Parent.Values.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCS.Value then
			script.Parent.TCS.TextColor3 = Color3.new(1,170/255,0)
			script.Parent.TCS.TextStrokeColor3 = Color3.new(1,170/255,0)
			if script.Parent.Parent.Values.TCSActive.Value then
				wait()
				script.Parent.TCS.Visible = not script.Parent.TCS.Visible
			else
				wait()
				script.Parent.TCS.Visible = false
			end
		else
			script.Parent.TCS.Visible = true
			script.Parent.TCS.TextColor3 = Color3.new(1,0,0)
			script.Parent.TCS.TextStrokeColor3 = Color3.new(1,0,0)
		end
	else
		script.Parent.TCS.Visible = false
	end
end)

script.Parent.Parent.Values.TCSActive.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = not script.Parent.TCS.Visible
		elseif not script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = true
		else
			wait()
			script.Parent.TCS.Visible = false
		end
	else
		script.Parent.TCS.Visible = false
	end
end)

script.Parent.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = not script.Parent.TCS.Visible
		elseif not script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.TCS.Visible = true
		end
	else
		if script.Parent.TCS.Visible then
			script.Parent.TCS.Visible = false
		end
	end
end)
script.Parent.Parent.Values.Gear.Changed:connect(function()
	if script.Parent.Parent.Values.LaunchMode.Value == true then
		script.Parent.Parent.Values.LaunchMode.Value = false
	end
	local gearText = script.Parent.Parent.Values.Gear.Value
	if gearText == 0 then gearText = "N"
	elseif gearText == -1 then gearText = "R"
	end
	script.Parent.Gear.Text = gearText
end)

script.Parent.Parent.Values.LaunchMode.Changed:connect(function()
	if script.Parent.Parent.Values.LaunchMode.Value == true then
		script.Parent.Launch.Visible = true
	else
		script.Parent.Launch.Visible = false
	end
end)


Prompt: -- loop to handle timed state transitions and tool animations

Response:
while Figure.Parent~=nil do
	local _, time = wait(0.1)
	move(time)
end


Prompt: --[[ The Module ]]

Response:
--
local BaseCamera = require(script.Parent:WaitForChild("BaseCamera"))
local LegacyCamera = setmetatable({}, BaseCamera)
LegacyCamera.__index = LegacyCamera

function LegacyCamera.new()
	local self = setmetatable(BaseCamera.new(), LegacyCamera)

	self.cameraType = Enum.CameraType.Fixed
	self.lastUpdate = tick()
	self.lastDistanceToSubject = nil

	return self
end

function LegacyCamera:GetModuleName()
	return "LegacyCamera"
end


Prompt: -- constants

Response:
local STAT_SCRIPT	= ServerScriptService.StatScript

local REMOTES	= ReplicatedStorage.Remotes
local MODULES	= ReplicatedStorage.Modules
	local DAMAGE	= require(MODULES.Damage)

local MAX_DISTANCE	= 20


Prompt: -- Using GUID so no conflict occur

Response:
script.Parent.OnInvoke = function(Player, Duration)
	if not UsedGUID[Player] then
		UsedGUID[Player] = {}
		if Player.Character:FindFirstChild("Humanoid") then
			Player.Character.Humanoid.WalkSpeed = 0
			Player.Character.Humanoid.JumpHeight = 0
			Player.Character.Humanoid.JumpPower = 0
		end
	end
	local GUID = GenerateGUID(Player)
	UsedGUID[Player][GUID] = true
	task.delay(Duration, function()
		if not UsedGUID[Player] then return end
		UsedGUID[Player][GUID] = nil
		if tlength(UsedGUID[Player]) > 0 then return end
		UsedGUID[Player] = nil
		if not Player.Character or not Player.Character:FindFirstChild("Humanoid") then return end
		Player.Character.Humanoid.WalkSpeed = StarterPlayer.CharacterWalkSpeed
		if Engine:IsGrabbing(Player) then return end
		Player.Character.Humanoid.JumpHeight = StarterPlayer.CharacterJumpHeight
		Player.Character.Humanoid.JumpPower = StarterPlayer.CharacterJumpPower
	end)
end


Prompt:
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------

Response:
	,VRecoil = {12,16}				--- Vertical Recoil
	,HRecoil = {5,7}				--- Horizontal Recoil
	,AimRecover = .7				---- Between 0 & 1

	,RecoilPunch = .15
	,VPunchBase = 2.5				--- Vertical Punch
	,HPunchBase = 1.7				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless

	,AimRecoilReduction = 5 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.15
	,MinRecoilPower = .5
	,MaxRecoilPower = 3.5
	,RecoilPowerStepAmount = .25

	,MinSpread = 0.56				--- Min bullet spread value | Studs
	,MaxSpread = 35					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0.5
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1.5					--- Max sway value based on player stamina | Studs


Prompt:
--////////////////////////////// Include
--//////////////////////////////////////

Response:
local ChatConstants = require(ReplicatedModules:WaitForChild("ChatConstants"))

local ChatChannel = require(modulesFolder:WaitForChild("ChatChannel"))
local Speaker = require(modulesFolder:WaitForChild("Speaker"))
local Util = require(modulesFolder:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization :: any) end)
ChatLocalization = ChatLocalization or {}

if not ChatLocalization.FormatMessageToSend or not ChatLocalization.LocalizeFormattedMessage then
	function ChatLocalization:FormatMessageToSend(key,default) return default end
end

local function allSpaces(inputString)
	local testString = string.gsub(inputString, " ", "")
	return string.len(testString) == 0
end


Prompt: -- ROBLOX upstream: https://github.com/facebook/jest/blob/v27.4.7/packages/jest-mock/src/index.ts


Prompt: --Main function

Response:
local function AttachAuraControl(source_part, eff_cont) --(source_part, effect_container)

	local AnimObj

	local function Start()
		AnimObj = {}
		AnimObj["LastUpdate"] = tick()

		AnimObj["Parts"] = {}

		for i = 1, 3 do
			local np = EFFECT_LIB.NewInvisiblePart()

			local particlez = script.Energy:Clone()
			particlez.Parent = np
			particlez.Enabled = true

			AnimObj["Parts"][i] = np

			np.Parent = eff_cont
		end
	end

	local function Update()
		local loop = EFFECT_LIB.Loop(3)
		local loop2 = EFFECT_LIB.Loop(8)

		for i = 1, #AnimObj["Parts"] do
			local res_cf = source_part.CFrame * CFrame.Angles(0, 0, math.rad(45 * math.sin(math.rad(360 * loop2)))) * CFrame.Angles(0, math.rad(loop * 360 + (360 / #AnimObj["Parts"] * (i - 1))), 0) * CFrame.new(0, 0, -3) * CFrame.Angles(0, math.rad(90), 0)
			AnimObj["Parts"][i].CFrame = source_part.CFrame - source_part.CFrame.p + res_cf.p
		end
	end

	local function Stop()
		eff_cont:ClearAllChildren()
		AnimObj = nil
	end

	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachAuraControl


Prompt: -- assume we are in the character, let's check

Response:
function sepuku()
	script.Parent = nil
end

local h = script.Parent:FindFirstChild("Humanoid")

if (h == nil) then sepuku() end

local oldSpeed = h.WalkSpeed
h.WalkSpeed = h.WalkSpeed * 3

local torso = script.Parent:FindFirstChild("Torso")

if (torso == nil) then sepuku() end

local head = script.Parent:FindFirstChild("Head")
if (head == nil) then head = torso end

local s = Instance.new("Fire")
s.Color = Color3.new(153, 0, 255)
s.Parent = torso

local count = h:FindFirstChild("CoffeeCount")
if (count == nil) then
	count = Instance.new("IntValue")
	count.Name = "CoffeeCount"
	count.Value = 1
	count.Parent = h
else

	if (count.Value > 3) then
		if (math.random() > .5) then

			local sound = Instance.new("Sound")
			sound.SoundId = "rbxasset://sounds\\Rocket shot.wav"
			sound.Parent = head
			sound.Volume = 1
			sound:play()

			local e = Instance.new("Explosion")
			e.BlastRadius = 4
			e.Position = head.Position

			s:Clone().Parent = head
			e.Parent = head

		end
	end
	count.Value = count.Value + 1
end

wait(30)

h.WalkSpeed = oldSpeed
s:Remove()

script.Parent = nil


Prompt: -- Add the Tween Module

Response: local UITween = require(game.ReplicatedStorage.UITweenModule)


Prompt:
--[[
	Game setup
]]

Response:
local localPlayer = Players.LocalPlayer
local playerGui = localPlayer:WaitForChild("PlayerGui")

local GuiHandler = require(ReplicatedStorage.Core.ClientGuisHandler)

if not PingHandler.doingSetup and not PingHandler.didSetup then
	PingHandler.setup()
end


Prompt:
--[[
	The TextReporter uses the results from a completed test to output text to
	standard output and TestService.
]]

Response:
local TestService = game:GetService("TestService")

local TestEnum = require(script.Parent.Parent.TestEnum)

local INDENT = (" "):rep(3)
local STATUS_SYMBOLS = {
	[TestEnum.TestStatus.Success] = "+",
	[TestEnum.TestStatus.Failure] = "-",
	[TestEnum.TestStatus.Skipped] = "~"
}
local UNKNOWN_STATUS_SYMBOL = "?"

local TextReporter = {}

local function compareNodes(a, b)
	return a.planNode.phrase:lower() < b.planNode.phrase:lower()
end

local function reportNode(node, buffer, level)
	buffer = buffer or {}
	level = level or 0

	if node.status == TestEnum.TestStatus.Skipped then
		return buffer
	end

	local line

	if node.status then
		local symbol = STATUS_SYMBOLS[node.status] or UNKNOWN_STATUS_SYMBOL

		line = ("%s[%s] %s"):format(
			INDENT:rep(level),
			symbol,
			node.planNode.phrase
		)
	else
		line = ("%s%s"):format(
			INDENT:rep(level),
			node.planNode.phrase
		)
	end

	table.insert(buffer, line)
	table.sort(node.children, compareNodes)

	for _, child in ipairs(node.children) do
		reportNode(child, buffer, level + 1)
	end

	return buffer
end

local function reportRoot(node)
	local buffer = {}
	table.sort(node.children, compareNodes)

	for _, child in ipairs(node.children) do
		reportNode(child, buffer, 0)
	end

	return buffer
end

local function report(root)
	local buffer = reportRoot(root)

	return table.concat(buffer, "\n")
end

function TextReporter.report(results)
	local resultBuffer = {
		"Test results:",
		report(results),
		("%d passed, %d failed, %d skipped"):format(
			results.successCount,
			results.failureCount,
			results.skippedCount
		)
	}

	print(table.concat(resultBuffer, "\n"))

	if results.failureCount > 0 then
		print(("%d test nodes reported failures."):format(results.failureCount))
	end

	if #results.errors > 0 then
		print("Errors reported by tests:")
		print("")

		for _, message in ipairs(results.errors) do
			TestService:Error(message)

			-- Insert a blank line after each error
			print("")
		end
	end
end

return TextReporter


Prompt:
------------------
--SPAWNING--
------------------

Response:
miked=script.Parent

itlh=miked.Torso:findFirstChild("Left Hip")
itlh.Part0=miked.Torso
itlh.Part1=miked:findFirstChild("Left Leg")
itlh.C0=CFrame.new(-4, -4, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
itlh.C1 = CFrame.new(-2, 4, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)

itrh=miked.Torso:findFirstChild("Right Hip")
itrh.Part0=miked.Torso
itrh.Part1=miked:findFirstChild("Right Leg")
itrh.C0=CFrame.new(4, -4, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
itrh.C1 = CFrame.new(2, 4, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)

itls=miked.Torso:findFirstChild("Left Shoulder")
itls.Part1=miked.Torso
itls.C0=CFrame.new(8, 2, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
itls.Part0=miked:findFirstChild("Left Arm")
itls.C1 = CFrame.new(2, 2, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)

itrs=miked.Torso:findFirstChild("Right Shoulder")
itrs.Part1=miked.Torso
itrs.C0=CFrame.new(-8, 2, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
itrs.Part0=miked:findFirstChild("Right Arm")
itrs.C1 = CFrame.new(-2, 2, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)

local w = Instance.new("Weld")
w.Parent = miked.Torso
w.Part0 = w.Parent
w.Part1 = miked.TE
w.C0 = CFrame.new(0, -8, 0)

miked.Head:makeJoints()


Prompt:
--[[
	Exits the view, including disconnection of any connections.
]]

Response:
function Spectating.exit()
	activeElements:Destroy()
end

return Spectating


Prompt: --         print("Distance from "..character.Name.." = "..distance)

Response:
         if distance <= 8*radius then
          torso.Velocity = (torso.Position - position).unit * 300;
          human:takeDamage(300-(distance-radius)*(300/radius))

          -- If player died


Prompt: -- Settings and GameSettings are read only

Response:
local Settings = UserSettings()	-- ignore warning
local GameSettings = Settings.GameSettings

local ShiftLockController = {}


Prompt: -- map to ScreenGui Holder

Response: local screenGui = playerGui:WaitForChild("ScreenGui")


Prompt: -- Container for temporary connections (disconnected automatically)

Response:
local Connections = {};

function DecorateTool.Equip()
	-- Enables the tool's equipped functionality

	-- Start up our interface
	ShowUI();

end;

function DecorateTool.Unequip()
	-- Disables the tool's equipped functionality

	-- Clear unnecessary resources
	HideUI();
	ClearConnections();

end;

function ClearConnections()
	-- Clears out temporary connections

	for ConnectionKey, Connection in pairs(Connections) do
		Connection:Disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;

function ShowUI()
	-- Creates and reveals the UI

	-- Reveal UI if already created
	if DecorateTool.UI then

		-- Reveal the UI
		DecorateTool.UI.Visible = true;

		-- Update the UI every 0.1 seconds
		UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

		-- Skip UI creation
		return;

	end;

	-- Create the UI
	DecorateTool.UI = Core.Tool.Interfaces.BTDecorateToolGUI:Clone();
	DecorateTool.UI.Parent = Core.UI;
	DecorateTool.UI.Visible = true;

	-- Enable each decoration type UI
	EnableOptionsUI(DecorateTool.UI.Smoke);
	EnableOptionsUI(DecorateTool.UI.Fire);
	EnableOptionsUI(DecorateTool.UI.Sparkles);

	-- Hook up manual triggering
	local SignatureButton = DecorateTool.UI:WaitForChild('Title'):WaitForChild('Signature')
	ListenForManualWindowTrigger(DecorateTool.ManualText, DecorateTool.Color.Color, SignatureButton)

	-- Update the UI every 0.1 seconds
	UIUpdater = Support.ScheduleRecurringTask(UpdateUI, 0.1);

end;


Prompt: --Tune

Response:
local WheelieButton = "T"
local DeadZone = 70


Prompt: --Automatic Gauge Scaling

Response:
if autoscaling then
	local Drive={}
	if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
		if car.Wheels:FindFirstChild("FL")~= nil then
			table.insert(Drive,car.Wheels.FL)
		end
		if car.Wheels:FindFirstChild("FR")~= nil then
			table.insert(Drive,car.Wheels.FR)
		end
		if car.Wheels:FindFirstChild("F")~= nil then
			table.insert(Drive,car.Wheels.F)
		end
	end
	if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
		if car.Wheels:FindFirstChild("RL")~= nil then
			table.insert(Drive,car.Wheels.RL)
		end
		if car.Wheels:FindFirstChild("RR")~= nil then
			table.insert(Drive,car.Wheels.RR)
		end
		if car.Wheels:FindFirstChild("R")~= nil then
			table.insert(Drive,car.Wheels.R)
		end
	end

	local wDia = 0
	for i,v in pairs(Drive) do
		if v.Size.x>wDia then wDia = v.Size.x end
	end
	Drive = nil
	for i,v in pairs(UNITS) do
		v.maxSpeed = math.ceil(v.scaling*wDia*math.pi*_lRPM/60/_Tune.Ratios[#_Tune.Ratios]/_Tune.FinalDrive)
		v.spInc = math.max(math.ceil(v.maxSpeed/200)*20,20)
	end
end

for i=0,revEnd do
	local ln = script.Parent.A:Clone()
	ln.Name = i
	ln.Parent = script.Parent.Tac.G
	ln.Rotation = -90 + i * 270 / (revEnd)
	ln.Num.Text = i
	ln.Num.Rotation = -ln.Rotation
	if i*1000>=math.ceil(_lRPM/1000)*1000 then
		ln.Num.TextColor3 = Color3.new(1,0,0)
	end
	ln.Num.Visible=true
	ln.Visible=true
end

local lns = Instance.new("Frame",script.Parent.Spd)
lns.Name = "lns"
lns.BackgroundTransparency = 1
lns.BorderSizePixel = 0
lns.Size = UDim2.new(0,0,0,0)

for i,v in pairs(UNITS) do
	local lnn = Instance.new("Frame",script.Parent.Spd.G)
	lnn.BackgroundTransparency = 1
	lnn.BorderSizePixel = 0
	lnn.Size = UDim2.new(1,0,1,0)
	lnn.Name = v.units
	if i~= 1 then lnn.Visible=false end

	for i=0,v.maxSpeed,v.spInc do
		local ln = script.Parent.A:clone()
		ln.Parent = lnn
		ln.Name = i
		ln.Rotation = -90 + 270*(i/v.maxSpeed)
		ln.Num.Text = i
		ln.Num.TextSize = 14
		ln.Num.Rotation = -ln.Rotation
		ln.Num.Visible=true
		ln.Visible=true
	end
end

if 	script.Parent.Parent.IsOn.Value then
	script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
end

script.Parent.Parent.IsOn.Changed:connect(function()
	if script.Parent.Parent.IsOn.Value then
		script.Parent:TweenPosition(UDim2.new(0, 0, 0, 0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad,1,true)
	end
end)

script.Parent.Parent.Values.RPM.Changed:connect(function()
	local r = script.Parent.Parent.Values.RPM
	script.Parent.Tac.G.Needle.Rotation = -90 + 270 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000))

	inTac.Rotation = -30 + 240 * math.min(1,script.Parent.Parent.Values.RPM.Value / (revEnd*1000))
end)

script.Parent.Parent.Values.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCS.Value then
			script.Parent.Clst.TCS.TextColor3 = Color3.new(1,170/255,0)
			script.Parent.Clst.TCS.TextStrokeColor3 = Color3.new(1,170/255,0)
			if script.Parent.Parent.Values.TCSActive.Value then
				wait()
				script.Parent.Clst.TCS.Visible = not script.Parent.Clst.TCS.Visible
			else
				wait()
				script.Parent.Clst.TCS.Visible = false
			end
		else
			script.Parent.Clst.TCS.Visible = true
			script.Parent.Clst.TCS.TextColor3 = Color3.new(1,0,0)
			script.Parent.Clst.TCS.TextStrokeColor3 = Color3.new(1,0,0)
		end
	else
		script.Parent.Clst.TCS.Visible = false
	end
end)

script.Parent.Parent.Values.TCSActive.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.Clst.TCS.Visible = not script.Parent.Clst.TCS.Visible
		elseif not script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.Clst.TCS.Visible = true
		else
			wait()
			script.Parent.Clst.TCS.Visible = false
		end
	else
		script.Parent.Clst.TCS.Visible = false
	end
end)

script.Parent.Clst.TCS.Changed:connect(function()
	if _Tune.TCSEnabled then
		if script.Parent.Parent.Values.TCSActive.Value and script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.Clst.TCS.Visible = not script.Parent.Clst.TCS.Visible
		elseif not script.Parent.Parent.Values.TCS.Value then
			wait()
			script.Parent.Clst.TCS.Visible = true
		end
	else
		if script.Parent.Clst.TCS.Visible then
			script.Parent.Clst.TCS.Visible = false
		end
	end
end)

script.Parent.Parent.Values.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABS.Value then
			script.Parent.Clst.ABS.TextColor3 = Color3.new(1,170/255,0)
			script.Parent.Clst.ABS.TextStrokeColor3 = Color3.new(1,170/255,0)
			if script.Parent.Parent.Values.ABSActive.Value then
				wait()
				script.Parent.Clst.ABS.Visible = not script.Parent.Clst.ABS.Visible
			else
				wait()
				script.Parent.Clst.ABS.Visible = false
			end
		else
			script.Parent.Clst.ABS.Visible = true
			script.Parent.Clst.ABS.TextColor3 = Color3.new(1,0,0)
			script.Parent.Clst.ABS.TextStrokeColor3 = Color3.new(1,0,0)
		end
	else
		script.Parent.Clst.ABS.Visible = false
	end
end)

script.Parent.Parent.Values.ABSActive.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.Clst.ABS.Visible = not script.Parent.Clst.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.Clst.ABS.Visible = true
		else
			wait()
			script.Parent.Clst.ABS.Visible = false
		end
	else
		script.Parent.Clst.ABS.Visible = false
	end
end)

script.Parent.Clst.ABS.Changed:connect(function()
	if _Tune.ABSEnabled then
		if script.Parent.Parent.Values.ABSActive.Value and script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.Clst.ABS.Visible = not script.Parent.Clst.ABS.Visible
		elseif not script.Parent.Parent.Values.ABS.Value then
			wait()
			script.Parent.Clst.ABS.Visible = true
		end
	else
		if script.Parent.Clst.ABS.Visible then
			script.Parent.Clst.ABS.Visible = false
		end
	end
end)

script.Parent.Parent.Values.PBrake.Changed:connect(function()
	script.Parent.Clst.P.Visible = script.Parent.Parent.Values.PBrake.Value
end)

script.Parent.Parent.Values.TransmissionMode.Changed:connect(function()
	if script.Parent.Parent.Values.TransmissionMode.Value == "Auto" then
		script.Parent.Clst.TMode.Text = "A/T"
		script.Parent.Clst.TMode.TextColor3 = Color3.new(1,170/255,0)
	elseif script.Parent.Parent.Values.TransmissionMode.Value == "Semi" then
		script.Parent.Clst.TMode.Text = "S/T"
		script.Parent.Clst.TMode.TextColor3 = Color3.new(0, 170/255, 127/255)
	else
		script.Parent.Clst.TMode.Text = "M/T"
		script.Parent.Clst.TMode.TextColor3 = Color3.new(1,85/255,.5)
	end
end)

script.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Spd.G.Needle.Rotation = -90 + 270 * math.min(1,UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude/UNITS[currentUnits].maxSpeed)
	script.Parent.Spd.G.Gear.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Values.Velocity.Value.Magnitude)
	inspd.Rotation = -30 + (240 / 160) * (math.abs(script.Parent.Parent.Values.Velocity.Value.Magnitude*((10/12) * (60/88))))
end)


Prompt: --BonBonBakery--

Response:
BadgetId = 2124489069 --put the code here

game.Players.PlayerAdded:connect(function(p)-- Do not change
wait(.5) --How long the person stays to earn the badge
b = game:GetService("BadgeService")-- Do not change
b:AwardBadge(p.userId,BadgetId)-- Do not change
end)-- Do not change


Prompt:
--[[*
 * Parse a glob pattern to create the source string for a regular
 * expression.
 *
 * ```js
 * const picomatch = require('picomatch');
 * const result = picomatch.parse(pattern[, options]);
 * ```
 * @param {String} `pattern`
 * @param {Object} `options`
 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
 * @api public
 ]]

Response:
function picomatch.parse(pattern, options: Object?)
	if Array.isArray(pattern) then
		return Array.map(pattern, function(p)
			return picomatch.parse(p, options)
		end)
	end
	return parse(pattern, Object.assign({}, options, { fastpaths = false }))
end


Prompt:
--[[
	Returns true if the provided instance is one of the ScreenGuis that is
	used by this dev module

	Parameters:
	instance - The instance to check

	Returns:
	true if the provided instance is one of the ScreenGuis that is
	used by this dev module and false otherwise.
]]

Response:
function GuiController:_isModuleScreenGui(instance: Instance)
	for _, screenGui in ipairs(self.screenGuis) do
		if instance == screenGui:getValue() then
			return true
		end
	end

	return false
end


Prompt: --// All global vars will be wiped/replaced except script

Response:
local function Expand(ent, point)
	ent.MouseLeave:connect(function(x,y)
		point.Visible = false
	end)

	ent.MouseMoved:connect(function(x,y)
		point.Label.Text = ent.Desc.Value
		point.Size = UDim2.new(0, 10000, 0, 10000)
		local bounds = point.Label.TextBounds.X
		local rows = math.floor(bounds/500)
		rows = rows+1
		if rows<1 then rows = 1 end
		local newx = 500
		if bounds<500 then newx = bounds end
		point.Visible = true
		point.Size = UDim2.new(0, newx+5, 0, (rows*20)+5)
		point.Position = UDim2.new(0, x, 0, y-40-((rows*20)+5))
	end)
end

return function(data)
	local parent = game
	local Plr = service.Player
	local GUI = gTable.Object
	local NewCloneBar = GUI.Entry
	local Point = GUI.Desc
	local drag = GUI.Drag
	local main = GUI.Drag.Main
	local ScrollFr = GUI.Drag.Main.ScrollingFrame
	local top = GUI.Drag.Title
	local cls = GUI.Drag.Close
	local hide = GUI.Drag.Hide
	local fakeDrag = GUI.Drag.Main.FakeDragger
	local drag2 = GUI.Drag.Main.Dragger
	local Search = GUI.Drag.Search
	local Refresh = GUI.Drag.Refresh

	Refresh.Visible=true
	Search.Visible=true

	Search.InputBegan:connect(function(t)
		drag.Draggable=false
	end)
	Search.InputEnded:connect(function(t)
		drag.Draggable=true
	end)

	cls.MouseButton1Click:connect(function()
		drag.Draggable = false
		drag:TweenPosition(UDim2.new(0, -drag.Size.X.Offset, drag.Position.Y.Scale, drag.Position.Y.Offset), "Out", "Sine", 0.5, true)
		wait(0.5)
		gTable:Destroy()
	end)

	drag.BackgroundColor3 = main.BackgroundColor3

	hide.MouseButton1Click:connect(function()
		if main.Visible then
			main.Visible = false
			drag.BackgroundTransparency = main.BackgroundTransparency
			hide.Text = "+"
		else
			main.Visible = true
			drag.BackgroundTransparency = 1
			hide.Text = "-"
		end
	end)

	local num = 0
	local mouse=service.Player:GetMouse()
	local nx,ny=drag.AbsoluteSize.X,main.AbsoluteSize.Y--405,400
	local dragging=false
	local defx,defy=nx,ny
	local topText=""
	mouse.Move:connect(function(x,y)
		if dragging then
			nx=defx+(drag2.Position.X.Offset+20)
			ny=defy+(drag2.Position.Y.Offset+20)
			if nx<230 then nx=230 end
			if ny<200 then ny=200 end
			drag.Size=UDim2.new(0, nx, 0, 30)
			main.Size=UDim2.new(1, 0, 0, ny)
			if nx<350 then
				if topText=="" then
					topText=top.Text
				end
				top.Text=""
			else
				if topText~="" then
					top.Text=topText
					topText=""
				end
			end
		end
	end)
	drag2.DragBegin:connect(function(init)
		dragging=true
	end)
	drag2.DragStopped:connect(function(x,y)
		dragging=false
		defx=nx
		defy=ny
		drag2.Position=UDim2.new(1,-20,1,-20)
		ScrollFr.CanvasSize = UDim2.new(0, 0, 0, (#ScrollFr:children())*20)
	end)

	local populate; populate = function(term)
		ScrollFr:ClearAllChildren()
		local num = 0
		local clone = NewCloneBar:Clone()
		clone.Position = UDim2.new(0, 5, 0, num*20)
		clone.Text = "Previous..."
		clone.Desc.Value = "Go back"
		clone.Visible = true
		clone.Parent = ScrollFr
		clone.Open.MouseButton1Click:connect(function()
			if parent.Parent then
				parent = parent.Parent
				populate()
			end
		end)
		Expand(clone, Point)
		num = num+1
		ScrollFr.CanvasSize = UDim2.new(0, 0, (num+1)/20, 0)

		for i,child in pairs(parent:GetChildren()) do
			if not term or term == "all" or term == "" or (term and string.find(string.lower(child.Name),string.lower(term))) then
				pcall(function()
					local clone = NewCloneBar:Clone()
					clone.Position = UDim2.new(0, 5, 0, num*20)
					clone.Text = tostring(child)
					clone:WaitForChild("Desc")
					clone.Desc.Value = child.ClassName
					clone.Visible = true
					clone.Parent = ScrollFr
					clone.Delete.MouseButton1Click:connect(function()
						child:Destroy()
						populate(term)
					end)
					clone.Open.MouseButton1Click:connect(function()
						parent = child
						populate()
					end)
					Expand(clone, Point)
					num = num+1
					ScrollFr.CanvasSize = UDim2.new(0, 0, (num+1)/20, 0)
				end)
			end
		end
	end
	----
	Search.FocusLost:connect(function(enterPressed)
		if enterPressed and (Search.Text ~= "Search" and Search.Text ~= "" or string.len(Search.Text) > 0) then
			populate(Search.Text)
		elseif enterPressed and (Search.Text=="" or string.len(Search.Text)==0 or string.lower(Search.Text)=="all") then
			ScrollFr:ClearAllChildren()
			Search.Text = "Search"
			populate()
		else
			Search.Text = "Search"
		end
	end)
	----
	Refresh.Visible = false
	----
	Search.Text="Search"

	Refresh.MouseButton1Click:connect(function()
		if (Search.Text ~= "Search" and Search.Text ~= "") then
			populate(Search.Text)
		else
			populate("all")
		end
	end)

	gTable:Ready()
	drag.Position = UDim2.new(0, -600, 0.5, -160)
	drag:TweenPosition(UDim2.new(0, 35, 0.5, -160), "Out", "Sine", 0.5)
	populate("all")
end


Prompt: -- Variables (best not to touch these!)

Response:
local button = script.Parent
local car = script.Parent.Parent.Car.Value
local sound = script.Parent.Start
sound.Parent = car.DriveSeat -- What brick the start sound is playing from.
button.MouseButton1Click:connect(function() -- Event when the button is clicked
	if script.Parent.Text == "Engine: Off" then -- If the text says it's off then..
		sound:Play() -- Startup sound plays..
		wait(1) -- For realism. Okay?
		script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car.
		button.Text = "Engine: On"  -- You don't really need this, but I would keep it.
	else -- If it's on then when you click the button,
		script.Parent.Parent.IsOn.Value = false -- The car is turned off.
		button.Text = "Engine: Off"
	end -- Don't touch this.
end) -- And don't touch this either.


Response:
function onSwimming(speed)
	if speed > 1.00 then
		local scale = 10.0
		playAnimation("swim", 0.4, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Swimming"
	else
		playAnimation("swimidle", 0.4, Humanoid)
		pose = "Standing"
	end
end

function animateTool()
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

local lastTick = 0

function stepAnimate(currentTime)
	local amplitude = 1
	local frequency = 1
	local deltaTime = currentTime - lastTick
	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

	if (jumpAnimTime > 0) then
		jumpAnimTime = jumpAnimTime - deltaTime
	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.2, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	-- Tool Animation handling
	local tool = Character:FindFirstChildOfClass("Tool")
	if tool and tool:FindFirstChild("Handle") then
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = currentTime + .3
		end

		if currentTime > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end


Prompt: -- OFFSET HANDLERS

Response:
local alignmentDetails = {}
alignmentDetails["left"] = {
	startScale = 0,
	getOffset = function()
		local offset = 48 + IconController.leftOffset
		if checkTopbarEnabled() then
			local chatEnabled = starterGui:GetCoreGuiEnabled("Chat")
			if chatEnabled then
				offset += 12 + 32
			end
			if voiceChatIsEnabledForUserAndWithinExperience and not isStudio then
				if chatEnabled then
					offset += 67
				else
					offset += 43
				end
			end
		end
		return offset
	end,
	getStartOffset = function()
		local alignmentGap = IconController["leftGap"]
		local startOffset = alignmentDetails.left.getOffset() + alignmentGap
		return startOffset
	end,
	records = {}
}
alignmentDetails["mid"] = {
	startScale = 0.5,
	getOffset = function()
		return 0
	end,
	getStartOffset = function(totalIconX)
		local alignmentGap = IconController["midGap"]
		return -totalIconX/2 + (alignmentGap/2)
	end,
	records = {}
}
alignmentDetails["right"] = {
	startScale = 1,
	getOffset = function()
		local offset = IconController.rightOffset
		local localCharacter  = localPlayer.Character
		local localHumanoid = localCharacter and localCharacter:FindFirstChild("Humanoid")
		local isR6 = if localHumanoid and localHumanoid.RigType == Enum.HumanoidRigType.R6 then true else false -- Even though the EmotesMenu doesn't appear for R6 players, it will still register as enabled unless manually disabled
		if (checkTopbarEnabled() or VRService.VREnabled) and (starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList) or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack) or (not isR6 and starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu))) then
			offset += 48
		end
		return offset
	end,
	getStartOffset = function(totalIconX)
		local startOffset = -totalIconX - alignmentDetails.right.getOffset()
		return startOffset
	end,
	records = {}
	--reverseSort = true
}


Prompt: -- initialize to idle

Response:
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"

while Figure.Parent ~= nil do
	local _, time = wait(0.1)
	move(time)
end


Prompt: --[[Engine]]

Response:
	--Torque Curve
	Tune.Horsepower		= 1200		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7000		--		Use sliders to manipulate values
	Tune.Redline		= 7500		--		Copy and paste slider values into the respective tune values
	Tune.ComfortShift   = 3500
	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)


Prompt: -- An object which stores a piece of reactive state.

Response:
export type StateObject<T> = Dependency & {
	type: string, -- replace with "State" when Luau supports singleton types
	kind: string,
	get: (StateObject<T>, asDependency: boolean?) -> T
}


Prompt:
--[[**
	ensures value is a table and all keys pass keyCheck and all values pass valueCheck

	@param keyCheck The function to use to check the keys
	@param valueCheck The function to use to check the values

	@returns A function that will return true iff the condition is passed
**--]]

Response:
function t.map(keyCheck, valueCheck)
	assert(t.callback(keyCheck), t.callback(valueCheck))
	local keyChecker = t.keys(keyCheck)
	local valueChecker = t.values(valueCheck)
	return function(value)
		local keySuccess, keyErr = keyChecker(value)
		if not keySuccess then
			return false, keyErr or ""
		end

		local valueSuccess, valueErr = valueChecker(value)
		if not valueSuccess then
			return false, valueErr or ""
		end

		return true
	end
end

do
	local arrayKeysCheck = t.keys(t.integer)
	--[[**
		ensures value is an array and all values of the array match check

		@param check The check to compare all values with

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.array(check)
		assert(t.callback(check))
		local valuesCheck = t.values(check)
		return function(value)
			local keySuccess, keyErrMsg = arrayKeysCheck(value)
			if keySuccess == false then
				return false, string.format("[array] %s", keyErrMsg or "")
			end

			-- # is unreliable for sparse arrays
			-- Count upwards using ipairs to avoid false positives from the behavior of #
			local arraySize = 0

			for _, _ in ipairs(value) do
				arraySize = arraySize + 1
			end

			for key in pairs(value) do
				if key < 1 or key > arraySize then
					return false, string.format("[array] key %s must be sequential", tostring(key))
				end
			end

			local valueSuccess, valueErrMsg = valuesCheck(value)
			if not valueSuccess then
				return false, string.format("[array] %s", valueErrMsg or "")
			end

			return true
		end
	end
end

do
	local callbackArray = t.array(t.callback)
	--[[**
		creates a union type

		@param ... The checks to union

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.union(...)
		local checks = {...}
		assert(callbackArray(checks))
		return function(value)
			for _, check in pairs(checks) do
				if check(value) then
					return true
				end
			end
			return false, "bad type for union"
		end
	end

	--[[**
		Alias for t.union
	**--]]
	t.some = t.union

	--[[**
		creates an intersection type

		@param ... The checks to intersect

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.intersection(...)
		local checks = {...}
		assert(callbackArray(checks))
		return function(value)
			for _, check in pairs(checks) do
				local success, errMsg = check(value)
				if not success then
					return false, errMsg or ""
				end
			end
			return true
		end
	end

	--[[**
		Alias for t.intersection
	**--]]
	t.every = t.intersection
end

do
	local checkInterface = t.map(t.any, t.callback)
	--[[**
		ensures value matches given interface definition

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.interface(checkTable)
		assert(checkInterface(checkTable))
		return function(value)
			local tableSuccess, tableErrMsg = t.table(value)
			if tableSuccess == false then
				return false, tableErrMsg or ""
			end

			for key, check in pairs(checkTable) do
				local success, errMsg = check(value[key])
				if success == false then
					return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "")
				end
			end
			return true
		end
	end

	--[[**
		ensures value matches given interface definition strictly

		@param checkTable The interface definition

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.strictInterface(checkTable)
		assert(checkInterface(checkTable))
		return function(value)
			local tableSuccess, tableErrMsg = t.table(value)
			if tableSuccess == false then
				return false, tableErrMsg or ""
			end

			for key, check in pairs(checkTable) do
				local success, errMsg = check(value[key])
				if success == false then
					return false, string.format("[interface] bad value for %s:\n\t%s", tostring(key), errMsg or "")
				end
			end

			for key in pairs(value) do
				if not checkTable[key] then
					return false, string.format("[interface] unexpected field '%s'", tostring(key))
				end
			end

			return true
		end
	end
end


Prompt: --// Recoil Settings

Response:
	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