Pinkstack/roblox-luau-corpus-text huggingface dataset:
--// All global vars will be wiped/replaced except script
--// All guis are autonamed client.Variables.CodeName..gui.Name



return function(data, env)
	if env then
		setfenv(1, env)
	end
	
	local gui = script.Parent.Parent
	local playergui = service.PlayerGui
	local str = data.Message
	local time = data.Time or 15
	
	local log  = {
		Type = "Hint";
		Title = "Hint";
		Message = str;
		Icon = "rbxassetid://7501175708";
		Time = os.date("%X");
		Function = nil;
	}

	table.insert(client.Variables.CommunicationsHistory, log) 
	service.Events.CommsPanel:Fire(log)
	
	--client.UI.Make("HintHolder")
	local container = client.UI.Get("HintHolder",nil,true)
	if not container then 
		local holder = service.New("ScreenGui")
		holder.IgnoreGuiInset = not client.Variables.TopBarShift
		holder.ClipToDeviceSafeArea = true
		
		
		local hTable = client.UI.Register(holder)
		local frame = service.New("ScrollingFrame", holder)
		client.UI.Prepare(holder)
		hTable.Name = "HintHolder"
		frame.Name = "Frame"
		frame.BackgroundTransparency = 1
		frame.Size = UDim2.new(1, 0, 0,150)
		frame.CanvasSize = UDim2.new(0, 0, 0, 0)
		frame.ChildAdded:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)
		
		frame.ChildRemoved:Connect(function(c)
			if #frame:GetChildren() == 0 then
				frame.Visible = false
			else
				frame.Visible = true
			end
		end)
		
		container = hTable
		hTable:Ready()
	end
	container = container.Object.Frame
	
	--// First things first account for notif :)
	local notif = client.UI.Get("Notif")
	
	if (container:IsA("ScreenGui")) then
		container.IgnoreGuiInset, container.ClipToDeviceSafeArea = not client.Variables.TopBarShift, true
	end
	
	container.Position = UDim2.new(0, 0, 0, (notif and 30 or 0))
	
	local children = container:GetChildren()
	
	gui.Position = UDim2.new(0,0,0,-100)
	gui.Frame.msg.Text = str
	local bounds = gui.Frame.msg.TextBounds.X
	
	local function moveGuis(m,ignore)
		m = m or 0
		local max = #container:GetChildren()
		for i,v in pairs(container:GetChildren()) do
			if v~=ignore then
				local y = (i+m)*28
				v.Position = UDim2.new(0,0,0,y)
				if i~=max then v.Size = UDim2.new(1,0,0,28) end
			end
		end
	end
	
	local lom = -1
	moveGuis(-1)
	gui.Parent = container
	if #container:GetChildren()>5 then lom = -2 end
	UDim2.new(0,0,0,(#container:GetChildren()+lom)*28)
	moveGuis(-1)
	--gui:TweenPosition(UDim2.new(0,0,0,(#container:GetChildren()+lom)*28),nil,nil,0.3,true,function() if gui and gui.Parent then moveGuis(-1) end end)
	
	if #container:GetChildren()>5 then
		local gui = container:GetChildren()[1]
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
	
	wait(data.Time or 5)
	
	if gui and gui.Parent then 
		moveGuis(-2,gui)
		gui:Destroy()
		--gui:TweenPosition(UDim2.new(0,0,0,-100),nil,nil,0.2,true,function() if gui and gui.Parent then gui:Destroy() end end)
	end
end
--[[ The Module ]]

--
local BaseCharacterController = require(script.Parent:WaitForChild("BaseCharacterController"))
local Gamepad = setmetatable({}, BaseCharacterController)
Gamepad.__index = Gamepad

function Gamepad.new(CONTROL_ACTION_PRIORITY)
	local self = setmetatable(BaseCharacterController.new(), Gamepad)

	self.CONTROL_ACTION_PRIORITY = CONTROL_ACTION_PRIORITY

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0

	self.activeGamepad = NONE	-- Enum.UserInputType.Gamepad1, 2, 3...
	self.gamepadConnectedConn = nil
	self.gamepadDisconnectedConn = nil
	return self
end

function Gamepad:Enable(enable)
	if not UserInputService.GamepadEnabled then
		return false
	end

	if enable == self.enabled then
		-- Module is already in the state being requested. True is returned here since the module will be in the state
		-- expected by the code that follows the Enable() call. This makes more sense than returning false to indicate
		-- no action was necessary. False indicates failure to be in requested/expected state.
		return true
	end

	self.forwardValue  = 0
	self.backwardValue = 0
	self.leftValue = 0
	self.rightValue = 0
	self.moveVector = ZERO_VECTOR3
	self.isJumping = false

	if enable then
		self.activeGamepad = self:GetHighestPriorityGamepad()
		if self.activeGamepad ~= NONE then
			self:BindContextActions()
			self:ConnectGamepadConnectionListeners()
		else
			-- No connected gamepads, failure to enable
			return false
		end
	else
		self:UnbindContextActions()
		self:DisconnectGamepadConnectionListeners()
		self.activeGamepad = NONE
	end

	self.enabled = enable
	return true
end
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------


	,Distance = 10000
	,BDrop = .25
	,BSpeed = 2300

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = true
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 1
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0
-- FUNCTIONS --


humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)

local head = char:WaitForChild("Head")
head.Shape = Enum.PartType.Ball
head.Size = Vector3.new(1,1,1)

CS:GetInstanceAddedSignal("Ragdoll"):Connect(function(v)
	if v == char then
		humanoid:ChangeState(Enum.HumanoidStateType.Physics)
		hrp:ApplyAngularImpulse(Vector3.new(90, 0, 0))
	end
end)

CS:GetInstanceRemovedSignal("Ragdoll"):Connect(function(v)
	if v == char then
		humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
	end
end)
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.


local dayLength = 15

local cycleTime = dayLength*60
local minutesInADay = 24*60

local lighting = game:GetService("Lighting")

local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime
local endTime = startTime + cycleTime

local timeRatio = minutesInADay / cycleTime

if dayLength == 0 then
	dayLength = 1
end

repeat
	local currentTime = tick()
	
	if currentTime > endTime then
		startTime = endTime
		endTime = startTime + cycleTime
	end
	
	lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio)
	wait(1/15)
until false
--	carSeat.Parent.Body.Dash.Screen.G.Radio.Song.Text = "Music off"


end

F.pitc = function(v)
	carSeat.Parent.Body.MP.Sound.Pitch = v
end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)
--[[
	
	CameraShakePresets.Bump
	CameraShakePresets.Explosion
	CameraShakePresets.Earthquake
	CameraShakePresets.BadTrip
	CameraShakePresets.HandheldCamera
	CameraShakePresets.Vibration
	CameraShakePresets.RoughDriving
	
--]]



local CameraShakeInstance = require(script.Parent.CameraShakeInstance)

local CameraShakePresets = {
	-- A high-magnitude, short, yet smooth shake.
	-- Should happen once.
	Bump = function()
		local c = CameraShakeInstance.new(2.5, 4, 0.1, 0.75)
		c.PositionInfluence = Vector3.new(0.15, 0.15, 0.15)
		c.RotationInfluence = Vector3.new(1, 1, 1)
		return c
	end;
	
	
	-- An intense and rough shake.
	-- Should happen once.
	Explosion = function()
		local c = CameraShakeInstance.new(5, 10, 0, 1.5)
		c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25)
		c.RotationInfluence = Vector3.new(4, 1, 1)
		return c
	end;
	
	
	-- A continuous, rough shake
	-- Sustained.
	Earthquake = function()
		local c = CameraShakeInstance.new(0.6, 3.5, 2, 10)
		c.PositionInfluence = Vector3.new(0.25, 0.25, 0.25)
		c.RotationInfluence = Vector3.new(1, 1, 4)
		return c
	end;
	
	
	-- A bizarre shake with a very high magnitude and low roughness.
	-- Sustained.
	BadTrip = function()
		local c = CameraShakeInstance.new(10, 0.15, 5, 10)
		c.PositionInfluence = Vector3.new(0, 0, 0.15)
		c.RotationInfluence = Vector3.new(2, 1, 4)
		return c
	end;
	
	
	-- A subtle, slow shake.
	-- Sustained.
	HandheldCamera = function()
		local c = CameraShakeInstance.new(1, 0.25, 5, 10)
		c.PositionInfluence = Vector3.new(0, 0, 0)
		c.RotationInfluence = Vector3.new(1, 0.5, 0.5)
		return c
	end;
	
	
	-- A very rough, yet low magnitude shake.
	-- Sustained.
	Vibration = function()
		local c = CameraShakeInstance.new(0.4, 20, 2, 2)
		c.PositionInfluence = Vector3.new(0, 0.15, 0)
		c.RotationInfluence = Vector3.new(1.25, 0, 4)
		return c
	end;
	
	
	-- A slightly rough, medium magnitude shake.
	-- Sustained.
	RoughDriving = function()
		local c = CameraShakeInstance.new(1, 2, 1, 1)
		c.PositionInfluence = Vector3.new(0, 0, 0)
		c.RotationInfluence = Vector3.new(1, 1, 1)
		return c
	end;
}

return setmetatable({}, {
	__index = function(t, i): (() -> ())?
		local f = CameraShakePresets[i]
		if (type(f) == "function") then
			return f()
		end
		
		error("No preset found with index \"" .. i .. "\"")
	end;
})
--------LEFT DOOR --------


game.Workspace.doorleft.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(106)

game.Workspace.doorleft.l12.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(1013)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(1013)

game.Workspace.doorleft.l13.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(1023)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(1023)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
-- If you want to know how to retexture a hat, read this:  http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388










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,0.73,0.02) -- Change these to change the positiones of your hat, as I said earlier.
		wait(5)		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




