Roblox/luau_corpus huggingface dataset:
--// Connections
L_105_.OnClientEvent:connect(function(L_188_arg1, L_189_arg2, L_190_arg3, L_191_arg4, L_192_arg5, L_193_arg6, L_194_arg7)
	if L_188_arg1 and not L_15_ then
		MakeFakeArms()
		
		L_42_ = L_2_.PlayerGui.MainGui
		L_26_ = L_42_:WaitForChild('Others')
		L_27_ = L_26_:WaitForChild('Kill')
		L_28_ = L_42_:WaitForChild('GameGui'):WaitForChild('AmmoFrame')
		L_29_ = L_28_:WaitForChild('Ammo')
		L_30_ = L_28_:WaitForChild('AmmoBackground')
		L_31_ = L_28_:WaitForChild('MagCount')
		L_32_ = L_28_:WaitForChild('MagCountBackground')
		L_33_ = L_28_:WaitForChild('DistDisp')
		L_34_ = L_28_:WaitForChild('Title')
		L_35_ = L_28_:WaitForChild('Mode1')
		L_36_ = L_28_:WaitForChild('Mode2')
		L_37_ = L_28_:WaitForChild('Mode3')
		L_38_ = L_28_:WaitForChild('Mode4')
		L_39_ = L_28_:WaitForChild('Mode5')
		L_40_ = L_28_:WaitForChild('Stances')
		L_41_ = L_42_:WaitForChild('Shading')
		L_41_.Visible = false
		
		L_34_.Text = L_1_.Name
		UpdateAmmo()
		
		L_43_ = L_189_arg2
		L_44_ = L_190_arg3
		L_45_ = L_191_arg4
		L_46_ = L_192_arg5
		L_47_ = L_193_arg6
		L_48_ = L_194_arg7	
		L_49_ = L_59_.Bolt
		
		L_84_ = L_48_.C1
		L_85_ = L_48_.C0
		
		if L_1_:FindFirstChild('AimPart2') then
			L_54_ = L_1_:WaitForChild('AimPart2')
		end
		
		if L_1_:FindFirstChild('FirePart2') then
			L_57_ = L_1_.FirePart2
		end
		
		if L_24_.FirstPersonOnly then
			L_2_.CameraMode = Enum.CameraMode.LockFirstPerson
		end
		--uis.MouseIconEnabled = false
		L_5_.FieldOfView = 70
		L_15_ = true
	elseif L_15_ then
		if L_3_ and L_3_.Humanoid and L_3_.Humanoid.Health > 0 and L_9_ then
			Stand()
			Unlean()
		end	
		
		L_90_ = 0
		L_77_ = false
		L_78_ = false
		L_79_ = false
		L_61_ = false
		L_64_ = false
		L_63_ = false
		Shooting = false
		
		L_94_ = 70
		
		RemoveArmModel()
		
		L_42_:Destroy()	
		
		for L_195_forvar1, L_196_forvar2 in pairs(IgnoreList) do
			if L_196_forvar2 ~= L_3_ and L_196_forvar2 ~= L_5_ and L_196_forvar2 ~= L_98_ then
				table.remove(IgnoreList, L_195_forvar1)
			end
		end
		
		if L_3_:FindFirstChild('Right Arm') and L_3_:FindFirstChild('Left Arm') then
			L_3_['Right Arm'].LocalTransparencyModifier = 0
			L_3_['Left Arm'].LocalTransparencyModifier = 0
		end	

		L_75_ = false
		L_66_ = true
		
		L_2_.CameraMode = Enum.CameraMode.Classic
		L_104_.MouseIconEnabled = true		
		L_5_.FieldOfView = 70
		L_15_ = false
		L_104_.MouseDeltaSensitivity = L_52_
		L_4_.Icon = "http://www.roblox.com/asset?id=0"
		L_15_ = false
	end
end)
-- Signal Type enums
RaycastHitbox.SignalType = {
	Default = 1,
	Single = 2, --- Defaults to Single connections only for legacy purposes
}
--[[ Constants ]]--
local movementKeys = {
	[Enum.KeyCode.W] = true;
	[Enum.KeyCode.A] = true;
	[Enum.KeyCode.S] = true;
	[Enum.KeyCode.D] = true;
	[Enum.KeyCode.Up] = true;
	[Enum.KeyCode.Down] = true;
}

