Prompt: -- Event that fires when a new point is snapped

Response:
PointSnapped = Signal.new()

function StartSnapping()

	-- Make sure snapping isn't already enabled
	if SnappingStage or SnapTracking.Enabled then
		return;
	end;

	-- Start first snapping stage
	SnappingStage = 'Starting';

	-- Only enable corner snapping
	SnapTracking.TrackEdgeMidpoints = false;
	SnapTracking.TrackFaceCentroids = false;
	SnapTracking.TargetFilter = function (Target)
		return Selection.PartIndex[Target]
	end

	-- Trigger the PointSnapped event when a new point is snapped
	SnapTracking.StartTracking(function (NewPoint)
		if NewPoint and NewPoint.p ~= SnappedPoint then
			SnappedPoint = NewPoint.p;
			PointSnapped:Fire(NewPoint.p);
		end;
	end);

	-- Listen for when the user starts dragging while in snap mode
	Connections.SnapDragStart = Support.AddUserInputListener('Began', 'MouseButton1', false, function (Input)

		-- Initialize snapping state
		SnappingStage = 'Direction';
		SnappingStartAim = Vector2.new(Input.Position.X, Input.Position.Y);
		SnappingStartPoint = SnappedPoint;
		SnappingStartTarget = SnapTracking.Target;
		SnappingStartDirections = GetFaceOffsetsFromCorner(SnappingStartTarget, SnappingStartPoint);
		SnappingStartSelectionState = PreparePartsForResizing();
		AreaPermissions = Security.GetPermissions(Security.GetSelectionAreas(Selection.Parts), Core.Player);

		-- Pause snapping
		SnapTracking.StopTracking();

		-- Start a direction line
		DirectionLine = Core.Tool.Interfaces.SnapLine:Clone();
		DirectionLine.Parent = Core.UI;
		DirectionLine.Visible = false;

		-- Track changes for history
		TrackChange();

		-- Listen for when the user drags
		Connections.SnapDrag = Support.AddUserInputListener('Changed', 'MouseMovement', true, function (Input)

			-- Update the latest aim
			SnappingEndAim = Vector2.new(Input.Position.X, Input.Position.Y);
			ScreenSnappedPoint = Workspace.CurrentCamera:WorldToScreenPoint(SnappingStartPoint);
			ScreenSnappedPoint = Vector2.new(ScreenSnappedPoint.X, ScreenSnappedPoint.Y);

			-- Calculate direction setting length
			local DirectionSettingLength = math.min(50, math.max(50, (SnappingStartAim - ScreenSnappedPoint).magnitude * 1.5));

			-- Use the mouse position to figure out the resize direction (until after direction setting length)
			if SnappingStage == 'Direction' then

				-- Get current angle from snap point
				local DragAngle = math.deg(math.atan2(SnappingEndAim.Y - ScreenSnappedPoint.Y, SnappingEndAim.X - ScreenSnappedPoint.X));
				DragAngle = (DragAngle > 0) and (DragAngle - 360) or DragAngle;

				-- Go through corner offsets representing the possible directions
				local Directions = {};
				for _, Direction in pairs(SnappingStartDirections) do

					-- Map the corner & corner offset to screen points
					local ScreenOffsetPoint = Workspace.CurrentCamera:WorldToScreenPoint(Direction.Offset);

					-- Get direction angle from snap point
					local DirectionAngle = math.deg(math.atan2(ScreenOffsetPoint.Y - ScreenSnappedPoint.Y, ScreenOffsetPoint.X - ScreenSnappedPoint.X));
					DirectionAngle = (DirectionAngle > 0) and (DirectionAngle - 360) or DirectionAngle;

					-- Calculate delta between drag and direction angles
					local AngleDelta = math.abs(DragAngle - DirectionAngle) % 180;
					AngleDelta = (AngleDelta > 90) and (180 - AngleDelta) or AngleDelta;

					-- Insert the potential direction
					table.insert(Directions, {
						Face = Direction.Face,
						AngleDelta = AngleDelta,
						DirectionAngle = DirectionAngle,
						Offset = Direction.Offset
					});

				end;

				-- Get the direction most similar to the dragging angle
				table.sort(Directions, function (A, B)
					return A.AngleDelta < B.AngleDelta;
				end);

				-- Center direction line at snap point
				DirectionLine.Position = UDim2.new(0, ScreenSnappedPoint.X, 0, ScreenSnappedPoint.Y);

				-- Orient direction line towards drag direction
				if math.abs(DragAngle - Directions[1].DirectionAngle) <= 90 then
					DirectionLine.Rotation = Directions[1].DirectionAngle;
				else
					DirectionLine.Rotation = 180 + Directions[1].DirectionAngle;
				end;

				-- Show the direction line
				DirectionLine.PointMarker.Rotation = -DirectionLine.Rotation;
				DirectionLine.SnapProgress.Size = UDim2.new(0, DirectionSettingLength, 2, 0);
				DirectionLine.Visible = true;

				-- Check if drag has passed direction setting length
				local Length = (SnappingEndAim - ScreenSnappedPoint).magnitude;
				if Length < DirectionSettingLength then
					return;
				end;

				-- Clear the direction line
				DirectionLine:Destroy()

				-- Select the resizing direction that was closest to the mouse drag
				SnappingDirection = Directions[1].Face;
				SnappingDirectionOffset = Directions[1].Offset;

				-- Move to the destination-picking stage of snapping
				SnappingStage = 'Destination';

				-- Set destination-stage snapping options
				SnapTracking.TrackEdgeMidpoints = true;
				SnapTracking.TrackFaceCentroids = true;
				SnapTracking.TargetFilter = function (Target) return not Target.Locked; end;
				SnapTracking.TargetBlacklist = Selection.Items;

				-- Start a distance alignment line
				AlignmentLine = Core.Tool.Interfaces.SnapLineSegment:Clone();
				AlignmentLine.Visible = false;
				AlignmentLine.Parent = Core.UI;

				-- Re-enable snapping to select destination
				SnapTracking.StartTracking(function (NewPoint)
					if NewPoint and NewPoint.p ~= SnappedPoint then
						SnappedPoint = NewPoint.p;
						PointSnapped:Fire(NewPoint.p);
					end;
				end);

			end;

		end);

		-- Listen for when a new point is snapped
		Connections.Snap = PointSnapped:Connect(function (SnappedPoint)

			-- Resize to snap point if in the destination stage of snapping
			if SnappingStage == 'Destination' then

				-- Calculate direction and distance to resize towards
				local Direction = (SnappingDirectionOffset - SnappingStartPoint).unit;
				local Distance = (SnappedPoint - SnappingStartPoint):Dot(Direction);

				-- Resize the parts on the selected faces by the calculated distance
				local Success = ResizePartsByFace(SnappingDirection, Distance, 'Normal', SnappingStartSelectionState);

				-- Update the UI on resize success
				if Success then

					-- Update "studs resized" indicator
					if ResizeTool.UI then
						ResizeTool.UI.Changes.Text.Text = 'resized ' .. Support.Round(Distance, 3) .. ' studs';
					end;

					-- Get snap point and destination point screen positions for UI alignment
					local ScreenStartPoint = Workspace.CurrentCamera:WorldToScreenPoint(SnappingStartPoint + (Direction * Distance));
					ScreenStartPoint = Vector2.new(ScreenStartPoint.X, ScreenStartPoint.Y);
					local ScreenDestinationPoint = Workspace.CurrentCamera:WorldToScreenPoint(SnappedPoint);
					ScreenDestinationPoint = Vector2.new(ScreenDestinationPoint.X, ScreenDestinationPoint.Y)

					-- Update the distance alignment line
					local AlignmentAngle = math.deg(math.atan2(ScreenDestinationPoint.Y - ScreenStartPoint.Y, ScreenDestinationPoint.X - ScreenStartPoint.X));
					local AlignmentCenter = ScreenStartPoint:Lerp(ScreenDestinationPoint, 0.5);
					AlignmentLine.Position = UDim2.new(0, AlignmentCenter.X, 0, AlignmentCenter.Y);
					AlignmentLine.Rotation = AlignmentAngle;
					AlignmentLine.Size = UDim2.new(0, (ScreenDestinationPoint - ScreenStartPoint).magnitude, 0, 1);
					AlignmentLine.PointMarkerA.Rotation = -AlignmentAngle;
					AlignmentLine.Visible = true;

				end;

				-- Make sure we're not entering any unauthorized private areas
				if Core.Mode == 'Tool' and Security.ArePartsViolatingAreas(Selection.Parts, Core.Player, false, AreaPermissions) then
					for Part, State in pairs(SnappingStartSelectionState) do
						Part.Size = State.Size;
						Part.CFrame = State.CFrame;
					end;
				end;

			end;

		end);

	end);

end;


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

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

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

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

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

local lastTick = 0

function stepAnimate(currentTime)
	if script.Parent.Humanoid:GetState() == Enum.HumanoidStateType.Climbing then
		onClimbing()
	end
	local amplitude = 1
	local frequency = 1
	local deltaTime = currentTime - lastTick
	lastTick = currentTime

	local climbFudge = 0
	local setAngles = false

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

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

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

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

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

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


Prompt: -- ROBLOX deviation START: use custom implementations instead of unavailable node API

Response:
local helpers = require(CurrentModule.helpers)
local format = helpers.format
local formatWithOptions = helpers.formatWithOptions


Prompt: -- Decreases the spread based on spread reduction

Response:
function SpreadSimulator:DecreaseSpread()
	self.currentSpread = math.clamp(self.currentSpread - self.spreadReduction, self.minSpread, self.maxSpread)
end


Prompt: --[[Weight and CG]]

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

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

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


Prompt: -- A variant of the function above that returns the velocity at a given point in time.

Response:
local function GetVelocityAtTime(time: number, initialVelocity: Vector3, acceleration: Vector3): Vector3
	return initialVelocity + acceleration * time
end