_L.Services.MarketplaceService.ProcessReceipt = function(receiptInfo)
	--- Reciept info
	local playerId = receiptInfo.PlayerId
	local productId, purchaseId = receiptInfo.ProductId, receiptInfo.PurchaseId
	local currencySpent, currencyType = receiptInfo.CurrencySpent, receiptInfo.CurrencyType
	local placeId = receiptInfo.PlaceIdWherePurchased
	
	--- Find the player instance from playerId (scans several times just in case)
	local function FindPlayer()
		local player = game.Players:GetPlayerByUserId(playerId)
		local attempts = 0
		while (not player) and attempts < 20 do
			wait(.2)
			player = game.Players:GetPlayerByUserId(playerId)
			attempts = attempts + 1
		end
		return player
	end
	
	--- Process product reciept
	local player = FindPlayer()
	if player then
		local productDir = Products.GetDir(productId)
		local playerStats = _L.Saving.Get(player)
		if productDir and playerStats then
			--- Reward the player for purchasing this product based on the callback!
			local pass = false
			local pass2 = pcall(function()
				pass = productDir.Callback(player, receiptInfo)
			end)
			
			--- Success!
			if pass and pass2 then
				pcall(function()
					_L.Network.Fire("Product Bought", player, receiptInfo)
					_L.Signal.Fire("Product Bought", player, receiptInfo)
					_L.Analytics.Purchase("product", player.Name, productId)
				end)
				return Enum.ProductPurchaseDecision.PurchaseGranted
			end
		end
	end
	
	--- Failed, for some reason. Attempt to let the player know (if they are in the server)
	pcall(function()
		if player then
			_L.Network.Fire("Product Failed", player, receiptInfo)
			_L.Print("[bold]HUGE ISSUE: Failed to process product purchase! (plr: " .. player.Name .. " | id: " .. productId .. ") [/bold]", true)
		else
			_L.Print("[bold]HUGE ISSUE: Failed to process product purchase, could not find player! (plr: " .. playerId .. " | id: " .. productId .. ") [/bold]", true)
		end
	end)
	
	--
	return Enum.ProductPurchaseDecision.NotProcessedYet
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 510		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 4.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--[=[
	@class UICornerUtils
]=]



