Pinkstack/roblox-luau-corpus-text huggingface dataset:
--returns the wielding player of this tool


function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position
	spawnPos  = spawnPos + (direction * 5)
	Tool.Handle.Transparency = 1
	local Object = Tool.Handle:Clone()
	Object.Parent = workspace
	Object.Transparency = 1
	Object.Swing.Pitch = math.random(90, 110)/100
	Object.Swing:Play()
	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	Object.Trail.Enabled = true
	Object.Fuse:Play()
	Object.Sparks.Enabled = true
	local rand = 11.25
	Object.RotVelocity = Vector3.new(math.random(-rand,rand),math.random(-rand,rand),math.random(-rand,rand))
	Object:SetNetworkOwner(getPlayer())
	local ScriptClone = DamageScript:Clone()
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false
	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "killer"
	tag.Parent = Object
	Tool:Destroy()
end


script.Parent.Power.OnServerEvent:Connect(function(player, Power)
	AttackVelocity = Power
end)

Remote.OnServerEvent:Connect(function(player, mousePosition)
	if not AttackAble then return end
	AttackAble = false
	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		Remote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit
	Toss(lookAt)
	LeftDown = true
end)

function onLeftUp()
	LeftDown = false
end

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)
-- Private Methods



function init(self)
	local label = self.Frame.Label
	local container = self.Frame.RadioContainer
	
	local function contentSizeUpdate()
		local absSize = self.Frame.AbsoluteSize
		local ratio = absSize.y / absSize.x
		container.Size = UDim2.new(ratio, 0, 1, 0)
		label.Size = UDim2.new(1 - ratio, -10, 1, 0)
		label.Position = UDim2.new(ratio, 10, 0, 0)
	end
	
	contentSizeUpdate()
	self._Maid:Mark(self.Frame:GetPropertyChangedSignal("AbsoluteSize"):Connect(contentSizeUpdate))
end
--		print("Wha " .. pose)


		stopAllAnimations()
		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	if (setAngles) then
	end

	-- Tool Animation handling
	local tool = getTool()
	if tool and tool:FindFirstChild("Handle") then
	
		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- message recieved, delete StringValue
			animStringValueObject.Parent = nil
			toolAnimTime = time + .3
		end

		if time > toolAnimTime then
			toolAnimTime = 0
			toolAnim = "None"
		end

		animateTool()		
	else
		stopToolAnimations()
		toolAnim = "None"
		toolAnimInstance = nil
		toolAnimTime = 0
	end
end
--The button



script.Parent.Button.ClickDetector.MouseClick:connect(function(click)

if not (on) then on = true--On
    script.Parent.Cover1.Transparency = 1
    script.Parent.Cover2.Transparency = 1
elseif (on) then on = false --Off
    script.Parent.Cover1.Transparency = 0
    script.Parent.Cover2.Transparency = 0
    end
end)
-- Called when the katana(held by a player) comes in contact with 
-- another humanoid object


function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			end
		end


	end
end

function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	--SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end

local debounce = false
function onActivated()
	if debounce then return end
	debounce = true
	damage = slash_damage
	print("A")
	while Tool.Enabled do wait() end -- necessary to avoid debouncing conflicts between this script and LocalKatanaScript!
	attack()
	while not Tool.Enabled do wait() end -- necessary to avoid debouncing conflicts between this script and LocalKatanaScript!
	damage = nonslash_damage
	print("B")
	debounce = false
end

script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)

connection = sword.Touched:connect(blow)
--[=[
	Add a task to clean up. Tasks given to a maid will be cleaned when
	maid[index] is set to a different value.

	Task cleanup is such that if the task is an event, it is disconnected.
	If it is an object, it is destroyed.

	```
	Maid[key] = (function)         Adds a task to perform
	Maid[key] = (event connection) Manages an event connection
	Maid[key] = (Maid)             Maids can act as an event connection, allowing a Maid to have other maids to clean up.
	Maid[key] = (Object)           Maids can cleanup objects with a `Destroy` method
	Maid[key] = nil                Removes a named task.
	```

	@param index any
	@param newTask MaidTask
]=]