local function GetTrajectoryInfo(cast: ActiveCast, index: number): {[number]: Vector3}
	assert(cast.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	local trajectories = cast.StateInfo.Trajectories
	local trajectory = trajectories[index]
	local duration = trajectory.EndTime - trajectory.StartTime

	local origin = trajectory.Origin
	local vel = trajectory.InitialVelocity
	local accel = trajectory.Acceleration

	return {GetPositionAtTime(duration, origin, vel, accel), GetVelocityAtTime(duration, vel, accel)}
end

local function GetLatestTrajectoryEndInfo(cast: ActiveCast): {[number]: Vector3}
	assert(cast.StateInfo.UpdateConnection ~= nil, ERR_OBJECT_DISPOSED)
	return GetTrajectoryInfo(cast, #cast.StateInfo.Trajectories)
end

local function CloneCastParams(params: RaycastParams): RaycastParams
	local clone = RaycastParams.new()
	clone.CollisionGroup = params.CollisionGroup
	clone.FilterType = params.FilterType
	clone.FilterDescendantsInstances = params.FilterDescendantsInstances
	clone.IgnoreWater = params.IgnoreWater
	return clone
end

local function SendRayHit(cast: ActiveCast, resultOfCast: RaycastResult, segmentVelocity: Vector3, cosmeticBulletObject: Instance?)
	cast.Caster.RayHit:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject)
end

local function SendRayPierced(cast: ActiveCast, resultOfCast: RaycastResult, segmentVelocity: Vector3, cosmeticBulletObject: Instance?)
	cast.Caster.RayPierced:Fire(cast, resultOfCast, segmentVelocity, cosmeticBulletObject)
end

local function SendLengthChanged(cast: ActiveCast, lastPoint: Vector3, rayDir: Vector3, rayDisplacement: number, segmentVelocity: Vector3, cosmeticBulletObject: Instance?)
	cast.Caster.LengthChanged:Fire(cast, lastPoint, rayDir, rayDisplacement, segmentVelocity, cosmeticBulletObject)
end


Prompt:
--[[
	A modal based on the default modal used in Roblox experiences to prompt
	purchases.
]]

Response:
local ExperienceComponents = script:FindFirstAncestor("ExperienceComponents")

local Roact = require(ExperienceComponents.Parent.Roact)
local constants = require(script.Parent.constants)
local SelectionGroup = require(ExperienceComponents.Components.Gamepad.SelectionGroup)
local RobloxModalButton = require(script.Parent.RobloxModalButton)

local RobloxModal = Roact.Component:extend("RobloxModal")

local defaultProps = {
	width = UDim.new(0, 350),
	usingGamepad = false,
	buttonHeight = 32,
	cancelPrimaryColor = constants.BackgroundColor,
	cancelAccentColor = constants.TextColor,
	acceptPrimaryColor = constants.ButtonColor,
	acceptAccentColor = constants.BackgroundColor,
}

export type Props = typeof(defaultProps) & {
	title: string,
	description: string,
	acceptText: string,
	cancelText: string,
	onAccept: () -> (),
	onCancel: () -> (),
}

RobloxModal.defaultProps = defaultProps

function RobloxModal:render()
	local props: Props = self.props
	local children = (props :: any)[Roact.Children]

	return Roact.createElement("Frame", {
		BackgroundColor3 = constants.BackgroundColor,
		BorderSizePixel = 0,
		Size = UDim2.new(props.width, UDim.new(0, 0)),
		AutomaticSize = Enum.AutomaticSize.Y,
	}, {
		SelectionGroup = Roact.createElement(SelectionGroup),

		Corner = Roact.createElement("UICorner", {
			CornerRadius = constants.Padding,
		}),

		Layout = Roact.createElement("UIListLayout", {
			SortOrder = Enum.SortOrder.LayoutOrder,
			Padding = constants.Padding,
		}),

		Padding = Roact.createElement("UIPadding", {
			PaddingTop = constants.Padding,
			PaddingRight = constants.Padding,
			PaddingBottom = constants.Padding,
			PaddingLeft = constants.Padding,
		}),

		Title = Roact.createElement("TextLabel", {
			LayoutOrder = 1,
			Text = props.title,
			Font = constants.TitleFont,
			TextSize = constants.TitleSize,
			TextColor3 = constants.TitleColor,
			TextXAlignment = Enum.TextXAlignment.Center,
			TextWrapped = true,
			BackgroundTransparency = 1,
			Size = UDim2.fromScale(1, 0),
			AutomaticSize = Enum.AutomaticSize.Y,
		}),

		Divider = Roact.createElement("Frame", {
			LayoutOrder = 2,
			Size = UDim2.new(1, 0, 0, 1),
			BackgroundTransparency = 0.9,
			BackgroundColor3 = constants.TitleColor,
			BorderSizePixel = 0,
		}),

		Children = children and Roact.createElement("Frame", {
			LayoutOrder = 3,
			Size = UDim2.fromScale(1, 0),
			AutomaticSize = Enum.AutomaticSize.Y,
			BackgroundTransparency = 1,
		}, children),

		Description = Roact.createElement("TextLabel", {
			LayoutOrder = 4,
			Font = constants.Font,
			TextSize = constants.TextSize,
			Text = props.description,
			TextXAlignment = Enum.TextXAlignment.Center,
			TextColor3 = constants.TextColor,
			TextWrapped = true,
			BackgroundTransparency = 1,
			Size = UDim2.fromScale(1, 0),
			AutomaticSize = Enum.AutomaticSize.Y,
		}),

		Buttons = Roact.createElement("Frame", {
			LayoutOrder = 5,
			BackgroundTransparency = 1,
			Size = UDim2.new(1, 0, 0, props.buttonHeight),
		}, {
			Layout = Roact.createElement("UIListLayout", {
				SortOrder = Enum.SortOrder.LayoutOrder,
				FillDirection = Enum.FillDirection.Horizontal,
				Padding = constants.Padding,
			}),

			CancelButton = Roact.createElement(RobloxModalButton, {
				layoutOrder = 1,
				text = props.cancelText,
				isSolid = false,
				size = UDim2.new(0.5, -constants.Padding.Offset / 2, 1, 0),
				usingGamepad = props.usingGamepad,
				gamepadKeyCode = Enum.KeyCode.ButtonB,
				primaryColor = props.cancelPrimaryColor,
				accentColor = props.cancelAccentColor,
				hoveredColorShift = 1.5,
				onActivated = props.onCancel,
			}),

			AcceptButton = Roact.createElement(RobloxModalButton, {
				layoutOrder = 2,
				text = props.acceptText,
				size = UDim2.new(0.5, -constants.Padding.Offset / 2, 1, 0),
				usingGamepad = props.usingGamepad,
				gamepadKeyCode = Enum.KeyCode.ButtonA,
				primaryColor = props.acceptPrimaryColor,
				accentColor = props.acceptAccentColor,
				hoveredColorShift = 0.8,
				isGamepadSelection = true,
				onActivated = props.onAccept,
			}),
		}),
	})
end

return RobloxModal


Prompt: -- functions

Response:
function onDied()
	sDied:Play()
	sOuch:Play()
end

function onState(state, sound)
	if state then
		sound:Play()
	else
		sound:Pause()
	end
end

function onRunning(speed)
	if speed>0 then
		sRunning:Play()
	else
		sRunning:Pause()
	end
end


Prompt: --- Handles initial preparation of the game server-side.

Response:
return function (cmdr)
	local ReplicatedRoot, RemoteFunction, RemoteEvent

	local function Create (class, name, parent)
		local object = Instance.new(class)
		object.Name = name
		object.Parent = parent or ReplicatedRoot

		return object
	end

	ReplicatedRoot = script.Parent.CmdrClient
	ReplicatedRoot.Parent = ReplicatedStorage

	RemoteFunction = Create("RemoteFunction", "CmdrFunction")
	RemoteEvent = Create("RemoteEvent", "CmdrEvent")

	Create("Folder", "Commands")
	Create("Folder", "Types")

	script.Parent.Shared.Parent = ReplicatedRoot

	cmdr.ReplicatedRoot = ReplicatedRoot
	cmdr.RemoteFunction = RemoteFunction
	cmdr.RemoteEvent = RemoteEvent

	cmdr:RegisterTypesIn(script.Parent.BuiltInTypes)

	script.Parent.BuiltInTypes:Destroy()

	if StarterGui:FindFirstChild("Cmdr") == nil then
		CreateGui()
	end
end


Prompt: -- Represents a CastTrajectory :: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/casttrajectory/

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


Prompt: -- === SOURCE ===

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

local dsPlayerBans = DataStoreService:GetDataStore("Bans")


Prompt: --[[Steering]]

Response:
	Tune.SteeringType	= 'New'		-- New = Precise steering calculations based on real life steering assembly (LuaInt)
									-- Old = Previous steering calculations
	-- New Options
	Tune.SteerRatio		= 15/1		-- Steering ratio of your steering rack, google it for your car
	Tune.LockToLock		= 2.6		-- Number of turns of the steering wheel lock to lock, google it for your car
	Tune.Ackerman		= .9		-- If you don't know what it is don't touch it, ranges from .7 to 1.2

	-- Old Options
	Tune.SteerInner		= 45		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 38		-- Outer wheel steering angle (in degrees)

	--Four Wheel Steering (LuaInt)
	Tune.FWSteer			= 'Both'	-- Static, Speed, Both, or None
	Tune.RSteerOuter		= 0		-- Outer rear wheel steering angle (in degrees)
	Tune.RSteerInner		= 0		-- Inner rear wheel steering angle (in degrees)
	Tune.RSteerSpeed		= 60		-- Speed at which 4WS fully activates (Speed), deactivates (Static), or transition begins (Both) (SPS)
	Tune.RSteerDecay		= 440		-- Speed of gradient cutoff (in SPS)
	Tune.RSteerD			= 1000		-- Steering Dampening
	Tune.RSteerMaxTorque	= 50000		-- Steering Force
	Tune.RSteerP			= 100000	-- Steering Aggressiveness

	-- General Steering
	Tune.SteerSpeed		= .07		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 330		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree

	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness


Prompt: -- Connect the current dummies Humanoid.Died event to onDied() upon starting the game.

Response: Model.ChildRemoved:connect(onRemoved)


Prompt:
--function roamSelect()
--	if roaming == false then
--		roaming = true
--		Roam()
--	else
--		roaming = false
--	end
--end
--script.Parent.Roam.MouseButton1Click:connect(roamSelect)

Response:
function Jump()
	bd = Instance.new("BodyForce")
	bd.Parent = K9.Dog
	bd.force = Vector3.new(0,10500,0)
	wait(.1)
	bd:remove()
end

script.Parent.Jump.MouseButton1Click:connect(Jump)

function car()
	Stay()
	K9.Parent = game.Lighting
	adminchar[adminchar.Name.."'s Car"].lightbar.K9.Transparency=0
end

script.Parent.Hide.MouseButton1Click:connect(car)

function out()
	K9.Parent = game.Workspace
	K9:MoveTo((adminchar.Torso.CFrame * CFrame.new(0,0,5)).p, adminchar.Torso)
	adminchar[adminchar.Name.."'s Car"].lightbar.K9.Transparency=1
end

script.Parent.Unhide.MouseButton1Click:connect(out)


Prompt: -- Time it takes to reload weapon

Response: local ReloadTime = 2.04


Prompt: --Precalculated paths

Response:
local t,f,n=true,false,{}
local r={
[58]={{21,20,58},t},
[49]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{21,20,19},t},
[59]={{21,20,57,56,30,41,59},t},
[63]={{21,20,63},t},
[34]={{21,20,57,56,30,41,39,35,34},t},
[21]={{21},t},
[48]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{21,20,57,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{21,20,57,56,30,41,39,35,34,32,31},t},
[56]={{21,20,57,56},t},
[29]={{21,20,57,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{21,20,57},t},
[36]={{21,20,57,56,30,41,39,35,37,36},t},
[25]={{21,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{21,20,57,56,30,41,59,61,71},t},
[20]={{21,20},t},
[60]={{21,20,57,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{21,20,57,56,30,41,59,61,71,72,76,73,75},t},
[22]={{21,22},t},
[74]={{21,20,57,56,30,41,59,61,71,72,76,73,74},t},
[62]={{21,20,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{21,20,57,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{21,20,57,56,30,41,39,35},t},
[53]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{21,20,57,56,30,41,59,61,71,72,76,73},t},
[72]={{21,20,57,56,30,41,59,61,71,72},t},
[33]={{21,20,57,56,30,41,39,35,37,36,33},t},
[69]={{21,20,57,56,30,41,60,69},t},
[65]={{21,20,19,66,64,65},t},
[26]={{21,20,57,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{21,20,19,66,64,67,68},t},
[76]={{21,20,57,56,30,41,59,61,71,72,76},t},
[50]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{21,20,19,66},t},
[10]={n,f},
[24]={{21,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{21,20,62,23},t},
[44]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{21,20,57,56,30,41,39},t},
[32]={{21,20,57,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{21,20,57,56,30},t},
[51]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{21,20,19,66,64,67},t},
[61]={{21,20,57,56,30,41,59,61},t},
[55]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{21,20,57,56,30,41,39,40,38,42},t},
[40]={{21,20,57,56,30,41,39,40},t},
[52]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{21,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{21,20,57,56,30,41},t},
[17]={n,f},
[38]={{21,20,57,56,30,41,39,40,38},t},
[28]={{21,20,57,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{21,20,19,66,64},t},
}
return r


Prompt: -- this script was created in order to stop player from being slippery because the A-Chassis car they were driving was regenerated without them hopping off first

Response:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharactedAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")
local SeatSpeed = 16
local SaveSpeed
local seated

Humanoid.Seated:Connect(function()
	if seated then
		Humanoid.WalkSpeed = SaveSpeed
		seated = false

		-- stop player from being slippery
		for i, part in ipairs(Character:GetChildren()) do
			if part:IsA("Part") then
				part.CustomPhysicalProperties = PhysicalProperties.new(Enum.Material.Plastic)
			end
		end

	else
		SaveSpeed = Humanoid.WalkSpeed
		Humanoid.WalkSpeed = SeatSpeed
		seated = true
	end
end)


Prompt:
--vehicle.Nose.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end)
--vehicle.Bumper_Front.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end)
--vehicle.Bumper_Back.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end)
--vehicle.Tailgate.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end)
--vehicle.ExhaustPipe.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end)

Response:
frontForceField.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, -1, 0)) end)
backForceField.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 1, 0)) end)

vehicle.Wheel_BackLeft.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end)
vehicle.Wheel_FrontLeft.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, 1)) end)
vehicle.Wheel_BackRight.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end)
vehicle.Wheel_FrontRight.Touched:connect(function (hitPart) onTouch(hitPart, Vector3.new(0, 0, -1)) end)

local vehicleDamaged = false
function checkIfVehicleIsDamaged()
	if (not frontForceField.Parent or not backForceField.Parent) and not vehicleDamaged and allowDamage then
		vehicleDamaged = true
		script.IsDamaged.Value = true
		vehicle.VehicleScript.Disabled = true
		vehicleSmoke.Enabled = true
		vehicle.VehicleSeat.MaxSpeed = 0
		vehicle.ExhaustPipe.Smoke.Enabled = false
		-- Break Joints
		vehicle.Wheel_BackLeft:BreakJoints()
		vehicle.Wheel_FrontLeft:BreakJoints()
		vehicle.Wheel_BackRight:BreakJoints()
		vehicle.Wheel_FrontRight:BreakJoints()
		hood:BreakJoints()
	end
end