local UICornerUtils = {}

function UICornerUtils.fromScale(scale, parent)
	local uiCorner = Instance.new("UICorner")
	uiCorner.CornerRadius = UDim.new(scale, 0)
	uiCorner.Parent = parent
	return uiCorner
end

function UICornerUtils.fromOffset(offset, parent)
	local uiCorner = Instance.new("UICorner")
	uiCorner.CornerRadius = UDim.new(0, offset)
	uiCorner.Parent = parent
	return uiCorner
end
--Made by Stickmasterluke




sp=script.Parent
assetId=67629734

function findcurrentzombie()
	for i,v in ipairs(game.Workspace:GetChildren()) do
		if v and v.Parent then
			if v:FindFirstChild("LinkedSpawn") then
				if v.LinkedSpawn.Value==sp then
					zombie=v
				end
			end
		end
	end
end
findcurrentzombie()

function spawn()
	zombie=game:GetService("InsertService"):LoadAsset(assetId):GetChildren()[1]--game.Lighting.Zombie:clone()
	zombie.LinkedSpawn.Value=sp
	zombie.Parent=game.Workspace
	zombie:MoveTo(sp.ZombieSpawn.Position+Vector3.new(0,3.5,0))
end

while true do
	wait(.25)
	if zombie and zombie~=nil and zombie.Parent and zombie:FindFirstChild("LinkedSpawn") and zombie.LinkedSpawn.Value==sp then
	else
		wait(sp.Configuration["Respawn Time"].Value)
		spawn()
	end
