Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- ROBLOX deviation: expected does not have string | RegExp type annotation


function formatReceived(
	label: string,
	thrown: Thrown, -- ROBLOX FIXME: narrowing | nil,
	key: string,
	expected: any -- ROBLOX FIXME: narrowing string | RegExp
)
	if thrown == nil then
		return ""
	end

	if key == "message" then
		local message = thrown.message

		if typeof(expected) == "string" then
			local index = message:find(expected)

			if index then
				return label .. printReceivedStringContainExpectedSubstring(message, index, #expected) .. "\n"
			end
		elseif getType(expected) == "regexp" then
			-- ROBLOX deviation: we don't check for expected.exec being a function
			-- since all RegExp polyfill instances have this function defined
			return label .. printReceivedStringContainExpectedResult(message, expected:exec(message)) .. "\n"
		end

		return label .. printReceived(message) .. "\n"
	end

	if key == "name" then
		if thrown.isError then
			return label .. printReceived(thrown.value.name) .. "\n"
		else
			return ""
		end
	end

	if key == "value" then
		if thrown.isError then
			return ""
		else
			return label .. printReceived(thrown.value) .. "\n"
		end
	end

	return ""
end

function formatStack(thrown: Thrown) -- ROBLOX FIXME: narrowing | nil)
	if thrown == nil or not thrown.isError then
		return ""
	else
		return formatStackTrace(thrown.value.stack)
	end
end

return {
	createMatcher = createMatcher,
	matchers = matchers,
}
--Green Liquid--



local function GEAR_EFFECT_SERVER(gear_server_functions, effect_data)
	local GSF = gear_server_functions
	local ED = effect_data
	
	--Effect variables
	local EV = {}
	
	--Server effect functions
	
	--Server effect object functions
	local function Start()
		EV["StartTime"] = tick()
		
	end
	
	local function Update() --"return false" to destroy gear effect object
		
		return true
	end
	
	local function Stop()
		EV = nil
	end
	
	return {Start, Update, Stop}
end

return GEAR_EFFECT_SERVER
--Also, we need a way to force a debounce on the destination teleporter


script.Parent.ForceSetBusy.Event:connect(function()
	if (isBusy) then return end
	glowPart.Transparency = 1
	indicator.BrickColor = BrickColor.new("Really red")
	isBusy = true
	wait(7.5)
	glowPart.Transparency = 0
	indicator.BrickColor = BrickColor.new("Lime green")
	isBusy = false
end)
-------------------------------



local tool = script.Parent
local player = game.Players.LocalPlayer
while player.Character == nil do wait() end
local char = player.Character
while char:FindFirstChild("Humanoid") == nil do wait() end
local hum = char:FindFirstChild("Humanoid")
local rs = char:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")
local ls = char:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")

local enabled = true
local equipped = false
local ischarging = false
tool.Equipped:connect(function(mouse)
	equipped = true
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function()
		if not enabled then return end
		if hum == nil then return end
		if hum.Health <= 0 then return end
		if mouse == nil then return end
		if not ischarging then
			if mouse.Hit ~= nil then
				ischarging = true
				script.Parent.ChargeProjectile:FireServer()
			end
		elseif ischarging then
			ischarging = false
			enabled = false
			script.Parent.ReleaseProjectile:FireServer(mouse.Hit.p)
			mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
			wait(RELOAD_TIME)
			mouse.Icon = "rbxasset://textures\\GunCursor.png"
			enabled = true
		end
	end)
end)

tool.Unequipped:connect(function(mouse)
	equipped = false
	ischarging = false
end)
--Sam



local rap = script.Parent.RightArmParts:GetChildren()
local lap = script.Parent.LeftArmParts:GetChildren()
local rlp = script.Parent.RightLegParts:GetChildren()
local llp = script.Parent.LeftLegParts:GetChildren()
local hp = script.Parent.HeadParts:GetChildren()
local tp = script.Parent.TorsoParts:GetChildren()

function WELDY(table, weldTo)
	local w2 = Instance.new("Weld")
	w2.Parent = script.Parent.Torso
	w2.Part0 = w2.Parent
	w2.C0 = CFrame.new()
	w2.Part1 = script.Parent.Head
	w2.C1 = CFrame.new(0, -1.5, 0)
	for i = 1, #table do 
		if table[i]:IsA("BasePart") then
			local w = Instance.new("Weld")
			w.Parent = weldTo
			w.Part0 = w.Parent
			w.C0 = weldTo.CFrame:inverse()
			w.Part1 = table[i]
			w.C1 = table[i].CFrame:inverse()
			w.Part1.Anchored = false
		end	
	end
	weldTo.Anchored = false
	for i = 1, #table do
		if table[i]:IsA("BasePart") then
			table[i].Anchored = false
		end
	end
	weldTo.Anchored = false
