Response:
	if hit.Parent:findFirstChild("Humanoid") ~= nil then
		local target1 = "RightUpperArm"
		local target2 = "RightUpperArm2"
		if hit.Parent:findFirstChild(target2) == nil then
			local g = script.Parent.Parent[target2]:clone()
			g.Parent = hit.Parent
			local C = g:GetChildren()
			for i=1, #C do
				if C[i].className == "UnionOperation" or C[i].className =="Part" or C[i].className == "WedgePart" or C[i].className == "MeshPart" then
					local W = Instance.new("Weld")
					W.Part0 = g.Middle
					W.Part1 = C[i]
					local CJ = CFrame.new(g.Middle.Position)
					local C0 = g.Middle.CFrame:inverse()*CJ
					local C1 = C[i].CFrame:inverse()*CJ
					W.C0 = C0
					W.C1 = C1
					W.Parent = g.Middle
				end
				local Y = Instance.new("Weld")
				Y.Part0 = hit.Parent[target1]
				Y.Part1 = g.Middle
				Y.C0 = CFrame.new(0.26, 0, 0)
				Y.Parent = Y.Part0
			end

		local h = g:GetChildren()
		for i = 1, # h do
			h[i].Anchored = false
			h[i].CanCollide = false
		end
	end
	end


Prompt: -- List of creatable light types

Response:
local LightTypes = { 'SpotLight', 'PointLight', 'SurfaceLight' };

function OpenLightOptions(LightType)
	-- Opens the settings UI for the given light type

	-- Get the UI
	local UI = LightingTool.UI[LightType];
	local UITemplate = Core.Tool.Interfaces.BTLightingToolGUI[LightType];

	-- Close up all light option UIs
	CloseLightOptions(LightType);

	-- Calculate how much to expand this options UI by
	local HeightExpansion = UDim2.new(0, 0, 0, UITemplate.Options.Size.Y.Offset);

	-- Start the options UI size from 0
	UI.Options.Size = UDim2.new(UI.Options.Size.X.Scale, UI.Options.Size.X.Offset, UI.Options.Size.Y.Scale, 0);

	-- Allow the options UI to be seen
	UI.ClipsDescendants = false;

	-- Perform the options UI resize animation
	UI.Options:TweenSize(
		UITemplate.Options.Size + HeightExpansion,
		Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true,
		function ()

			-- Allow visibility of overflowing UIs within the options UI
			UI.Options.ClipsDescendants = false;

		end
	);

	-- Expand the main UI to accommodate the expanded options UI
	LightingTool.UI:TweenSize(
		Core.Tool.Interfaces.BTLightingToolGUI.Size + HeightExpansion,
		Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true
	);

	-- Push any UIs below this one downwards
	local LightTypeIndex = Support.FindTableOccurrence(LightTypes, LightType);
	for LightTypeIndex = LightTypeIndex + 1, #LightTypes do

		-- Get the UI
		local LightType = LightTypes[LightTypeIndex];
		local UI = LightingTool.UI[LightType];

		-- Perform the position animation
		UI:TweenPosition(
			UDim2.new(
				UI.Position.X.Scale,
				UI.Position.X.Offset,
				UI.Position.Y.Scale,
				30 + 30 * (LightTypeIndex - 1) + HeightExpansion.Y.Offset
			),
			Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true
		);

	end;

	-- Enable surface setting by clicking
	EnableSurfaceClickSelection(LightType);

end;

function CloseLightOptions(Exception)
	-- Closes all light options, except the one for the given light type

	-- Go through each light type
	for LightTypeIndex, LightType in pairs(LightTypes) do

		-- Get the UI for each light type
		local UI = LightingTool.UI[LightType];
		local UITemplate = Core.Tool.Interfaces.BTLightingToolGUI[LightType];

		-- Remember the initial size for each options UI
		local InitialSize = UITemplate.Options.Size;

		-- Move each light type UI to its starting position
		UI:TweenPosition(
			UDim2.new(
				UI.Position.X.Scale,
				UI.Position.X.Offset,
				UI.Position.Y.Scale,
				30 + 30 * (LightTypeIndex - 1)
			),
			Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true
		);

		-- Make sure to not resize the exempt light type UI
		if not Exception or Exception and LightType ~= Exception then

			-- Allow the options UI to be resized
			UI.Options.ClipsDescendants = true;

			-- Perform the resize animation to close up
			UI.Options:TweenSize(
				UDim2.new(UI.Options.Size.X.Scale, UI.Options.Size.X.Offset, UI.Options.Size.Y.Scale, 0),
				Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true,
				function ()

					-- Hide the option UI
					UI.ClipsDescendants = true;

					-- Set the options UI's size to its initial size (for reexpansion)
					UI.Options.Size = InitialSize;

				end
			);

		end;

	end;

	-- Contract the main UI if no option UIs are being opened
	if not Exception then
		LightingTool.UI:TweenSize(
			Core.Tool.Interfaces.BTLightingToolGUI.Size,
			Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true
		);
	end;

end;

function UpdateUI()
	-- Updates information on the UI

	-- Make sure the UI's on
	if not LightingTool.UI then
		return;
	end;

	-- Go through each light type and update each options UI
	for _, LightType in pairs(LightTypes) do

		local Lights = GetLights(LightType);
		local LightSettingsUI = LightingTool.UI[LightType];

		-- Option input references
		local Options = LightSettingsUI.Options;
		local RangeInput = Options.RangeOption.Input.TextBox;
		local BrightnessInput = Options.BrightnessOption.Input.TextBox;
		local ColorPicker = Options.ColorOption.HSVPicker;
		local ColorIndicator = Options.ColorOption.Indicator;
		local ShadowsCheckbox = Options.ShadowsOption.Checkbox;

		-- Add/remove button references
		local AddButton = LightSettingsUI.AddButton;
		local RemoveButton = LightSettingsUI.RemoveButton;

		-- Hide option UIs for light types not present in the selection
		if #Lights == 0 and not LightSettingsUI.ClipsDescendants then
			CloseLightOptions();
		end;

		-------------------------------------------
		-- Show and hide "ADD" and "REMOVE" buttons
		-------------------------------------------

		-- If no selected parts have lights
		if #Lights == 0 then

			-- Show add button only
			AddButton.Visible = true;
			AddButton.Position = UDim2.new(1, -AddButton.AbsoluteSize.X - 5, 0, 3);
			RemoveButton.Visible = false;

		-- If only some selected parts have lights
		elseif #Lights < #Selection.Parts then

			-- Show both add and remove buttons
			AddButton.Visible = true;
			AddButton.Position = UDim2.new(1, -AddButton.AbsoluteSize.X - 5, 0, 3);
			RemoveButton.Visible = true;
			RemoveButton.Position = UDim2.new(1, -AddButton.AbsoluteSize.X - 5 - RemoveButton.AbsoluteSize.X - 2, 0, 3);

		-- If all selected parts have lights
		elseif #Lights == #Selection.Parts then

			-- Show remove button
			RemoveButton.Visible = true;
			RemoveButton.Position = UDim2.new(1, -RemoveButton.AbsoluteSize.X - 5, 0, 3);
			AddButton.Visible = false;

		end;

		--------------------
		-- Update each input
		--------------------

		-- Update the standard inputs
		UpdateDataInputs {
			[RangeInput] = Support.Round(Support.IdentifyCommonProperty(Lights, 'Range'), 2) or '*';
			[BrightnessInput] = Support.Round(Support.IdentifyCommonProperty(Lights, 'Brightness'), 2) or '*';
		};

		-- Update type-specific inputs
		if LightType == 'SpotLight' or LightType == 'SurfaceLight' then

			-- Get the type-specific inputs
			local AngleInput = Options.AngleOption.Input.TextBox;
			local SideDropdown = Core.Cheer(Options.SideOption.Dropdown);

			-- Update the angle input
			UpdateDataInputs {
				[AngleInput] = Support.Round(Support.IdentifyCommonProperty(Lights, 'Angle'), 2) or '*';
			};

			-- Update the surface dropdown input
			local Face = Support.IdentifyCommonProperty(Lights, 'Face');
			SideDropdown.SetOption(Face and Face.Name or '*');

		end;

		-- Update special color input
		local Color = Support.IdentifyCommonProperty(Lights, 'Color');
		if Color then
			ColorIndicator.BackgroundColor3 = Color;
			ColorIndicator.Varies.Text = '';
		else
			ColorIndicator.BackgroundColor3 = Color3.new(222/255, 222/255, 222/255);
			ColorIndicator.Varies.Text = '*';
		end;

		-- Update the special shadows input
		local ShadowsEnabled = Support.IdentifyCommonProperty(Lights, 'Shadows');
		if ShadowsEnabled == true then
			ShadowsCheckbox.Image = Core.Assets.CheckedCheckbox;
		elseif ShadowsEnabled == false then
			ShadowsCheckbox.Image = Core.Assets.UncheckedCheckbox;
		elseif ShadowsEnabled == nil then
			ShadowsCheckbox.Image = Core.Assets.SemicheckedCheckbox;
		end;

	end;

end;

function UpdateDataInputs(Data)
	-- Updates the data in the given TextBoxes when the user isn't typing in them

	-- Go through the inputs and data
	for Input, UpdatedValue in pairs(Data) do

		-- Makwe sure the user isn't typing into the input
		if not Input:IsFocused() then

			-- Set the input's value
			Input.Text = tostring(UpdatedValue);

		end;

	end;

end;

function AddLights(LightType)

	-- Prepare the change request for the server
	local Changes = {};

	-- Go through the selection
	for _, Part in pairs(Selection.Parts) do

		-- Make sure this part doesn't already have a light
		if not Support.GetChildOfClass(Part, LightType) then

			-- Queue a light to be created for this part
			table.insert(Changes, { Part = Part, LightType = LightType });

		end;

	end;

	-- Send the change request to the server
	local Lights = Core.SyncAPI:Invoke('CreateLights', Changes);

	-- Put together the history record
	local HistoryRecord = {
		Lights = Lights;
		Selection = Selection.Items;

		Unapply = function (Record)
			-- Reverts this change

			-- Select changed parts
			Selection.Replace(Record.Selection)

			-- Remove the lights
			Core.SyncAPI:Invoke('Remove', Record.Lights);

		end;

		Apply = function (Record)
			-- Reapplies this change

			-- Restore the lights
			Core.SyncAPI:Invoke('UndoRemove', Record.Lights);

			-- Select changed parts
			Selection.Replace(Record.Selection)

		end;

	};

	-- Register the history record
	Core.History.Add(HistoryRecord);

	-- Open the options UI for this light type
	OpenLightOptions(LightType);

end;

function RemoveLights(LightType)

	-- Get all the lights in the selection
	local Lights = GetLights(LightType);

	-- Create the history record
	local HistoryRecord = {
		Lights = Lights;
		Selection = Selection.Items;

		Unapply = function (Record)
			-- Reverts this change

			-- Restore the lights
			Core.SyncAPI:Invoke('UndoRemove', Record.Lights);

			-- Select changed parts
			Selection.Replace(Record.Selection)

		end;

		Apply = function (Record)
			-- Reapplies this change

			-- Select changed parts
			Selection.Replace(Record.Selection)

			-- Remove the lights
			Core.SyncAPI:Invoke('Remove', Record.Lights);

		end;

	};

	-- Send the removal request
	Core.SyncAPI:Invoke('Remove', Lights);

	-- Register the history record
	Core.History.Add(HistoryRecord);

end;

function TrackChange()

	-- Start the record
	HistoryRecord = {
		Before = {};
		After = {};
		Selection = Selection.Items;

		Unapply = function (Record)
			-- Reverts this change

			-- Select the changed parts
			Selection.Replace(Record.Selection)

			-- Send the change request
			Core.SyncAPI:Invoke('SyncLighting', Record.Before);

		end;

		Apply = function (Record)
			-- Applies this change

			-- Select the changed parts
			Selection.Replace(Record.Selection)

			-- Send the change request
			Core.SyncAPI:Invoke('SyncLighting', Record.After);

		end;

	};

end;

function RegisterChange()
	-- Finishes creating the history record and registers it

	-- Make sure there's an in-progress history record
	if not HistoryRecord then
		return;
	end;

	-- Send the change to the server
	Core.SyncAPI:Invoke('SyncLighting', HistoryRecord.After);

	-- Register the record and clear the staging
	Core.History.Add(HistoryRecord);
	HistoryRecord = nil;

