Roblox/luau_corpus huggingface dataset:
-- 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}

local PreloadAnimsUserFlag = false
local successPreloadAnim, msgPreloadAnim = pcall(function()
	PreloadAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserPreloadAnimations")
end)
if not successPreloadAnim then
	PreloadAnimsUserFlag = false
end

math.randomseed(tick())

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 AllowDisableCustomAnimsUserFlag = false

	local success, msg = pcall(function()
		AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims2")
	end)

	if (AllowDisableCustomAnimsUserFlag) then
		local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end)
		if not success then
			allowCustomAnimations = true
		end
	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
--//General functions
function Switch1()
	for i,v in pairs(aparts) do
		v.CanCollide = false
		v.Transparency = 1
	for i,v in pairs(bparts) do
		v.CanCollide = true
		v.Transparency = 0
		end
	end
end

function Switch2()
	for i,v in pairs(bparts) do
		v.CanCollide = false
		v.Transparency = 1
	for i,v in pairs(aparts) do
		v.CanCollide = true
		v.Transparency = 0
		end
	end
end
--[[
	Identical to Map, except that the result will be reversed.
]]
function Functional.MapReverse(list, callback)
	local new = {}

	for key = #list, 1, -1 do
		new[key] = callback(list[key], key)
	end

	return new
end
--[=[
	Links several instances to a new Janitor, which is then returned.

	@param ... Instance -- All the Instances you want linked.
	@return Janitor -- A new Janitor that can be used to manually disconnect all LinkToInstances.
]=]
function Janitor:LinkToInstances(...: Instance)
	local ManualCleanup = Janitor.new()
	for _, Object in ipairs({...}) do
		ManualCleanup:Add(self:LinkToInstance(Object, true), "Disconnect")
	end

	return ManualCleanup
end
--// Functions
function UpdateTag(plr)
	if plr == L_1_ or not plr.Character or not plr.Character:FindFirstChild("TeamTagUI") then return; end;
	local Tag = plr.Character:FindFirstChild("TeamTagUI");
	if plr.Team == L_1_.Team then
		Tag.Enabled = true;
		if plr.Character:FindFirstChild("ACS_Client") and plr.Character.ACS_Client:FindFirstChild("FireTeam") and plr.Character.ACS_Client.FireTeam.SquadName.Value ~= "" then
			Tag.Frame.Icon.ImageColor3 = plr.Character.ACS_Client.FireTeam.SquadColor.Value;
		else
			Tag.Frame.Icon.ImageColor3 = Color3.fromRGB(255,255,255);
		end;
	else
		Tag.Enabled = false;
	end
end
-- Get references to the DockShelf and its children
local dockShelf = script.Parent.Parent.Parent.Parent.Parent.DockShelf
local aFinderButton = dockShelf.GASettings
local Minimalise = script.Parent
local window = script.Parent.Parent.Parent
-- Go through each setting value
for _, i in pairs(settingVals) do
	
	-- Make sure not nil
	if i ~= nil then
		
		-- Connect changed event
		i.Changed:connect(function()
			
			-- Set border to be on if this item
			if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and itemName ~= "" then
				
				-- Turn on border
				script.Parent.GreenEdge.Visible = true
				
			else
				
				-- Check if equip nothing as toy button
				if itemName == "" and script.Parent.ItemType.Value == "Toy" then
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value ~= "" then
							equipped = true
							break
						end
					end
					
					-- Only turn on border if nothing equipped
					if equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				else
					
					-- Check if equipped anywhere
					local equipped = false
					for _, o in pairs(settingVals) do
						if o.Value == itemName then
							equipped = true
							break
						end
					end
					
					-- Set border accordingly
					if not equipped then
						script.Parent.GreenEdge.Visible = false
					else
						script.Parent.GreenEdge.Visible = true
					end
					
				end
			end
			
		end)
		
		-- Set up
		if i.Value == itemName and script.Parent.Parent.Player.Value == plr and script.Parent.ItemType.Value ~= "Emote" and (script.Parent.ItemType.Value ~= "Toy" or itemName ~= "") then
			script.Parent.GreenEdge.Visible = true
			plr.PlayerGui.MainGui.Inventory.Preview.Item.Value = actualItem
		end
		
	end
	