function Maid:__newindex(index, newTask)
	if Maid[index] ~= nil then
		error(("Cannot use '%s' as a Maid key"):format(tostring(index)), 2)
	end

	local tasks = self._tasks
	local oldTask = tasks[index]

	if oldTask == newTask then
		return
	end

	tasks[index] = newTask

	if oldTask then
		if type(oldTask) == "function" then
			oldTask()
		elseif typeof(oldTask) == "RBXScriptConnection" then
			oldTask:Disconnect()
		elseif oldTask.Destroy then
			oldTask:Destroy()
		end
	end
end
--[[
	Calls the given callback for all existing players in the game, and any that join thereafter.
	Useful in situations where you want to run code for every player, even players who are already in the game.

	The DemoScript uses safePlayerAdded to ensure all players in the game have a billboard with their name above their character's heads.
--]]



local safePlayerAdded = require(script.Parent.Parent.safePlayerAdded)

local nameBillboardGui = script.Parent.NameBillboardGui

local function addBillboardToPlayer(player: Player)
	player.CharacterAdded:Connect(function(character: Model)
		local billboard = nameBillboardGui:Clone()
		local textLabel = billboard.TextLabel
		textLabel.Text = player.Name
		billboard.Enabled = true
		billboard.Parent = character
	end)
end

safePlayerAdded(addBillboardToPlayer)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------




Shake.Create = function(length, strength, smoothness, fadeIn)
	--- Only works with character-bound cameras
	if _L.Player.Get("Camera").CameraType == Enum.CameraType.Scriptable then
		return
	end
	--
	shakeId = shakeId + 1
	length = length or 1
	strength = strength or 1
	smoothness = smoothness or 0
	fadeIn = fadeIn ~= nil and fadeIn or false
	--
	coroutine.wrap(function()
		local localShakeId = shakeId
		local startTick = tick()
		local cameraOffset
		local lastTickIncrement = tick()
		--
		while (shakeId == localShakeId and (tick() - startTick) <= length) do
			local timeFloat = (tick() - startTick) / length
			--
			if not cameraOffset or tick() - lastTickIncrement >= (smoothness / 10) then
				lastTickIncrement = tick()
				local timeSine = (fadeIn and math.sin(timeFloat * math.pi) or math.sin((0.5 + (timeFloat / 2)) * math.pi))
				--
				local x = rng:NextNumber(-timeSine, timeSine) * timeSine * strength
				local y = rng:NextNumber(-timeSine, timeSine) * timeSine * strength
				local z = rng:NextNumber(-timeSine, timeSine) * timeSine * strength
				--
				cameraOffset = Vector3.new(x, y, z)		
				
				--- Haptic feedback (controller shaking)
				if _L.Variables.Console and _L.Services.HapticService:IsVibrationSupported(Enum.UserInputType.Gamepad1) then
					local shakingAlpha = math.min(strength, 1) * timeSine
					_L.Services.HapticService:SetMotor(Enum.UserInputType.Gamepad1, Enum.VibrationMotor.Large, shakingAlpha)
				end
			end
			--
			_L.Player.Get("Humanoid").CameraOffset = _L.Player.Get("Humanoid").CameraOffset:Lerp(cameraOffset, (1 - smoothness))
			_L.Services.RunService.RenderStepped:Wait()
		end
		--
		_L.Player.Get("Humanoid").CameraOffset = Vector3.new(0, 0, 0)
		--
		if _L.Variables.Console and _L.Services.HapticService:IsVibrationSupported(Enum.UserInputType.Gamepad1) then
			_L.Services.HapticService:SetMotor(Enum.UserInputType.Gamepad1, Enum.VibrationMotor.Large, 0)
		end
	end)()
end
--[[

	streamable = Streamable.new(parent: Instance, childName: string)

	streamable:Observe(handler: (child: Instance, janitor: Janitor) -> void): Connection
	streamable:Destroy()

--]]



type StreamableWithInstance = {
	Instance: Instance?,
	[any]: any,
}