local Player = Players.LocalPlayer

local ClickToMoveDisplay = require(script.Parent:WaitForChild("ClickToMoveDisplay"))

local ZERO_VECTOR3 = Vector3.new(0,0,0)
local ALMOST_ZERO = 0.000001
--		print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
		local anim = animTable[animName][idx].anim

		-- load it to the humanoid; get AnimationTrack
		toolOldAnimTrack = toolAnimTrack
		toolAnimTrack = humanoid:LoadAnimation(anim)
		 
		-- play the animation
		toolAnimTrack:Play(transitionTime)
		toolAnimName = animName

		currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
	end
end

function stopToolAnimations()
	local oldAnim = toolAnimName

	if (currentToolAnimKeyframeHandler ~= nil) then
		currentToolAnimKeyframeHandler:disconnect()
	end

	toolAnimName = ""
	if (toolAnimTrack ~= nil) then
		toolAnimTrack:Stop()
		toolAnimTrack:Destroy()
		toolAnimTrack = nil
	end


	return oldAnim
end
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,VRecoil = {20,22}				--- Vertical Recoil
	,HRecoil = {8,10}				--- Horizontal Recoil
	,AimRecover = .3				---- Between 0 & 1
	
	,RecoilPunch = .35
	,VPunchBase = 5.75				--- Vertical Punch
	,HPunchBase = 3.25				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = .75 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.1
	,MinRecoilPower = 1
	,MaxRecoilPower = 1
	,RecoilPowerStepAmount = 1
	
	,MinSpread = 0.15				--- Min bullet spread value | Studs
	,MaxSpread = 25					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 0
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0				--- Weapon Base Sway | Studs
	,MaxSway =	3					--- Max sway value based on player stamina | Studs
--// Modules
local L_111_ = require(L_22_:WaitForChild("Utilities"))
local L_112_ = require(L_22_:WaitForChild("Spring"))
local L_113_ = require(L_22_:WaitForChild("Plugins"))
local L_114_ = require(L_22_:WaitForChild("easing"))

local L_115_ = L_111_.Fade
local L_116_ = L_111_.SpawnCam
local L_117_ = L_111_.FixCam
local L_118_ = L_111_.tweenFoV
local L_119_ = L_111_.tweenCam
local L_120_ = L_111_.tweenRoll
local L_121_ = L_111_.TweenJoint

local L_122_ = L_111_.Weld
--// Events
local L_28_ = L_6_:WaitForChild('Equipped')
local L_29_ = L_6_:WaitForChild('ShootEvent')
local L_30_ = L_6_:WaitForChild('DamageEvent')
local L_31_ = L_6_:WaitForChild('CreateOwner')
local L_32_ = L_6_:WaitForChild('Stance')
local L_33_ = L_6_:WaitForChild('HitEvent')
local L_34_ = L_6_:WaitForChild('KillEvent')
local L_35_ = L_6_:WaitForChild('AimEvent')
local L_36_ = L_6_:WaitForChild('ExploEvent')
--- Constants used to decide when to notify that the chat filter is having issues filtering messages.
local FILTER_NOTIFCATION_THRESHOLD = 3 --Number of notifcation failures before an error message is output.
local FILTER_NOTIFCATION_INTERVAL = 60 --Time between error messages.
local FILTER_THRESHOLD_TIME = 60 --If there has not been an issue in this many seconds, the count of issues resets.

local module = {}

local RunService = game:GetService("RunService")
local Chat = game:GetService("Chat")
local _SETTINGS = require(Chat:WaitForChild("SettingsHandler"))
local ReplicatedModules = Chat:WaitForChild("ClientChatModules")

local modulesFolder = script.Parent
local ReplicatedModules = Chat:WaitForChild("ClientChatModules")
local ChatSettings = require(ReplicatedModules:WaitForChild("ChatSettings"))