end
--[=[
	@return Trove
	Constructs a Trove object.
]=]
function Trove.new()
	local self = setmetatable({}, Trove)
	self._objects = {}
	return self
end
--------------------------------------------------------------------------------------
--------------------[ PRE-LOADING ]---------------------------------------------------
--------------------------------------------------------------------------------------

CP:Preload(S.explosionSettings.soundId)
CP:Preload(S.holeSettings.Texture)
CP:Preload(S.sparkSettings.Texture)
CP:Preload(S.smokeSettings.Texture)
CP:Preload(S.bloodSettings.Texture)
CP:Preload("http://www.roblox.com/asset/?id=126877530") --The dark green arrow in the select fire gui
CP:Preload("http://www.roblox.com/asset/?id=55754953") --The circle in the select fire gui
-- Don't mess with anything in the script. The constants and variables are all mixed together

local Type = 0		-- Manipulated by GUI	(0 = 12 hr, 1 = 24 hr)
local Sec = false	-- Manipulated by GUI

local year = 1970
local month = 1
local day = 1
local Date = "January 1, 1970"

local hour = 0
local min = 0
local sec = 0
local tag = "AM"
local Time = "12:00 AM"

function getDate()
	local months = {
-- Contstants -- 

local Camera = game.Workspace.CurrentCamera --Now that we fixed this up its time to get to the GUI Part!
local Player = game.Players.LocalPlayer
-- Warm water
faucet.WarmWaterSet.Interactive.ClickDetector.MouseClick:Connect(function()
	faucet.Handle:SetPrimaryPartCFrame(faucet.HandleBase.CFrame * CFrame.Angles(math.rad(-90),0,0))
	if steam.HotSteam.Enabled == true then
	steam.HotSteam.Enabled = false
	end
	steam.WarmSteam.Enabled = true
	p.HotOn.Value = true
	p.ColdOn.Value = true
end)
--[=[
	Pushes an entry to the left of the queue
	@param value T
]=]
function Queue:PushLeft(value)
	self._first = self._first - 1
	self[self._first] = value
end
-- the script ----------------------

local effect = script.soundeffect

if level >= 0 and level <= 100 then
	effect.HighGain = (level*-1)/2
	effect.MidGain = (level*-1)/2
elseif level < 0 then
	effect.HighGain = -0
	effect.MidGain = -0
elseif level > 100 then
	effect.HighGain = -50
	effect.MidGain = -50
end
-- Reset the camera look vector when the camera is enabled for the first time
local SetCameraOnSpawn = true

local hasGameLoaded = false

local GestureArea = nil
-- Sample assumes a Main Portal Template model exists under Workspace
local mainPortal = Workspace:WaitForChild("Main Portal Template")
-- move the shelly to the newfound goal
bg.CFrame = CFrame.new(shelly.PrimaryPart.Position,goal)
bp.Position = (CFrame.new(shelly.PrimaryPart.Position,goal)*CFrame.new(0,0,-100)).p

local start = tick()
repeat wait(1/2) 
local ray = Ray.new(shelly.PrimaryPart.Position,Vector3.new(0,-1000,0))
-- This store is to be used only on the client. It contains both UI states and data from the server, the latter being
-- synchronized with the server store
local store = Rodux.Store.new(reducer, nil, { Rodux.thunkMiddleware })

return store
--model:remove()
--model.Parent = nil
wait(5) -- display regen message for 4 seconds
backup.Parent = game.Workspace
backup:makeJoints()
model:Destroy()
----------------------------------------------------------------------------------------------------
-----------------=[ RECOIL & PRECISAO ]=------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,VRecoil = {3,7}				--- Vertical Recoil
	,HRecoil = {3,7}				--- Horizontal Recoil
	,AimRecover = 1					---- Between 0 & 1
	
	,RecoilPunch = .25
	,VPunchBase = 5					--- Vertical Punch
	,HPunchBase = 1.5				--- Horizontal Punch
	,DPunchBase = 1 				--- Tilt Punch | useless
	
	,AimRecoilReduction = 1 		--- Recoil Reduction Factor While Aiming (Do not set to 0)
	,PunchRecover = 0.2
	,MinRecoilPower = 1
	,MaxRecoilPower = 3
	,RecoilPowerStepAmount = .5
	
	,MinSpread = 5					--- Min bullet spread value | Studs
	,MaxSpread = 40					--- Max bullet spread value | Studs
	,AimInaccuracyStepAmount = 2.5
	,WalkMultiplier = 0				--- Bullet spread based on player speed

	,SwayBase = 0.25				--- Weapon Base Sway | Studs
	,MaxSway =	1					--- Max sway value based on player stamina | Studs
--[=[
	@within Plasma
	@function create
	@param className string -- The class name of the Instance to create
	@param props CreateProps
	@return Instance -- The created instance
	@tag utilities

	A function that creates an Instance tree.

	CreateProps is a table:
	- String keys are interpreted as properties to set
	- Numerical keys are interpreted as children
	- Function values are interpreted as event handlers
	- Table keys can be used to get references to instances deep in the tree, the value becomes the key in the table

	This function doesn't do anything special. It just creates an instance.

	```lua
	create("Frame", {
		BackgroundTransparency = 1,
		Name = "Checkbox",

		create("TextButton", {
			BackgroundColor3 = Color3.fromRGB(54, 54, 54),
			Size = UDim2.new(0, 30, 0, 30),

			create("UICorner", {
				CornerRadius = UDim.new(0, 8),
			}),

			Activated = function()
				setClicked(true)
			end,
		}),
	})
	```

	Getting references to instances deep in a tree:

	```lua
	local ref = {}

	create("Frame", {
		create("TextButton", {
			[ref] = "button",
			Text = "hi"
		})
	})

	print(ref.button.Text) --> hi
	```
]=]
local function create(className, props)
	props = props or {}

	local eventCallback = Runtime.useEventCallback()

	local instance = Instance.new(className)

	for key, value in pairs(props) do
		if type(value) == "function" then
			if eventCallback then
				eventCallback(instance, key, value)
			else
				instance[key]:Connect(value)
			end
		elseif type(key) == "number" then
			value.Parent = instance
		elseif type(key) == "table" then
			key[value] = instance

			if props.Name == nil then
				instance.Name = value
			end
		else
			instance[key] = value
		end
	end

	return instance
end

return create
--// gets gun values from configuration folders
function module.getValue(folder : Instance, name : string)
	return folder:WaitForChild(name,1000).Value
end

function module.loadAnimation(folder : Instance, name : string, animator : Animator)
	return animator:LoadAnimation(folder:WaitForChild(name, 1000))
end

function module.getHumanoidFromPart(part : BasePart)
	local parent = part.Parent
	if parent ~= workspace and not parent:IsA("Accessory") then
		local Humanoid = parent:FindFirstChildWhichIsA("Humanoid",true)
		return Humanoid
	elseif part.Parent:IsA("Accessory") then
		parent = part.Parent.Parent
		local Humanoid = parent:FindFirstChildWhichIsA("Humanoid",true)
		return Humanoid
	end
end

function module.getRandomInstanceOfType(folder : Instance, instanceType : string)
	local folderChildren = folder:GetChildren()
	local random
	repeat random = folderChildren[math.random(1,#folderChildren)] until random:IsA(instanceType)
	return random
end

function module.normalIdFromVector(vector)
	print(vector)
	local epsilon = 0.01
	for _, normalId in pairs(Enum.NormalId:GetEnumItems()) do
		if vector.unit:Dot(Vector3.FromNormalId(normalId)) > 1 - epsilon then
			print(normalId)
			return normalId
		end
	end
end

function module.SetStatValue(player : Player, statName : string, newValue : number)
	local leaderstatsFolder = player:WaitForChild("leaderstats", 1000)
	if leaderstatsFolder then
		local stat = leaderstatsFolder:WaitForChild(statName, 1000)
		if stat then
			stat.Value = newValue
		else
			return false
		end
	else
		return false
	end
end

function module.GetStatValue(player : Player, statName : string)
	local leaderstatsFolder = player:WaitForChild("leaderstats", 1000)
	if leaderstatsFolder then
		local stat = leaderstatsFolder:WaitForChild(statName, 1000)
		if stat then
			return stat.Value
		else
			return false
		end
	else
		return false
	end
end

return module
--------LEFT DOOR --------

game.Workspace.doorleft.l21.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(21)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(106)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(21)
-- Комбинации данных
DataStore2.Combine(DB, "stage")
-- RemoteProperty
-- Stephen Leitnick
-- December 20, 2021

local Players = game:GetService("Players")

local Util = require(script.Parent.Parent.Util)
local Types = require(script.Parent.Parent.Types)
local RemoteSignal = require(script.Parent.RemoteSignal)

local None = Util.None
--- Skill
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local Mouse = plr:GetMouse()
local Debounce = true
Player = game.Players.LocalPlayer
local Track1 : Animation = script:WaitForChild("Anim01")
Track1 = Player.Character:WaitForChild("Humanoid"):LoadAnimation(script.Anim01)
local PrevWalkSpeed = nil
local PrevJumpPower = nil
local Tween = game:GetService("TweenService")
local Gui = Player.PlayerGui:WaitForChild("Mochi_Skill_List".. Player.Name):WaitForChild("Frame")

local Cooldown = 7

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.C and Debounce == true and Tool.Equip.Value == true and Tool.Active.Value == "None" then
		Tool.Active.Value = "3BuzzCutDough"
		Gui:FindFirstChild(Tool.Active.Value).Frame.Size = UDim2.new(1, 0, 1, 0)
		PrevWalkSpeed = Player.Character:WaitForChild("Humanoid").WalkSpeed
		PrevJumpPower = Player.Character:WaitForChild("Humanoid").JumpPower
		Player.Character:WaitForChild("Humanoid").WalkSpeed = 2.5
		Player.Character:WaitForChild("Humanoid").JumpPower = 0
		Track1:Play()
		Track1:AdjustSpeed(0)
		wait(0.15)
		script.Fire:FireServer("hold")
	end
end)

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.C and Debounce == true and Tool.Equip.Value == true and Tool.Active.Value == "3BuzzCutDough" then
		Debounce = false
		Tool.Active.Value = "3BuzzCutDough"
		Player.Character:WaitForChild("Humanoid").WalkSpeed = 0
		Track1:Stop()
		script.Fire:FireServer("unhold")
		wait(1.5)
		local hum =  Player.Character.Humanoid
		local CamOffsetMulti = 6
		for i = 1,20 do
			hum.CameraOffset = Vector3.new(
				math.random(-CamOffsetMulti,CamOffsetMulti),
				math.random(-CamOffsetMulti,CamOffsetMulti),
				math.random(-CamOffsetMulti,CamOffsetMulti))
			CamOffsetMulti = CamOffsetMulti/1.05
			wait()
		end
		hum.CameraOffset = Vector3.new(0,0,0)
		Tween:Create(Gui:FindFirstChild(Tool.Active.Value).Frame, TweenInfo.new(Cooldown), {Size = UDim2.new(0, 0, 1, 0)}):Play()
		Tool.Active.Value = "None"
		Player.Character:WaitForChild("Humanoid").WalkSpeed = PrevWalkSpeed
		Player.Character:WaitForChild("Humanoid").JumpPower = PrevJumpPower
		wait(Cooldown)
		Debounce = true
	end
end)
-- Destroy script 10 seconds later (prevents multiple things trying to set parent at same time)
wait(10)
script:destroy()
--]]


