Roblox/luau_corpus huggingface dataset:
--[[
	Controls transparency of multiple Humanoids.
]]

local HumanoidController = require(script.Parent.HumanoidController)

local HumanoidControllers = {}
HumanoidControllers.__index = HumanoidControllers

function HumanoidControllers.new(playerList: { Player }, whitelist: { Player }?)
	local self = {
		playerList = playerList,
		whitelist = whitelist,
	}

	self.isHiding = false

	self.humanoidControllers = {}
	for _, player in ipairs(self.playerList) do
		self.humanoidControllers[player.UserId] = HumanoidController.new(player)
	end

	self.whitelistedUserIds = {}
	if self.whitelist then
		for _, player in ipairs(self.whitelist) do
			self.whitelistedUserIds[player.UserId] = true
		end
	end

	setmetatable(self, HumanoidControllers)

	return self
end

function HumanoidControllers:showHumanoids()
	self.isHiding = false
	for userId, humanoidController in pairs(self.humanoidControllers) do
		if not self.whitelistedUserIds[userId] then
			humanoidController:show()
		end
	end
end

function HumanoidControllers:hideHumanoids()
	self.isHiding = true
	for userId, humanoidController in pairs(self.humanoidControllers) do
		if not self.whitelistedUserIds[userId] then
			humanoidController:hide()
		end
	end
end

function HumanoidControllers:addHumanoidController(player: Player)
	if not self.humanoidControllers[player.UserId] then
		self.humanoidControllers[player.UserId] = HumanoidController.new(player)

		if self.isHiding then
			self.humanoidControllers[player.UserId]:hide()
		end
	else
		warn("Error: " .. player.Name .. " already has a HumanoidController.")
	end
end

function HumanoidControllers:removeHumanoidController(player: Player)
	if self.humanoidControllers[player.UserId] then
		self.humanoidControllers[player.UserId] = nil
	else
		warn("Error: " .. player.Name .. " does not have a HumanoidController to remove.")
	end
end

function HumanoidControllers:addToWhitelist(player: Player)
	if not self.whitelistedUserIds[player.UserId] then
		self.whitelistedUserIds[player.UserId] = player
	else
		warn("Error: " .. player.Name .. " is already part of the whitelist for HumanoidControllers.")
	end
end

function HumanoidControllers:removeFromWhitelist(player: Player)
	if self.whitelistedUserIds[player.UserId] ~= nil then
		self.whitelistedUserIds[player.UserId] = nil
	else
		warn("Error: " .. player.Name .. " is not part of the whitelist for HumanoidControllers.")
	end
end

function HumanoidControllers:waitForHumanoidAnimations()
	for _, humanoidController in pairs(self.humanoidControllers) do
		if humanoidController:isAnimating() then
			humanoidController.animationCompleted.Event:Wait()
		end
	end
end