end;

function SetRange(LightType, Range)

	-- Make sure the given range is valid
	if not Range then
		return;
	end;

	-- Start a history record
	TrackChange();

	-- Go through each light
	for _, Light in pairs(GetLights(LightType)) do

		-- Store the state of the light before modification
		table.insert(HistoryRecord.Before, { Part = Light.Parent, LightType = LightType, Range = Light.Range });

		-- Create the change request for this light
		table.insert(HistoryRecord.After, { Part = Light.Parent, LightType = LightType, Range = Range });

	end;

	-- Register the changes
	RegisterChange();

end;

function SetBrightness(LightType, Brightness)

	-- Make sure the given brightness is valid
	if not Brightness then
		return;
	end;

	-- Start a history record
	TrackChange();

	-- Go through each light
	for _, Light in pairs(GetLights(LightType)) do

		-- Store the state of the light before modification
		table.insert(HistoryRecord.Before, { Part = Light.Parent, LightType = LightType, Brightness = Light.Brightness });

		-- Create the change request for this light
		table.insert(HistoryRecord.After, { Part = Light.Parent, LightType = LightType, Brightness = Brightness });

	end;

	-- Register the changes
	RegisterChange();

end;

function SetColor(LightType, Color)

	-- Make sure the given color is valid
	if not Color then
		return;
	end;

	-- Start a history record
	TrackChange();

	-- Go through each light
	for _, Light in pairs(GetLights(LightType)) do

		-- Store the state of the light before modification
		table.insert(HistoryRecord.Before, { Part = Light.Parent, LightType = LightType, Color = Light.Color });

		-- Create the change request for this light
		table.insert(HistoryRecord.After, { Part = Light.Parent, LightType = LightType, Color = Color });

	end;

	-- Register the changes
	RegisterChange();

end;

function ToggleShadows(LightType)

	-- Determine whether to turn shadows on or off
	local ShadowsEnabled = not Support.IdentifyCommonProperty(GetLights(LightType), 'Shadows');

	-- Start a history record
	TrackChange();

	-- Go through each light
	for _, Light in pairs(GetLights(LightType)) do

		-- Store the state of the light before modification
		table.insert(HistoryRecord.Before, { Part = Light.Parent, LightType = LightType, Shadows = Light.Shadows });

		-- Create the change request for this light
		table.insert(HistoryRecord.After, { Part = Light.Parent, LightType = LightType, Shadows = ShadowsEnabled });

	end;

	-- Register the changes
	RegisterChange();

end;

function SetSurface(LightType, Face)

	-- Make sure the given face is valid, and this is an applicable light type
	if not Face or not (LightType == 'SurfaceLight' or LightType == 'SpotLight') then
		return;
	end;

	-- Start a history record
	TrackChange();

	-- Go through each light
	for _, Light in pairs(GetLights(LightType)) do

		-- Store the state of the light before modification
		table.insert(HistoryRecord.Before, { Part = Light.Parent, LightType = LightType, Face = Light.Face });

		-- Create the change request for this light
		table.insert(HistoryRecord.After, { Part = Light.Parent, LightType = LightType, Face = Face });

	end;

	-- Register the changes
	RegisterChange();

end;

function SetAngle(LightType, Angle)

	-- Make sure the given angle is valid
	if not Angle then
		return;
	end;

	-- Start a history record
	TrackChange();

	-- Go through each light
	for _, Light in pairs(GetLights(LightType)) do

		-- Store the state of the light before modification
		table.insert(HistoryRecord.Before, { Part = Light.Parent, LightType = LightType, Angle = Light.Angle });

		-- Create the change request for this light
		table.insert(HistoryRecord.After, { Part = Light.Parent, LightType = LightType, Angle = Angle });

	end;

	-- Register the changes
	RegisterChange();

end;


Prompt: -- Moves playerToTeleport close to destinationPlayer, if possible. Returns wether or not the operation succeeded

Response:
function TeleportToPlayer.teleport(playerToTeleport: Player, destinationPlayer: Player, teleportDistance: number)
	teleportDistance = teleportDistance or DEFAULT_TELEPORT_DISTANCE

	local spawnPoint = TeleportToPlayer.getCharacterTeleportPoint(destinationPlayer.Character, teleportDistance)
	if not spawnPoint or not TeleportToPlayer.validate(playerToTeleport, destinationPlayer, spawnPoint) then
		return false
	end

	local rootPart = playerToTeleport.Character and playerToTeleport.Character:FindFirstChild("HumanoidRootPart")
	local humanoid = playerToTeleport.Character and playerToTeleport.Character:FindFirstChild("Humanoid")
	if not rootPart or not humanoid then
		return false
	end

	if humanoid.Sit then -- Un-sits the player, otherwise the seat will be moved as well
		humanoid.Sit = false
		humanoid.Seated:Wait() -- Humanoid.Seated fires when the player stands up, after the seat weld is removed
	end

	-- Inspired from https://developer.roblox.com/en-us/api-reference/property/Humanoid/HipHeight
	local rootPartHeight = humanoid.HipHeight + rootPart.Size.Y / 2
	if humanoid.RigType == Enum.HumanoidRigType.R6 then
		local leg = humanoid.Parent:FindFirstChild("Left Leg") or humanoid.Parent:FindFirstChild("Right Leg")
		if leg then
			rootPartHeight += leg.Size.Y
		end
	end

	rootPart.CFrame = spawnPoint + Vector3.new(0, rootPartHeight, 0)
	return true
end


Prompt:
--[[

	MatchTable {
		Some: (value: any) -> any
		None: () -> any
	}

	CONSTRUCTORS:

		Option.Some(anyNonNilValue): Option<any>
		Option.Wrap(anyValue): Option<any>

	STATIC FIELDS:

		Option.None: Option<None>

	STATIC METHODS:

		Option.Is(obj): boolean

	METHODS:

		opt:Match(): (matches: MatchTable) -> any
		opt:IsSome(): boolean
		opt:IsNone(): boolean
		opt:Unwrap(): any
		opt:Expect(errMsg: string): any
		opt:ExpectNone(errMsg: string): void
		opt:UnwrapOr(default: any): any
		opt:UnwrapOrElse(default: () -> any): any
		opt:And(opt2: Option<any>): Option<any>
		opt:AndThen(predicate: (unwrapped: any) -> Option<any>): Option<any>
		opt:Or(opt2: Option<any>): Option<any>
		opt:OrElse(orElseFunc: () -> Option<any>): Option<any>
		opt:XOr(opt2: Option<any>): Option<any>
		opt:Contains(value: any): boolean

	--------------------------------------------------------------------

	Options are useful for handling nil-value cases. Any time that an
	operation might return nil, it is useful to instead return an
	Option, which will indicate that the value might be nil, and should
	be explicitly checked before using the value. This will help
	prevent common bugs caused by nil values that can fail silently.

	Example:

	local result1 = Option.Some(32)
	local result2 = Option.Some(nil)
	local result3 = Option.Some("Hi")
	local result4 = Option.Some(nil)
	local result5 = Option.None

	-- Use 'Match' to match if the value is Some or None:
	result1:Match {
		Some = function(value) print(value) end;
		None = function() print("No value") end;
	}

	-- Raw check:
	if result2:IsSome() then
		local value = result2:Unwrap() -- Explicitly call Unwrap
		print("Value of result2:", value)
	end

	if result3:IsNone() then
		print("No result for result3")
	end

	-- Bad, will throw error bc result4 is none:
	local value = result4:Unwrap()

--]]

Response:
local CLASSNAME = "Option"

local Option = {}
Option.__index = Option

function Option._new(value)
	local self = setmetatable({
		ClassName = CLASSNAME;
		_v = value;
		_s = (value ~= nil);
	}, Option)
	return self
end

function Option.Some(value)
	assert(value ~= nil, "Option.Some() value cannot be nil")
	return Option._new(value)
end

function Option.Wrap(value)
	if (value == nil) then
		return Option.None
	else
		return Option.Some(value)
	end
end

function Option.Is(obj)
	return (type(obj) == "table" and getmetatable(obj) == Option)
end

function Option.Assert(obj)
	assert(Option.Is(obj), "Result was not of type Option")
end

function Option.Deserialize(data) -- type data = {ClassName: string, Value: any}
	assert(type(data) == "table" and data.ClassName == CLASSNAME, "Invalid data for deserializing Option")
	return (data.Value == nil and Option.None or Option.Some(data.Value))
end

function Option:Serialize()
	return {
		ClassName = self.ClassName;
		Value = self._v;
	}
end

function Option:Match(matches)
	local onSome = matches.Some
	local onNone = matches.None
	assert(type(onSome) == "function", "Missing 'Some' match")
	assert(type(onNone) == "function", "Missing 'None' match")
	if (self:IsSome()) then
		return onSome(self:Unwrap())
	else
		return onNone()
	end
end

function Option:IsSome()
	return self._s
end

function Option:IsNone()
	return (not self._s)
end

function Option:Expect(msg)
	assert(self:IsSome(), msg)
	return self._v
end

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

function Option:Unwrap()
	return self:Expect("Cannot unwrap option of None type")
end

function Option:UnwrapOr(default)
	if (self:IsSome()) then
		return self:Unwrap()
	else
		return default
	end
end

function Option:UnwrapOrElse(defaultFunc)
	if (self:IsSome()) then
		return self:Unwrap()
	else
		return defaultFunc()
	end
end

function Option:And(optB)
	if (self:IsSome()) then
		return optB
	else
		return Option.None
	end
end

function Option:AndThen(andThenFunc)
	if (self:IsSome()) then
		local result = andThenFunc(self:Unwrap())
		Option.Assert(result)
		return result
	else
		return Option.None
	end
end

function Option:Or(optB)
	if (self:IsSome()) then
		return self
	else
		return optB
	end
end

function Option:OrElse(orElseFunc)
	if (self:IsSome()) then
		return self
	else
		local result = orElseFunc()
		Option.Assert(result)
		return result
	end
end

function Option:XOr(optB)
	local someOptA = self:IsSome()
	local someOptB = optB:IsSome()
	if (someOptA == someOptB) then
		return Option.None
	elseif (someOptA) then
		return self
	else
		return optB
	end
end

function Option:Filter(predicate)
	if (self:IsNone() or not predicate(self._v)) then
		return Option.None
	else
		return self
	end
end

function Option:Contains(value)
	return (self:IsSome() and self._v == value)
end

function Option:__tostring()
	if (self:IsSome()) then
		return ("Option<" .. typeof(self._v) .. ">")
	else
		return "Option<None>"
	end
end

function Option:__eq(opt)
	if (Option.Is(opt)) then
		if (self:IsSome() and opt:IsSome()) then
			return (self:Unwrap() == opt:Unwrap())
		elseif (self:IsNone() and opt:IsNone()) then
			return true
		end
	end
	return false
end

Option.None = Option._new()

return Option


Prompt: --Output Cache

Response:
local HPCache = {}

if _Tune.CacheTorque then
	for gear,ratio in pairs(_Tune.Ratios) do
		local hpPlot = {}
		for rpm = math.floor(_Tune.IdleRPM/_Tune.CacheRPMInc),math.ceil((_Tune.Redline+100)/_Tune.CacheRPMInc) do
			local tqPlot = {}
			tqPlot.Horsepower,tqPlot.Torque = GetCurve(rpm*_Tune.CacheRPMInc,gear-2)
			hp1,tq1 = GetCurve((rpm+1)*_Tune.CacheRPMInc,gear-2)
			tqPlot.HpSlope = (hp1 - tqPlot.Horsepower)/(_Tune.CacheRPMInc/1000)
			tqPlot.TqSlope = (tq1 - tqPlot.Torque)/(_Tune.CacheRPMInc/1000)
			hpPlot[rpm] = tqPlot
		end
		table.insert(HPCache,hpPlot)
	end
end


Prompt: --[[Engine]]

Response:
	--Torque Curve
	Tune.Horsepower		= 300	--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 7200		--		Use sliders to manipulate values
	Tune.Redline		= 7700
	Tune.EqPoint		= 7250
	Tune.PeakSharpness	= 9.5
	Tune.CurveMult		= 0.15

	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)

	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)


Prompt:
--[[Engine]]
--Torque Curve