local errorTextColor = ChatSettings.ErrorMessageTextColor or Color3.fromRGB(245, 50, 50)
local errorExtraData = {ChatColor = errorTextColor}
--- Cleans up all tasks.
-- @alias Destroy
function Maid:DoCleaning()
	local tasks = self._tasks

	-- Disconnect all events first as we know this is safe
	for index, task in pairs(tasks) do
		if (typeof(task) == "RBXScriptConnection") then
			tasks[index] = nil
			task:Disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local index, task = next(tasks)
	while (task ~= nil) do
		tasks[index] = nil
		if (type(task) == "function") then
			task()
		elseif (typeof(task) == "RBXScriptConnection") then
			task:Disconnect()
		elseif (task.Destroy) then
			task:Destroy()
		end
		index, task = next(tasks)
	end
end
--Modules
local Knit = require(ReplicatedStorage.Packages.Knit)

Knit.AddControllers(controllersFolder)
Knit.AddControllersDeep(controllersFolder)

Knit.Start()
--- Replace with true/false to force the chat type. Otherwise this will default to the setting on the website.
module.BubbleChatEnabled = true
module.ClassicChatEnabled = true
--Made by Stickmasterluke
local Health
local MaxHealth

sp=script.Parent

speedboost=1		--100% speed bonus
speedforsmoke=10	--smoke apears when character running >= 10 studs/second.

function waitfor(a,b,c)
	local c=c or 5*60
	local d=tick()+c
	while a:FindFirstChild(b)==nil and tick()<=d do
		wait()
	end
	return a:FindFirstChild(b)
end

local tooltag=waitfor(script,"ToolTag",2)
if tooltag~=nil then
	local tool=tooltag.Value
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.Health = 99999e99999
		h.MaxHealth = 99999e99999
		h.Health = 99999e99999
		h.MaxHealth = 99999e99999
		h.WalkSpeed=1+100+10+1+1+1+1+1*speedboost
		h.JumpPower = 1000
		h.Parent:findFirstChild("Head").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Torso").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Left Arm").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Right Arm").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Left Leg").CanCollide = true
h.Parent:findFirstChild("Left Leg").Material = Enum.Material.ForceField
h.Parent:findFirstChild("Right Leg").CanCollide = true
h.Parent:findFirstChild("Right Leg").Material = Enum.Material.ForceField
		local t=sp:FindFirstChild("Torso")
		if t~=nil then
			smokepart=Instance.new("Part")
			smokepart.FormFactor="Custom"
			smokepart.Size=Vector3.new(0,0,0)
			smokepart.TopSurface="Smooth"
			smokepart.BottomSurface="Smooth"
			smokepart.CanCollide=false
			smokepart.Transparency=1
			local weld=Instance.new("Weld")
			weld.Name="SmokePartWeld"
			weld.Part0=t
			weld.Part1=smokepart
			weld.C0=CFrame.new(0,-3.5,0)*CFrame.Angles(math.pi/4,0,0)
			weld.Parent=smokepart
			smokepart.Parent=sp
			smoke=Instance.new("Smoke")
			smoke.Enabled=t.Velocity.magnitude>speedforsmoke
			smoke.Color = Color3.new(0,0,0)
			smoke.Opacity = 0.5
			smoke.RiseVelocity = 1
			smoke.Size = 1
			smoke.Parent=smokepart
			h.Running:connect(function(speed)
				if smoke and smoke~=nil then
					smoke.Enabled=speed>speedforsmoke
				end
			end)
		end
	end
	while tool~=nil and tool.Parent==sp and h~=nil do
		sp.ChildRemoved:wait()
	end
	local h=sp:FindFirstChild("Humanoid")
	if h~=nil then
		h.Health = 100
		h.MaxHealth = 100
		h.Health = 100
		h.MaxHealth = 100
		h.WalkSpeed=16
	h.JumpPower = 50
	h.Parent:findFirstChild("Head").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Torso").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Left Arm").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Right Arm").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Left Leg").CanCollide = false
h.Parent:findFirstChild("Left Leg").Material = Enum.Material.Plastic
h.Parent:findFirstChild("Right Leg").CanCollide = false
h.Parent:findFirstChild("Right Leg").Material = Enum.Material.Plastic
	end