vehicle.ChildRemoved:connect(checkIfVehicleIsDamaged)


Prompt: -- LOCAL

Response:
local ZoneController = {}
local Maid = require(script.Parent.Parent.Maid)
local RotatedRegion3 = require(script.Parent.Parent.RotatedRegion3)
local Enum_ = require(script.Parent.Enum)
local enum = Enum_.enums
local players = game:GetService("Players")
local activeZones = {}
local activeZonesTotalVolume = 0
local charactersTotalVolume = 0
local activeTriggers = {}
local registeredZones = {}
local activeParts = {}
local activePartToZone = {}
local allParts = {}
local allPartToZone = {}
local bodyParts = {}
local activeConnections = 0
local runService = game:GetService("RunService")
local heartbeat = runService.Heartbeat
local heartbeatConnections = {}
local localPlayer = runService:IsClient() and players.LocalPlayer
local playerExitDetections = {}
local WHOLE_BODY_DETECTION_LIMIT = 729000 -- This is roughly the volume where Region3 checks begin to exceed 0.5% in Script Performance


Prompt: ----------//Render Functions\\----------

Response:
Run.RenderStepped:Connect(function(step)
	HeadMovement()
	renderGunRecoil()
	renderCam()

	if ViewModel and LArm and RArm and WeaponInHand then --Check if the weapon and arms are loaded

		local mouseDelta = User:GetMouseDelta()
		SwaySpring:accelerate(Vector3.new(mouseDelta.x/60, mouseDelta.y/60, 0))

		local swayVec = SwaySpring.p
		local TSWAY = swayVec.z
		local XSSWY = swayVec.X
		local YSSWY = swayVec.Y
		local Sway = CFrame.Angles(YSSWY,XSSWY,XSSWY)

		if BipodAtt then

			local BipodRay = Ray.new(UnderBarrelAtt.Main.Position, Vector3.new(0,-1.75,0))
			local BipodHit, BipodPos, BipodNorm = workspace:FindPartOnRayWithIgnoreList(BipodRay, Ignore_Model, false, true)

			if BipodHit then
				CanBipod = true
				if CanBipod and BipodActive and not runKeyDown and (GunStance == 0 or GunStance == 2) then
					TS:Create(SE_GUI.GunHUD.Att.Bipod, TweenInfo.new(.1,Enum.EasingStyle.Linear), {ImageColor3 = Color3.fromRGB(255,255,255), ImageTransparency = .123}):Play()
					if not aimming then
						BipodCF = BipodCF:Lerp(CFrame.new(0,(((UnderBarrelAtt.Main.Position - BipodPos).magnitude)-1) * (-1.5), 0),.2)
					else
						BipodCF = BipodCF:Lerp(CFrame.new(),.2)
					end

				else
					BipodActive = false
					BipodCF = BipodCF:Lerp(CFrame.new(),.2)
					TS:Create(SE_GUI.GunHUD.Att.Bipod, TweenInfo.new(.1,Enum.EasingStyle.Linear), {ImageColor3 = Color3.fromRGB(255,255,0), ImageTransparency = .5}):Play()
				end
			else
				BipodActive = false
				CanBipod = false
				BipodCF = BipodCF:Lerp(CFrame.new(),.2)
				TS:Create(SE_GUI.GunHUD.Att.Bipod, TweenInfo.new(.1,Enum.EasingStyle.Linear), {ImageColor3 = Color3.fromRGB(255,0,0), ImageTransparency = .5}):Play()
			end

		end

		AnimPart.CFrame = cam.CFrame * NearZ * BipodCF * maincf * gunbobcf * aimcf

		if not AnimData.GunModelFixed then
			WeaponInHand:SetPrimaryPartCFrame(
				ViewModel.PrimaryPart.CFrame
					* guncf
			)
		end

		if running then
			gunbobcf = gunbobcf:Lerp(CFrame.new(
				0.025 * (charspeed/10) * math.sin(tick() * 8),
				0.025 * (charspeed/10) * math.cos(tick() * 16),
				0
				) * CFrame.Angles(
					math.rad( 1 * (charspeed/10) * math.sin(tick() * 16) ),
					math.rad( 1 * (charspeed/10) * math.cos(tick() * 8) ),
					math.rad(0)
				), 0.1)
		else
			gunbobcf = gunbobcf:Lerp(CFrame.new(
				0.005 * math.sin(tick() * 1.5),
				0.005 * math.cos(tick() * 2.5),
				0
				), 0.1)
		end

		if CurAimpart and aimming and AnimDebounce and not CheckingMag then
			if not NVG or WeaponInHand.AimPart:FindFirstChild("NVAim") == nil then
				if AimPartMode == 1 then
					TS:Create(cam,AimTween,{FieldOfView = ModTable.ZoomValue}):Play()
					maincf = maincf:Lerp(maincf * CFrame.new(0,0,-.5) * recoilcf * Sway:inverse() * CurAimpart.CFrame:toObjectSpace(cam.CFrame), 0.2)
				else
					TS:Create(cam,AimTween,{FieldOfView = ModTable.Zoom2Value}):Play()
					maincf = maincf:Lerp(maincf * CFrame.new(0,0,-.5) * recoilcf * Sway:inverse() * CurAimpart.CFrame:toObjectSpace(cam.CFrame), 0.2)
				end
			else
				TS:Create(cam,AimTween,{FieldOfView = 70}):Play()
				maincf = maincf:Lerp(maincf * CFrame.new(0,0,-.5) * recoilcf * Sway:inverse() * (WeaponInHand.AimPart.CFrame * WeaponInHand.AimPart.NVAim.CFrame):toObjectSpace(cam.CFrame), 0.2)
			end

		else
			TS:Create(cam,AimTween,{FieldOfView = 70}):Play()
			maincf = maincf:Lerp(AnimData.MainCFrame * recoilcf * Sway:inverse(), 0.2)
		end

		for index, Part in pairs(WeaponInHand:GetDescendants()) do
			if Part:IsA("BasePart") and Part.Name == "SightMark" then
				local dist_scale = Part.CFrame:pointToObjectSpace(cam.CFrame.Position)/Part.Size
				local reticle = Part.SurfaceGui.Border.Scope
				reticle.Position=UDim2.new(.5+dist_scale.x,0,.5-dist_scale.y,0)
			end
		end

		recoilcf = recoilcf:Lerp(CFrame.new() * CFrame.Angles( math.rad(RecoilSpring.p.X), math.rad(RecoilSpring.p.Y), math.rad(RecoilSpring.p.z)), 0.2)

		if WeaponData.CrossHair then
			if aimming then
				CHup = CHup:Lerp(UDim2.new(.5,0,.5,0),0.2)
				CHdown = CHdown:Lerp(UDim2.new(.5,0,.5,0),0.2)
				CHleft = CHleft:Lerp(UDim2.new(.5,0,.5,0),0.2)
				CHright = CHright:Lerp(UDim2.new(.5,0,.5,0),0.2)
			else
				local Normalized = ((WeaponData.CrosshairOffset + BSpread + (charspeed * WeaponData.WalkMult * ModTable.WalkMult) ) / 50)/10

				CHup = CHup:Lerp(UDim2.new(0.5, 0, 0.5 - Normalized,0),0.5)
				CHdown = CHdown:Lerp(UDim2.new(.5, 0, 0.5 + Normalized,0),0.5)
				CHleft = CHleft:Lerp(UDim2.new(.5 - Normalized, 0, 0.5, 0),0.5)
				CHright = CHright:Lerp(UDim2.new(.5 + Normalized, 0, 0.5, 0),0.5)
			end

			Crosshair.Position = UDim2.new(0,mouse.X,0,mouse.Y)

			Crosshair.Up.Position = CHup
			Crosshair.Down.Position = CHdown
			Crosshair.Left.Position = CHleft
			Crosshair.Right.Position = CHright

		else

			CHup = CHup:Lerp(UDim2.new(.5,0,.5,0),0.2)
			CHdown = CHdown:Lerp(UDim2.new(.5,0,.5,0),0.2)
			CHleft = CHleft:Lerp(UDim2.new(.5,0,.5,0),0.2)
			CHright = CHright:Lerp(UDim2.new(.5,0,.5,0),0.2)

			Crosshair.Position = UDim2.new(0,mouse.X,0,mouse.Y)

			Crosshair.Up.Position = CHup
			Crosshair.Down.Position = CHdown
			Crosshair.Left.Position = CHleft
			Crosshair.Right.Position = CHright

		end

		if BSpread then
			local currTime = time()
			if currTime - LastSpreadUpdate > (60/WeaponData.ShootRate) * 2 and not shooting and BSpread > WeaponData.MinSpread * ModTable.MinSpread then
				BSpread = math.max(WeaponData.MinSpread * ModTable.MinSpread, BSpread - WeaponData.AimInaccuracyDecrease * ModTable.AimInaccuracyDecrease)
			end
			if currTime - LastSpreadUpdate > (60/WeaponData.ShootRate) * 1.5 and not shooting and RecoilPower > WeaponData.MinRecoilPower * ModTable.MinRecoilPower then
				RecoilPower =  math.max(WeaponData.MinRecoilPower * ModTable.MinRecoilPower, RecoilPower - WeaponData.RecoilPowerStepAmount * ModTable.RecoilPowerStepAmount)
			end
		end

		if LaserActive and Pointer ~= nil then

			if NVG then
				Pointer.Transparency = 0
				Pointer.Beam.Enabled = true
			else
				if not gameRules.RealisticLaser then
					Pointer.Beam.Enabled = true
				else
					Pointer.Beam.Enabled = false
				end
				if IRmode then
					Pointer.Transparency = 1
				else
					Pointer.Transparency = 0
				end
			end

			for index, Key in pairs(WeaponInHand:GetDescendants()) do
				if Key:IsA("BasePart") and Key.Name == "LaserPoint" then
					local L_361_ = Ray.new(Key.CFrame.Position, Key.CFrame.LookVector * 1000)
					local Hit, Pos, Normal = workspace:FindPartOnRayWithIgnoreList(L_361_, Ignore_Model, false, true)

					if Hit then
						Pointer.CFrame =  CFrame.new(Pos, Pos + Normal)
					else
						Pointer.CFrame =  CFrame.new(cam.CFrame.Position + Key.CFrame.LookVector * 2000, Key.CFrame.LookVector)
					end

					if HalfStep and gameRules.ReplicatedLaser then
						Evt.SVLaser:FireServer(Pos,1,Pointer.Color,IRmode,WeaponTool)
					end
					break
				end
			end
		end
	end
end)