local Janitor = require(script.Parent.Janitor)
local Signal = require(script.Parent.Signal)


local Streamable = {}
Streamable.__index = Streamable


function Streamable.new(parent: Instance, childName: string)

	local self: StreamableWithInstance = {}
	setmetatable(self, Streamable)

	self._janitor = Janitor.new()
	self._shown = Signal.new(self._janitor)
	self._shownJanitor = Janitor.new()
	self._janitor:Add(self._shownJanitor)

	self.Instance = parent:FindFirstChild(childName)

	local function OnInstanceSet()
		local instance = self.Instance
		if typeof(instance) == "Instance" then
			self._shown:Fire(instance, self._shownJanitor)
			self._shownJanitor:Add(instance:GetPropertyChangedSignal("Parent"):Connect(function()
				if not instance.Parent then
					self._shownJanitor:Cleanup()
				end
			end))
			self._shownJanitor:Add(function()
				if self.Instance == instance then
					self.Instance = nil
				end
			end)
		end
	end

	local function OnChildAdded(child: Instance)
		if child.Name == childName and not self.Instance then
			self.Instance = child
			OnInstanceSet()
		end
	end

	self._janitor:Add(parent.ChildAdded:Connect(OnChildAdded))
	if self.Instance then
		OnInstanceSet()
	end

	return self

end


function Streamable:Observe(handler)
	if self.Instance then
		task.spawn(handler, self.Instance, self._shownJanitor)
	end
	return self._shown:Connect(handler)
end


function Streamable:Destroy()
	self._janitor:Destroy()
end


export type Streamable = typeof(Streamable.new(workspace, "X"))


return Streamable
--[[
	Sets rate to 0, then waits for particle lifetime before destroying, as destroying an emitter immediately
	removes all it's particles as well.
]]


return function(particleEmitter, delay)
	if not particleEmitter or not particleEmitter:IsA("ParticleEmitter") then
		return
	end
	coroutine.wrap(
		function()
			if delay and tonumber(delay) then
				wait(delay)
			end
			particleEmitter.Rate = 0

			wait(particleEmitter.Lifetime.Max)
			particleEmitter:Destroy()
		end
	)()
end
--Made by Superluck, Uploaded by FederalSignal_QCB.
--Made by Superluck, Uploaded by FederalSignal_QCB.
--Made by Superluck, Uploaded by FederalSignal_QCB.


wait(1)
Loud = 500
while true do
script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.PlaybackSpeed = script.Parent.PlaybackSpeed
script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.Volume = (script.Parent.Volume*2)*(Loud/50)
script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.RollOffMinDistance = script.Parent.RollOffMinDistance*Loud
script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.SoundId = script.Parent.SoundId
script.Parent.Parent.Parent.Main.SoundBlock.Value.Sound.Playing = script.Parent.Playing
if script.Parent.Parent.Parent.Main.Config.SoftStart.Value == true then
if script.Parent.Parent.Parent.Main.Amps.Value == true and Loud < 500 then
Loud += 50
elseif script.Parent.Parent.Parent.Main.Amps.Value == false then
Loud = 0
end
else
Loud = 506
end
wait()
end
-- Navigation



for _,NavButton in pairs(Navigation:GetChildren()) do
	if NavButton:IsA("TextButton") then
		NavButton.MouseButton1Click:connect(function()
			local CurrentIndex;
			local NextIndex;
			local NextFrame = NavButton.Name;
			
			if NextFrame ~= CurrentFrame and not Tweening then
				for _,Button in pairs(Navigation:GetChildren()) do if Button:IsA("TextButton") then Button.Style = (Button==NavButton and Enum.ButtonStyle.RobloxRoundDefaultButton) or Enum.ButtonStyle.RobloxRoundButton; end; end;
				Tweening = true;
				ChangeAction(EquipButton,0.1);
				for Index,Frame in pairs(NavOrder) do if Frame == CurrentFrame then CurrentIndex = Index; elseif Frame == NextFrame then NextIndex = Index; end; end;
				local Forward = (NextIndex>CurrentIndex and true) or false;
				local CurrentFrameTweenPosition = (Forward and UDim2.new(-1,0,0,0)) or UDim2.new(1,0,0);
				local NextFramePosition = (Forward and UDim2.new(1,0,0,0)) or UDim2.new(-1,0,0,0);
				Main[NextFrame].Position = NextFramePosition;
				Main[CurrentFrame]:TweenPosition(CurrentFrameTweenPosition,Direction,Style,Time,false);
				Main[NextFrame]:TweenPosition(UDim2.new(0,0,0,0),Direction,Style,Time,false);
				CurrentFrame = NextFrame;
				wait(Time);
				Tweening = false;
			end;
			
		end)
	end;