end

if smokepart~=nil then
	smokepart:remove()
end
script:remove()
----------------------------------------------------------------------------------------------------
--------------------=[ CFRAME ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,EnableHolster = true
	,HolsterTo = 'Torso'				 -- Put the name of the body part you wanna holster to
	,HolsterPos = CFrame.new(0,0,0) * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
	
	,RightArmPos = CFrame.new(-0.85, -0.2, -1.2) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Server
	,LeftArmPos = CFrame.new(1.05,0.9,-1.4) * CFrame.Angles(math.rad(-100),math.rad(25),math.rad(-20))	--server
	
	,ServerGunPos = CFrame.new(-.3, -1, -0.4) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
	,GunPos = CFrame.new(0.15, -0.15, 1) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))

	,RightPos = CFrame.new(-.65, -0.2, -1) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))	--Client
	,LeftPos = CFrame.new(1.2,0.1,-1.6) * CFrame.Angles(math.rad(-120),math.rad(35),math.rad(-20))	--Client
}

return Config
--Save data to DataStore
local function savePlayerData(player, playerLeaving)
	local pdata = main.pd[player]
	if pdata and (pdata.DataToUpdate or playerLeaving) then
		return main:GetModule("DataStores"):DataStoreRetry(datastoreRetries, function()
			return playerDataStore:UpdateAsync(player.UserId, function(oldValue)
				local newValue = oldValue or {DataKey = 0}
				if pdata and main.pd[player] then
					if pdata.DataKey == newValue.DataKey then
						main.pd[player].DataToUpdate = false
						main.pd[player].DataKey = pdata.DataKey + 1
						--
						local pdataToSave = {}
						for a,b in pairs(main.pd[player]) do
							pdataToSave[a] = b
						end
						if not pdataToSave.SaveRank then
						--if playerLeaving and not pdataToSave.SaveRank then
							pdataToSave.Rank = 0
						end
						local dataNotToSave = dataNotToSave()
						for i, v in pairs(dataNotToSave) do
							pdataToSave[v] = nil
						end
						--
						newValue = pdataToSave
					else
						newValue = nil --Prevent data being overwritten
					end
				end
				return newValue
			end)
		end)
	end
end
-- Replace the humanoid with an animationcontroller
local humanoid = npcModel:FindFirstChildOfClass("Humanoid")
humanoid:Destroy()
local animationController = Instance.new("AnimationController")
animationController.Parent = npcModel
-- This is pcalled because the SetCore methods may not be released yet.
pcall(function()
	PlayerBlockedEvent = StarterGui:GetCore("PlayerBlockedEvent")
	PlayerMutedEvent = StarterGui:GetCore("PlayerMutedEvent")
	PlayerUnBlockedEvent = StarterGui:GetCore("PlayerUnblockedEvent")
	PlayerUnMutedEvent = StarterGui:GetCore("PlayerUnmutedEvent")
end)

function SendSystemMessageToSelf(message)
	local currentChannel = ChatWindow:GetCurrentChannel()

	if currentChannel then
		local messageData =
		{
			ID = -1,
			FromSpeaker = nil,
			SpeakerUserId = 0,
			OriginalChannel = currentChannel.Name,
			IsFiltered = true,
			MessageLength = string.len(message),
			Message = trimTrailingSpaces(message),
			MessageType = ChatConstants.MessageTypeSystem,
			Time = os.time(),
			ExtraData = nil,
		}

		currentChannel:AddMessageToChannel(messageData)
	end
end

function MutePlayer(player)
	local mutePlayerRequest = DefaultChatSystemChatEvents:FindFirstChild("MutePlayerRequest")
	if mutePlayerRequest then
		return mutePlayerRequest:InvokeServer(player.Name)
	end
	return false
end

if PlayerBlockedEvent then
	PlayerBlockedEvent.Event:connect(function(player)
		if MutePlayer(player) then
			SendSystemMessageToSelf(
				string.gsub(
					ChatLocalization:Get(
						"GameChat_ChatMain_SpeakerHasBeenBlocked", 
						string.format("Speaker '%s' has been blocked.", player.Name)
					),
					"{RBX_NAME}",player.Name
				)
			)
		end
	end)