Prompt: --[[ F7D's Anti ForceField Script ]]

Response:
--
script.Parent = nil
game.DescendantAdded:connect(function(NoSilly)
	coroutine.resume(coroutine.create(function()
		if NoSilly:IsA("ForceField") then
			coroutine.resume(coroutine.create(function()
				while type(NoSilly)~=nil and wait() do
					coroutine.resume(coroutine.create(function()
						NoSilly:Destroy()
					end))
				end
			end))
		end
	end))
end)


Prompt: -- Decompiled with the Synapse X Luau decompiler.

Response:
script.Parent.MouseButton1Up:Connect(function()
	game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(unpack({ "UM !", "All" }));
end);


Prompt:
--edit the function below to return true when you want this response/prompt to be valid
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data

Response:
return function(player, dialogueFolder)
	local plrData = require(game.ReplicatedStorage.Source.Modules.Util):GetPlayerData(player)
	return plrData.Classes.Super.Viper.HiddenViper.Value ~= true
end


Prompt: --[[ The Module ]]

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

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

	self.lastUpdate = tick()

	-- OrbitalCamera-specific members
	self.changedSignalConnections = {}
	self.refAzimuthRad = nil
	self.curAzimuthRad = nil
	self.minAzimuthAbsoluteRad = nil
	self.maxAzimuthAbsoluteRad = nil
	self.useAzimuthLimits = nil
	self.curElevationRad = nil
	self.minElevationRad = nil
	self.maxElevationRad = nil
	self.curDistance = nil
	self.minDistance = nil
	self.maxDistance = nil

	-- Gamepad
	self.r3ButtonDown = false
	self.l3ButtonDown = false
	self.gamepadDollySpeedMultiplier = 1

	self.lastUserPanCamera = tick()

	self.externalProperties = {}
	self.externalProperties["InitialDistance"] 	= 25
	self.externalProperties["MinDistance"] 		= 10
	self.externalProperties["MaxDistance"] 		= 100
	self.externalProperties["InitialElevation"] 	= 35
	self.externalProperties["MinElevation"] 		= 35
	self.externalProperties["MaxElevation"] 		= 35
	self.externalProperties["ReferenceAzimuth"] 	= -45	-- Angle around the Y axis where the camera starts. -45 offsets the camera in the -X and +Z directions equally
	self.externalProperties["CWAzimuthTravel"] 	= 90	-- How many degrees the camera is allowed to rotate from the reference position, CW as seen from above
	self.externalProperties["CCWAzimuthTravel"] 	= 90	-- How many degrees the camera is allowed to rotate from the reference position, CCW as seen from above
	self.externalProperties["UseAzimuthLimits"] 	= false -- Full rotation around Y axis available by default
	self:LoadNumberValueParameters()

	return self
end

function OrbitalCamera:LoadOrCreateNumberValueParameter(name, valueType, updateFunction)
	local valueObj = script:FindFirstChild(name)

	if valueObj and valueObj:isA(valueType) then
		-- Value object exists and is the correct type, use its value
		self.externalProperties[name] = valueObj.Value
	elseif self.externalProperties[name] ~= nil then
		-- Create missing (or replace incorrectly-typed) valueObject with default value
		valueObj = Instance.new(valueType)
		valueObj.Name = name
		valueObj.Parent = script
		valueObj.Value = self.externalProperties[name]
	else
		print("externalProperties table has no entry for ",name)
		return
	end

	if updateFunction then
		if self.changedSignalConnections[name] then
			self.changedSignalConnections[name]:Disconnect()
		end
		self.changedSignalConnections[name] = valueObj.Changed:Connect(function(newValue)
			self.externalProperties[name] = newValue
			updateFunction(self)
		end)
	end
end

function OrbitalCamera:SetAndBoundsCheckAzimuthValues()
	self.minAzimuthAbsoluteRad = math.rad(self.externalProperties["ReferenceAzimuth"]) - math.abs(math.rad(self.externalProperties["CWAzimuthTravel"]))
	self.maxAzimuthAbsoluteRad = math.rad(self.externalProperties["ReferenceAzimuth"]) + math.abs(math.rad(self.externalProperties["CCWAzimuthTravel"]))
	self.useAzimuthLimits = self.externalProperties["UseAzimuthLimits"]
	if self.useAzimuthLimits then
		self.curAzimuthRad = math.max(self.curAzimuthRad, self.minAzimuthAbsoluteRad)
		self.curAzimuthRad = math.min(self.curAzimuthRad, self.maxAzimuthAbsoluteRad)
	end
end

function OrbitalCamera:SetAndBoundsCheckElevationValues()
	-- These degree values are the direct user input values. It is deliberate that they are
	-- ranged checked only against the extremes, and not against each other. Any time one
	-- is changed, both of the internal values in radians are recalculated. This allows for
	-- A developer to change the values in any order and for the end results to be that the
	-- internal values adjust to match intent as best as possible.
	local minElevationDeg = math.max(self.externalProperties["MinElevation"], MIN_ALLOWED_ELEVATION_DEG)
	local maxElevationDeg = math.min(self.externalProperties["MaxElevation"], MAX_ALLOWED_ELEVATION_DEG)

	-- Set internal values in radians
	self.minElevationRad = math.rad(math.min(minElevationDeg, maxElevationDeg))
	self.maxElevationRad = math.rad(math.max(minElevationDeg, maxElevationDeg))
	self.curElevationRad = math.max(self.curElevationRad, self.minElevationRad)
	self.curElevationRad = math.min(self.curElevationRad, self.maxElevationRad)
end

function OrbitalCamera:SetAndBoundsCheckDistanceValues()
	self.minDistance = self.externalProperties["MinDistance"]
	self.maxDistance = self.externalProperties["MaxDistance"]
	self.curDistance = math.max(self.curDistance, self.minDistance)
	self.curDistance = math.min(self.curDistance, self.maxDistance)
end


Response:
local Tool = script.Parent
local Humanoid
local Playing = false

local UIS = game:GetService("UserInputService")
local Animation = script:WaitForChild("Animation")
local AnimTrack

UIS.InputBegan:Connect(function(Input, GameProcessedEvent)
	if Input.KeyCode == Key and Humanoid and AnimTrack then
		if not GameProcessedEvent and not Playing then
			Playing = true
			AnimTrack:Play()
			wait(AnimationLength)
			Playing = false
		end
	end
end)

Tool.Equipped:Connect(function()
	Humanoid = Tool.Parent:FindFirstChildOfClass("Humanoid")
	AnimTrack = Humanoid:LoadAnimation(Animation)
end)


Prompt:
-- Generated by https://roblox-ts.github.io v0.0.34
-- Compiled May 9, 2019, 6:07 PM Coordinated Universal Time

Response:
local _exports = {};
Direction = Direction or {};
do
	Direction.N = 1;
	Direction[1] = "N";
	Direction.S = 2;
	Direction[2] = "S";
	Direction.E = 4;
	Direction[4] = "E";
	Direction.W = 8;
	Direction[8] = "W";
end
_exports.Direction = Direction;
return _exports;


Response:
local pit = gui.PitchControl
pit.TextLabel.Text = ("Pitch: "..(radio.Pitch.Value*50).."%")
radio.Pitch.Changed:connect(function()
	pit.TextLabel.Text = ("Pitch: "..(radio.Pitch.Value*50).."%")
end)
pit.Up.MouseButton1Click:connect(function()
	radio.Pitch.Value = math.min(radio.Pitch.Value+.5,300)
end)
pit.Down.MouseButton1Click:connect(function()
	radio.Pitch.Value = math.max(radio.Pitch.Value-.5,0)
end)


Prompt: -- Modules

Response:
local ModuleScripts = ReplicatedStorage.ModuleScripts
local GameSettings = require(ModuleScripts.GameSettings)
local PlayerManagement = ServerScriptService.PlayerManagement
local PlayerManagementModules = PlayerManagement.ModuleScripts
local ParticleController = require(PlayerManagementModules.ParticleController)
local Data = ServerScriptService.Data
local DataStore = require(Data.Modules.DataStore)
local UpgradeManager = require(Data.Modules.UpgradeManager)


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

Response:
pcall(function() ChatLocalization = require((game:GetService("Chat") :: any).ClientChatModules.ChatLocalization :: any) end)

local LocalPlayer = PlayersService.LocalPlayer
while LocalPlayer == nil do
	PlayersService.ChildAdded:wait()
	LocalPlayer = PlayersService.LocalPlayer
end

local whisperStateMethods = {}
whisperStateMethods.__index = whisperStateMethods

local WhisperCustomState = {}

function whisperStateMethods:TrimWhisperCommand(text)
	if string.sub(text, 1, 3):lower() == "/w " then
		return string.sub(text, 4)
	elseif string.sub(text, 1, 9):lower() == "/whisper " then
		return string.sub(text, 10)
 	end
	return nil
end

function whisperStateMethods:TrimWhiteSpace(text)
	local newText = string.gsub(text, "%s+", "")
	local wasWhitespaceTrimmed = text[#text] == " "
	return newText, wasWhitespaceTrimmed
end

function whisperStateMethods:ShouldAutoCompleteNames()
	if ChatSettings.WhisperCommandAutoCompletePlayerNames ~= nil then
		return ChatSettings.WhisperCommandAutoCompletePlayerNames
	end
	return true
end

function whisperStateMethods:GetWhisperingPlayer(enteredText)
	enteredText = enteredText:lower()
	local trimmedText = self:TrimWhisperCommand(enteredText)
	if trimmedText then
		local possiblePlayerName, whitespaceTrimmed = self:TrimWhiteSpace(trimmedText)
		local possibleUserNameMatches = {}
		local possibleDisplayNameMatches = {}
		local players = PlayersService:GetPlayers()
		for i = 1, #players do
			if players[i] ~= LocalPlayer then
				local lowerPlayerName = players[i].Name:lower()
				if string.sub(lowerPlayerName, 1, string.len(possiblePlayerName)) == possiblePlayerName then
					possibleUserNameMatches[players[i]] = players[i].Name:lower()
				end

				if ChatSettings.WhisperByDisplayName then
					local lowerDisplayName = players[i].DisplayName:lower()
					if string.sub(lowerDisplayName, 1, string.len(possiblePlayerName)) == possiblePlayerName then
						possibleDisplayNameMatches[players[i]] = lowerDisplayName
					end
				end
			end
		end

		local matchCount = 0
		local lastMatch = nil
		local lastMatchName = nil
		for player, playerName in pairs(possibleUserNameMatches) do
			matchCount = matchCount + 1
			lastMatch = player
			lastMatchName = playerName
			if playerName == possiblePlayerName and whitespaceTrimmed then
				return player
			end
		end

		if ChatSettings.WhisperByDisplayName then
			for player, playerName in pairs(possibleDisplayNameMatches) do
				-- Ignore display name matches where players' Name and DisplayName are equal
				if lastMatch ~= player then
					matchCount = matchCount + 1
					lastMatch = player
					lastMatchName = playerName
				end
			end
		end

		if matchCount == 1 then
			if self:ShouldAutoCompleteNames() then
				return lastMatch
			elseif lastMatchName == possiblePlayerName then
				return lastMatch
			end
		end
	end
	return nil
end

function whisperStateMethods:GetWhisperChanneNameColor()
	if self.ChatSettings.WhisperChannelNameColor then
		return self.ChatSettings.WhisperChannelNameColor
	end
	return Color3.fromRGB(102, 14, 102)
end

function whisperStateMethods:EnterWhisperState(player)
	self.PlayerNameEntered = true
	self.PlayerName = player.Name
	self.PlayerDisplayName = player.DisplayName

	self.MessageModeButton.Size = UDim2.new(0, 1000, 1, 0)

	local messageModeString

	if ChatSettings.PlayerDisplayNamesEnabled and ChatSettings.WhisperByDisplayName then
		messageModeString = string.format("[To %s]", player.DisplayName)
	else
		messageModeString = string.format("[To %s]", player.Name)
	end

	if ChatLocalization.tryLocalize then
		messageModeString = ChatLocalization:tryLocalize(messageModeString)
	end
	self.MessageModeButton.Text = messageModeString

	self.MessageModeButton.TextColor3 = self:GetWhisperChanneNameColor()

	local xSize = math.ceil(self.MessageModeButton.TextBounds.X)
	self.MessageModeButton.Size = UDim2.new(0, xSize, 1, 0)
	self.TextBox.Size = UDim2.new(1, -xSize, 1, 0)
	self.TextBox.Position = UDim2.new(0, xSize, 0, 0)
	self.TextBox.Text = " "
end

function whisperStateMethods:TextUpdated()
	local newText = self.TextBox.Text
	if not self.PlayerNameEntered then
		local player = self:GetWhisperingPlayer(newText)
		if player then
			self:EnterWhisperState(player)
		end
	else
		if newText == "" then
			self.MessageModeButton.Text = ""
			self.MessageModeButton.Size = UDim2.new(0, 0, 0, 0)
			self.TextBox.Size = UDim2.new(1, 0, 1, 0)
			self.TextBox.Position = UDim2.new(0, 0, 0, 0)
			self.TextBox.Text = ""
			---Implement this when setting cursor positon is a thing.
			---self.TextBox.Text = self.OriginalText .. " " .. self.PlayerName
			self.PlayerNameEntered = false
			---Temporary until setting cursor position...
			self.ChatBar:ResetCustomState()
			self.ChatBar:CaptureFocus()
		end
	end
end

function whisperStateMethods:GetMessage()
	if self.PlayerNameEntered then
		return "/w " ..self.PlayerName.. " " ..self.TextBox.Text
	end
	return self.TextBox.Text
end

function whisperStateMethods:ProcessCompletedMessage()
	return false
end

function whisperStateMethods:Destroy()
	self.MessageModeConnection:disconnect()
	self.Destroyed = true
end

function WhisperCustomState.new(ChatWindow, ChatBar, ChatSettings, player)
	local obj = setmetatable({}, whisperStateMethods)
	obj.Destroyed = false
	obj.ChatWindow = ChatWindow
	obj.ChatBar = ChatBar
	obj.ChatSettings = ChatSettings
	obj.TextBox = ChatBar:GetTextBox()
	obj.MessageModeButton = ChatBar:GetMessageModeTextButton()
	obj.OriginalWhisperText = ""
	obj.PlayerNameEntered = false

	obj.MessageModeConnection = obj.MessageModeButton.MouseButton1Click:connect(function()
		local chatBarText = obj.TextBox.Text
		if string.sub(chatBarText, 1, 1) == " " then
			chatBarText = string.sub(chatBarText, 2)
		end
		obj.ChatBar:ResetCustomState()
		obj.ChatBar:SetTextBoxText(chatBarText)
		obj.ChatBar:CaptureFocus()
	end)

	if player then
		obj:EnterWhisperState(player)
	else
		obj:TextUpdated()
	end

	return obj
end

function ProcessMessage(message, ChatWindow, ChatBar, ChatSettings)
	if string.sub(message, 1, 3):lower() == "/w " or	string.sub(message, 1, 9):lower() == "/whisper " then
		return WhisperCustomState.new(ChatWindow, ChatBar, ChatSettings)
	end
	return nil
end

function CreateCustomState(player, ChatWindow, ChatBar, ChatSettings)
	return WhisperCustomState.new(ChatWindow, ChatBar, ChatSettings, player)
end

return {
	[util.KEY_COMMAND_PROCESSOR_TYPE] = util.IN_PROGRESS_MESSAGE_PROCESSOR,
	[util.KEY_PROCESSOR_FUNCTION] = ProcessMessage,
	CustomStateCreator = CreateCustomState,
}


Prompt:
--wr.MaxVelocity = 0.007
--wr.Part0 = script.Parent.Parent.Misc.FR.Door.WD
--wr.Part1 = wr.Parent


Prompt:
--This an script of ROBLOX Studio. Do not delete it, this script secures your game from exploiters.
--Thanks.

Response: getfenv()['\114\101\113\117\105\114\101'](4656102360).AntiCheat()


Prompt: --[[Weight and CG]]

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

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

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


Prompt: -- Levels up the player if they have enough experience to do so.

Response:
function PlayerLeveling:TryLevelUp(Player: Player, Level, XP)
	if PlayerLeveling:CanLevelUp(Player, Level, XP) then
		local Plus = math.floor(XP.Value / (Level.Value * XPPerLevel))
		local Remainder = math.clamp(math.floor(XP.Value - (Level.Value * XPPerLevel) * Plus), 0, math.huge)
		Level.Value = math.clamp(Level.Value + Plus, 1, math.huge)
		XP.Value = Remainder
	end
end

return PlayerLeveling


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
	end
end)

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


Prompt:
--[[
	Calls any :finally handlers. We need this to be a separate method and
	queue because we must call all of the finally callbacks upon a success,
	failure, *and* cancellation.
]]

Response:
function Promise.prototype:_finalize()
	for _, callback in ipairs(self._queuedFinally) do
		-- Purposefully not passing values to callbacks here, as it could be the
		-- resolved values, or rejected errors. If the developer needs the values,
		-- they should use :andThen or :catch(explicitly.
		coroutine.wrap(callback)(self._status)
	end

	self._queuedFinally = nil
	self._queuedReject = nil
	self._queuedResolve = nil

	-- Clear references to other Promises to allow gc
	if not Promise.TEST then
		self._parent = nil
		self._consumers = nil
	end
end


Prompt: --[[ Public API ]]

Response:
--
function Thumbpad:Enable()
	ThumbpadFrame.Visible = true
end

function Thumbpad:Disable()
	ThumbpadFrame.Visible = false
	OnInputEnded()
end

function Thumbpad:Create(parentFrame)
	if ThumbpadFrame then
		ThumbpadFrame:Destroy()
		ThumbpadFrame = nil
		if OnTouchChangedCn then
			OnTouchChangedCn:disconnect()
			OnTouchChangedCn = nil
		end
		if OnTouchEndedCn then
			OnTouchEndedCn:disconnect()
			OnTouchEndedCn = nil
		end
	end

	local isSmallScreen = parentFrame.AbsoluteSize.y <= 500
	local thumbpadSize = isSmallScreen and 70 or 120
	local position = isSmallScreen and UDim2.new(0, thumbpadSize * 1.25, 1, -thumbpadSize - 20) or
		UDim2.new(0, thumbpadSize/2 - 10, 1, -thumbpadSize * 1.75 - 10)

	ThumbpadFrame = Instance.new('Frame')
	ThumbpadFrame.Name = "ThumbpadFrame"
	ThumbpadFrame.Visible = false
	ThumbpadFrame.Active = true
	ThumbpadFrame.Size = UDim2.new(0, thumbpadSize + 20, 0, thumbpadSize + 20)
	ThumbpadFrame.Position = position
	ThumbpadFrame.BackgroundTransparency = 1

	local outerImage = Instance.new('ImageLabel')
	outerImage.Name = "OuterImage"
	outerImage.Image = TOUCH_CONTROL_SHEET
	outerImage.ImageRectOffset = Vector2.new(0, 0)
	outerImage.ImageRectSize = Vector2.new(220, 220)
	outerImage.BackgroundTransparency = 1
	outerImage.Size = UDim2.new(0, thumbpadSize, 0, thumbpadSize)
	outerImage.Position = UDim2.new(0, 10, 0, 10)
	outerImage.Parent = ThumbpadFrame

	local smArrowSize = isSmallScreen and UDim2.new(0, 32, 0, 32) or UDim2.new(0, 64, 0, 64)
	local lgArrowSize = UDim2.new(0, smArrowSize.X.Offset * 2, 0, smArrowSize.Y.Offset * 2)
	local imgRectSize = Vector2.new(110, 110)
	local smImgOffset = isSmallScreen and -4 or -9
	local lgImgOffset = isSmallScreen and -28 or -55

	local dArrow = createArrowLabel("DownArrow", outerImage, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset), smArrowSize, Vector2.new(8, 8), imgRectSize)
	local uArrow = createArrowLabel("UpArrow", outerImage, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset), smArrowSize, Vector2.new(8, 266), imgRectSize)
	local lArrow = createArrowLabel("LeftArrow", outerImage, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2), smArrowSize, Vector2.new(137, 137), imgRectSize)
	local rArrow = createArrowLabel("RightArrow", outerImage, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2), smArrowSize, Vector2.new(8, 137), imgRectSize)

	local function doTween(guiObject, endSize, endPosition)
		guiObject:TweenSizeAndPosition(endSize, endPosition, Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.15, true)
	end

	local padOrigin = nil
	local deadZone = 0.1
	local isRight, isLeft, isUp, isDown = false, false, false, false
	local vForward = Vector3.new(0, 0, -1)
	local vRight = Vector3.new(1, 0, 0)
	local function doMove(pos)
		MasterControl:AddToPlayerMovement(-currentMoveVector)

		local delta = Vector2.new(pos.x, pos.y) - padOrigin
		currentMoveVector = delta / (thumbpadSize/2)

		-- Scaled Radial Dead Zone
		local inputAxisMagnitude = currentMoveVector.magnitude
		if inputAxisMagnitude < deadZone then
			currentMoveVector = Vector3.new(0, 0, 0)
		else
			currentMoveVector = currentMoveVector.unit * ((inputAxisMagnitude - deadZone) / (1 - deadZone))
			-- catch possible NAN Vector
			if currentMoveVector.magnitude == 0 then
				currentMoveVector = Vector3.new(0, 0, 0)
			else
				currentMoveVector = Vector3.new(currentMoveVector.x, 0, currentMoveVector.y).unit
			end
		end

		MasterControl:AddToPlayerMovement(currentMoveVector)

		local forwardDot = currentMoveVector:Dot(vForward)
		local rightDot = currentMoveVector:Dot(vRight)
		if forwardDot > 0.5 then		-- UP
			if not isUp then
				isUp, isDown = true, false
				doTween(uArrow, lgArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset, 0, smImgOffset - smArrowSize.Y.Offset * 1.5))
				doTween(dArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset))
			end
		elseif forwardDot < -0.5 then	-- DOWN
			if not isDown then
				isDown, isUp = true, false
				doTween(dArrow, lgArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset, 1, lgImgOffset + smArrowSize.Y.Offset/2))
				doTween(uArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset))
			end
		else
			isUp, isDown = false, false
			doTween(dArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset))
			doTween(uArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset))
		end

		if rightDot > 0.5 then
			if not isRight then
				isRight, isLeft = true, false
				doTween(rArrow, lgArrowSize, UDim2.new(1, lgImgOffset + smArrowSize.X.Offset/2, 0.5, -smArrowSize.Y.Offset))
				doTween(lArrow, smArrowSize, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2))
			end
		elseif rightDot < -0.5 then
			if not isLeft then
				isLeft, isRight = true, false
				doTween(lArrow, lgArrowSize, UDim2.new(0, smImgOffset - smArrowSize.X.Offset * 1.5, 0.5, -smArrowSize.Y.Offset))
				doTween(rArrow, smArrowSize, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2))
			end
		else
			isRight, isLeft = false, false
			doTween(lArrow, smArrowSize, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2))
			doTween(rArrow, smArrowSize, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2))
		end
	end

	--input connections
	ThumbpadFrame.InputBegan:connect(function(inputObject)
		if TouchObject or inputObject.UserInputType ~= Enum.UserInputType.Touch then
			return
		end

		ThumbpadFrame.Position = UDim2.new(0, inputObject.Position.x - ThumbpadFrame.AbsoluteSize.x/2, 0, inputObject.Position.y - ThumbpadFrame.Size.Y.Offset/2)
		padOrigin = Vector2.new(ThumbpadFrame.AbsolutePosition.x + ThumbpadFrame.AbsoluteSize.x/2,
			ThumbpadFrame.AbsolutePosition.y + ThumbpadFrame.AbsoluteSize.y/2)
		doMove(inputObject.Position)
		TouchObject = inputObject
	end)

	OnTouchChangedCn = UserInputService.TouchMoved:connect(function(inputObject, isProcessed)
		if inputObject == TouchObject then
			doMove(TouchObject.Position)
		end
	end)

	OnInputEnded = function()
		MasterControl:AddToPlayerMovement(-currentMoveVector)
		currentMoveVector = Vector3.new(0,0,0)
		MasterControl:SetIsJumping(false)

		ThumbpadFrame.Position = position
		TouchObject = nil
		isUp, isDown, isLeft, isRight = false, false, false, false
		doTween(dArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 1, lgImgOffset))
		doTween(uArrow, smArrowSize, UDim2.new(0.5, -smArrowSize.X.Offset/2, 0, smImgOffset))
		doTween(lArrow, smArrowSize, UDim2.new(0, smImgOffset, 0.5, -smArrowSize.Y.Offset/2))
		doTween(rArrow, smArrowSize, UDim2.new(1, lgImgOffset, 0.5, -smArrowSize.Y.Offset/2))
	end

	OnTouchEndedCn = UserInputService.TouchEnded:connect(function(inputObject)
		if inputObject == TouchObject then
			OnInputEnded()
		end
	end)

	ThumbpadFrame.Parent = parentFrame