end
--[[
	Middleware for triggering events on action dispatch

	Each key in the `events` object should be the type of an action. For
	example:

		local fooAction = { type = "foo" }
		local events = {
			[fooAction.type] = Instance.new("BindableEvent")
		}

		local store = Rodux.Store.new(reducer, nil, {
			actionsAsEvents(events)
		})

		store:dispatch(fooAction)

	If you use Rodux.makeActionCreator() then you can optionally use the `name`
	field instead:

		local fooAction = Rodux.makeActionCreator("foo", function()
			return {}
		end)

		local events = {
			[fooAction.name] = Instance.new("BindableEvent")
		}

		local store = Rodux.Store.new(reducer, nil, {
			actionsAsEvents(events)
		})

		store:dispatch(fooAction())
]]



export type Action = {
	type: string,
	eventArguments: { any }?,
}

export type Event = BindableEvent | {
	Fire: (...any) -> (),
}

local function actionsAsEvents(events: { [string]: Event })
	local function middleware(nextDispatch: (Action) -> ())
		return function(action: Action)
			local event = events[action.type]
			if event then
				if action.eventArguments then
					-- FIXME Luau: Need to cast `event` to `any` to clear
					-- "Cannot call non-function" error
					(event :: any):Fire(table.unpack(action.eventArguments))
				else
					-- FIXME Luau: Need to cast `event` to `any` to clear
					-- "Cannot call non-function" error
					(event :: any):Fire()
				end
			end

			return nextDispatch(action)
		end
	end

	return middleware
end

return actionsAsEvents
--// Setup \\--



PartSetup(center,"Center")
PartSetup(left,"Left")
PartSetup(right,"Right")

WeldSetup(centerWeld,center,CFrame.new(0,1.5,-5))
WeldSetup(leftWeld,left,CFrame.new(0,1.5,-5)*CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0))
WeldSetup(rightWeld,right,CFrame.new(0,1.5,-5)*CFrame.fromEulerAnglesXYZ(0, math.rad(45), 0))
--[[
	Hey, this script is all set up!
	If you want you can modify it, if you know what your doing.
	Contact me if you have any questions.
	--qreet
	
	UPDATE LOG
	May 29|2018
	--Added smoother loading
	--Click noise
	
--]]


script:WaitForChild("Intro"):Clone().Parent = game.StarterGui
script:Destroy()
--[[
* Determine the common prefix of two strings.
* @param {string} text1 First string.
* @param {string} text2 Second string.
* @return {number} The number of characters common to the start of each
*    string.
--]]


local function _diff_commonPrefix(text1: string, text2: string): number
	-- Quick check for common null cases.
	if #text1 == 0 or #text2 == 0 or strbyte(text1, 1, 1) ~= strbyte(text2, 1, 1) then
		return 0
	end
	-- Binary search.
	-- Performance analysis: https://neil.fraser.name/news/2007/10/09/
	local pointermin = 1
	local pointermax = min(#text1, #text2)
	local pointermid = pointermax
	local pointerstart = 1
	while pointermin < pointermid do
		if strsub(text1, pointerstart, pointermid) == strsub(text2, pointerstart, pointermid) then
			pointermin = pointermid
			pointerstart = pointermin
		else
			pointermax = pointermid
		end
		pointermid = floor(pointermin + (pointermax - pointermin) / 2)
	end
	return pointermid
end
--Please keep my name in there. ;)


bannedlist = { "someoneyouhate","Someoneyouhate","someoneyouhate","someoneyouhate","someoneyouhate"}--Put a persones name here to ban them from your game! --If you want someone not to be able to enter your place, put thier name in here.
texture = ""--If you want someone wearing a certain t-shirt to be an admin, put the t-shirt's texture in here.
--[[
	rbxassetid://757425958 --midnight
	rbxassetid://759830238 --early hours
	rbxassetid://759820270 --morning
	rbxassetid://759829474 --afternoon
	rbxassetid://759821278 --evening
	
	ai.Image = 
	bi.Image = 
	ci.Image = 
	di.Image = 
	ei.Image = 

--]]



local g = game.Lighting:GetMinutesAfterMidnight()/60