return HumanoidControllers
--[[**
		ensures value is an array of a strict makeup and size

		@param check The check to compare all values with

		@returns A function that will return true iff the condition is passed
	**--]]
	function t.strictArray(...)
		local valueTypes = { ... }
		assert(t.array(t.callback)(valueTypes))

		return function(value)
			local keySuccess, keyErrMsg = arrayKeysCheck(value)
			if keySuccess == false then
				return false, string.format("[strictArray] %s", keyErrMsg or "")
			end

			-- If there's more than the set array size, disallow
			if #valueTypes < #value then
				return false, string.format("[strictArray] Array size exceeds limit of %d", #valueTypes)
			end

			for idx, typeFn in pairs(valueTypes) do
				local typeSuccess, typeErrMsg = typeFn(value[idx])
				if not typeSuccess then
					return false, string.format("[strictArray] Array index #%d - %s", idx, typeErrMsg)
				end
			end

			return true
		end
	end
end

do
	local callbackArray = t.array(t.callback)
-- Gives the player an upgrade for completing a lap
function WaypointController:ProvideLapReward()
	AddUpgradeEvent:FireServer(self.player)
end

function WaypointController:ProvideCheckpointReward()
	TouchCheckpointEvent:FireServer(self.player)
end

function WaypointController:UpdateWaypoint()
	self.waypointPath:Destroy()
	self.WaypointPathReached:Disconnect()
	self.NodeReached:Disconnect()
	self.FinishedMoving:Disconnect()
	
	if self.currentWaypointIndex == #waypoints then
		-- Player is at the last waypoint
		self.currentWaypointIndex = 1
		self.currentWaypoint = waypoints[self.currentWaypointIndex]
		self:ProvideCheckpointReward()
	else
		if self.currentWaypointIndex == 1 then			
			-- Cheer
			local animateScript = character:WaitForChild("Animate")
			local animation = animateScript:WaitForChild("cheer"):GetChildren()[1]
			if animation then
				local track = humanoid:LoadAnimation(animation)
				track.Priority = Enum.AnimationPriority.Action
				track:Play()
			end
		else
			-- Player has more waypoints left
			self:ProvideCheckpointReward()
		end
		
		self.currentWaypointIndex = self.currentWaypointIndex + 1
		self.currentWaypoint= waypoints[self.currentWaypointIndex]
	end
	
	self.waypointPath = WaypointPath.new(self.player, self.humanoidRoot.Position,
		self.currentWaypoint.Position)
	self.WaypointPathReached = self.waypointPath.WaypointReached:Connect(
		function()
			self:UpdateWaypoint()
		end)
	self.NodeReached = self.waypointPath.NodeReached:Connect(
		function()
			self._CooldownFinishedEvent:Fire()
		end)
	self.FinishedMoving = self.waypointPath.FinishedMoving:Connect(
		function()
			self:StopTracking()
		end)
	
	self.waypointPath:MoveTo()
end


return WaypointController
--//Setup//--
local WindLines = require(script.WindLines)
local WindShake = require(script.WindShake)

local WindSpeed = 20

local WindShakeSettings = {
	WindPower = 0.75,
	WindSpeed = WindSpeed,
	WindDirection = Vector3.new(5, 0, 5)
}

local WindLinesSettings = {
	WindDirection = Vector3.new(5, 0, 5),
	WindSpeed = WindSpeed,
	LifeTime = 9,
	SpawnRate = 15
}

local ShakableObjects = {
	"Leaf"
}
--- Returns the extra data associated with this command.
-- This needs to be used instead of just context.Data for reliability when not using a remote command.
function Command:GetData ()
	if self.Data then
		return self.Data
	end

	if self.Object.Data then
		self.Data = self.Object.Data(self)
	end

	return self.Data
end
--[[
cspeed = speed/1.298
print("FL ".. math.abs(FL.Parent.RotVelocity.Magnitude-cspeed))
print("FR ".. math.abs(FR.Parent.RotVelocity.Magnitude-cspeed))
print("RL ".. math.abs(RL.Parent.RotVelocity.Magnitude-cspeed))
print("RR ".. math.abs(RR.Parent.RotVelocity.Magnitude-cspeed))]]--
--print("Speed ".. speed/1.298)
bST = (inds.Value)*(1000*convert)  
build = rpm.Value/18000


if speed > 110 and carSeat.Steer ~= 0 then
--// All global vars will be wiped/replaced except script

return function(data)
	local playergui = service.PlayerGui
	local localplayer = service.Player
	local toggle = script.Parent.Parent.Toggle
	
	if client.Core.Get("Chat") then
		toggle.Position = UDim2.new(1, -(45+40),1, -45)
	end
	
	toggle.MouseButton1Down:connect(function()
		local found = client.Core.Get("UserPanel",nil,true)
		if found then
			found.Object:Destroy()
		else
			client.Core.Make("UserPanel",{})
		end
	end)
	
	script.Parent.Parent.Parent = playergui
end
-- Keep a history of the past number of frames based on FRAMES_TO_CHECK_VELOCITY
local function onHeartbeat()
	local humanoidVelocity = humanoidRootPart.Velocity
	previousVelocities[counter] = humanoidVelocity

	counter = counter + 1
	if counter > MAX_VELOCITY_HISTORY_COUNT then
		counter = 1
	end

end

RunService.Heartbeat:Connect(onHeartbeat)

local function onStateChanged(oldState, newState)
	if newState == Enum.HumanoidStateType.Landed then
		local humanoidVelocity = getAverageVelocity()
		eventData:FireServer("FallDamage", humanoidVelocity)
	end
end

humanoid.StateChanged:Connect(onStateChanged)
--[[
	Returns the stack trace of where the element was created that this component
	instance's properties are based on.

	Intended to be used primarily by diagnostic tools.
]]
function Component:getElementTraceback()
	return self[InternalData].virtualNode.currentElement.source
end
-------- OMG HAX

r = game:service("RunService")


Tool = script.Parent

local sparkles = script.Parent.Handle:findFirstChild("Sparkles")

function onEquipped()
	menorahsound = Instance.new("Sound")
	menorahsound.SoundId = "http://www.roblox.com/asset/?id=19095020" 
	menorahsound.Parent = Tool
	menorahsound.Volume = .4

end

function onUnequipped()
	menorahsound:Stop()
end


function onActivated()

	
	--active the sparkes
	if (not sparkles.Enabled) then
		sparkles.Enabled = true		
		menorahsound:Play()
	else
		sparkles.Enabled = false
	end
end
--[[Susupension]]
Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
--[ Variables ]--
local Outer = script.Parent
	local Inner = Outer:WaitForChild("Inner")
	--local Display = Outer:WaitForChild("Display")
	local Detector = Outer:WaitForChild("Detector")
	local N = Outer:WaitForChild("N")
local Player = game.Players.LocalPlayer
	local Humanoid = Player.Character:WaitForChild("Humanoid")
-- << SETUP >>
for commandName, command in pairs(module) do
	command.Name = commandName
end



return module
--[[
	Joins any number of lists together into a new list
]]
local function join(...)
	local new = {}

	for listKey = 1, select("#", ...) do
		local list = select(listKey, ...)
		local len = #new

		for itemKey = 1, #list do
			if list[itemKey] == None then
				len = len - 1
			else
				new[len + itemKey] = list[itemKey]
			end
		end
	end

	return new
end

return join
-- Update camera if it changes

workspace.Changed:connect(function (p)
	if p == "CurrentCamera" then
		camera = workspace.CurrentCamera
	end
end)
--GET THE NEEDED INFO AND PUT IN TABLES
function getwheels(model)
	for _,i in pairs (model:GetChildren()) do
		if i:IsA("BasePart") then
			i.Anchored = false
			if i.Name == "GOING" then
				table.insert(Seats,i)
			--[[	
			elseif i.Name == "Brake" then
				table.insert(Brakes,i)
				--print("Brake found")
			--]]
			end
		elseif i:IsA("Model") then
			getwheels(i)
			if i.Name == "Coupler" then
				if not cplrstr then
					cplrstr = i
				else
					FrontCoupler.model, RearCoupler.model = getclosestcoupler(cplrstr,i)
					cplrstr = nil
				end
			end
		end
	end
end

function scopinggetcoupler(model)
	local cplrs = {}
	local addtable = {}
	for _,i in pairs (model:GetChildren()) do
		if i:IsA("Model") then
			if i.Name == "Coupler" then
				table.insert(cplrs,i)
			else
				addtable = scopinggetcoupler(i)
				for _,i in pairs (addtable) do
					table.insert(cplrs,i)
				end
			end
		end
	end
	return cplrs
end

function scopinggetFront(model)
	local a = model
	if a and a.Parent then
		repeat
			a = a.Parent
		until a:FindFirstChild("Front") or a == workspace or not a.Parent
	end
	if a and a:FindFirstChild("Front") then
		return a.Front
	else
		return nil
	end
end
function scopinggetDrive(model)
	local a = model
	if a and a.Parent then
		repeat
			a = a.Parent
		until a:FindFirstChild("Drive") or a == workspace or not a.Parent
	end
	if a and a:FindFirstChild("Drive") then
		return a.Drive
	else
		return nil
	end
end

function getclosestcoupler(coupler1,coupler2)
	local tg = scopinggetFront(coupler1)
	local front, rear = nil,nil
	if coupler2 and tg then
		local dista = (coupler1.Coupler.Position-tg.Position).magnitude
		local distb = (coupler2.Coupler.Position-tg.Position).magnitude
		front = dista < distb and coupler1 or coupler2
		rear = dista < distb and coupler2 or coupler1
	elseif not coupler2 then
		front = coupler1
	end
	return front,rear
end

function updatewheels()
	for _,k in pairs (Seats) do
		k.MaxSpeed = Throttle*MAXIMUMSPEED
		k.Torque = TORQUE
		if ((k.CFrame*CFrame.new(0,0,3)).p-Front.CFrame.p).magnitude >((k.CFrame*CFrame.new(0,0,-3)).p-Front.CFrame.p).magnitude then
			k.Throttle = Reverser
		else
			k.Throttle = -Reverser
		end
	end
end
--[[ By: Brutez. ]]--

function onTouched(hit)
   local player = game.Players:GetPlayerFromCharacter(hit.Parent)
   if player then
       game:GetService("TeleportService"):Teleport(4641921091,player)  --replace the numbers with your place id
  end
end


script.Parent.Torso.Touched:connect(onTouched)
------------------------------------------------------------------------
-- reads a string
-- * has been restructured significantly compared to the original C code
------------------------------------------------------------------------

function luaX:read_string(ls, del, Token)
  self:save_and_next(ls)
  while ls.current ~= del do
    local c = ls.current
    if c == "EOZ" then
      self:lexerror(ls, "unfinished string", "TK_EOS")
    elseif self:currIsNewline(ls) then
      self:lexerror(ls, "unfinished string", "TK_STRING")
    elseif c == "\\" then
      c = self:nextc(ls)  -- do not save the '\'
      if self:currIsNewline(ls) then  -- go through
        self:save(ls, "\n")
        self:inclinenumber(ls)
      elseif c ~= "EOZ" then -- will raise an error next loop
        -- escapes handling greatly simplified here:
        local i = string.find("abfnrtv", c, 1, 1)
        if i then
          self:save(ls, string.sub("\a\b\f\n\r\t\v", i, i))
          self:nextc(ls)
        elseif not string.find(c, "%d") then
          self:save_and_next(ls)  -- handles \\, \", \', and \?
        else  -- \xxx
          c, i = 0, 0
          repeat
            c = 10 * c + ls.current
            self:nextc(ls)
            i = i + 1
          until i >= 3 or not string.find(ls.current, "%d")
          if c > 255 then  -- UCHAR_MAX
            self:lexerror(ls, "escape sequence too large", "TK_STRING")
          end
          self:save(ls, string.char(c))
        end
      end
    else
      self:save_and_next(ls)
    end--if c
  end--while
  self:save_and_next(ls)  -- skip delimiter
  Token.seminfo = string.sub(ls.buff, 2, -2)
end
--[[local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
numberMap = {
	{1000, 'M'},
	{900, 'CM'},
	{500, 'D'},
	{400, 'CD'},
	{100, 'C'},
	{90, 'XC'},
	{50, 'L'},
	{40, 'XL'},
	{10, 'X'},
	{9, 'IX'},
	{5, 'V'},
	{4, 'IV'},
	{1, 'I'}

}

function intToRoman(num)
	num = tonumber(num)
	local roman = ""
	while num > 0 do
		for index,v in pairs(numberMap)do 
			local romanChar = v[2]
			local int = v[1]
			while num >= int do
				roman = roman..romanChar
				num = num - int
			end
		end
	end
	return roman
end

return intToRoman]]--
--[[ Use the following script to program your on/off switch to do stuff. This can mean opening and closing a door, turning on and off lights, anything!
Just put what you want the button to do while on/off below.]]

Room = script.Parent

function on() --Type below what you want the button to do while it is on.
Room.L1.SpotLight.Enabled = true
Room.L2.SpotLight.Enabled = true
Room.L3.SpotLight.Enabled = true
Room.L4.SpotLight.Enabled = true
Room.L5.SpotLight.Enabled = true
Room.L6.SpotLight.Enabled = true
end

function off() --Type below what you want the button to do while it is off.
Room.L1.SpotLight.Enabled = false
Room.L2.SpotLight.Enabled = false
Room.L3.SpotLight.Enabled = false
Room.L4.SpotLight.Enabled = false
Room.L5.SpotLight.Enabled = false
Room.L6.SpotLight.Enabled = false
end
-- If in-game, enable ctrl hotkeys for undoing and redoing
if Mode == 'Tool' then
	AssignHotkey({ 'LeftControl', 'Z' }, History.Undo);
	AssignHotkey({ 'RightControl', 'Z' }, History.Undo);
	AssignHotkey({ 'LeftControl', 'Y' }, History.Redo);
	AssignHotkey({ 'RightControl', 'Y' }, History.Redo);
end;

local function GetDepthFromAncestor(Item, Ancestor)
	-- Returns the depth of `Item` from `Ancestor`

	local Depth = 0

	-- Go through ancestry until reaching `Ancestor`
	while Item ~= Ancestor do
		Depth = Depth + 1
		Item = Item.Parent
	end

	-- Return depth
	return Depth
end

local function GetHighestParent(Items)
	local HighestItem, HighestItemDepth

	-- Calculate depth of each item & keep highest
	for _, Item in ipairs(Items) do
		local Depth = GetDepthFromAncestor(Item, game)
		if (not HighestItemDepth) or (Depth < HighestItemDepth) then
			HighestItem = Item
			HighestItemDepth = Depth
		end
	end

	-- Return parent of highest item
	return HighestItem and HighestItem.Parent or nil
end

function CloneSelection()
	-- Clones selected parts

	-- Make sure that there are items in the selection
	if #Selection.Items == 0 then
		return;
	end;

	-- Send the cloning request to the server
	local Clones = SyncAPI:Invoke('Clone', Selection.Items, GetHighestParent(Selection.Items))

	-- Put together the history record
	local HistoryRecord = {
		Clones = Clones;

		Unapply = function (HistoryRecord)
			-- Reverts this change

			-- Deselect the clones
			Selection.Remove(HistoryRecord.Clones, false);

			-- Remove the clones
			SyncAPI:Invoke('Remove', HistoryRecord.Clones);

		end;

		Apply = function (HistoryRecord)
			-- Reapplies this change

			-- Restore the clones
			SyncAPI:Invoke('UndoRemove', HistoryRecord.Clones);

		end;

	};

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

	-- Select the clones
	Selection.Replace(Clones);

	-- Flash the outlines of the new parts
	coroutine.wrap(Selection.FlashOutlines)();

end;

function DeleteSelection()
	-- Deletes selected items

	-- Put together the history record
	local HistoryRecord = {
		Parts = Support.CloneTable(Selection.Items);

		Unapply = function (HistoryRecord)
			-- Reverts this change

			-- Restore the parts
			SyncAPI:Invoke('UndoRemove', HistoryRecord.Parts);

			-- Select the restored parts
			Selection.Replace(HistoryRecord.Parts);

		end;

		Apply = function (HistoryRecord)
			-- Applies this change

			-- Deselect the parts
			Selection.Remove(HistoryRecord.Parts, false);

			-- Remove the parts
			SyncAPI:Invoke('Remove', HistoryRecord.Parts);

		end;

	};

	-- Deselect parts before deleting
	Selection.Remove(HistoryRecord.Parts, false);

	-- Perform the removal
	SyncAPI:Invoke('Remove', HistoryRecord.Parts);

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

end;
--[[*
 * Create a regular expression from the given regex source string.
 *
 * ```js
 * const picomatch = require('picomatch');
 * // picomatch.toRegex(source[, options]);
 *
 * const { output } = picomatch.parse('*.js');
 * console.log(picomatch.toRegex(output));
 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
 * ```
 * @param {String} `source` Regular expression source string.
 * @param {Object} `options`
 * @return {RegExp}
 * @api public
 ]]

function picomatch.toRegex(source: string, options: Object?)
	local ok, result = pcall(function()
		local opts: Object = options or {}
		return RegExp(
			source,
			Boolean.toJSBoolean(opts.flags) and opts.flags or if Boolean.toJSBoolean(opts.nocase) then "i" else ""
		)
	end)
	if not ok then
		local err = result
		if options ~= nil and options.debug == true then
			error(err)
		end
		return RegExp("$^")
	end
	return result
end
--		print("Keyframe : ".. frameName)

		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(0.8)
	end
end
-- A graph object which can have dependencies.
export type Dependent = {
	update: (Dependent) -> boolean,
	dependencySet: Set<Dependency>
}
-----------------
--| Constants |--
-----------------

local BLAST_RADIUS = 20 -- Blast radius of the explosion
local BLAST_DAMAGE = 200 -- Amount of damage done to players
local BLAST_FORCE = 1200 -- Amount of force applied to parts

local IGNORE_LIST = {rocket = 1, handle = 1, effect = 1, water = 1} -- Rocket will fly through things named these
--[[
	Higher order component that lets the wrapped component consume the ConfigurationContext.
]]
local function withConfiguration(component)
	return function(props)
		if props.configuration then
			warn("Child component has a prop named `configuration` and will be overriden by ConfigurationContext.")
		end

		return Roact.createElement(context.Consumer, {
			render = function(configuration)
				local mergedProps = Cryo.Dictionary.join({ configuration = configuration }, props)

				return Roact.createElement(component, mergedProps)
			end,
		})
	end
end

return {
	ConfigurationProvider = ConfigurationProvider,
	withConfiguration = withConfiguration,
}
-- REQUIRED PARTS ----------------------------
-- Include these, or things will break!
local frontForceField = vehicle.FrontForceField
local backForceField = vehicle.BackForceField
local hood = vehicle.Hood
local vehicleSmoke = hood.Smoke
local wheel_frontLeft = vehicle.Wheel_FrontLeft
local wheel_frontRight = vehicle.Wheel_FrontRight
local wheel_backLeft = vehicle.Wheel_BackLeft
local wheel_backRight = vehicle.Wheel_BackRight
--[[
	Start
]]

if PATROL_ENABLED then
	coroutine.wrap(function()
		patrol()
	end)()
end
--Returns the name of the weapon to display in a kill feed.
local function GetDamageName()
	if GetReflectedByPlayer() then
		return "Reflector"
	end
	return "Slingshot"
end
-- Skydiving
local Skydive = require(ReplicatedStorage.Skydive)

local messageTakeoverModule = require(ReplicatedStorage:WaitForChild("MessageTakeoverModule"))

Skydive.fallSpeed = 10
Skydive.fallSpeedModifier = 20
Skydive.maxHorizontalSpeed = 30
local TELEPORT_BACK_HEIGHT = -150

local SkydiveOutOfBoundsConnection = nil
--!strict
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential
return function(value: string | number, fractionDigits: number?): string | nil
	local num = value
	if typeof(value) == "string" then
		-- ROBLOX FIXME: add parseInt to encapsulate this logic and use it here
		local NaN = 0 / 0
		num = tonumber(value) or NaN -- works because 0 is truthy in Lua
	end
	-- returns nil for invalid input instead of nan to be more lua-native
	if typeof(num) ~= "number" then
		return "nan"
	end

	if fractionDigits ~= nil then
		if typeof(fractionDigits) ~= "number" then
			error("TypeError: fractionDigits must be a number between 0 and 100")
		end
		if fractionDigits < 0 or fractionDigits > 100 then
			error("RangeError: fractionDigits must be between 0 and 100")
		end
	end

	local formatString
	if fractionDigits == nil then
		formatString = "%e"
	else
		formatString = "%." .. tostring(fractionDigits) .. "e"
	end

	local retval = string.format(formatString, num):gsub("%+0", "+"):gsub("%-0", "-"):gsub("0*e", "e")

	return retval
end
-- functions

local function CreateSquad(name)
	if not name then
		name	= HttpService:GenerateGUID(false)
	end
	
	local squad		= script.Squad:Clone()
		squad.Name		= name
		squad.Parent	= SQUADS
		
	return squad
end

local function GetSquad(player)
	for _, squad in pairs(SQUADS:GetChildren()) do
		if squad:FindFirstChild(player.Name) then
			return squad
		end
	end
end

local function AddPlayerToSquad(player, squad)
	local playerValue	= Instance.new("ObjectValue")
		playerValue.Name	= player.Name
		playerValue.Value	= player
		playerValue.Parent	= squad
end

local function RemovePlayer(player)
	for _, squad in pairs(SQUADS:GetChildren()) do
		local playerValue	= squad:FindFirstChild(player.Name)
		
		if playerValue then
			playerValue:Destroy()
		end
	end
end
--////////////////////////////// Include
--//////////////////////////////////////
local ChatConstants = require(ReplicatedModules:WaitForChild("ChatConstants"))

local ChatChannel = require(modulesFolder:WaitForChild("ChatChannel"))
local Speaker = require(modulesFolder:WaitForChild("Speaker"))
local Util = require(modulesFolder:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
ChatLocalization = ChatLocalization or {}

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

local function allSpaces(inputString)
	local testString = string.gsub(inputString, " ", "")
	return string.len(testString) == 0
end