end 

function CFRAMEIT(table, weldTo)
	for i = 1, #table do
		if table[i]:IsA("BasePart") then
			local cf = table[i].CFrame
			local v = Instance.new("CFrameValue")
			v.Name = "CF"
			v.Value = cf
			v.Parent = table[i]
		end
	end
	local v = Instance.new("CFrameValue")
	v.Name = "CF"
	v.Value = weldTo.CFrame
	v.Parent = weldTo
end

function WELDIT(table, weldTo)
	if not weldTo:findFirstChild("CF") then
		WELDY(table, weldTo)
	elseif weldTo:findFirstChild("CF") then
		for i = 1, #table do
			if table[i]:IsA("BasePart") then
				local w = Instance.new("Weld")
				w.Parent = weldTo
				w.Part0 = w.Parent
				w.C0 = weldTo.CF.Value:inverse()
				w.Part1 = table[i]
				w.C1 = table[i].CF.Value:inverse()
				table[i].Anchored = false
			end
		end
		weldTo.Anchored = false
	end
end

function weld(t, weldTo)
WELDIT(t, weldTo)
end 

weld(rap, script.Parent["Right Arm"])
weld(lap, script.Parent["Left Arm"])
weld(rlp, script.Parent["Right Leg"])
weld(llp, script.Parent["Left Leg"])
weld(tp, script.Parent["Torso"])
weld(hp, script.Parent["Head"])
-- ROBLOX deviation: omitted external type NewPlugin


local PrettyFormat = require(Packages.PrettyFormat)
type Config = PrettyFormat.Config
type Printer = PrettyFormat.Printer
type Refs = PrettyFormat.Refs

local function serialize(
	val: any,
	config: Config,
	indentation: string,
	depth: number,
	refs: Refs,
	printer: Printer
): string
	-- Serialize a non-default name, even if config.printFunctionName is false.
	local name = val.getMockName()
	local nameString = ""
	if name == "jest.fn()" then
		nameString = ""
	else
		nameString = " " .. name
	end

	local callsString = ""
	if #val.mock.calls ~= 0 then
		local indentationNext = indentation .. config.indent
		callsString = " {"
			.. config.spacingOuter
			.. indentationNext
			.. '"calls": '
			.. printer(val.mock.calls, config, indentationNext, depth, refs)

		if config.min then
			callsString = callsString .. ", "
		else
			callsString = callsString .. ","
		end

		callsString = callsString
			.. config.spacingOuter
			.. indentationNext
			.. '"results": '
			.. printer(val.mock.results, config, indentationNext, depth, refs)

		if not config.min then
			callsString = callsString .. ","
		end

		callsString = callsString .. config.spacingOuter .. indentation .. "}"
	end

	return "[MockFunction" .. nameString .. "]" .. callsString
end

local function test(val: any): boolean
	-- ROBLOX deviation: add a table check to prevent access errors on non-tables
	return val and typeof(val) == "table" and val._isMockFunction
end

return {
	serialize = serialize,
	test = test,
}
-- Smooth Interpolation Curve Generator
-- @author Validark
-- @original https://github.com/gre/bezier-easing
-- 		Copyright (c) 2014 Gaëtan Renaudeau, MIT License (see bottom for full license)
-- @testsite http://cubic-bezier.com/
-- @testsite http://greweb.me/bezier-easing-editor/example/
-------------------------


while true do
Puerta1.BodyVelocity.velocity = Vector3.new(0, 0, -0.5)
Puerta2.BodyVelocity.velocity = Vector3.new(0, 0, 0.5)
wait(8)
Puerta1.BodyVelocity.velocity = Vector3.new(0, 0, 0)
Puerta2.BodyVelocity.velocity = Vector3.new(0, 0, 0)
break
end
--[[
Creats a beam between two parts.	
--]]


local function JoinPartsAtOffset(Part1,Part2,Offset1,Offset2,Rotation,Width1,Width2)
	--Create the attachments.
	local Attachment1 = Instance.new("Attachment")
	Attachment1.Position = Offset1
	Attachment1.Orientation = Rotation
	Attachment1.Parent = Part1
	
	local Attachment2 = Instance.new("Attachment")
	Attachment2.Position = Offset2
	Attachment2.Orientation = Rotation
	Attachment2.Parent = Part2
	
	--Create the beam.
	local Beam = Instance.new("Beam")
	Beam.Color = ColorSequence.new(Part1.Color,Part2.Color)
	Beam.Transparency = NumberSequence.new(Part1.Transparency,Part2.Transparency)
	Beam.LightInfluence = 1
	Beam.Attachment0 = Attachment1
	Beam.Attachment1 = Attachment2
	Beam.Width0 = Width1
	Beam.Width1 = Width2
	Beam.Parent = Part1