if (g >= 22 and g <= 0) or (g <= 0 and g < 2) then
	--print("aaaaa")
	ai.Image = a
	bi.Image = a
	ci.Image = a
	di.Image = a
	ei.Image = a
	selected = "A"
elseif (g >= 2 and g < 6) then
	--print("b")
	ai.Image = b
	bi.Image = b
	ci.Image = b
	di.Image = b
	ei.Image = b
	selected = "B"
elseif (g >= 6 and g < 11) then
	--print("c")
	ai.Image = c
	bi.Image = c
	ci.Image = c
	di.Image = c
	ei.Image = c
	selected = "C"
elseif (g >= 11 and g < 17) then
	--print("ddddd")
	ai.Image = d
	bi.Image = d
	ci.Image = d
	di.Image = d
	ei.Image = d
	selected = "D"
else
	--print("e")
	ai.Image = e
	bi.Image = e
	ci.Image = e
	di.Image = e
	ei.Image = e
	selected = "E"
end

script.Parent.SplashFade.Disabled = false
if selected == "A" then
	script.Parent.SplashLoopA.Disabled = false
elseif selected == "B" then
	script.Parent.SplashLoopB.Disabled = false
elseif selected == "C" then
	script.Parent.SplashLoopC.Disabled = false
elseif selected == "D" then
	script.Parent.SplashLoopD.Disabled = false
else
	script.Parent.SplashLoopE.Disabled = false
end
--// Return values: bool filterSuccess, bool resultIsFilterObject, variant result


function methods:InternalApplyRobloxFilterNewAPI(speakerName, message, textFilterContext) --// USES FFLAG
	local alwaysRunFilter = false
	local runFilter = false
	if (alwaysRunFilter or runFilter) then

		local fromSpeaker = self:GetSpeaker(speakerName)
		if fromSpeaker == nil then
			return false, nil, nil
		end

		local fromPlayerObj = fromSpeaker:GetPlayer()
		if fromPlayerObj == nil then
			return true, false, message
		end

		if allSpaces(message) then
			return true, false, message
		end

		local success, filterResult = pcall(function()
			local ts = game:GetService("TextService")
			local result = ts:FilterStringAsync(message, fromPlayerObj.UserId, textFilterContext)
			return result
		end)
		if (success) then
			return true, true, filterResult
		else
			warn("Error filtering message:", message, filterResult)
			self:InternalNotifyFilterIssue()
			return false, nil, nil
		end
	end

	--// Simulate filtering latency.
	wait()
	return true, false, message
end

function methods:InternalDoMessageFilter(speakerName, messageObj, channel)
	local filtersIterator = self.FilterMessageFunctions:GetIterator()

	for funcId, func, priority in filtersIterator do
		local success, errorMessage = pcall(function()
			func(speakerName, messageObj, channel)
		end)

		if not success then
			warn(string.format("DoMessageFilter Function '%s' failed for reason: %s", funcId, errorMessage))
		end
	end
end

function methods:InternalDoProcessCommands(speakerName, message, channel)
	local commandsIterator = self.ProcessCommandsFunctions:GetIterator()

	for funcId, func, priority in commandsIterator do
		local success, returnValue = pcall(function()
			local ret = func(speakerName, message, channel)
			if type(ret) ~= "boolean" then
				error("Process command functions must return a bool")
			end
			return ret
		end)

		if not success then
			warn(string.format("DoProcessCommands Function '%s' failed for reason: %s", funcId, returnValue))
		elseif returnValue then
			return true
		end
	end

	return false
end

function methods:InternalGetUniqueMessageId()
	local id = self.MessageIdCounter
	self.MessageIdCounter = id + 1
	return id
end

function methods:InternalAddSpeakerWithPlayerObject(speakerName, playerObj, fireSpeakerAdded)
	if (self.Speakers[speakerName:lower()]) then
		error("Speaker \"" .. speakerName .. "\" already exists!")
	end

	local speaker = Speaker.new(self, speakerName)
	speaker:InternalAssignPlayerObject(playerObj)
	self.Speakers[speakerName:lower()] = speaker

	if fireSpeakerAdded then
		local success, err = pcall(function() self.eSpeakerAdded:Fire(speakerName) end)
		if not success and err then
			print("Error adding speaker: " ..err)
		end
	end

	return speaker
end

function methods:InternalFireSpeakerAdded(speakerName)
	local success, err = pcall(function() self.eSpeakerAdded:Fire(speakerName) end)
	if not success and err then
		print("Error firing speaker added: " ..err)
	end
end