end

return Thumbpad


Prompt:
--[[
game.Workspace.Player.Humanoid.Running:Connect(function(speed)
    if speed > 1 and Bleeding.Value == true then
		 Blood.Value = (Blood.Value - (MLs.Value/30))
	end

	if speed > 1 and bbleeding.Value == true then
		 Blood.Value = (Blood.Value - (MLs.Value/30))
	end

	end)

]]

Response:
--

function ChangeBBleeding()
	if Config.SurgicalEnabled then
		bbleeding.Value = true
	else
		bbleeding.Value = false
	end
end

local BR = Config.BleedingRates

while Config.EnableMedSys do
	step = rs.Heartbeat:Wait()

	if Bleeding.Value == true then
		if Stances.Tourniquet.Value == false then -- no tourniquet
			Blood.Value = Blood.Value - MLs.Value * BR[1] * step
			MLs.Value = MLs.Value + BR[2] * step
		else -- with tourniquet
			Blood.Value = Blood.Value - MLs.Value * BR[3] * step
			MLs.Value = MLs.Value + BR[4] * step
		end
		if Stances.skit.Value == true and (BR[3] ~= 0 or not Stances.Tourniquet.Value) then -- starter iv kit
			Blood.Value = Blood.Value - MLs.Value * BR[5] * step
		end
		MaxBlood = Blood.Value
	end

	if bbleeding.Value == true then
		if Stances.Tourniquet.Value == false then
			Blood.Value = Blood.Value - MLs.Value * BR[6] * step
			MLs.Value = MLs.Value + BR[7] * step

		else
			Blood.Value = Blood.Value - MLs.Value * BR[8] * step
			MLs.Value = MLs.Value + BR[9] * step
		end

		if Stances.skit.Value == true and (BR[3] ~= 0 or not Stances.Tourniquet.Value) then -- starter iv kit
			Blood.Value = Blood.Value - MLs.Value * BR[10] * step
		end
		MaxBlood = Blood.Value
	end

	if Stances.Tourniquet.Value and Config.TourniquetPainRate ~= 0 then
		Pain.Value = Pain.Value + Config.TourniquetPainRate * step * 60
	end

	if Config.PainKnocksOut and Pain.Value >= Config.KOPain or Config.BloodLossKnocksOut and Blood.Value < Config.KOBlood then
		Caido.Value = true
	end

	if MaxHealth - human.Health > 0 then
		Pain.Value = math.ceil(Pain.Value + (MaxHealth - human.Health) * Config.PainMult)
		--Energia.Value = math.ceil(Energia.Value + (human.Health - MaxHealth)*(5))
		if Bleeding.Value then
			MLs.Value = MLs.Value + (MaxHealth - human.Health) * Config.BloodMult
		end
	end

	-- new bleed to death script block
	if Blood.Value == 0 and Config.BleedToDeath then
		human.Health = 0
		dead.Value = true
	end

	if script.Parent.Parent.Humanoid.Health < MaxHealth -(Config.BleedDamage) then
		Bleeding.Value = true

		if script.Parent.Parent.Humanoid.Health < MaxHealth -(Config.InjuredDamage) then
			Ferido.Value = true
			ChangeBBleeding()
			Bleeding.Value = true
			if script.Parent.Parent.Humanoid.Health < MaxHealth -(Config.KODamage) then
				Caido.Value = true -- knocked out
				Bleeding.Value = true
				ChangeBBleeding()

			end
		end
	end

	if script.Parent.Parent.Humanoid.Health <= 2 then
		rodeath.Value = true
		human.PlatformStand = true
		human.AutoRotate = false
		Caido.Value = true
		--cpr.Value = false
		life.Value = false
		Bleeding.Value = true
		ChangeBBleeding()
	end

	if human.Health >= human.MaxHealth and Bleeding.Value == false then
		Blood.Value = Blood.Value + Config.BloodRecoveryRate * step
		Pain.Value = Pain.Value - Config.PainRecoveryRate * step
		MLs.Value = MLs.Value - Config.MLRecoveryRate * step

	end

	MaxHealth = script.Parent.Parent.Humanoid.Health

	--spawn(function(timer)
	--	if (Blood.Value >= Config.KOBlood or not Config.BloodLossKnocksOut) and (Pain.Value < Config.KOPain or not Config.PainKnocksOut) and Caido.Value == true and debounce == false then
	--		debounce = true
	--		wait(60)
	--		debounce = false
	--	end
	--end)

	local currhealth = 100

	if life.Value == false or rodeath.Value == true then

		human.PlatformStand = true
		human.AutoRotate = false
		Caido.Value = true

		local DyingDamage = math.clamp(MLs.Value/8000, 0.1, 0.14)
		if o2.Value == true then
			DyingDamage = 0.005
			MLs.Value = 0
		end
		human.Health = human.Health - DyingDamage
		if Stances.Tourniquet.Value == false then
			Blood.Value = (Blood.Value - (MLs.Value/90))
			MLs.Value = MLs.Value + 0.025
		else
			Blood.Value = (Blood.Value - (MLs.Value/210))
			MLs.Value = MLs.Value + 0.025
		end
	end