function getHumanoid(model)
	for _, v in pairs(model:GetChildren()) do
		if v:IsA'Humanoid' then
			return v
		end
	end
end


local ai = script.Parent
local human = getHumanoid(ai)
local hroot = ai.HumanoidRootPart
local zspeed = hroot.Velocity.magnitude


local pfs = game:GetService("PathfindingService")

function GetPlayerNames()
	local players = game:GetService('Players'):GetChildren()
	local name = nil
	for _, v in pairs(players) do
		if v:IsA'Player' then
			name = tostring(v.Name)
		end
	end
	return name
end


function GetPlayersBodyParts(t)
	local torso = t
	if torso then
		local figure = torso.Parent
		for _, v in pairs(figure:GetChildren()) do
			if v:IsA'Part' then
				return v.Name
			end
		end
	else
		return "HumanoidRootPart"
	end
end

function GetTorso(part)
	local chars = game.Workspace:GetChildren()
	local torso = nil
	for _, v in pairs(chars) do
		if v:IsA'Model' and v ~= script.Parent and v.Name == GetPlayerNames() then
			local charRoot = v:FindFirstChild'HumanoidRootPart'
			if (charRoot.Position - part).magnitude < SearchDistance then
				torso = charRoot
			end
		end
	end
	return torso
end