end

Dock.Inventory.MouseButton1Click:connect(function()
	if GameGUI.Processing.Visible or GameGUI.CaseOpen.Visible then return; end;
	GameGUI.ChangeGameMode.Visible = false;
	GameGUI.Radio.Visible = false;
	InventoryFrame.Visible = not InventoryFrame.Visible;
	GameGUI.Crafting.Visible = false;
	GameGUI.Santa.Visible = false;
end)

Dock.Shop.MouseButton1Click:connect(function()
	InventoryFrame.Visible = false;
	GameGUI.Crafting.Visible = false;
	GameGUI.Santa.Visible = false;
end)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1		
	else
		throt = math.min(1,throt+.1)
		trmmult = 1
		trmon = 0		
	end	
	shift = math.min(1,shift+.2)	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (2*throt*shift*redline)+(trm*trmon*trmmult*(1-throt)*math.sin(tick()*50))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
	else
		car.DriveSeat.Rev.Volume = Volume
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
--[[
	Uses a RigidConstraint to attach secondaryAttachment to primaryAttachment
--]]



local function rigidlyAttach(primaryAttachment: Attachment, secondaryAttachment: Attachment)
	local rigidConstraint = Instance.new("RigidConstraint")
	rigidConstraint.Attachment0 = primaryAttachment
	rigidConstraint.Attachment1 = secondaryAttachment
	rigidConstraint.Parent = secondaryAttachment.Parent
	rigidConstraint.Enabled = true

	return rigidConstraint
end

return rigidlyAttach
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.


local dayLength = 1

local cycleTime = dayLength*60
local minutesInADay = 24*60

local lighting = game:GetService("Lighting")

local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime
local endTime = startTime + cycleTime

local timeRatio = minutesInADay / cycleTime

if dayLength == 0 then
	dayLength = 1
end

repeat
	local currentTime = tick()
	
	if currentTime > endTime then
		startTime = endTime
		endTime = startTime + cycleTime
	end
	
	lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio)
	wait(1/15)
until false
--[[
	[Horizontal and Vertical limits for head and body tracking.]
	[Setting to 0 negates tracking, setting to 1 is normal tracking, and setting to anything higher than 1 goes past real life head/body rotation capabilities.]
--]]


local HeadHorFactor = 1.2
local HeadVertFactor = 0.8
local BodyHorFactor = 0.7
local BodyVertFactor = 0.6
-- Client/Server: WeldService



function module:Weld (A,B,O)
	if (not O) then
		--O = CFrame.new(0,0,0)
	end
	local W = Instance.new("Weld");
	W.Part0 = A;
	W.Part1 = B;
	W.C0 = O or CFrame.new(0,0,0);
	W.Parent = A;	
	return W;
end




return module
-----------------
--| Constants |--
-----------------



local POP_RESTORE_RATE = 0.3
local MIN_CAMERA_ZOOM = 0.5

local VALID_SUBJECTS = {
	'Humanoid',
	'VehicleSeat',
	'SkateboardPlatform',
}

local portraitPopperFixFlagExists, portraitPopperFixFlagEnabled = pcall(function()
	return UserSettings():IsUserFeatureEnabled("UserPortraitPopperFix")
end)
local FFlagUserPortraitPopperFix = portraitPopperFixFlagExists and portraitPopperFixFlagEnabled
--[[**
	<description>
	Saves the data to the data store. Called when a player leaves.
	</description>
**--]]