end
--functions


function coverdown()
	shutter.TextLabel.Visible = false
	shutter:TweenPosition(UDim2.new(0, 0,0.525, 0), "Out", "Sine", 1, true)
end

function coverup()
	shutter:TweenPosition(UDim2.new(0, 0,0.145, 0), "Out", "Sine", 1, true)	
	shutter.TextLabel.Visible = true
end

function menuoneappear()
	for _,v in pairs(machine.ToppingsOne:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = true
		end
	end
	machine.ToppingsOne.Header.Visible = true
end

function menutwoappear()
	for _,v in pairs(machine.ToppingsTwo:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = true
		end
	end
	machine.ToppingsTwo.Header.Visible = true
end

function menuonedisappear()
	for _,v in pairs(machine.ToppingsOne:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = false
		end
	end
	machine.ToppingsOne.Header.Visible = false
end

function menutwodisappear()
	for _,v in pairs(machine.ToppingsTwo:GetChildren()) do
		if v:IsA("TextButton") then
			v.Visible = false
		end
	end
	machine.ToppingsTwo.Header.Visible = false
end
--[[Running Logic]]

--
local equipped = false
local rayparts = {}
local ColorChoices = {BrickColor.new('Really red'),BrickColor.new('Lime green'),BrickColor.new('Toothpaste')}
local StartOffset = {Vector3.new(-.45,0,0),Vector3.new(0,0,0),Vector3.new(.45,0,0)}
local oldC0 =nil
local nweld
-- Copied from Grimgold Periastron Beta



local Tool = script.Parent
local Sword = Tool.Handle

local vCharacter
local myTorso
local myHumanoid 

local equipped = false

local debris = game:GetService("Debris")

function tagHumanoid(humanoid, player)
	if humanoid then 
		local creatorTag = Instance.new("ObjectValue")
		creatorTag.Value = player
		creatorTag.Name = "creator"
		creatorTag.Parent = humanoid
		debris:AddItem(creatorTag, 1)
	end
end

function cut(hit)
	local humanoid
	local vPlayer
	if hit and hit.Parent and myHumanoid then 
		if hit.Parent.className == "Hat" then
			humanoid = hit.Parent.Parent:FindFirstChild("Humanoid")
		else
			humanoid = hit.Parent:FindFirstChild("Humanoid")
		end
		vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
		if humanoid ~= nil and humanoid ~= myHumanoid then 
			tagHumanoid(humanoid, vPlayer)
			humanoid:TakeDamage(7.)
		end
	end
end

function onEquipped()
	vCharacter = Tool.Parent
	myTorso = vCharacter:FindFirstChild("Torso")
	myHumanoid = vCharacter:FindFirstChild("Humanoid")	
end

Tool.Equipped:connect(onEquipped)

Sword.Touched:connect(cut)
-- ROBLOX deviation: expected does not have Error type annotation


function toThrowExpectedObject(
	matcherName: string,
	options: JestMatcherUtils.MatcherHintOptions,
	thrown: Thrown | nil,
	expected: Error
): SyncExpectationResult
	local pass = thrown ~= nil and thrown.message == expected.message

	local message
	if pass then
		message = function()
			local retval = matcherHint(matcherName, nil, nil, options)
				.. "\n\n"
				.. formatExpected("Expected message: never ", expected.message)

			if thrown ~= nil and thrown.hasMessage and not thrown.value["$$robloxInternalJestError"] then
				retval = retval .. formatStack(thrown)
			else
				retval = retval .. formatReceived("Received value:         ", thrown, "message") .. formatStack(thrown)
			end

			return retval
		end
	else
		message = function()
			local retval = matcherHint(matcherName, nil, nil, options) .. "\n\n"

			if thrown == nil then
				retval = retval .. formatExpected("Expected message: ", expected.message) .. "\n" .. DID_NOT_THROW
			else
				if thrown.hasMessage and not thrown.value["$$robloxInternalJestError"] then
					retval = retval
						.. printDiffOrStringify(
							expected.message,
							thrown.message,
							"Expected message",
							"Received message",
							true
						)
						.. "\n"
						.. formatStack(thrown)
				else
					retval = retval
						.. formatExpected("Expected message: ", expected.message)
						.. formatReceived("Received value:   ", thrown, "message")
						.. formatStack(thrown)
				end
			end

			return retval
		end
	end

	return { message = message, pass = pass }
end
--TimeSensor--


TurnOn = 19
TurnOff = 7
On = false
while wait(10) do
    if game.Lighting.ClockTime >= TurnOn then
        if not On then
            On = true
            script.Parent.Flicker.On.Value = true
        end
    elseif game.Lighting.ClockTime >= TurnOff then
        if On then
            On = false
            script.Parent.Flicker.On.Value = false
        end
    end
end