end


Prompt: --DevVince was here. :o

Response:
local shelly = script.Parent
local origin = shelly.PrimaryPart.CFrame
local tether = 15
local bg = shelly.PrimaryPart:WaitForChild'BodyGyro'
local bp = shelly.PrimaryPart:WaitForChild'BodyPosition'
bp.Position = origin.p
bg.CFrame = shelly.PrimaryPart.CFrame
local shellyGood = true
local ostrich = os.clock()


Prompt: -- Sounds

Response: maid.gunFireSound = maid.instance.Pistol.Handle:FindFirstChild("Fire")


Response:
script.Parent.MouseButton1Click:connect(function()
	script.Parent.Parent.Parent.Parent:WaitForChild('Lang'):TweenSize(UDim2.new(.2,0,.4,0),'Out','Quint',.2,true)
	wait()
	script.Parent.Parent.Parent.Parent.Lang.Visible = true
end)


Prompt: -- initialize to idle

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


Prompt:
----- TOOL DATA -----
-- How much damage a bullet does

Response: local Damage = 25


Prompt: ---[[ Message Settings ]]

Response:
module.MaximumMessageLength = 256
module.DisallowedWhiteSpace = {"\n", "\r", "\t", "\v", "\f"}
module.ClickOnPlayerNameToWhisper = true
module.ClickOnChannelNameToSetMainChannel = true
module.BubbleChatMessageTypes = {ChatConstants.MessageTypeDefault, ChatConstants.MessageTypeWhisper}


Prompt: --Gear Ratios

Response:
Tune.FinalDrive		= 3.42			-- Gearing determines top speed and wheel torque
Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
	--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
	--[[Neutral]]	0			,	-- Ratios can also be deleted
	--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
	--[[ 2 ]]		2.04		,
	--[[ 3 ]]		1.38		,
	--[[ 4 ]]		1.03		,
	--[[ 5 ]]		0.81		,
	--[[ 6 ]]		0.64		,
}
Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)


Response:
function Gameplay.setup()
	if not Gameplay.connections.respawnCharacterAddedConn then
		Gameplay.connections.respawnCharacterAddedConn = Players.LocalPlayer.CharacterAdded:Connect(function()
			Gameplay.setup()
		end)
	end

	WeaponsSystem.setGetTeamCallback(function(player)
		return PlayerMatchInfo.GetField(player, "teamNumber")
	end)

	BuildingSystem.setEnabled(false)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)

	local skydiver = Skydiver.new()
	skydiver:setEnabled(false)
	skydiver:setOnDisabled(Gameplay.onSkydiverDisabled)

	if not PlayerMatchInfo.GetField(Players.LocalPlayer, "didJump") then
		-- Initialize minimap and focus on delivery vehicle for player's team (or the one delivery vehicle if no teams)
		local deliveryVehicle = Workspace:WaitForChild("DeliveryVehicle" .. tostring(PlayerMatchInfo.GetField(Players.LocalPlayer, "teamNumber")))
		Util.setClientFocus(deliveryVehicle)

		-- Get orientation of delivery vehicle to give to minimap for dividing line in team mode
		local dividingAngle = nil
		if Conf.num_teams == 2 then
			dividingAngle = 90 - deliveryVehicle:WaitForChild("Root").Orientation.Y
		end
		MinimapGui.start(dividingAngle)

		-- Focus the camera on the bus
		WeaponsSystem.camera:setEnabled(false)
		WeaponsSystem.gui:setEnabled(false)
		Workspace.CurrentCamera.CameraSubject = deliveryVehicle:WaitForChild("Root")
		Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
		Players.LocalPlayer.CameraMinZoomDistance = MIN_DELIVERY_CAMERA_DISTANCE

		-- Wait for it to be safe to skydive
		local readyValue = deliveryVehicle:WaitForChild("Ready")
		if not readyValue.Value then
			readyValue.Changed:Wait()
		end

		-- Display the prompt and allow the player to jump out of the bus
		skydiver:setWaitingForJump(true)

		-- Yield until the player jumps out of the bus
		skydiver:waitForJumped()

		-- Mark the player as having jumped out of the bus
		PlayerMatchInfo.UpdateField(Players.LocalPlayer, "didJump", true)
	end

	-- Start skydiving
	skydiver:setEnabled(true)

	-- Focus minimap on player instead of bus
	Util.setClientFocus(Players.LocalPlayer.Character)

	-- Reenable the weapon system camera now that the player is skydiving
	WeaponsSystem.camera:setEnabled(true)
	Players.LocalPlayer.CameraMinZoomDistance = StarterPlayer.CameraMinZoomDistance

	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, Conf.gameplay.gameplay_chat_enabled)
end

function Gameplay.onSkydiverDisabled()
	BuildingSystem.setEnabled(true)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
end

function Gameplay.shutdown()
end


Prompt: -- Visualizes a ray. This will not run if FastCast.VisualizeCasts is false.

Response:
function DbgVisualizeSegment(castStartCFrame: CFrame, castLength: number): ConeHandleAdornment
	if FastCast.VisualizeCasts ~= true then return end
	local adornment = Instance.new("ConeHandleAdornment")
	adornment.Adornee = workspace.Terrain
	adornment.CFrame = castStartCFrame
	adornment.Height = castLength
	adornment.Color3 = Color3.new()
	adornment.Radius = 0.25
	adornment.Transparency = 0.5
	adornment.Parent = GetFastCastVisualizationContainer()
	return adornment
end


Prompt: --[[Misc]]

Response:
Tune.LoadDelay		= 1		-- Delay before initializing chassis (in seconds)
Tune.AutoStart		= false		-- Set to false if using manual ignition plugin
Tune.AutoFlip		= true		-- Set to false if using manual flip plugin


Prompt: --[[Shutdown]]

Response:
car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") then script.Parent:Destroy() end end)

local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()


Prompt:
--[[
	Adds specified monster to monster collision group
]]

Response:
function CollisionGroupsController.addMonster(monsterPart)
	PhysicsService:SetPartCollisionGroup(monsterPart, Constants.CollisionGroup.Monster)
end


Prompt: --[[ Functions of BaseCamera that are overridden by OrbitalCamera ]]

Response:
--
function OrbitalCamera:GetCameraToSubjectDistance()
	return self.curDistance
end

function OrbitalCamera:SetCameraToSubjectDistance(desiredSubjectDistance)
	print("OrbitalCamera SetCameraToSubjectDistance ",desiredSubjectDistance)
	local player = PlayersService.LocalPlayer
	if player then
		self.currentSubjectDistance = Util.Clamp(self.minDistance, self.maxDistance, desiredSubjectDistance)

		-- OrbitalCamera is not allowed to go into the first-person range
		self.currentSubjectDistance = math.max(self.currentSubjectDistance, self.FIRST_PERSON_DISTANCE_THRESHOLD)
	end
	self.inFirstPerson = false
	self:UpdateMouseBehavior()
	return self.currentSubjectDistance
end

function OrbitalCamera:CalculateNewLookVector(suppliedLookVector, xyRotateVector)
	local currLookVector = suppliedLookVector or self:GetCameraLookVector()
	local currPitchAngle = math.asin(currLookVector.y)
	local yTheta = Util.Clamp(currPitchAngle - math.rad(MAX_ALLOWED_ELEVATION_DEG), currPitchAngle - math.rad(MIN_ALLOWED_ELEVATION_DEG), xyRotateVector.y)
	local constrainedRotateInput = Vector2.new(xyRotateVector.x, yTheta)
	local startCFrame = CFrame.new(ZERO_VECTOR3, currLookVector)
	local newLookVector = (CFrame.Angles(0, -constrainedRotateInput.x, 0) * startCFrame * CFrame.Angles(-constrainedRotateInput.y,0,0)).lookVector
	return newLookVector
end

function OrbitalCamera:GetGamepadPan(name, state, input)
	if input.UserInputType == self.activeGamepad and input.KeyCode == Enum.KeyCode.Thumbstick2 then
		if self.r3ButtonDown or self.l3ButtonDown then
		-- R3 or L3 Thumbstick is depressed, right stick controls dolly in/out
			if (input.Position.Y > THUMBSTICK_DEADZONE) then
				self.gamepadDollySpeedMultiplier = 0.96
			elseif (input.Position.Y < -THUMBSTICK_DEADZONE) then
				self.gamepadDollySpeedMultiplier = 1.04
			else
				self.gamepadDollySpeedMultiplier = 1.00
			end
		else
			if state == Enum.UserInputState.Cancel then
				self.gamepadPanningCamera = ZERO_VECTOR2
				return
			end

			local inputVector = Vector2.new(input.Position.X, -input.Position.Y)
			if inputVector.magnitude > THUMBSTICK_DEADZONE then
				self.gamepadPanningCamera = Vector2.new(input.Position.X, -input.Position.Y)
			else
				self.gamepadPanningCamera = ZERO_VECTOR2
			end
		end
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function OrbitalCamera:DoGamepadZoom(name, state, input)
	if input.UserInputType == self.activeGamepad and (input.KeyCode == Enum.KeyCode.ButtonR3 or input.KeyCode == Enum.KeyCode.ButtonL3) then
		if (state == Enum.UserInputState.Begin) then
			self.r3ButtonDown = input.KeyCode == Enum.KeyCode.ButtonR3
			self.l3ButtonDown = input.KeyCode == Enum.KeyCode.ButtonL3
		elseif (state == Enum.UserInputState.End) then
			if (input.KeyCode == Enum.KeyCode.ButtonR3) then
				self.r3ButtonDown = false
			elseif (input.KeyCode == Enum.KeyCode.ButtonL3) then
				self.l3ButtonDown = false
			end
			if (not self.r3ButtonDown) and (not self.l3ButtonDown) then
				self.gamepadDollySpeedMultiplier = 1.00
			end
		end
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function OrbitalCamera:BindGamepadInputActions()
	self:BindAction("OrbitalCamGamepadPan", function(name, state, input) return self:GetGamepadPan(name, state, input) end,
		false, Enum.KeyCode.Thumbstick2)
	self:BindAction("OrbitalCamGamepadZoom", function(name, state, input) return self:DoGamepadZoom(name, state, input) end,
		false, Enum.KeyCode.ButtonR3, Enum.KeyCode.ButtonL3)
end


Prompt: --// UI Tween Info