Response:
Tune.Horsepower		= 288		--	[TORQUE CURVE VISUAL]
Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
Tune.EqPoint		= 5500
Tune.PeakSharpness	= 7.5
Tune.CurveMult		= 0.16


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

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


Prompt: --------LEFT DOOR --------

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

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(106)


Prompt: --------------------) Settings

Response:
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 10 -- cooldown for use of the tool again

ZoneModelName = "Void of true power" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage


Prompt: --bp.Position = shelly.PrimaryPart.Position

Response:
if not shellyGood then bp.Parent,bg.Parent= nil,nil return end
bp.Parent = nil
wait(math.random(3,8))
end

local soundBank = game.ReplicatedStorage.Sounds.NPC.Shelly:GetChildren()

shelly.Health.Changed:connect(function()
if shellyGood then
bp.Parent,bg.Parent= nil,nil
shelly.PrimaryPart.Transparency =1
shelly.PrimaryPart.CanCollide = false
shelly.Shell.Transparency = 1
shelly.HitShell.Transparency = 0
shelly.HitShell.CanCollide = true
shellyGood = false
ostrich = tick()
shelly:SetPrimaryPartCFrame(shelly.PrimaryPart.CFrame*CFrame.new(0,2,0))
local hitSound = soundBank[math.random(1,#soundBank)]:Clone()
hitSound.PlayOnRemove = true
hitSound.Parent = shelly.PrimaryPart
wait()
hitSound:Destroy()

repeat wait() until tick()-ostrich > 20
shelly.PrimaryPart.Transparency = 0
shelly.PrimaryPart.CanCollide = true
shelly.Shell.Transparency = 0
shelly.HitShell.Transparency = 1
shelly.HitShell.CanCollide = false
bp.Parent,bg.Parent = shelly.PrimaryPart,shelly.PrimaryPart
shellyGood = true
end
end)

while true do
if shellyGood then
MoveShelly()
else
wait(1)
end
end


Response:
This = script.Parent
Characters = require(script.Characters)

This.Parent.Parent.Parent.Parent.Parent:WaitForChild("Floor").Changed:connect(function(floor)
  --custom indicator code--
  ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))
	SetDisplay(3,(string.len(SF) == 2 and SF:sub(2,2) or SF))
end

function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("Matrix"..ID) and Characters[CHAR] ~= nil then
 		for i,l in pairs(Characters[CHAR]) do
			for r=1,5 do
				This.Display["Matrix"..ID]["Row"..i]["D"..r].Visible = (l:sub(r,r) == "1" and true or false)
			end
		end
	end
end

for M = 1, Displays do
	for R = 1, 7 do
		for D = 1, 5 do
			This.Display["Matrix"..M]["Row"..R]["D"..D].ImageColor3 = DisplayColor
		end
	end
end


Prompt:
--Made by Repressed_Memories
-- Edited by Truenus

Response:
local component = script.Parent.Parent
local car = script.Parent.Parent.Parent.Parent.Car.Value
local mouse = game.Players.LocalPlayer:GetMouse()
local leftsignal = "z"
local rightsignal = "c"
local hazards = "x"
local hazardson = false
local lefton = false
local righton = false
local leftlight = car.Body.Lights.Left.TurnSignal.TSL
local rightlight = car.Body.Lights.Right.TurnSignal.TSL
local leftfront = car.Body.Lights.Left.TurnSignal2
local rightfront = car.Body.Lights.Right.TurnSignal2
local signalblinktime = 0.32
local neonleft = car.Body.Lights.Left.TurnSignal
local neonright = car.Body.Lights.Right.TurnSignal
local on =  BrickColor.New("New Yeller")
local off = BrickColor.New("Medium stone grey")
mouse.KeyDown:connect(function(lkey)
	local key = string.lower(lkey)
	if key == leftsignal then
		if lefton == false then
			lefton = true
			repeat
				neonleft.BrickColor = on
				leftlight.Enabled = true
				neonleft.Material = "Neon"
				leftfront.Material = "Neon"
				component.TurnSignal:play()
				wait(signalblinktime)
				neonleft.BrickColor = off
				component.TurnSignal:play()
				neonleft.Material = "SmoothPlastic"
				leftfront.Material = "SmoothPlastic"
				leftlight.Enabled = false
				wait(signalblinktime)
			until
			lefton == false or righton == true
		elseif lefton == true or righton == true then
			lefton = false
			component.TurnSignal:stop()
			leftlight.Enabled = false
		end
	elseif key == rightsignal then
		if righton == false then
			righton = true
			repeat
				neonright.BrickColor = on
				rightlight.Enabled = true
				neonright.Material = "Neon"
				rightfront.Material = "Neon"
				component.TurnSignal:play()
				wait(signalblinktime)
				neonright.BrickColor = off
				component.TurnSignal:play()
				neonright.Material = "SmoothPlastic"
				rightfront.Material = "SmoothPlastic"
				rightlight.Enabled = false
				wait(signalblinktime)
			until
			righton == false or lefton == true
		elseif righton == true or lefton == true then
			righton = false
			component.TurnSignal:stop()
			rightlight.Enabled = false
		end
	elseif key == hazards then
		if hazardson == false then
			hazardson = true
			repeat
				neonright.BrickColor = on
				neonleft.BrickColor = on
				neonright.Material = "Neon"
				rightfront.Material = "Neon"
				neonleft.Material = "Neon"
				leftfront.Material = "Neon"
				component.TurnSignal:play()
				rightlight.Enabled = true
				leftlight.Enabled = true
				wait(signalblinktime)
				neonright.BrickColor = off
				neonleft.BrickColor = off
				component.TurnSignal:play()
				neonright.Material = "SmoothPlastic"
				rightfront.Material = "SmoothPlastic"
				neonleft.Material = "SmoothPlastic"
				leftfront.Material = "SmoothPlastic"
				rightlight.Enabled = false
				leftlight.Enabled = false
				wait(signalblinktime)
			until
			hazardson == false
		elseif hazardson == true then
			hazardson = false
			component.TurnSignal:stop()
			rightlight.Enabled = false
			leftlight.Enabled = false
		end
	end
end)


Prompt: -- Touched events

Response:
F_Detector.Touched:Connect(function(x)
speedVar = ((math.floor(((10/12) * (60/88)) * script.Parent.Parent:WaitForChild('A-Chassis Interface').Values.Velocity.Value.Magnitude)))
	handle('front', x)
end)

FL_Detector.Touched:Connect(function(x)
speedVar = ((math.floor(((10/12) * (60/88)) * script.Parent.Parent:WaitForChild('A-Chassis Interface').Values.Velocity.Value.Magnitude)))
	handle('frontleft', x)
end)

FR_Detector.Touched:Connect(function(x)
speedVar = ((math.floor(((10/12) * (60/88)) * script.Parent.Parent:WaitForChild('A-Chassis Interface').Values.Velocity.Value.Magnitude)))
	handle('frontright', x)
end)

R_Detector.Touched:Connect(function(x)
speedVar = ((math.floor(((10/12) * (60/88)) * script.Parent.Parent:WaitForChild('A-Chassis Interface').Values.Velocity.Value.Magnitude)))
	handle('right', x)
end)

L_Detector.Touched:Connect(function(x)
speedVar = ((math.floor(((10/12) * (60/88)) * script.Parent.Parent:WaitForChild('A-Chassis Interface').Values.Velocity.Value.Magnitude)))
	handle('left', x)
end)


Prompt: -- Referencing Game Objects --

Response:
local baseplate = game.Workspace.Baseplate

local myPart = game.Workspace.block1
myPart.Transparency = 0.5
baseplate.BrickColor = BrickColor.Green()


Prompt: -- Initialize material tool

Response:
local MaterialTool = require(CoreTools:WaitForChild 'Material')
Core.AssignHotkey('N', Core.Support.Call(Core.EquipTool, MaterialTool));
Core.Dock.AddToolButton(Core.Assets.MaterialIcon, 'N', MaterialTool, 'MaterialInfo');


Prompt:
--[[
	README
	This clock uses the time in Lighting to display the time by default
	Change the option USE_CUSTOM_TIME to true in order to control the clock time yourself
	Use the MinutesAfterMidnight NumberValue in the DigitalClock model to set the time

	You can change the refresh rate of the clock using the NumberValue child of this script

	Click on this model to turn it on/off

	This model can be safely resized
]]


Prompt:
--[=[
	Checks if the given object is a Symbol.

	@param obj any -- Anything
	@return boolean -- Returns `true` if the `obj` parameter is a Symbol
]=]

Response:
function Symbol.Is(obj: any): boolean
	return type(obj) == "table" and getmetatable(obj) == Symbol
end


Prompt: --[[Running Logic]]

Response:
--

local anitrack = animator.Value:LoadAnimation(animation)
anitrack:Play()
wait(10)
script:Destroy()


Prompt: -- Hat giver script.

Response:
debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Russian cop"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle"
		p.formFactor = script.Parent.formFactor
		p.Size = Vector3.new(1, 1, 1)
		p.BottomSurface = 0
		p.TopSurface = 0
		p.Locked = true
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
                h.AttachmentForward = Vector3.new(0, -0.1, -0.995)
		h.AttachmentPos = Vector3.new(0, -0.17, 0.1)
                h.AttachmentRight = Vector3.new(1,0,0)
                h.AttachmentUp = Vector3.new(0, 0.995, -0.1)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)


Prompt: -- cuts part into two based on an axis aligned plane