for _, zambieparts in pairs(ai:GetChildren()) do
	if zambieparts:IsA'Part' then
		zambieparts.Touched:connect(function(p)
			if p.Parent.Name == GetPlayerNames() and p.Parent.Name ~= ai.Name then -- damage
				local enemy = p.Parent
				local enemyhuman = getHumanoid(enemy)
				enemyhuman:TakeDamage(aiDamage)
			end
		end)
	end
end
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------


function onRunning(speed)
	if speed > 0.01 then
		playAnimation("walk", 0.1, Humanoid)
		if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
			setAnimationSpeed(speed / 14.5)
		end
		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 getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

function animateTool()
	
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

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

local lastTick = 0

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

	local climbFudge = 0
	local setAngles = false

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

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		playAnimation("sit", 0.5, Humanoid)
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
-- Define the function to open or close the window with gene-alike effect
local function toggleWindow()
	if window.Visible then

		window.Visible = false

	else
		opened.Visible = true
		window.Visible = true
	end
end
-- @Return Model
function WeaponRuntimeData:GetOwningCharacter()
	return self.character
end

function WeaponRuntimeData:SetMaxAmmo()
	self.currentAmmo = self.weaponDefinition:GetMaxAmmo()
end
-- Written by Coercii

local Verifier = {}