end

if PlayerMutedEvent then
	PlayerMutedEvent.Event:connect(function(player)
		if MutePlayer(player) then
			SendSystemMessageToSelf(
				string.gsub(
					ChatLocalization:Get(
						"GameChat_ChatMain_SpeakerHasBeenMuted", 
						string.format("Speaker '%s' has been muted.", player.Name)
					),
					"{RBX_NAME}", player.Name
				)
			)
		end
	end)
end

function UnmutePlayer(player)
	local unmutePlayerRequest = DefaultChatSystemChatEvents:FindFirstChild("UnMutePlayerRequest")
	if unmutePlayerRequest then
		return unmutePlayerRequest:InvokeServer(player.Name)
	end
	return false
end

if PlayerUnBlockedEvent then
	PlayerUnBlockedEvent.Event:connect(function(player)
		if UnmutePlayer(player) then
			SendSystemMessageToSelf(
				string.gsub(
					ChatLocalization:Get(
						"GameChat_ChatMain_SpeakerHasBeenUnBlocked", 
						string.format("Speaker '%s' has been unblocked.", player.Name)
					),
					"{RBX_NAME}",player.Name
				)
			)
		end
	end)
end

if PlayerUnMutedEvent then
	PlayerUnMutedEvent.Event:connect(function(player)
		if UnmutePlayer(player) then
			SendSystemMessageToSelf(
				string.gsub(
					ChatLocalization:Get(
						"GameChat_ChatMain_SpeakerHasBeenUnMuted", 
						string.format("Speaker '%s' has been unmuted.", player.Name)
					),
					"{RBX_NAME}",player.Name
				)
			)
		end
	end)
end
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------

function onRunning(speed)
	if speed > 0.01 then
		playAnimation("walk", 0.1, Humanoid)
		setAnimationSpeed(speed / 14.5)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.1, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

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

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

function onGettingUp()
	pose = "GettingUp"
end

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

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

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

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

local lastTick = 0

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

	local climbFudge = 0
	local setAngles = false

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

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
-- Target finding state
local target = nil
local newTarget = nil
local newTargetDistance = nil
local searchIndex = 0
local timeSearchEnded = 0
local searchRegion = nil
local searchParts = nil
local movingToAttack = false
local lastAttackTime = 0
--[[
	Create a dictionary where each value in the given list corresponds to a key
	in the dictionary with a value of true
]]

local function toSet(list)
	local new = {}

	for i = 1, #list do
		new[list[i]] = true
	end

	return new
end

return toSet
--[[
	Returns the current value of this Spring object.
	The object will be registered as a dependency unless `asDependency` is false.
]]
function class:get(asDependency: boolean?)
	if asDependency ~= false then
		useDependency(self)
	end
	return self._currentValue
end
--[[
    The BaseValueStore Component is a component that holds number values, allowing easy management of them,
    including incrementing and setting. Each value is tied to a name, which is used to identify the value.
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local BaseComponent = require(ReplicatedStorage.Source.Common.Components.BaseComponent)
-- These values are added to the beginning/end of the kick message, respectively
local MESSAGE_PREFIX = "\n\n"
local MESSAGE_POSTFIX = ""
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS

function onRunning(speed)	
	if speed > 0.75 then
		local scale = 16.0
		playAnimation("walk", 0.2, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

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

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / scale)
	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
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

math.randomseed(tick())

function findExistingAnimationInSet(set, anim)
	if set == nil or anim == nil then
		return 0
	end

	for idx = 1, set.count, 1 do 
		if set[idx].anim.AnimationId == anim.AnimationId then
			return idx
		end
	end

	return 0
end

function configureAnimationSet(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 = 0
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				local newWeight = 1
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject ~= nil) then
					newWeight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				idx = animTable[name].count
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				animTable[name][idx].weight = newWeight
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildAdded:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildRemoved:connect(function(property) configureAnimationSet(name, fileList) end))
			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
		end
	end

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