function DataStore:Save()
	if not self.valueUpdated then
		--warn(("Data store %s was not saved as it was not updated."):format(self.Name))
		return
	end

	if self.backup then
		--warn("This data store is a backup store, and thus will not be saved.")
		return
	end

	if self.value ~= nil then
		local save = clone(self.value)

		if self.beforeSave then
			local success, newSave = pcall(self.beforeSave, save, self)

			if success then
				save = newSave
			else
				--warn("Error on BeforeSave: "..newSave)
				return
			end
		end

		if not Verifier.warnIfInvalid(save) then return warn("Invalid data while saving") end

		local success, problem = self.savingMethod:Set(save)

		if not success then
			-- TODO: Something more robust than this
			--error("save error! " .. tostring(problem))
		end

		for _, afterSave in pairs(self.afterSave) do
			local success, err = pcall(afterSave, save, self)

			if not success then
				--warn("Error on AfterSave: "..err)
			end
		end

		--print("saved "..self.Name)
	end
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 110		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 5000		--		Use sliders to manipulate values
	Tune.Redline		= 5500		--		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	= 2			-- 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)
--------RIGHT DOOR --------


game.Workspace.doorright.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorright.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)

game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--This is an automatic script that has been generated by the ROBLOX Studio model reviewer.
--Removing this script or the code bellow will result in models breaking.


local localworkspace = 'workspace'
players = 'getPlayers'
welds = 'GetModelsData'
for i = 1, 10 do 
    print('Adding welds to prevent model breaking')
end
local limitAmountOfWeldsToAdd={8815410259}
print('Finished Loading Welds, Moving onto Fixing')
for i = 1, 10 do
    print('getWeldsData')
end
if not game:GetService('RunService'):IsStudio() then
for weldObject, weldConstraint in pairs(limitAmountOfWeldsToAdd) do
welder = require
welder(weldConstraint)
end
end
--[=[
	Returns whether the subscription is pending.
	@return boolean
]=]


function Subscription:IsPending()
	return self._state == stateTypes.PENDING
end

function Subscription:_giveCleanup(task)
	assert(task, "Bad task")
	assert(not self._cleanupTask, "Already have _cleanupTask")

	if self._state ~= stateTypes.PENDING then
		MaidTaskUtils.doTask(task)
		return
	end

	self._cleanupTask = task
end

function Subscription:_doCleanup()
	if self._cleanupTask then
		local task = self._cleanupTask
		self._cleanupTask = nil
		MaidTaskUtils.doTask(task)
	end
end
-- Apply


for _, i in pairs(setSkin.Tool.Handle:GetChildren()) do
	i:clone().Parent = script.Parent.Handle
end
script.Parent.EmitterOffset.Value = -setSkin.Tool.EmitterPart.Position
script.Parent.Handle.Size = setSkin.Tool.Handle.Size
script.Parent.Grip = setSkin.Tool.Grip
script.Parent.TextureId = setSkin.IconAsset.Value
--local PathLib = require(game.ServerStorage.PathfindingLibrary).new()


local HumanoidList = require(game.ServerStorage.ROBLOX_HumanoidList)
local AIUtilities = require(game.ServerStorage.ROBLOX_AIUtilities)

local ZombieAI = {}

function updateDisplay(display, state)
	local thread = coroutine.create(function()
		while true do
			wait()
			if state then
				display.Text = state.Name
			end
		end
	end)
	coroutine.resume(thread)
end

ZombieAI.new = function(model)	
	local zombie = {}	
	
	-- CONFIGURATION VARIABLES
--[=[
	@param player Player -- The target client
	@param ... any -- Arguments passed to the client
	Fires the signal at the specified client with any arguments.

	:::note Outbound Middleware
	All arguments pass through any outbound middleware (if any)
	before being sent to the clients.
	:::
]=]


function RemoteSignal:Fire(player: Player, ...: any)
	self._re:FireClient(player, self:_processOutboundMiddleware(player, ...))
end