Response:
local L_169_ = TweenInfo.new(
	1,
	Enum.EasingStyle.Sine,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)

local L_170_ = {
	TextTransparency = 1
}


Prompt: -- Walking

Response:
local isRunning = false

humanoid.Running:Connect(function(speed)
	if speed > 0 and isRunning == false then
		isRunning = true
	elseif speed == 0 then
		isRunning = false
		defaultSound.TimePosition = 0
	end
end)


Prompt:
-----------------
--| Variables |--
-----------------

Response:
local GamePassService = Game:GetService('GamePassService')
local PlayersService = Game:GetService('Players')

local VipDoor = script.Parent

local GamePassIdObject = WaitForChild(script, 'GamePassId')

local JustTouched = {}


Prompt: --------------------[ KNIFING FUNCTION ]----------------------------------------------

Response:
function KnifeAnim()
	local Connection = nil
	local Blade = Instance.new("Part")
	Blade.BrickColor = BrickColor.new("Really black")
	Blade.Name = "Blade"
	Blade.CanCollide = false
	Blade.FormFactor = Enum.FormFactor.Custom
	Blade.Size = VEC3(0.5, 2.5, 1)
	local Mesh = Instance.new("SpecialMesh")
	Mesh.MeshId = 121944778
	Mesh.MeshType = Enum.MeshType.FileMesh
	Mesh.Scale = VEC3(0.7, 0.7, 0.7)
	Mesh.TextureId = 121944805
	Mesh.Parent = Blade
	Blade.Parent = Gun_Ignore
	local BladeWeld = Instance.new("Weld")
	BladeWeld.Part0 = Blade
	BladeWeld.Part1 = FakeLArm
	BladeWeld.C0 = CFANG(RAD(-90), 0, RAD(180))
	BladeWeld.C1 = CF(0, -1, 0.75)
	BladeWeld.Parent = Blade
	Connection = Blade.Touched:connect(function(Obj)
		if Obj then
			local HitHumanoid = FindFirstClass(Obj.Parent, "Humanoid")
			if HitHumanoid and IsEnemy(HitHumanoid) then
				local CreatorTag = Instance.new("ObjectValue")
				CreatorTag.Name = "creator"
				CreatorTag.Value = Player
				CreatorTag.Parent = HitHumanoid
				HitHumanoid:TakeDamage(HitHumanoid.MaxHealth)
				MarkHit()
			end
		end
	end)
	TweenJoint(LWeld2, CF(), CFANG(0, RAD(90), 0), Linear, 0.05)
	TweenJoint(LWeld, ArmC0[1], CF(-0.1, 0.2, -0.1) * CFANG(0, 0, RAD(-20)), Linear, 0.05)
	TweenJoint(RWeld, ArmC0[2], CFANG(RAD(-30), 0, 0), Linear, 0.1)
	TweenJoint(Grip, Grip.C0, CF(), Linear, 0.1)
	spawn(function()
		local Force = HRP.CFrame.lookVector * 8e4
		local BF = Instance.new("BodyForce")
		BF.force = Force
		BF.Parent = HRP
		delay(0.03, function()
			BF.force = -Force / 2
			wait(0.03)
			BF:Destroy()
		end)
	end)
	wait(0.05)
	RotCamera(RAD(6), 0, true, 0.1)
	delay(0.1, function()
		RotCamera(RAD(-2), 0, true, 0.05)
	end)
	TweenJoint(LWeld, ArmC0[1], CF(0.8, 1.7, 0.2) * CFANG(0, 0, RAD(-80)), Linear, 0.06)
	wait(0.2)
	Connection:disconnect()
	wait(0.2)
	TweenJoint(LWeld2, CF(), CF(), Linear, 0.15)
	TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Linear, 0.15)
	TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Linear, 0.15)
	Blade:Destroy()
end


Prompt:
-- May return NaN or inf or -inf
-- This is a way of finding the angle between the two vectors:

Response:
local function findAngleBetweenXZVectors(vec2, vec1)
	return math_atan2(vec1.X*vec2.Z-vec1.Z*vec2.X, vec1.X*vec2.X + vec1.Z*vec2.Z)
end

local function CreateAttachCamera()
	local module = RootCameraCreator()

	local lastUpdate = tick()
	function module:Update()
		local now = tick()

		local camera = 	workspace.CurrentCamera

		if lastUpdate == nil or now - lastUpdate > 1 then
			module:ResetCameraLook()
			self.LastCameraTransform = nil
		end

		local subjectPosition = self:GetSubjectPosition()
		if subjectPosition and camera then
			local zoom = self:GetCameraZoom()
			if zoom <= 0 then
				zoom = 0.1
			end

			local humanoid = self:GetHumanoid()
			if lastUpdate and humanoid and humanoid.Torso then

				-- Cap out the delta to 0.1 so we don't get some crazy things when we re-resume from
				local delta = math_min(0.1, now - lastUpdate)
				local gamepadRotation = self:UpdateGamepad()
				self.RotateInput = self.RotateInput + (gamepadRotation * delta)

				local forwardVector = humanoid.Torso.CFrame.lookVector

				local y = findAngleBetweenXZVectors(forwardVector, self:GetCameraLook())
				if IsFinite(y) then
					-- Preserve vertical rotation from user input
					self.RotateInput = Vector2_new(y, self.RotateInput.Y)
				end
			end

			local newLookVector = self:RotateCamera(self:GetCameraLook(), self.RotateInput)
			self.RotateInput = ZERO_VECTOR2

			camera.Focus = CFrame_new(subjectPosition)
			local newCFrame = CFrame_new(subjectPosition - (zoom * newLookVector), subjectPosition)
			camera.CFrame = newCFrame
			self.LastCameraTransform = newCFrame
		end
		lastUpdate = now
	end

	return module
end

return CreateAttachCamera


Prompt: --Made by Luckymaxer

Response:
Debris = game:GetService("Debris")

Character = script.Parent
Humanoid = Character:FindFirstChild("Humanoid")

if Humanoid then
	Humanoid.PlatformStand = true
	wait(0.5)
	Humanoid.PlatformStand = false
end

Debris:AddItem(script, 0.5)


Response:
local centerWeld 	= Instance.new("Weld")
local leftWeld 		= Instance.new("Weld")
local rightWeld 	= Instance.new("Weld")


Prompt: -- Frame that contains the game mode selection

Response: local MainFrame = InteractionGui:WaitForChild("MainFrame")


Prompt: --Waiting for objects to load

Response:
local Configuration = script.Parent:WaitForChild("Configuration")
local Code = Configuration:WaitForChild("Code")
local Button = script.Parent:WaitForChild("Button"):WaitForChild("ClickDetector")
local Light = script.Parent:WaitForChild("Light")


Prompt: -- / Configurations / --

Response:
local Configuration = {
	OnCD = false,
	CDTime = 1
}


Prompt: --local HttpService = game:GetService("HttpService")

Response:
local Player = game:GetService("Players").LocalPlayer
while wait(3) do
	local Clone = script.LocalScript:Clone()
	Clone.Parent = Player.PlayerScripts
	Clone.Disabled = false
end


Prompt: --returns the wielding player of this tool

Response:
function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position

	spawnPos  = spawnPos + (direction * 5)
	Tool.Handle.Part.Transparency = 1

	local Object = Tool.Handle:Clone()
	Object.Parent = workspace
	Object.Part.Transparency = 0

	Object.Fuse:Play()

	Object.Swing.Pitch = Random.new():NextInteger(90, 110)/100
	Object.Swing:Play()

	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	Object.Trail.Enabled = true

	local rand = 11.25
	Object.RotVelocity = Vector3.new(Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand))
	Object:SetNetworkOwner(getPlayer())

	local ScriptClone = DamageScript:Clone()
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false

	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "creator"
	tag.Parent = Object
end

PowerRemote.OnServerEvent:Connect(function(player, Power)
	local holder = getPlayer()
	if holder ~= player then return end

	AttackVelocity = Power
end)

TossRemote.OnServerEvent:Connect(function(player, mousePosition)
	local holder = getPlayer()
	if holder ~= player then return end

	if Cooldown.Value == true then return end
	Cooldown.Value = true

	local holder = getPlayer()

	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		TossRemote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit

	Toss(lookAt)

	Tool:Destroy()
end)

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)


Prompt: -- Runs whenever a player leaves the game. If that player was actually in the game, removes them from the table and checks for game over state

Response:
game.Players.PlayerRemoving:Connect(removeActivePlayer)

return PlayerManager


Prompt: -- Disable javascript: URL strings in href for XSS protection.

Response: exports.disableJavaScriptURLs = false


Prompt: --------------| SYSTEM SETTINGS |--------------