function Verifier.typeValid(data)
	return type(data) ~= "userdata", typeof(data)
end

function Verifier.scanValidity(tbl, passed, path)
	if type(tbl) ~= "table" then
		return Verifier.scanValidity({input = tbl}, {}, {})
	end
	passed, path = passed or {}, path or {"input"}
	passed[tbl] = true
	local tblType
	do
		local key = next(tbl)
		if type(key) == "number" then
			tblType = "Array"
		else
			tblType = "Dictionary"
		end
	end
	local last = 0
	for key, value in next, tbl do
		path[#path + 1] = tostring(key)
		if type(key) == "number" then
			if tblType == "Dictionary" then
				return false, path, "Mixed Array/Dictionary"
			elseif key%1 ~= 0 then  -- if not an integer
				return false, path, "Non-integer index"
			elseif key == math.huge or key == -math.huge then
				return false, path, "(-)Infinity index"
			end
		elseif type(key) ~= "string" then
			return false, path, "Non-string key", typeof(key)
		elseif tblType == "Array" then
			return false, path, "Mixed Array/Dictionary"
		end
		if tblType == "Array" then
			if last ~= key - 1 then
				return false, path, "Array with non-sequential indexes"
			end
			last = key
		end
		local isTypeValid, valueType = Verifier.typeValid(value)
		if not isTypeValid then
			return false, path, "Invalid type", valueType
		end
		if type(value) == "table" then
			if passed[value] then
				return false, path, "Cyclic"
			end
			local isValid, keyPath, reason, extra = Verifier.scanValidity(value, passed, path)
			if not isValid then
				return isValid, keyPath, reason, extra
			end
		end
		path[#path] = nil
	end
	passed[tbl] = nil
	return true
end

function Verifier.getStringPath(path)
	return table.concat(path, ".")
end

function Verifier.testValidity(input)
	local isValid, keyPath, reason, extra = Verifier.scanValidity(input)
	if not isValid then
		if extra then
			return "Invalid at "..Verifier.getStringPath(keyPath).." because: "..reason.." ("..tostring(extra)..")"
		else
			return "Invalid at "..Verifier.getStringPath(keyPath).." because: "..reason
		end
	end
end

return Verifier