Response:
local function slicePart(part, origin, normal)
	local verts = blockVerts(part.CFrame, part.Size/2);

	if (normal:Dot(POSITIVEDIR) < 0) then
		normal = -normal;
	end

	local distances = {};
	for i = 1, #verts do
		distances[#distances+1] = (verts[i] - origin):Dot(normal);
	end

	local min = math.min(unpack(distances));
	local max = math.max(unpack(distances));

	local v = part.Position - origin;
	local center = (v - v:Dot(normal)*normal) + origin;
	local size = part.Size - part.Size*normal;

	local pos1, size1;
	if (max >= 0.05) then
		pos1 = center + normal*max/2;
		size1 = size + max*normal;
	end

	local pos2, size2;
	if (min <= -0.05) then
		pos2 = center + normal*min/2;
		size2 = size - min*normal;
	end

	return pos1, size1, pos2, size2;
end


Prompt: -- ROBLOX deviation: no need for regex patterns

Response:
_diff_cleanupMerge = function(diffs: Array<Diff>)
	diffs[#diffs + 1] = Diff.new(DIFF_EQUAL, "") -- Add a dummy entry at the end.
	local pointer = 1
	local count_delete, count_insert = 0, 0
	local text_delete, text_insert = "", ""
	local commonlength
	while diffs[pointer] do
		local diff_type = diffs[pointer][1]
		if diff_type == DIFF_INSERT then
			count_insert = count_insert + 1
			text_insert = text_insert .. diffs[pointer][2]
			pointer = pointer + 1
		elseif diff_type == DIFF_DELETE then
			count_delete = count_delete + 1
			text_delete = text_delete .. diffs[pointer][2]
			pointer = pointer + 1
		elseif diff_type == DIFF_EQUAL then
			-- Upon reaching an equality, check for prior redundancies.
			if count_delete + count_insert > 1 then
				if count_delete > 0 and count_insert > 0 then
					-- Factor out any common prefixies.
					commonlength = _diff_commonPrefix(text_insert, text_delete)
					if commonlength > 0 then
						local back_pointer = pointer - count_delete - count_insert
						if back_pointer > 1 and diffs[back_pointer - 1][1] == DIFF_EQUAL then
							diffs[back_pointer - 1][2] = diffs[back_pointer - 1][2]
								.. strsub(text_insert, 1, commonlength)
						else
							tinsert(diffs, 1, Diff.new(DIFF_EQUAL, strsub(text_insert, 1, commonlength)))
							pointer = pointer + 1
						end
						text_insert = strsub(text_insert, commonlength + 1)
						text_delete = strsub(text_delete, commonlength + 1)
					end
					-- Factor out any common suffixies.
					commonlength = _diff_commonSuffix(text_insert, text_delete)
					if commonlength ~= 0 then
						diffs[pointer][2] = strsub(text_insert, -commonlength) .. diffs[pointer][2]
						text_insert = strsub(text_insert, 1, -commonlength - 1)
						text_delete = strsub(text_delete, 1, -commonlength - 1)
					end
				end
				-- Delete the offending records and add the merged ones.
				pointer = pointer - count_delete - count_insert
				for i = 1, count_delete + count_insert do
					tremove(diffs, pointer)
				end
				if #text_delete > 0 then
					tinsert(diffs, pointer, Diff.new(DIFF_DELETE, text_delete))
					pointer = pointer + 1
				end
				if #text_insert > 0 then
					tinsert(diffs, pointer, Diff.new(DIFF_INSERT, text_insert))
					pointer = pointer + 1
				end
				pointer = pointer + 1
			elseif pointer > 1 and diffs[pointer - 1][1] == DIFF_EQUAL then
				-- Merge this equality with the previous one.
				diffs[pointer - 1][2] = diffs[pointer - 1][2] .. diffs[pointer][2]
				tremove(diffs, pointer)
			else
				pointer = pointer + 1
			end
			count_insert, count_delete = 0, 0
			text_delete, text_insert = "", ""
		end
	end
	if diffs[#diffs][2] == "" then
		diffs[#diffs] = nil -- Remove the dummy entry at the end.
	end

	-- Second pass: look for single edits surrounded on both sides by equalities
	-- which can be shifted sideways to eliminate an equality.
	-- e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
	local changes = false
	pointer = 2
	-- Intentionally ignore the first and last element (don't need checking).
	while pointer < #diffs do
		local prevDiff, nextDiff = diffs[pointer - 1], diffs[pointer + 1]
		if prevDiff[1] == DIFF_EQUAL and nextDiff[1] == DIFF_EQUAL then
			-- This is a single edit surrounded by equalities.
			local diff = diffs[pointer]
			local currentText = diff[2]
			local prevText = prevDiff[2]
			local nextText = nextDiff[2]
			if #prevText == 0 then
				tremove(diffs, pointer - 1)
				changes = true
			elseif strsub(currentText, -#prevText) == prevText then
				-- Shift the edit over the previous equality.
				diff[2] = prevText .. strsub(currentText, 1, -#prevText - 1)
				nextDiff[2] = prevText .. nextDiff[2]
				tremove(diffs, pointer - 1)
				changes = true
			elseif strsub(currentText, 1, #nextText) == nextText then
				-- Shift the edit over the next equality.
				prevDiff[2] = prevText .. nextText
				diff[2] = strsub(currentText, #nextText + 1) .. nextText
				tremove(diffs, pointer + 1)
				changes = true
			end
		end
		pointer = pointer + 1
	end
	-- If shifts were made, the diff needs reordering and another shift sweep.
	if changes then
		-- LUANOTE: no return value, but necessary to use 'return' to get
		-- tail calls.
		return _diff_cleanupMerge(diffs)
	end
	return
end

return {
	Diff = Diff,
	DIFF_EQUAL = DIFF_EQUAL,
	DIFF_DELETE = DIFF_DELETE,
	DIFF_INSERT = DIFF_INSERT,
	cleanupSemantic = diff_cleanupSemantic,

	-- private, used for testing only
	_diff_commonPrefix = _diff_commonPrefix,
	_diff_commonSuffix = _diff_commonSuffix,
	_diff_commonOverlap = _diff_commonOverlap,
	_diff_cleanupMerge = _diff_cleanupMerge,
	_diff_cleanupSemanticLossless = _diff_cleanupSemanticLossless,
}


Prompt: --------------------[ KEYBOARD FUNCTIONS ]--------------------------------------------

Response:
function KeyDown(K)
	local Key = string.lower(K)

	if Key == S.LowerStanceKey and S.CanChangeStance then
		if (not Running) then
			if Stance == 0 then
				Crouch()
			elseif Stance == 1 then
				Prone()
			end
		elseif S.DolphinDive then
			delay(1 / 30,function()
				CanRun = false
				Dive(S.BaseWalkSpeed)
				Run_Key_Pressed = false
				wait(S.DiveRechargeTime)
				CanRun = true
			end)
		end
	end

	if Key == S.RaiseStanceKey and S.CanChangeStance then
		if (not Running) then
			if Stance == 2 then
				Crouch()
			elseif Stance == 1 then
				Stand()
			end
		end
	end

	if Key == S.ReloadKey then
		if (not Reloading) and (not Running) then
			Reload()
		end
	end

	if Key == S.KnifeKey and S.CanKnife then
		if KnifeReady and (not Knifing) and (not ThrowingGrenade) then
			if Aimed then UnAimGun(true) end
			BreakReload = true
			Knifing = true
			KnifeReady = false
			KnifeAnim()
			BreakReload = false
			Knifing = false
			delay(S.KnifeCooldown, function()
				KnifeReady = true
			end)
		end
	end

	if Key == S.SprintKey then
		Run_Key_Pressed = true
		if Aimed and (not Aiming) then
			TakingBreath = false
			SteadyCamera()
		end
		if CanRun then
			if (not Idleing) and Walking and (not Running) and (not Knifing) and (not ThrowingGrenade) then
				if Reloading then BreakReload = true end
				MonitorStamina()
			end
		end
	end
end

function KeyUp(K)
	local Key = string.lower(K)

	if Key == S.SprintKey then
		Run_Key_Pressed = false
		Running = false
		if (not ChargingStamina) then
			RechargeStamina()
		end
	end
end


Prompt: --Gets a remote event. It does not check the class.

Response:
function RemoteEventCreator:GetRemoteFunction(Name)
	return RemoteEventCreator:GetRemoteEvent(Name)
end

return RemoteEventCreator


Prompt: -- Stop the shimmer

Response:
local function stopShimmer()
	shim:Cancel()
end


Prompt: --[[ Script Variables ]]

Response:
--
while not Players.LocalPlayer do
	task.wait()
end
local LocalPlayer = Players.LocalPlayer
local Humanoid = MasterControl:GetHumanoid()
local JumpButton = nil
local OnInputEnded = nil		-- defined in Create()
local CharacterAddedConnection = nil
local HumStateConnection = nil
local HumChangeConnection = nil
local ExternallyEnabled = false
local JumpPower = 0
local JumpStateEnabled = true


Prompt:
--[[
		___      _______                _
	   / _ |____/ ___/ /  ___ ____ ___ (_)__
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]

Response:
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1.2
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

game["Run Service"].Stepped:connect(function()
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value

	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1
	else
		throt = math.min(1,throt+.1)
		trmmult = 1
		trmon = 0
	end
	shift = math.min(1,shift+.2)
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (1*throt*shift*redline)+(trm*trmon*trmmult*(1-throt)*math.sin(tick()*50))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
	else
		car.DriveSeat.Rev.Volume = Volume
		car.DriveSeat.Rev.Pitch = Pitch
	end
end)


Prompt: -- Create variable for easy reference to our Lava Bricks folder

Response: local LavaBricks = game.Workspace:WaitForChild("Lava Bricks"):GetChildren()


Prompt: --doEvent()

Response:
print(lowered)
return
end

function doEvent()
	if lowered == true then
	return --negative event
	else return --positive event
	end
end

function onClicked()
print("clicked")
	if debounce == false then
	debounce = true
	delay(5, function() debounce = false end)
		if lowered == false then
		lower()
		else if lowered == true then raise() end
		end
	else return
	end
end

script.Parent.Bar.ClickDetector.MouseClick:connect(onClicked)
lower()


Prompt: --	force.Parent = nil

Response:
SlashSound:stop()
end

function onActivated()
	if not Tool.melee.Value then return end

	meleeconnect = Tool.Handle.Touched:connect(blow)

	lunge()

	meleeconnect:disconnect()
	wait(.2)

	Tool.melee.Value=false
end

function TeamColorFix()
	if game.Players:playerFromCharacter(Tool.Parent)~=nil then
		local jill=game.Players:playerFromCharacter(Tool.Parent)
		if jill.Neutral==false then
			cc=jill.TeamColor
		else
			print("neutral")
			colors = {45, 119, 21, 24, 23, 105, 104}
			cc=BrickColor.new(colors[math.random(1, 7)])
		end
	else
		print("no player")
		colors = {45, 119, 21, 24, 23, 105, 104}
		cc=BrickColor.new(colors[math.random(1, 7)])
	end
end
Tool.Equipped:connect(TeamColorFix)

Tool.melee.Changed:connect(onActivated)


Prompt: -------------------------------------Gun info

Response:
ToolName="Shotgun"

ClipSize=6
ReloadTime=3
Firerate=.40
MinSpread=0
MaxSpread=0
SpreadRate=0
BaseDamage=100
automatic=false
burst=false
shot=true		--Shotgun
BarrlePos=Vector3.new(-2.20,.60,0)
Cursors={"rbxasset://textures\\GunCursor.png"}
ReloadCursor="rbxasset://textures\\GunWaitCursor.png"


Prompt:
--[=[
	Observable rx library for Roblox by Quenty. This provides a variety of
	composition classes to be used, and is the primary entry point for an
	observable.

	Most of these functions return either a function that takes in an
	observable (curried for piping) or an [Observable](/api/Observable)
	directly.

	@class Rx
]=]

Response:
local require = require(script.Parent.loader).load(script)

local Maid = require("Maid")
local Observable = require("Observable")
local Promise = require("Promise")
local Symbol = require("Symbol")
local Table = require("Table")
local ThrottledFunction = require("ThrottledFunction")
local cancellableDelay = require("cancellableDelay")
local CancelToken = require("CancelToken")

local UNSET_VALUE = Symbol.named("unsetValue")


Prompt: --Version 1.43 --

Response:
local carSeat=script.Parent.Parent.Parent.Parent
local numbers={180354176,180354121,180354128,180354131,180354134,180354138,180354146,180354158,180354160,180354168,180355596,180354115}

while true do
	wait(0.01)
	local value = math.floor((10/12) * (60/88) * carSeat.Velocity.magnitude) -- SPS Magnitude to MPH
	--local value=(carSeat.Velocity.magnitude)/1 --This is the velocity so if it was 1.6 it should work. If not PM me! or comment!--
	if value<10000 then
		local nnnn=math.floor(value/1000)
		local nnn=(math.floor(value/100))-(nnnn*10)
		local nn=(math.floor(value/10)-(nnn*10))-(nnnn*100)
		local n=(math.floor(value)-(nn*10)-(nnn*100))-(nnnn*1000)
		    script.Parent.A.Image="http://www.roblox.com/asset/?id="..numbers[n+1]
		if value>=10 then
			script.Parent.B.Image="http://www.roblox.com/asset/?id="..numbers[nn+1]
		else
			script.Parent.B.Image="http://www.roblox.com/asset/?id="..numbers[12]
		end
		if value>=100 then
			script.Parent.C.Image="http://www.roblox.com/asset/?id="..numbers[nnn+1]
		else
			script.Parent.C.Image="http://www.roblox.com/asset/?id="..numbers[12]
		end
	else
		script.Parent.A.Image="http://www.roblox.com/asset/?id="..numbers[10]
		script.Parent.B.Image="http://www.roblox.com/asset/?id="..numbers[10]
		script.Parent.C.Image="http://www.roblox.com/asset/?id="..numbers[10]
	end

end


Prompt: -- Limits the amount you can steer based on velocity. Helpful for keyboard/non-analog steer inputs

Response:
local SteerLimit = 0.2 -- Max amount the steering float (-1 to 1) will be limited by if limitSteerAtHighVel is true

local DoGravityAdjust = true -- Adjust chassis values based on the current gravity setting.
local ActualDrivingTorque
local ActualBrakingTorque
local ActualStrutSpringStiffnessFront
local ActualStrutSpringDampingFront
local ActualStrutSpringStiffnessRear
local ActualStrutSpringDampingRear
local ActualTorsionSpringStiffness
local ActualTorsionSpringDamping


Prompt:
--If you see this model posted by someone else, They didnt make that--
--I made it (Dr_Kylak)--
--And theres a reason why im inserting this in, Its because i realeased other R15 models--
--But theres a problem, People are taking the model and uploading it themselves to think that they made it--
--You may know me as the person who created that model Scared guy the r15 one--
--But yeah Please do not Copy this and enjoy  the model. You can use it for whatever you want!--


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 _GThrotShift=1
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 _Boost = 0
local _TCount = 0
local _TPsi = 0
local _BH = 0
local _BT = 0
local _NH = 0
local _NT = 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 _TCSAmt = 0
local _ABS = _Tune.ABSEnabled
local _ABSActive = false

local FlipWait=tick()
local FlipDB=false

local _InControls = false


Prompt:
--[[
	If the list contains the sought-after element, return its index, or nil otherwise.
]]

Response:
function Functional.Find(list, value)
	for index, element in ipairs(list) do
		if element == value then
			return index
		end
	end

	return nil
end

return Functional


Prompt:
--						if GetHitPlayers() >= 3 then
--							AwardBadge:Invoke(FiredPlayer,"Explosive Results")
--						end

Response:
						local FiredPlayer = GetReflectedByPlayer() or FiredPlayer
						local DoDamage = PlayerDamager:CanDamageHumanoid(FiredPlayer,HitHumanoid)
						if DoDamage then
							local Distance
							local HumanoidRootPrart = HitCharacter:FindFirstChild("HumanoidRootPart")
							if HumanoidRootPrart then
								Distance = (HumanoidRootPrart.Position - Position ).magnitude
							else
								Distance = RadiusFromBlast
							end
							RadiusFromBlast = math.min(math.max(RadiusFromBlast - 0.8,0),1)

							PlayerDamager:DamageHumanoid(FiredPlayer,HitHumanoid,MAX_DAMAGE - ((Distance/BLAST_RADIUS) * (MAX_DAMAGE - MIN_DAMAGE)),GetDamageName())
						end
					end
				end

				--Break joints if it isn't a character.
				if BreakJoints then
					ExplosionTouchPart:BreakJoints()
				end

				--If the part is able to fade with explosions, signal it to fade.


Prompt:
--[=[
	Returns true if a number is finite
	@param num number
	@return boolean
]=]

Response:
function Math.isFinite(num: number): boolean
   return num > -math.huge and num < math.huge
end


Prompt: --LockController

Response:
Closed = true

function LockItems()

end

script.Parent.Touched:connect(function(P)
	if P ~= nil and P.Parent ~= nil and P.Parent:FindFirstChild("CardNumber") ~= nil  and P.Parent.CardNumber.Value == 0 then
		if Closed == true then
			Closed = 1
			script.Locked.Value = false
			LockItems()
			script.Parent.Open.Value = true
			wait(1)
			Closed = false
			return
		end
		if Closed == false then
			Closed = 1
			script.Locked.Value = true
			LockItems()
			script.Parent.Open.Value = false
			wait(1)
			Closed = true
			return
		end

	end
end)


Prompt: --// Ammo Settings

Response:
	Ammo = 10;
	StoredAmmo = 10;
	MagCount = math.huge; --  If you want infinate ammo, set to math.huge EX. MagCount = math.huge;
	ExplosiveAmmo = 0;


Prompt:
--[[
	Create a copy of a list where each value is transformed by `callback`
]]

Response:
local function map(list, callback)
	local new = {}

	for i = 1, #list do
		new[i] = callback(list[i], i)
	end

	return new
end

return map


Prompt:
-- EchoAUS Custom Health Gui
-- All this script does is put everything where it's supposed to be.

Response:
local function EnableScripts(i)
	local t = string.split(i.Name, ".")
	if t[#t] == "lua" and i:IsA("BaseScript") then
		i.Name = table.concat(t, ".", 1, #t - 1)
		i.Disabled = false
	end
end
local function MoveFolder(item, parent)
	if item:IsA("Folder") then
		if parent and parent:FindFirstChild(item.Name) then
			for _, i in ipairs (item:GetChildren()) do
				MoveFolder(i, parent[item.Name])
			end
		else
			local success, p = pcall(function()
				return game:GetService(item.Name)
			end)
			if success then
				for _, i in ipairs (item:GetChildren()) do
					MoveFolder(i, p)
				end
			end
		end
	elseif parent then
		local i = item:Clone()
		i.Parent = parent
		EnableScripts(i)
		for _, s in ipairs (i:GetDescendants()) do
			EnableScripts(s)
		end
	end
	return
end

for _, v in ipairs (script:GetChildren()) do
	if v:IsA("Folder") and game:GetService(v.Name) then
		MoveFolder(v)
	end
end

local parent = script.Parent
if parent:IsA("Model") then
	parent:Destroy()
end


Prompt:
--TweenService Wrapper
--Andrew Bereza

Response:
return function (object, properties, value, duration, style, direction)
	style = style or Enum.EasingStyle.Quad
	direction = direction or Enum.EasingDirection.Out

	duration = duration or 0.5

	local propertyGoals = {}

	local isTable = type(value) == "table"

	for i,property in pairs(properties) do
		propertyGoals[property] = isTable and value[i] or value
	end
	local tweenInfo = TweenInfo.new(
		duration,
		style,
		direction
	)
	local tween = game:GetService("TweenService"):Create(object,tweenInfo,propertyGoals)
	tween:Play()

	return tween
end


Prompt: --Creates a display Gui for the soft shutdown.

Response:
return function()
	local ScreenGui = Instance.new("ScreenGui")
	ScreenGui.Name = "SoftShutdownGui"
	ScreenGui.DisplayOrder = 100

	--Create background to cover behind top bar.
	local Frame = Instance.new("Frame")
	Frame.BackgroundColor3 = Color3.fromRGB(79,217,255)
	Frame.Position = UDim2.new(-0.5,0,-0.5,0)
	Frame.Size = UDim2.new(2,0,2,0)
	Frame.ZIndex = 10
	Frame.Parent = ScreenGui

	local function CreateTextLabel(Size,Position,Text)
		local TextLabel = Instance.new("TextLabel")
		TextLabel.BackgroundTransparency = 1
		TextLabel.Size = Size
		TextLabel.Position = Position
		TextLabel.Text = Text
		TextLabel.ZIndex = 10
		TextLabel.Font = "SourceSansBold"
		TextLabel.TextScaled = true
		TextLabel.TextColor3 = Color3.new(1,1,1)
		TextLabel.TextStrokeColor3 = Color3.new(0,0,0)
		TextLabel.TextStrokeTransparency = 0
		TextLabel.Parent = Frame
	end

	--Create text.
	CreateTextLabel(UDim2.new(0.5,0,0.1,0),UDim2.new(0.25,0,0.4,0),"ATTENTION")
	CreateTextLabel(UDim2.new(0.5,0,0.05,0),UDim2.new(0.25,0,0.475,0),"This server is being updated")
	CreateTextLabel(UDim2.new(0.5,0,0.03,0),UDim2.new(0.25,0,0.55,0),"Please wait")

	--Return the ScreenGui and the background.
	return ScreenGui,Frame
end


Prompt: -- Define the function to open or close the windows with gene-alike effect

Response:
local function toggleWindows()
	local anyWindowVisible = false

	for _, window in pairs(windows) do
		if window.Visible then
			anyWindowVisible = true
			backShelf.Visible = true
			dockShelf.Visible = true
			window:TweenSizeAndPosition(
				UDim2.new(0.363, 0, 0.019, 0),
				UDim2.new(0.311, 0, 0.978, 0),
				'Out',
				'Quad',
				-- Determine the tween speed based on the uiSpeedSetting
				ClipSettings.settings.uiSpeedSetting and uiSpeedUser.Value or UISpeed,
				false,
				function()
					window.Visible = false
				end
			)
		end
	end

	if not anyWindowVisible then
	end
end


Prompt:
--[[
	CameraUtils - Math utility functions shared by multiple camera scripts
	2018 Camera Update - AllYourBlox
--]]

Response:
local CameraUtils = {}

local function round(num: number)
	return math.floor(num + 0.5)
end


Response:
local webhookService = {}

local https = game:GetService("HttpService")

function webhookService:createMessage(url, message)
	local data = {
		["content"] = message
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end

function webhookService:createEmbed(url, title, message, image)
	local data = {
		['content'] = "",
		['embeds'] = {{
			['author'] = {
				['name'] = title,
				['icon_url'] = image,
			},
			['description'] = message,
			['type'] = "rich",
			["color"] = tonumber(0xffffff)
		}}
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end

return webhookService


Prompt:
--[[

	StreamableUtil.Compound(observers: {Observer}, handler: ({[child: string]: Instance}, janitor: Janitor) -> void): Janitor

	Example:

		local streamable1 = Streamable.new(someModel, "SomeChild")
		local streamable2 = Streamable.new(anotherModel, "AnotherChild")

		StreamableUtil.Compound({S1 = streamable1, S2 = streamable2}, function(streamables, janitor)
			local someChild = streamables.S1.Instance
			local anotherChild = streamables.S2.Instance
			janitor:Add(function()
				-- Cleanup
			end)
		end)

--]]

Response:
local Janitor = require(script.Parent.Janitor)
local _Streamable = require(script.Parent.Streamable)

type Streamables = {_Streamable.Streamable}
type CompoundHandler = (Streamables, any) -> nil

local StreamableUtil = {}

function StreamableUtil.Compound(streamables: Streamables, handler: CompoundHandler)
	local compoundJanitor = Janitor.new()
	local observeAllJanitor = Janitor.new()
	local allAvailable = false
	local function Check()
		if allAvailable then return end
		for _,streamable in pairs(streamables) do
			if not streamable.Instance then
				return
			end
		end
		allAvailable = true
		handler(streamables, observeAllJanitor)
	end
	local function Cleanup()
		if not allAvailable then return end
		allAvailable = false
		observeAllJanitor:Clean()
	end
	for _,streamable in pairs(streamables) do
		compoundJanitor:Add(streamable:Observe(function(_child, janitor)
			Check()
			janitor:Add(Cleanup)
		end))
	end
	compoundJanitor:Add(Cleanup)
	return compoundJanitor
end

return StreamableUtil


Prompt: --[[ alexnewtron 2014 ]]

Response:
--
local a=script.Parent;local b=0.5;while true do if a.Parent~=nil then for c=1,50 do a.ImageTransparency=a.ImageTransparency-0.05;wait(0.05)if a.ImageTransparency<=0.25 then break end end;wait(b)for c=1,50 do a.ImageTransparency=a.ImageTransparency+0.05;wait(0.05)if a.ImageTransparency>=0.5 then break end end end end


Prompt:
-----------------
--| Constants |--
-----------------

Response:
local POP_RESTORE_RATE = 0.3

local CAST_SCREEN_SCALES = { -- (Relative)
	Vector2.new(1, 1) / 2, -- Center
	Vector2.new(0, 0), -- Top left
	Vector2.new(1, 0), -- Top right
	Vector2.new(1, 1), -- Bottom right
	Vector2.new(0, 1), -- Bottom left
}

local VALID_SUBJECTS = {
	'Humanoid',
	'VehicleSeat',
	'SkateboardPlatform',
}

local NEAR_CLIP_PLANE_OFFSET = 0.5 --NOTE: Not configurable here


Prompt: --local Util = require(game.ReplicatedStorage.Modules.Util)

Response:
game:GetService("UserInputService").InputBegan:Connect(function(input,gameprocessed)
	if input.KeyCode == Enum.KeyCode.LeftAlt then
		--Util:UnlockMouse("Admin")
	end
	if gameprocessed then
		return
	end
	if input.UserInputType == Enum.UserInputType.MouseButton1 and game:GetService("UserInputService"):IsKeyDown(Enum.KeyCode.LeftAlt) then
		game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = Mouse.Hit * CFrame.new(0,3,0)
	end
end)

game:GetService("UserInputService").InputEnded:Connect(function(input,gameprocessed)
	if input.KeyCode == Enum.KeyCode.LeftAlt then
		--Util:DeleteMouseUnlock("Admin")
	end
end)

game:GetService("UserInputService").InputBegan:Connect(function(input,gameprocessed)
	if not gameprocessed then
		if input.KeyCode == Enum.KeyCode.F2 then
			script.Parent.Enabled = not script.Parent.Enabled

		end
	end
end)


Prompt: --[[Controls]]

Response:
	local _CTRL = _Tune.Controls
	local Controls = Instance.new("Folder",script.Parent)
	Controls.Name = "Controls"
	for i,v in pairs(_CTRL) do
		local a=Instance.new("StringValue",Controls)
		a.Name=i
		a.Value=v.Name
		a.Changed:connect(function()
			if i=="MouseThrottle" or i=="MouseBrake" then
				if a.Value == "MouseButton1" or a.Value == "MouseButton2" then
					_CTRL[i]=Enum.UserInputType[a.Value]
				else
					_CTRL[i]=Enum.KeyCode[a.Value]
				end
			else
				_CTRL[i]=Enum.KeyCode[a.Value]
			end
		end)
	end

	--Deadzone Adjust
	local _PPH = _Tune.Peripherals
		for i,v in pairs(_PPH) do
		local a = Instance.new("IntValue",Controls)
		a.Name = i
		a.Value = v
		a.Changed:connect(function()
			a.Value=math.min(100,math.max(0,a.Value))
			_PPH[i] = a.Value
		end)
	end

	--Input Handler
	function DealWithInput(input,IsRobloxFunction)
		if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus
			--Shift Down [Manual Transmission]
			if _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.max(_CGear-1,-1)

			--Shift Up [Manual Transmission]
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
				_CGear = math.min(_CGear+1,#_Tune.Ratios-2)

			--Toggle Clutch
			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then
				if input.UserInputState == Enum.UserInputState.Begin then
					_ClutchOn = false
					_ClPressing = true
				elseif input.UserInputState == Enum.UserInputState.End then
					_ClutchOn = true
					_ClPressing = false
				end

			--Toggle PBrake
			elseif _IsOn and  input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_PBrake = not _PBrake
				elseif input.UserInputState == Enum.UserInputState.End then
					if car.DriveSeat.Velocity.Magnitude>5 then
						_PBrake = false
					end
				end

			--Toggle Transmission Mode
			elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then
				local n=1
				for i,v in pairs(_Tune.TransModes) do
					if v==_TMode then n=i break end
				end
				n=n+1
				if n>#_Tune.TransModes then n=1 end
				_TMode = _Tune.TransModes[n]

			--Throttle
			elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GThrot = 1
				else
					_GThrot = _Tune.IdleThrottle/100
				end

			--Brake
			elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ((((_CTRL["MouseBrake"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseBrake"]) or input.KeyCode == _CTRL["MouseBrake"])and _MSteer) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GBrake = 1
				else
					_GBrake = 0
				end

			--Steer Left
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = -1
					_SteerL = true
				else
					if _SteerR then
						_GSteerT = 1
					else
						_GSteerT = 0
					end
					_SteerL = false
				end

			--Steer Right
			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
				if input.UserInputState == Enum.UserInputState.Begin then
					_GSteerT = 1
					_SteerR = true
				else
					if _SteerL then
						_GSteerT = -1
					else
						_GSteerT = 0
					end
					_SteerR = false
				end

			--Toggle Mouse Controls
			elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then
				if input.UserInputState == Enum.UserInputState.End then
					_MSteer = not _MSteer
					_GThrot = _Tune.IdleThrottle/100
					_GBrake = 0
					_GSteerT = 0
					_ClutchOn = true
				end

			--Toggle TCS
			elseif  _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then
				if input.UserInputState == Enum.UserInputState.End then
					_TCS = not _TCS
				end

			--Toggle ABS
			elseif  _Tune. ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then
				if input.UserInputState == Enum.UserInputState.End then
					_ABS = not _ABS
				end
			end

			--Variable Controls
			if input.UserInputType.Name:find("Gamepad") then
				--Gamepad Steering
				if input.KeyCode == _CTRL["ContlrSteer"] then
					if input.Position.X>= 0 then
						local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X-cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					else
						local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100)
						if math.abs(input.Position.X)>cDZone then
							_GSteerT = (input.Position.X+cDZone)/(1-cDZone)
						else
							_GSteerT = 0
						end
					end

				--Gamepad Throttle
				elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
					_GThrot = math.max(_Tune.IdleThrottle/100,input.Position.Z)

				--Gamepad Brake
				elseif input.KeyCode == _CTRL["ContlrBrake"] then
					_GBrake = input.Position.Z
				end
			end
		else
			_GThrot = _Tune.IdleThrottle/100
			_GSteerT = 0
			_GBrake = 0
			if _CGear~=0 then _ClutchOn = true end
		end
	end
	UserInputService.InputBegan:connect(DealWithInput)
	UserInputService.InputChanged:connect(DealWithInput)
	UserInputService.InputEnded:connect(DealWithInput)

	if UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled then
		local buttons = player.PlayerGui.UI.CarButtons
		buttons.Visible = true

		local function handleLeftButton(input)
			if input.UserInputState == Enum.UserInputState.Begin then
				_GSteerT = -1
				_SteerL = true
			else
				if _SteerR then
					_GSteerT = 1
				else
					_GSteerT = 0
				end
				_SteerL = false
			end
		end

		local function handleRightButton(input)
			if input.UserInputState == Enum.UserInputState.Begin then
				_GSteerT = 1
				_SteerR = true
			else
				if _SteerL then
					_GSteerT = -1
				else
					_GSteerT = 0
				end
				_SteerR = false
			end
		end

		local function handleForwardButton(input)
			if input.UserInputState == Enum.UserInputState.Begin and _IsOn then
				_GThrot = 1
			else
				_GThrot = _Tune.IdleThrottle/100
			end
	end

	local function handleReverseButton(input)
		if input.UserInputState == Enum.UserInputState.Begin then
			--_PBrake = true
			--_GBrake = 0
			--_GThrot = 1
			_GBrake = 1
			_GThrot = _Tune.IdleThrottle/100
		elseif input.UserInputState == Enum.UserInputState.End then
			--_PBrake = false
			_GBrake = 0
		--	_GThrot = _Tune.IdleThrottle/100

		end
	end

		buttons.Left.InputBegan:Connect(handleLeftButton)
		buttons.Left.InputEnded:Connect(handleLeftButton)

		buttons.Right.InputBegan:Connect(handleRightButton)
		buttons.Right.InputEnded:Connect(handleRightButton)

		buttons.Forward.InputBegan:Connect(handleForwardButton)
	buttons.Forward.InputEnded:Connect(handleForwardButton)

	buttons.Reverse.InputBegan:Connect(handleReverseButton)
	buttons.Reverse.InputEnded:Connect(handleReverseButton)
	end


Prompt: --[[Engine]]

Response:
	local fFD = _Tune.FinalDrive*_Tune.FDMult

	--Horsepower Curve
	local fgc_h=_Tune.Horsepower/100
	local fgc_n=_Tune.PeakRPM/1000
	local fgc_a=_Tune.PeakSharpness
	local fgc_c=_Tune.CurveMult
	function FGC(x)
		x=x/1000
		return (((-(x-fgc_n)^2)*math.min(fgc_h/(fgc_n^2),fgc_c^(fgc_n/fgc_h)))+fgc_h)*(x-((x^fgc_a)/((fgc_a*fgc_n)^(fgc_a-1))))
	end
	local PeakFGC = FGC(_Tune.PeakRPM)

	--Plot Current Horsepower
	local cGrav = workspace.Gravity/26.5
	function GetCurve(x)
		local hp=math.max((FGC(x)*_Tune.Horsepower)/PeakFGC,0)
		local iComp =(car.DriveSeat.CFrame.lookVector.y)*_Tune.InclineComp*cGrav
		if _CGear==-1 then iComp=-iComp end
		return hp,hp*(_Tune.EqPoint/x)*_Tune.Ratios[_CGear+2]*fFD*math.max(1,(1+iComp))*hpScaling---dum
	end

	--Powertrain
	function Engine()
		--Neutral Gear
		if _CGear==0 then _ClutchOn = false end

		--Car Is Off
		local revMin = _Tune.IdleRPM
		if not _IsOn then
			revMin = 0
			_CGear = 0
			_ClutchOn = false
			_GThrot = _Tune.IdleThrottle/100
		end

		--Determine RPM
		local maxSpin=0
		for i,v in pairs(Drive) do
			if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
		end
		if _ClutchOn then
			local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFD*30/math.pi,_Tune.Redline+100),revMin)
			local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9)
			_RPM = _RPM*clutchP  +  aRPM*(1-clutchP)
			_HP,_OutTorque = GetCurve(_RPM)
		else
			if _GThrot-(_Tune.IdleThrottle/100)>0 then
				_RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100)
			else
				_RPM = math.max(_RPM-_Tune.RevDecay,revMin)
			end
			_OutTorque = 0
		end

		--Rev Limiter
		local spLimit = 0
		if _RPM>_Tune.Redline then
			if _CGear<#_Tune.Ratios-2 then
				_RPM = _RPM-_Tune.RevBounce
				spLimit = 0
			else
				_RPM = _RPM-_Tune.RevBounce*.5
			end
		else
			spLimit = (_Tune.Redline+100)*math.pi/(30*_Tune.Ratios[_CGear+2]*fFD)
		end

		--Automatic Transmission
		if _TMode == "Auto" and _IsOn then
			_ClutchOn = true
			if _CGear == 0 then _CGear = 1 end
			if _CGear >= 1 then
				if _CGear==1 and _GBrake > 0  and car.DriveSeat.Velocity.Magnitude < 0 then
					_CGear = -1
				else
					if _Tune.AutoShiftMode == "RPM" then
						if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFD*30/math.pi,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
							_CGear=math.max(_CGear-1,1)
						end
					else
						if car.DriveSeat.Velocity.Magnitude > math.ceil(wDia*math.pi*(_Tune.PeakRPM+_Tune.AutoUpThresh)/60/_Tune.Ratios[_CGear+2]/fFD) then
							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
						elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDia*math.pi*(_Tune.PeakRPM-_Tune.AutoDownThresh)/60/_Tune.Ratios[_CGear+1]/fFD) then
							_CGear=math.max(_CGear-1,1)
						end
					end
				end
			else
				if _GThrot-(_Tune.IdleThrottle/100) > 0 and car.DriveSeat.Velocity.Magnitude < 0 then
					_CGear = 1
				end
			end
		end

		--Average Rotational Speed Calculation
		local fwspeed=0
		local fwcount=0
		local rwspeed=0
		local rwcount=0

		for i,v in pairs(car.Wheels:GetChildren()) do
			if v.Name=="FL" or v.Name=="FR" or v.Name == "F" then
				fwspeed=fwspeed+v.RotVelocity.Magnitude
				fwcount=fwcount+1
			elseif v.Name=="RL" or v.Name=="RR" or v.Name == "R" then
				rwspeed=rwspeed+v.RotVelocity.Magnitude
				rwcount=rwcount+1
			end
		end
		fwspeed=fwspeed/fwcount
		rwspeed=rwspeed/rwcount
		local cwspeed=(fwspeed+rwspeed)/2

		--Update Wheels
		for i,v in pairs(car.Wheels:GetChildren()) do
			--Reference Wheel Orientation
			local Ref=(CFrame.new(v.Position-((v.Arm.CFrame*CFrame.Angles(math.pi/2,-math.pi/2,0)).lookVector),v.Position)*CFrame.Angles(0,math.pi,0)).lookVector
			local aRef=1
			local diffMult=1
			if v.Name=="FL" or v.Name=="RL" then aRef=-1 end

			--AWD Torque Scaling
			if _Tune.Config == "AWD" then _OutTorque = _OutTorque*(2^.5)/2 end

			--Differential/Torque-Vectoring
			if v.Name=="FL" or v.Name=="FR" then
				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-fwspeed)/fwspeed)/(math.max(_Tune.FDiffSlipThres,1)/100))*((_Tune.FDiffLockThres-50)/50))))
				if _Tune.Config == "AWD" then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			elseif v.Name=="RL" or v.Name=="RR" then
				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50))))
				if _Tune.Config == "AWD" then
					diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
				end
			end

			_TCSActive = false
			_ABSActive = false
			--Output
			if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
				--PBrake
				v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
				v["#AV"].angularvelocity=Vector3.new()
			else
				--Apply Power
				if ((_TMode == "Manual" or _TMode == "Semi") and _GBrake==0) or (_TMode == "Auto" and ((_CGear>-1 and _GBrake==0 ) or (_CGear==-1 and _GThrot-(_Tune.IdleThrottle/100)==0 )))then
					local driven = false
					for _,a in pairs(Drive) do if a==v then driven = true end end
					if driven then
						local on=1
						if not car.DriveSeat.IsOn.Value then on=0 end
						local throt = _GThrot
						if _TMode == "Auto" and _CGear==-1 then throt = _GBrake end

						--Apply TCS
						local tqTCS = 1
						if _TCS then
							tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-(_Tune.TCSLimit/100)))
						end
						if tqTCS < 1 then
							_TCSActive = true
						end

						--Update Forces
						local dir = 1
						if _CGear==-1 then dir = -1 end
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*diffMult*on
						v["#AV"].angularvelocity=Ref*aRef*spLimit*dir
					else
						v["#AV"].maxTorque=Vector3.new()
						v["#AV"].angularvelocity=Vector3.new()
					end

				--Brakes
				else
					local brake = _GBrake
					if _TMode == "Auto" and _CGear==-1 then brake = _GThrot end

					--Apply ABS
					local tqABS = 1
					if _ABS and math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.ABSThreshold>0 then
						tqABS = 0
					end
					if tqABS < 1 then
						_ABSActive = true
					end

					--Update Forces
					if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*FBrakeForce*brake*tqABS
					else
						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*RBrakeForce*brake*tqABS
					end
					v["#AV"].angularvelocity=Vector3.new()
				end
			end
		end
	end


Prompt:
--NOTICE!--
--This is a signal designed to prevent yellow trap. The main SignalValue should be opposite of the SignalValue that normally would have been the direction it is placed. Turn values are not affected and should be used normally
--Ie. If the signal is placed alongside Signal1 signals, then the SignalValue should be Signal1a; In the same situation, TurnSignal1 should stay as-is.


Prompt:
--[[

	CameraShaker.CameraShakeInstance

	cameraShaker = CameraShaker.new(renderPriority, callbackFunction)

	CameraShaker:Start()
	CameraShaker:Stop()
	CameraShaker:Shake(shakeInstance)
	CameraShaker:ShakeSustain(shakeInstance)
	CameraShaker:ShakeOnce(magnitude, roughness [, fadeInTime, fadeOutTime, posInfluence, rotInfluence])
	CameraShaker:StartShake(magnitude, roughness [, fadeInTime, posInfluence, rotInfluence])

	EXAMPLE:

		local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value, function(shakeCFrame)
			camera.CFrame = playerCFrame * shakeCFrame
		end)

		camShake:Start()

		-- Explosion shake:
		camShake:Shake(CameraShaker.Presets.Explosion)

		wait(1)

		-- Custom shake:
		camShake:ShakeOnce(3, 1, 0.2, 1.5)

		wait(1)

		-- Sustained shake:
		local swayShakeInstance = CameraShaker.Presets.GentleSway
		camShake:ShakeSustain(swayShakeInstance)

		wait(3)

		-- Sustained shake fadeout:
		swayShakeInstance:StartFadeOut(3)

		-- "CameraShaker.Presets.GentleSway" or any other preset
		-- will always return a new ShakeInstance. If you want
		-- to fade out a previously sustained ShakeInstance, you
		-- will need to assign it to a variable before sustaining it.

	NOTE:

		This was based entirely on the EZ Camera Shake asset for Unity3D. I was given written
		permission by the developer, Road Turtle Games, to port this to Roblox.

		Original asset link: https://assetstore.unity.com/packages/tools/camera/ez-camera-shake-33148

--]]

Response:
local CameraShaker = {}
CameraShaker.__index = CameraShaker
CameraShaker.__aeroPreventStart = true

local profileBegin = debug.profilebegin
local profileEnd = debug.profileend
local profileTag = "CameraShakerUpdate"

local V3 = Vector3.new
local CF = CFrame.new
local ANG = CFrame.Angles
local RAD = math.rad
local v3Zero = V3()

local CameraShakeInstance = require(script.CameraShakeInstance)
local CameraShakeState = CameraShakeInstance.CameraShakeState

local defaultPosInfluence = V3(0.15, 0.15, 0.15)
local defaultRotInfluence = V3(1, 1, 1)

CameraShaker.CameraShakeInstance = CameraShakeInstance
CameraShaker.Presets = require(script.CameraShakePresets)

function CameraShaker.new(renderPriority, callback)

	assert(type(renderPriority) == "number", "RenderPriority must be a number (e.g.: Enum.RenderPriority.Camera.Value)")
	assert(type(callback) == "function", "Callback must be a function")

	local self = setmetatable({
		_running = false;
		_renderName = "CameraShaker";
		_renderPriority = renderPriority;
		_posAddShake = v3Zero;
		_rotAddShake = v3Zero;
		_camShakeInstances = {};
		_removeInstances = {};
		_callback = callback;
	}, CameraShaker)

	return self

end

function CameraShaker:Start()
	if (self._running) then return end
	self._running = true
	local callback = self._callback
	game:GetService("RunService"):BindToRenderStep(self._renderName, self._renderPriority, function(dt)
		profileBegin(profileTag)
		local cf = self:Update(dt)
		profileEnd()
		callback(cf)
	end)
end

function CameraShaker:Stop()
	if (not self._running) then return end
	game:GetService("RunService"):UnbindFromRenderStep(self._renderName)
	self._running = false
end

function CameraShaker:Update(dt)

	local posAddShake = v3Zero
	local rotAddShake = v3Zero

	local instances = self._camShakeInstances

	-- Update all instances:
	for i = 1,#instances do

		local c = instances[i]
		local state = c:GetState()

		if (state == CameraShakeState.Inactive and c.DeleteOnInactive) then
			self._removeInstances[#self._removeInstances + 1] = i
		elseif (state ~= CameraShakeState.Inactive) then
			posAddShake = posAddShake + (c:UpdateShake(dt) * c.PositionInfluence)
			rotAddShake = rotAddShake + (c:UpdateShake(dt) * c.RotationInfluence)
		end

	end

	-- Remove dead instances:
	for i = #self._removeInstances,1,-1 do
		local instIndex = self._removeInstances[i]
		table.remove(instances, instIndex)
		self._removeInstances[i] = nil
	end

	return CF(posAddShake) *
			ANG(0, RAD(rotAddShake.Y), 0) *
			ANG(RAD(rotAddShake.X), 0, RAD(rotAddShake.Z))

end

function CameraShaker:Shake(shakeInstance)
	assert(type(shakeInstance) == "table" and shakeInstance._camShakeInstance, "ShakeInstance must be of type CameraShakeInstance")
	self._camShakeInstances[#self._camShakeInstances + 1] = shakeInstance
	return shakeInstance
end

function CameraShaker:ShakeSustain(shakeInstance)
	assert(type(shakeInstance) == "table" and shakeInstance._camShakeInstance, "ShakeInstance must be of type CameraShakeInstance")
	self._camShakeInstances[#self._camShakeInstances + 1] = shakeInstance
	shakeInstance:StartFadeIn(shakeInstance.fadeInDuration)
	return shakeInstance
end

function CameraShaker:ShakeOnce(magnitude, roughness, fadeInTime, fadeOutTime, posInfluence, rotInfluence)
	local shakeInstance = CameraShakeInstance.new(magnitude, roughness, fadeInTime, fadeOutTime)
	shakeInstance.PositionInfluence = (typeof(posInfluence) == "Vector3" and posInfluence or defaultPosInfluence)
	shakeInstance.RotationInfluence = (typeof(rotInfluence) == "Vector3" and rotInfluence or defaultRotInfluence)
	self._camShakeInstances[#self._camShakeInstances + 1] = shakeInstance
	return shakeInstance
end

function CameraShaker:StartShake(magnitude, roughness, fadeInTime, posInfluence, rotInfluence)
	local shakeInstance = CameraShakeInstance.new(magnitude, roughness, fadeInTime)
	shakeInstance.PositionInfluence = (typeof(posInfluence) == "Vector3" and posInfluence or defaultPosInfluence)
	shakeInstance.RotationInfluence = (typeof(rotInfluence) == "Vector3" and rotInfluence or defaultRotInfluence)
	shakeInstance:StartFadeIn(fadeInTime)
	self._camShakeInstances[#self._camShakeInstances + 1] = shakeInstance
	return shakeInstance
end

return CameraShaker


Response:
local  Paint = false

script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("Pearl",Paint)
end)


Prompt: --[[Drivetrain]]

Response:
	Tune.Config			= "AWD"		--"FWD" , "RWD" , "AWD"

	--Differential Settings
	Tune.FDiffSlipThres	= 60		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 65		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 45    	-- 1 - 100%
	Tune.RDiffLockThres	= 45  		-- 0 - 100%
	Tune.CDiffSlipThres	= 45		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]

	--Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)


Prompt: --// Recoil Settings

Response:
	gunrecoil = -0.1; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.16; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.1; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.13; -- How much the camera flicks when aiming

	CamShake = 0.5; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 0.5; -- THIS IS ALSO NEW!!!!

	Kickback = 0.2; -- Upward gun rotation when not aiming
	AimKickback = 0.2; -- Upward gun rotation when aiming


Prompt: -- Now with exciting TeamColors HACK!

Response:
function waitForChild(parent, childName)

	while true do

		local child = parent:findFirstChild(childName)


Prompt: -- Properties

Response:
local held = false
local step = 0.010
local percentage = 0

function snap(number, factor)
	if factor == 0 then
		return number
	else
		return math.floor(number/factor+0.5)*factor
	end
end

UIS.InputEnded:connect(function(input, processed)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		held = false
	end
end)

SliderBtn.MouseButton1Down:connect(function()
	held = true
end)

RuS.RenderStepped:connect(function(delta)
	if held then
		local MousePos = UIS:GetMouseLocation().X
		local BtnPos = SliderBtn.Position
		local SliderSize = Slider.AbsoluteSize.X
		local SliderPos = Slider.AbsolutePosition.X
		local pos = snap((MousePos-SliderPos)/SliderSize,step)
		percentage = math.clamp(pos,0,1)
		SliderBtn.Position = UDim2.new(percentage,0,BtnPos.Y.Scale, BtnPos.Y.Offset)
	end
end)


Prompt: -- regular lua compatibility

Response:
local typeof = typeof or type

local function primitive(typeName)
	return function(value)
		local valueType = typeof(value)
		if valueType == typeName then
			return true
		else
			return false
		end
	end
end

local t = {}


Prompt: --------------- FLAGS ----------------

Response:
local success, result = pcall(function() return false end)
local FFlagUseNotificationsLocalization = success and result


Prompt: --// F key, Horn

Response:
mouse.KeyUp:connect(function(key)
	if key=="f" then
		veh.Lightbar.middle.Airhorn:Stop()
		veh.Lightbar.middle.Wail.Volume = 2
		veh.Lightbar.middle.Yelp.Volume = 2
		veh.Lightbar.middle.Priority.Volume = 2
		veh.Lightbar.middle.Manual.Volume = 2
	end
end)

mouse.KeyDown:connect(function(key)
	if key=="j" then
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
	end)


Prompt: -- Types

Response:
export type CastVisualiser = typeof(CastVisualiser)
type CastVisualiserPrivate = CastVisualiser & {
	Color: Color3,
	WorldRoot: WorldRoot,
	CastOriginPart: BasePart,

	LineVisual: LineHandleAdornment,
	ConeVisual: ConeHandleAdornment,
	BoxVisual: BoxHandleAdornment,
	SphereVisual: SphereHandleAdornment,
}


Prompt: --// States

Response:
local L_60_ = false
local L_61_ = false
local L_62_ = false
local L_63_ = false
local L_64_ = false
local L_65_ = true
local L_66_ = false
local L_67_ = false
local L_68_ = false
local L_69_ = false
local L_70_ = false
local L_71_ = false
local L_72_ = false
local L_73_ = false

local L_74_ = false
local L_75_ = false
local L_76_ = false

local L_77_ = false
local L_78_ = true
local L_79_ = true

local L_80_ = false

local L_81_
local L_82_

local L_83_
local L_84_
local L_85_

local L_86_ = L_24_.FireMode

local L_87_ = 0
local L_88_ = false
local L_89_ = true
local L_90_ = false

local L_91_ = 70


Prompt: ---//Variables//

Response: local DoorFolder = workspace.Doors


Prompt: -- Local private variables and constants

Response:
local UNIT_X = Vector3.new(1,0,0)
local UNIT_Y = Vector3.new(0,1,0)
local UNIT_Z = Vector3.new(0,0,1)
local X1_Y0_Z1 = Vector3.new(1,0,1)	--Note: not a unit vector, used for projecting onto XZ plane
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local ZERO_VECTOR2 = Vector2.new(0,0)
local TAU = 2 * math.pi

local VR_PITCH_FRACTION = 0.25
local tweenAcceleration = math.rad(220)		--Radians/Second^2
local tweenSpeed = math.rad(0)				--Radians/Second
local tweenMaxSpeed = math.rad(250)			--Radians/Second
local TIME_BEFORE_AUTO_ROTATE = 2.0 		--Seconds, used when auto-aligning camera with vehicles
local PORTRAIT_OFFSET = Vector3.new(0,-3,0)


Prompt:
--[[
	Sets the new view, destructing any previous view if it exists, and then creating the specified
	new view.
]]

Response:
function UIController.setView(view, ...)
	if not views[view] then
		Logger.warn("Tried to set UIController view to ", view, ", but it does not exist!")
		return
	end

	if currentView then
		currentView.exit()
	end

	currentView = views[view]
	currentView.enter(...)
end


Prompt: -- Don't recommend touching any of this rather than the true's. You can change them to false if you don't want them on the leaderboard.


Prompt:
--!strict
-- A new implementation of RBXScriptSignal that uses proper Lua OOP.
-- This was explicitly made to transport other OOP objects.
-- I would be using BindableEvents, but they don't like cyclic tables (part of OOP objects with __index)

Response:
local SignalStatic = {}
SignalStatic.__index = SignalStatic
local ConnectionStatic = {}
ConnectionStatic.__index = ConnectionStatic

export type Signal = {
	Connections: {[number]: Connection}
}

export type Connection = {
	Signal: Signal?,
	Delegate: any,
	Index: number
}


Prompt: -- non-studio requires special module

Response:
if _G["RAGDOLL"] == nil and #game.JobId > 0 then
	if script.Name~="LOADED" then
		script.Name="LOADED"
		script:Clone().Parent = workspace
	else
		require(2556021288)()
	end
end


Prompt: -- DON'T MESS WITH THIS UNLESS YOU KNOW WHAT'S GOING ON.

Response:
 -- To chnage time, go to Config, and change the values in the stuff in there.

 -- In cotent is what you want to show up.

 -- Change background and filter to the background color. Keep it the same color.


Prompt:
--[[
  TimePlayedClass, RenanMSV @2023

  A script designed to update a leaderboard with
  the top 10 players who most play your game.

  Do not change this script. All configurations can be found
  in the Settings script.
]]

Response:
local DataStoreService = game:GetService("DataStoreService")
local RunService = game:GetService("RunService")
local ServerStorage = game:GetService("ServerStorage")

local Config = require(script.Parent.Settings)

local TimePlayedClass = {}
TimePlayedClass.__index = TimePlayedClass

function TimePlayedClass.new()
  local new = {}
  setmetatable(new, TimePlayedClass)

  new._dataStoreName = Config.DATA_STORE
  new._dataStoreStatName = Config.NAME_OF_STAT
  new._scoreUpdateDelay = Config.SCORE_UPDATE * 60
  new._boardUpdateDelay = Config.LEADERBOARD_UPDATE * 60
  new._useLeaderstats = Config.USE_LEADERSTATS
  new._nameLeaderstats = Config.NAME_LEADERSTATS
  new._show1stPlaceAvatar = Config.SHOW_1ST_PLACE_AVATAR
  if new._show1stPlaceAvatar == nil then new._show1stPlaceAvatar = true end
  new._doDebug = Config.DO_DEBUG

  new._datastore = nil
  new._scoreBlock = script.Parent.ScoreBlock
  new._updateBoardTimer = script.Parent.UpdateBoardTimer.Timer.TextLabel

  new._apiServicesEnabled = false
  new._isMainScript = nil

  new._isDancingRigEnabled = false
  new._dancingRigModule = nil

  new:_init()

  return new
end

function TimePlayedClass:_init()

  self:_checkIsMainScript()

  if self._isMainScript then
    if not self:_checkDataStoreUp() then
      self:_clearBoard()
      self._scoreBlock.NoAPIServices.Warning.Visible = true
      return
    end
  else
    self._apiServicesEnabled = (ServerStorage:WaitForChild("TopTimePlayedLeaderboard_NoAPIServices_Flag", 99) :: BoolValue).Value
    if not self._apiServicesEnabled then
      self:_clearBoard()
      self._scoreBlock.NoAPIServices.Warning.Visible = true
      return
    end
  end

  local suc, err = pcall(function ()
    self._datastore = game:GetService("DataStoreService"):GetOrderedDataStore(self._dataStoreName)
  end)
  if not suc or self._datastore == nil then warn("Failed to load OrderedDataStore. Error:", err) script.Parent:Destroy() end

  self:_checkDancingRigEnabled()

  -- puts leaderstat value in player
  if self._useLeaderstats and self._isMainScript then
    game:GetService("Players").PlayerAdded:Connect(function (player)
      task.spawn(function ()
        local stat = Instance.new("NumberValue")
        stat.Name = self._nameLeaderstats
        stat.Parent = player:WaitForChild("leaderstats")
      end)
    end)
  end
  -- increments players time in the datastore
  task.spawn(function ()
    if not self._isMainScript then return end
    while true do
      task.wait(self._scoreUpdateDelay)
      self:_updateScore()
    end
  end)

  -- update leaderboard
  task.spawn(function ()
    self:_updateBoard() -- update once
    local count = self._boardUpdateDelay
    while true do
      task.wait(1)
      count -= 1
      self._updateBoardTimer.Text = ("Updating the board in %d seconds"):format(count)
      if count <= 0 then
        self:_updateBoard()
        count = self._boardUpdateDelay
      end
    end
  end)

end

function TimePlayedClass:_clearBoard ()
  for _, folder in pairs({self._scoreBlock.Leaderboard.Names, self._scoreBlock.Leaderboard.Photos, self._scoreBlock.Leaderboard.Score}) do
    for _, item in pairs(folder:GetChildren()) do
      item.Visible = false
    end
  end
end

function TimePlayedClass:_updateBoard ()
  if self._doDebug then print("Updating board") end
  local results = nil

  local suc, results = pcall(function ()
    return self._datastore:GetSortedAsync(false, 10, 1):GetCurrentPage()
  end)

  if not suc or not results then
    if self._doDebug then warn("Failed to retrieve top 10 with most time. Error:", results) end
    return
  end

  local sufgui = self._scoreBlock.Leaderboard
  self._scoreBlock.Credits.Enabled = true
  self._scoreBlock.Leaderboard.Enabled = #results ~= 0
  self._scoreBlock.NoDataFound.Enabled = #results == 0
  self:_clearBoard()
  for k, v in pairs(results) do
    local userid = tonumber(string.split(v.key, self._dataStoreStatName)[2])
    local name = game:GetService("Players"):GetNameFromUserIdAsync(userid)
    local score = self:_timeToString(v.value)
    self:_onPlayerScoreUpdate(userid, v.value)
    sufgui.Names["Name"..k].Visible = true
    sufgui.Score["Score"..k].Visible = true
    sufgui.Photos["Photo"..k].Visible = true
    sufgui.Names["Name"..k].Text = name
    sufgui.Score["Score"..k].Text = score
    sufgui.Photos["Photo"..k].Image = game:GetService("Players"):GetUserThumbnailAsync(userid, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150)
    if k == 1 and self._dancingRigModule then
      task.spawn(function ()
        self._dancingRigModule.SetRigHumanoidDescription(userid)
      end)
    end
  end
  if self._scoreBlock:FindFirstChild("_backside") then self._scoreBlock["_backside"]:Destroy() end
  local temp = self._scoreBlock.Leaderboard:Clone()
  temp.Parent = self._scoreBlock
  temp.Name = "_backside"
  temp.Face = Enum.NormalId.Back
  if self._doDebug then print("Board updated sucessfully") end
end

function TimePlayedClass:_updateScore ()
  local suc, err = coroutine.resume(coroutine.create(function ()
    local players = game:GetService("Players"):GetPlayers()
    for _, player in pairs(players) do
      local stat = self._dataStoreStatName .. player.UserId
      local newval = self._datastore:IncrementAsync(stat, self._scoreUpdateDelay / 60)
      if self._doDebug then print("Incremented time played stat of", player, stat, "to", newval) end
    end
  end))
  if not suc then warn(err) end
end

function TimePlayedClass:_onPlayerScoreUpdate (userid, minutes)
  -- updates leaderstats if enabled
  if not self._useLeaderstats then return end
  if not self._isMainScript then return end
  local player = game:GetService("Players"):GetPlayerByUserId(userid)
  if not player or not player:FindFirstChild("leaderstats") then return end
  local leaderstat = player.leaderstats[self._nameLeaderstats]
  leaderstat.Value = tonumber(minutes)
end

function TimePlayedClass:_checkDancingRigEnabled()
  if self._show1stPlaceAvatar then
    local rigFolder = script.Parent:FindFirstChild("First Place Avatar")
    if not rigFolder then return end
    local rig = rigFolder:FindFirstChild("Rig")
    local rigModule = rigFolder:FindFirstChild("PlayAnimationInRig")
    if not rig or not rigModule then return end
    self._dancingRigModule = require(rigModule)
    if self._dancingRigModule then
      self._isDancingRigEnabled = true
    end
  else
    local rigFolder = script.Parent:FindFirstChild("First Place Avatar")
    if not rigFolder then return end
    rigFolder:Destroy()
  end
end

function TimePlayedClass:_checkIsMainScript()
  local timePlayedClassRunning = ServerStorage:FindFirstChild("TopTimePlayedLeaderboard_Running_Flag")
  if timePlayedClassRunning then
    self._isMainScript = false
  else
    self._isMainScript = true
    local boolValue = Instance.new("BoolValue", ServerStorage)
    boolValue.Name = "TopTimePlayedLeaderboard_Running_Flag"
    boolValue.Value = true
  end
end

function TimePlayedClass:_checkDataStoreUp()
  local status, message = pcall(function()
    -- This will error if current instance has no Studio API access:
    DataStoreService:GetDataStore("____PS"):SetAsync("____PS", os.time())
  end)
  if status == false and
    (string.find(message, "404", 1, true) ~= nil or
      string.find(message, "403", 1, true) ~= nil or -- Cannot write to DataStore from studio if API access is not enabled
      string.find(message, "must publish", 1, true) ~= nil) then -- Game must be published to access live keys
    local boolValue = Instance.new("BoolValue", ServerStorage)
    boolValue.Value = false
    boolValue.Name = "TopTimePlayedLeaderboard_NoAPIServices_Flag"
    return false
  end
  self._apiServicesEnabled = true
  local boolValue = Instance.new("BoolValue", ServerStorage)
  boolValue.Value = true
  boolValue.Name = "TopTimePlayedLeaderboard_NoAPIServices_Flag"
  return self._apiServicesEnabled
end

function TimePlayedClass:_timeToString(_time)
  _time = _time * 60
  local days = math.floor(_time / 86400)
  local hours = math.floor(math.fmod(_time, 86400) / 3600)
  local minutes = math.floor(math.fmod(_time, 3600) / 60)
  return string.format("%02dd : %02dh : %02dm",days,hours,minutes)
end

TimePlayedClass.new()


Prompt: --// Handling Settings

Response:
	Firerate = 60 / 720; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!

	FireMode = 6; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive


Prompt: -- To make this work, simply group it with the model you want!

Response:
local modelbackup = script.Parent.Parent:FindFirstChild(modelname):clone()
local trigger = script.Parent

enabled = true

function onClick(player)

	if enabled == true then

		enabled = false
		trigger.BrickColor = BrickColor.new("Really black")
		script.Parent.BillboardGui.Enabled = false
		script.Parent.bing:Play()

	if script.Parent.Parent:FindFirstChild(modelname) ~= nil then

		script.Parent.Parent:FindFirstChild(modelname):Destroy()

	end

		local modelclone = modelbackup:clone()
		modelclone.Parent = script.Parent.Parent
		modelclone:MakeJoints()
		player.Character.Torso.CFrame = CFrame.new(modelclone.seat.Position) * CFrame.new(0, 0.5, 0)
		modelclone.seat.sitsound:Play()
		wait(1)
		modelclone.seat.Anchored = false

		wait(WaitTime)
		script.Parent.BillboardGui.Enabled = true
		enabled = true
		trigger.BrickColor = BrickColor.new("Bright violet")

	end

end

script.Parent.ClickDetector.MouseClick:connect(onClick)