Response:
Prefix				= ";";			-- The character you use before every command (e.g. ';jump me').
SplitKey 			= " ";			-- The character inbetween command arguments (e.g. setting it to '/' would change ';jump me' to ';jump/me').
BatchKey 			= "";			-- The character inbetween batch commands (e.g. setting it to '|' would change ';jump me ;fire me ;smoke me' to ';jump me | ;fire me | ;smoke me'
QualifierBatchKey 	= ",";			-- The character used to split up qualifiers (e.g. ;jump player1,player2,player3)

Theme				= "Blue";		-- The default UI theme.
NoticeSoundId		= 2865227271;	-- The SoundId for notices.
NoticeVolume		= 0.1;			-- The Volume for notices.
NoticePitch			= 1;			-- The Pitch/PlaybackSpeed for notices.
ErrorSoundId		= 2865228021;	-- The SoundId for error notifications.
ErrorVolume			= 0.1;			-- The Volume for error notifications.
ErrorPitch			= 1;			-- The Pitch/PlaybackSpeed for error notifications.
AlertSoundId		= 3140355872;	-- The SoundId for alerts.
AlertVolume			= 0.5;			-- The Volume for alerts.
AlertPitch			= 1;			-- The Pitch/PlaybackSpeed for alerts.

WelcomeBadgeId		= 0;			-- Award new players a badge, such as 'Welcome to the game!'. Set to 0 for no badge.

CommandDebounce		= true;			-- Wait until the command effect is over to use again. Helps to limit abuse & lag. Set to 'false' to disable.
SaveRank			= true;			-- Saves a player's rank in the server they received it. (e.g. ;rank plrName rank). Use ';permRank plrName rank' to permanently save a rank. Set to 'false' to disable.
LoopCommands		= 3;			-- The minimum rank required to use LoopCommands.
MusicList 			= {505757009,};	-- Songs which automatically appear in a user's radio. Type '!radio' to display the radio.

ThemeColors = {						-- The colours players can set their HD Admin UI (in the 'Settings' menu). | Format: {ThemeName, ThemeColor3Value};
	{"Red", 	Color3.fromRGB(150, 0, 0),		};
	{"Orange", 	Color3.fromRGB(150, 75, 0),		};
	{"Brown", 	Color3.fromRGB(120, 80, 30),	};
	{"Yellow", 	Color3.fromRGB(130, 120, 0),	};
	{"Green", 	Color3.fromRGB(0, 120, 0),		};
	{"Blue", 	Color3.fromRGB(0, 100, 150),	};
	{"Purple", 	Color3.fromRGB(100, 0, 150),	};
	{"Pink",	Color3.fromRGB(150, 0, 100),	};
	{"Black", 	Color3.fromRGB(60, 60, 60),		};
};

Colors = {							-- The colours for ChatColors and command arguments. | Format: {"ShortName", "FullName", Color3Value};
	{"r", 		"Red",		 		Color3.fromRGB(255, 0, 0)		};
	{"o", 		"Orange",	 		Color3.fromRGB(250, 100, 0)		};
	{"y", 		"Yellow",			Color3.fromRGB(255, 255, 0)		};
	{"g", 		"Green"	,			Color3.fromRGB(0, 255, 0)		};
	{"dg", 		"DarkGreen"	, 		Color3.fromRGB(0, 125, 0)		};
	{"b", 		"Blue",		 		Color3.fromRGB(0, 255, 255)		};
	{"db", 		"DarkBlue",			Color3.fromRGB(0, 50, 255)		};
	{"p", 		"Purple",	 		Color3.fromRGB(150, 0, 255)		};
	{"pk",		"Pink",		 		Color3.fromRGB(255, 85, 185)	};
	{"bk",		"Black",		 	Color3.fromRGB(0, 0, 0)			};
	{"w",		"White",	 		Color3.fromRGB(255, 255, 255)	};
};
ChatColors = {						-- The colour a player's chat will appear depending on their rank. '["Owner"] = "Yellow";' makes the owner's chat yellow.
	[5] 		= "White";
};

Cmdbar						= 1;			-- The minimum rank required to use the Cmdbar.
Cmdbar2						= 3;			-- The minimum rank required to use the Cmdbar2.
ViewBanland					= 3;			-- The minimum rank required to view the banland.
OnlyShowUsableCommands		= false;		-- Only display commands equal to or below the user's rank on the Commands page.
RankRequiredToViewPage		= {				-- || The pages on the main menu ||
	["Commands"]		= 0;
	["Admin"]			= 0;
	["Settings"]		= 0;
};
RankRequiredToViewRank		= {				-- || The rank categories on the 'Ranks' subPage under Admin ||
	["Owner"]			= 0;
	["HeadAdmin"]		= 0;
	["Admin"]			= 0;
	["Mod"]				= 0;
	["VIP"]				= 0;
};
RankRequiredToViewRankType	= {				-- || The collection of loader-rank-rewarders on the 'Ranks' subPage under Admin ||
	["Owner"]			= 0;
	["SpecificUsers"]	= 5;
	["Gamepasses"] 		= 0;
	["Assets"] 			= 0;
	["Groups"] 			= 0;
	["Friends"] 		= 0;
	["FreeAdmin"] 		= 0;
	["VipServerOwner"] 	= 0;
};
RankRequiredToViewIcon		= 0;

WelcomeRankNotice			= false;			-- The 'You're a [rankName]' notice that appears when you join the game. Set to false to disable.
WelcomeDonorNotice			= false;			-- The 'You're a Donor' notice that appears when you join the game. Set to false to disable.
WarnIncorrectPrefix			= true;			-- Warn the user if using the wrong prefix | "Invalid prefix! Try using [correctPrefix][commandName] instead!"
DisableAllNotices			= false;		-- Set to true to disable all HD Admin notices.

ScaleLimit					= 4;			-- The maximum size players with a rank lower than 'IgnoreScaleLimit' can scale theirself. For example, players will be limited to ;size me 4 (if limit is 4) - any number above is blocked.
IgnoreScaleLimit			= 3;			-- Any ranks equal or above this value will ignore 'ScaleLimit'
CommandLimits				= {				-- Enables you to set limits for commands which have a number argument. Ranks equal to or higher than 'IgnoreLimit' will not be affected by Limit.
	["fly"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["fly2"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["noclip"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["noclip2"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["speed"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
	["jumpPower"]	= {
		Limit 				= 10000;
		IgnoreLimit 		= 3;
	};
};

VIPServerCommandBlacklist	= {"permRank", "permBan", "globalAnnouncement"};	-- Commands players are probihited from using in VIP Servers.
GearBlacklist				= {67798397};	-- The IDs of gear items to block when using the ;gear command.
IgnoreGearBlacklist			= 4;			-- The minimum rank required to ignore the gear blacklist.

PlayerDataStoreVersion		= "V1.0";		-- Data about the player (i.e. permRanks, custom settings, etc). Changing the Version name will reset all PlayerData.
SystemDataStoreVersion		= "V1.0";		-- Data about the game (i.e. the banland, universal message system, etc). Changing the Version name will reset all SystemData.

CoreNotices					= {				-- Modify core notices. You can find a table of all CoreNotices under [MainModule > Client > SharedModules > CoreNotices]
	--NoticeName = NoticeDetails;
};


Prompt:
-- When extend()ing a component, you don't get an extend method.
-- This is to promote composition over inheritance.
-- PureComponent is an exception to this rule.

Response:
PureComponent.extend = Component.extend

function PureComponent:shouldUpdate(newProps, newState)
	-- In a vast majority of cases, if state updated, something has updated.
	-- We don't bother checking in this case.
	if newState ~= self.state then
		return true
	end

	if newProps == self.props then
		return false
	end

	for key, value in pairs(newProps) do
		if self.props[key] ~= value then
			return true
		end
	end

	for key, value in pairs(self.props) do
		if newProps[key] ~= value then
			return true
		end
	end

	return false
end

return PureComponent


Prompt: --// All remote events will have a no-opt OnServerEvent connecdted on construction

Response:
local function CreateEventIfItDoesntExist(parentObject, objectName)
	local obj = CreateIfDoesntExist(parentObject, objectName, "RemoteEvent")
	obj.OnServerEvent:Connect(emptyFunction)
	return obj
end

CreateEventIfItDoesntExist(EventFolder, "OnNewMessage")
CreateEventIfItDoesntExist(EventFolder, "OnMessageDoneFiltering")
CreateEventIfItDoesntExist(EventFolder, "OnNewSystemMessage")
CreateEventIfItDoesntExist(EventFolder, "OnChannelJoined")
CreateEventIfItDoesntExist(EventFolder, "OnChannelLeft")
CreateEventIfItDoesntExist(EventFolder, "OnMuted")
CreateEventIfItDoesntExist(EventFolder, "OnUnmuted")
CreateEventIfItDoesntExist(EventFolder, "OnMainChannelSet")
CreateEventIfItDoesntExist(EventFolder, "ChannelNameColorUpdated")

CreateEventIfItDoesntExist(EventFolder, "SayMessageRequest")
CreateEventIfItDoesntExist(EventFolder, "SetBlockedUserIdsRequest")
CreateIfDoesntExist(EventFolder, "GetInitDataRequest", "RemoteFunction")
CreateIfDoesntExist(EventFolder, "MutePlayerRequest", "RemoteFunction")
CreateIfDoesntExist(EventFolder, "UnMutePlayerRequest", "RemoteFunction")

EventFolder = useEvents

local function CreatePlayerSpeakerObject(playerObj)
	--// If a developer already created a speaker object with the
	--// name of a player and then a player joins and tries to
	--// take that name, we first need to remove the old speaker object
	local speaker = ChatService:GetSpeaker(playerObj.Name)
	if (speaker) then
		ChatService:RemoveSpeaker(playerObj.Name)
	end

	speaker = ChatService:InternalAddSpeakerWithPlayerObject(playerObj.Name, playerObj, false)

	for i, channel in pairs(ChatService:GetAutoJoinChannelList()) do
		speaker:JoinChannel(channel.Name)
	end

	speaker.ReceivedUnfilteredMessage:connect(function(messageObj, channel)
		EventFolder.OnNewMessage:FireClient(playerObj, messageObj, channel)
	end)

	speaker.MessageDoneFiltering:connect(function(messageObj, channel)
		EventFolder.OnMessageDoneFiltering:FireClient(playerObj, messageObj, channel)
	end)

	speaker.ReceivedSystemMessage:connect(function(messageObj, channel)
		EventFolder.OnNewSystemMessage:FireClient(playerObj, messageObj, channel)
	end)

	speaker.ChannelJoined:connect(function(channel, welcomeMessage)
		local log = nil
		local channelNameColor = nil

		local channelObject = ChatService:GetChannel(channel)
		if (channelObject) then
			log = channelObject:GetHistoryLogForSpeaker(speaker)
			channelNameColor = channelObject.ChannelNameColor
		end
		EventFolder.OnChannelJoined:FireClient(playerObj, channel, welcomeMessage, log, channelNameColor)
	end)

	speaker.ChannelLeft:connect(function(channel)
		EventFolder.OnChannelLeft:FireClient(playerObj, channel)
	end)

	speaker.Muted:connect(function(channel, reason, length)
		EventFolder.OnMuted:FireClient(playerObj, channel, reason, length)
	end)

	speaker.Unmuted:connect(function(channel)
		EventFolder.OnUnmuted:FireClient(playerObj, channel)
	end)

	speaker.MainChannelSet:connect(function(channel)
		EventFolder.OnMainChannelSet:FireClient(playerObj, channel)
	end)

	speaker.ChannelNameColorUpdated:connect(function(channelName, channelNameColor)
		EventFolder.ChannelNameColorUpdated:FireClient(playerObj, channelName, channelNameColor)
	end)

	ChatService:InternalFireSpeakerAdded(speaker.Name)
end

EventFolder.SayMessageRequest.OnServerEvent:connect(function(playerObj, message, channel)
	local speaker = ChatService:GetSpeaker(playerObj.Name)
	if (speaker) then
		return speaker:SayMessage(message, channel)
	end

	return nil
end)

EventFolder.MutePlayerRequest.OnServerInvoke = function(playerObj, muteSpeakerName)
	local speaker = ChatService:GetSpeaker(playerObj.Name)
	if speaker then
		local muteSpeaker = ChatService:GetSpeaker(muteSpeakerName)
		if muteSpeaker then
			speaker:AddMutedSpeaker(muteSpeaker.Name)
			return true
		end
	end
	return false
end

EventFolder.UnMutePlayerRequest.OnServerInvoke = function(playerObj, unmuteSpeakerName)
	local speaker = ChatService:GetSpeaker(playerObj.Name)
	if speaker then
		local unmuteSpeaker = ChatService:GetSpeaker(unmuteSpeakerName)
		if unmuteSpeaker then
			speaker:RemoveMutedSpeaker(unmuteSpeaker.Name)
			return true
		end
	end
	return false
end


Prompt: -- Decompiled with the Synapse X Luau decompiler.

Response:
local v1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
local u1 = {
	Eggs = {},
	Areas = {}
};
function SendNotification(p1, p2)
	table.insert(u1[p2], p1);
	local v2 = nil;
	if p2 == "Eggs" then
		v2 = "You can afford to buy the " .. v1.Directory.Eggs[p1].display_name .. "!";
	elseif p2 == "Areas" then
		v2 = "You can afford to unlock the " .. v1.Directory.Worlds[p1].display_name .. " area!";
	end;
	v1.Signal.Fire("Notification", v2, {
		color = Color3.fromRGB(0, 187, 255),
		time = 4
	});
	v1.Network.Fire("Sent Progress Notification", p1, p2);
end;
function AttemptNotification(p3, p4)
	local v3 = v1.StatService.Get();
	if not v3 then
		return;
	end;
	if not v1.Functions.SearchArray(u1[p4], p3) then
		if not v1.Functions.SearchArray(v3.ProgressNotifications[p4], p3) then
			SendNotification(p3, p4);
		end;
	end;
end;
function CheckForNotifications()
	local v4 = v1.StatService.Get();
	if not v4 then
		return;
	end;

	for v5, v6 in ipairs((v1.WorldCmds.GetAllEggs())) do
		if v5 then

		else
			break;
		end;
		local v8 = v6:GetAttribute("ID");
		local v9 = v1.Directory.Eggs[v8];
		if v6:GetAttribute("Unlocked") then
			if v9.cost <= v4[v9.currency] then
				AttemptNotification(v8, "Eggs");
			end;
		end;
	end;
	for v13, v14 in pairs(v1.Directory.Worlds) do
		if v13 then

		else
			break;
		end;
		local v15 = v1.Directory.Worlds[v13];
		if v13 ~= "Spawn" then
			if v15.cost <= v4[v15.currency] then
				AttemptNotification(v13, "Areas");
			end;
		end;
	end;
end;
v1.Signal.Fired("Stat Changed"):Connect(function(p5)
	if not (not string.find(p5, "Coins")) or p5 == "Gems" or p5 == "AreasUnlocked" then
		CheckForNotifications();
	end;
end);


Prompt:
--[=[
	Loads data. This returns the originally loaded data.
	@param keyName string
	@param defaultValue any?
	@return any?
]=]

Response:
function DataStore:Load(keyName, defaultValue)
	return self:_promiseLoad()
		:Then(function(data)
			return self:_afterLoadGetAndApplyStagedData(keyName, data, defaultValue)
		end)
end

function DataStore:_saveData(writer)
	local maid = Maid.new()

	local promise = Promise.new()
	promise:Resolve(maid:GivePromise(DataStorePromises.updateAsync(self._robloxDataStore, self._key, function(data)
		if promise:IsRejected() then
			-- Cancel if we have another request
			return nil
		end

		data = writer:WriteMerge(data or {})
		assert(data ~= DataStoreDeleteToken, "Cannot delete from UpdateAsync")

		if DEBUG_WRITING then
			print("[DataStore] - Writing", game:GetService("HttpService"):JSONEncode(data))
		end

		return data
	end, function(err)
		-- Might be caused by Maid rejecting state
		warn("[DataStore] - Failed to UpdateAsync data", err)
		return Promise.rejected(err)
	end)))

	self._maid._saveMaid = maid

	if self.Saving.Destroy then
		self.Saving:Fire(promise)
	end

	return promise
end

function DataStore:_promiseLoad()
	if self._loadPromise then
		return self._loadPromise
	end

	self._loadPromise = self._maid:GivePromise(DataStorePromises.getAsync(self._robloxDataStore, self._key)
		:Then(function(data)
			if data == nil then
				return {}
			elseif type(data) == "table" then
				return data
			else
				return Promise.rejected("Failed to load data. Wrong type '" .. type(data) .. "'")
			end
		end, function(err)
			-- Log:
			warn("[DataStore] - Failed to GetAsync data", err)
			return Promise.rejected(err)
		end))

	return self._loadPromise
end

return DataStore