Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- Instruction: Put in a (Vehicle)Seat.


wait(0.1)

local seat = script.Parent

function GetPlayerFromWeld( weld )
	if weld.Part1.Name == "HumanoidRootPart" then
		local character = weld.Part1.Parent:findFirstChild("Humanoid")
		if (character) then
			local player = game.Players:GetPlayerFromCharacter(character.Parent)
			if (player) then
				return player
			end
		end
	end
	return nil
end

seat.ChildAdded:connect(function( newChild )	
	if newChild:IsA("Weld") then
		local player = GetPlayerFromWeld(newChild)
		if (player) then
			local newGUI = script.SpeedGUI:Clone()
			wait(0.1)
			newGUI.Car.Value = seat
			newGUI.Parent = player.PlayerGui
		end
	end
end)

seat.ChildRemoved:connect(function( oldChild )
	if oldChild:IsA("Weld") then
		local player = GetPlayerFromWeld( oldChild )
		if player then
			if player.PlayerGui:findFirstChild("SpeedGUI") then
				player.PlayerGui.SpeedGUI:Destroy()
			end
		end
	end
end)
--Thanks for this, Zeph. Hope you don't mind that I essentially stole this :P



local IntWait = 0.01
local MD = script.Parent.WPR.SS.Motor
local MD2 = script.Parent.WPR2.SS.Motor


while true do
	wait()
	if script.Parent.DriveSeat.Wipers.Value == true then
		if MD.CurrentAngle == 0  then
			wait(IntWait)
			MD.DesiredAngle = -1.31
			MD2.DesiredAngle = -1.31
		elseif MD.CurrentAngle < -1.3 then
			MD.DesiredAngle = 0
			MD2.DesiredAngle = 0
		end
	end
end
-------------------------


function onClicked()
R.Function1.Disabled = true
FX.CRUSH.BrickColor = BrickColor.new("Really red")
FX.CRUSH.loop.Disabled = true

FX.JET.BrickColor = BrickColor.new("Really red")
FX.JET.loop.Disabled = true

FX.HPF.BrickColor = BrickColor.new("Really red")
FX.HPF.loop.Disabled = true

FX.NOISE.BrickColor = BrickColor.new("Really red")
FX.NOISE.loop.Disabled = true

FX.ZIP.BrickColor = BrickColor.new("Really red")
FX.ZIP.loop.Disabled = true
R.loop.Disabled = false
R.Function2.Disabled = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
-- LIGHT SETTINGS
--[[
	LIGHT TYPES:
		- Halogen
		- LED
]]

--

local Low_Beam_Brightness = 2.28

local High_Beam_Brightness = 3.18

local Fog_Light_Brightness = 0.73

local Rear_Light_Brightness = 1.53

local Brake_Light_Brightness = 2.53

local Reverse_Light_Brightness = 1.03

local Headlight_Type = "Halogen"

local Indicator_Type = "Halogen"

local Fog_Light_Type = "Halogen"

local Plate_Light_Type = "Halogen"

local Rear_Light_Type = "Halogen"

local Reverse_Light_Type = "Halogen"

local Running_Light_Location = "Custom DRL" -- Where your running lights will luminate. ("Low Beam / Indicators" and "Low Beam".  LED DRLS or any DRL in a differnet position go in the Running model, change the string to "Custom DRL")

local CustomDRL_Type = "LED"

local Fade_Time = 0.10 -- How long it takes for the light to fully turn on. (works only with Halogen, default is 0.35 seconds)

local Indicator_Flash_Rate = 0.3 -- Rate of change between each indicator state. (in seconds)

local Popup_Hinge_Angle = -0.75 -- Changes the angle of your popup headlights. (only use if your car has popups)
--Fallout tactics gets too hard when you start fighting muties...



if string.sub(msg,1,8) == "respawn/" then
local player = findplayer(string.sub(msg,9),speaker)
if player ~= 0 then
for i = 1,#player do
local ack2 = Instance.new("Model")
ack2.Parent = game.Workspace
local ack4 = Instance.new("Part")
ack4.Transparency = 1
ack4.CanCollide = false
ack4.Anchored = true
ack4.Name = "Torso"
ack4.Position = Vector3.new(10000,10000,10000)
ack4.Parent = ack2
local ack3 = Instance.new("Humanoid")
ack3.Torso = ack4
ack3.Parent = ack2
player[i].Character = ack2
end end end

if string.sub(msg,1,10) == "invisible/" then
local player = findplayer(string.sub(msg,11),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local char = player[i].Character
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Hat" then
local handle = c[i]:FindFirstChild("Handle")
if handle ~= nil then
handle.Transparency = 1 --We dont want our hats to give off our position, do we?
end end
if c[i].className == "Part" then
c[i].Transparency = 1
if c[i].Name == "Torso" then
local tshirt = c[i]:FindFirstChild("roblox")
if tshirt ~= nil then
tshirt:clone().Parent = char
tshirt:remove()
end end
if c[i].Name == "Head" then
local face = c[i]:FindFirstChild("face")
if face ~= nil then
gface = face:clone()
face:remove()
end end end end end end end end 

if string.sub(msg,1,8) == "visible/" then
local player = findplayer(string.sub(msg,9),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local char = player[i].Character
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Hat" then
local handle = c[i]:FindFirstChild("Handle")
if handle ~= nil then
handle.Transparency = 0
end end
if c[i].className == "Part" then
c[i].Transparency = 0
if c[i].Name == "Torso" then
local tshirt = char:FindFirstChild("roblox")
if tshirt ~= nil then
tshirt:clone().Parent = c[i]
tshirt:remove()
end end
if c[i].Name == "Head" then
if gface ~= nil then
local face = gface:clone()
face.Parent = c[i]
end end end end end end end end

if string.sub(msg,1,7) == "freeze/" then
local player = findplayer(string.sub(msg,8),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local humanoid = player[i].Character:FindFirstChild("Humanoid")
if humanoid ~= nil then
humanoid.WalkSpeed = 0
end
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Part" then
c[i].Anchored = true
c[i].Reflectance = 0.6
end end end end end end

if string.sub(msg,1,5) == "thaw/" then
local player = findplayer(string.sub(msg,6),speaker)
if player ~= 0 then
for i = 1,#player do
if player[i].Character ~= nil then
local humanoid = player[i].Character:FindFirstChild("Humanoid")
if humanoid ~= nil then
humanoid.WalkSpeed = 16
end
local c = player[i].Character:GetChildren()
for i =1,#c do
if c[i].className == "Part" then
c[i].Anchored = false
c[i].Reflectance = 0
end end end end end end
--[[ReadMe*
	Please improve upon this script as needed, I'm a noob scripter and I only script 
	through ways I know that work. This loop works, so I'm happy with it. But please, 
	edit as you may.
	
	This model uses MeshParts to animate the flag. The previous frame turns transparent
	while the next frame becomes visible.
	
	If you would like to use your own custom flag, for your ROBLOX group or country, 
	select all the children in the "Flag" model and paste in a ROBLOX decal asset in 
	the "TextureID" slot. If you receive an error, try subtracting 1 from the decal id.
		
		http://www.roblox.com/asset/?id=129395425{decal id}
		rbxassetid://{decal id}
	
	Any ROBLOX decal in the Developers Library will work, or you may upload your own 
	flag decal to insert in. Rectangular decals are recommended for this flag. 
		*If you use a decal with a transparent background in the MeshPart's TextureID, 
		the transparent background will default to black. Instead, insert the actual
		decal into every MeshPart in "Flag." This will allow you to change the BrickColor
		of the flag with the decal on top.
	
	The flags have been UV mapped to flip the flag design on the other side. 
		e.g. You won't see the blue box of the United States flag on the other side
			 of the flag on its end, but close to the pole for both sides.
				
	Thank you and have a wonderful day.
	(MeshParts rendered using Blender)
--]]



sp=script.Parent
flag=sp.Flag

reset=function()
	for _,meshpart in pairs (flag:GetChildren()) do
		if meshpart:IsA("MeshPart") then
			meshpart.Transparency=1
		end
	end
end

waittime=.04 --Time between each "Frame"

while true do
	wait(waittime)
	reset()
	flag["2"].Transparency=0
	wait(waittime)
	reset()
	flag["3"].Transparency=0
	wait(waittime)
	reset()
	flag["4"].Transparency=0	
	wait(waittime)
	reset()
	flag["5"].Transparency=0
	wait(waittime)
	reset()
	flag["6"].Transparency=0
	wait(waittime)
	reset()
	flag["7"].Transparency=0
	wait(waittime)
	reset()
	flag["8"].Transparency=0
	wait(waittime)
	reset()
	flag["9"].Transparency=0
	wait(waittime)
	reset()
	flag["10"].Transparency=0
	wait(waittime)
	reset()
	flag["11"].Transparency=0
	wait(waittime)
	reset()
	flag["12"].Transparency=0
	wait(waittime)
	reset()
	flag["13"].Transparency=0
	wait(waittime)
	reset()
	flag["14"].Transparency=0
	wait(waittime)
	reset()
	flag["15"].Transparency=0
	wait(waittime)
	reset()
	flag["16"].Transparency=0
	wait(waittime)
	reset()
	flag["1"].Transparency=0
end
--		print(animName .. " " .. idx .. " [" .. origRoll .. "]")


		local anim = animTable[animName][idx].anim

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

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
	end
end
-- ROBLOX deviation: replaced most get methods to reduce code repetition


local function getOption(options: OptionsReceived?, opt): any
	if options and options[opt] ~= nil then
		return options[opt]
	end
	return DEFAULT_OPTIONS[opt]
end

local function getIndent(options: OptionsReceived?)
	if options and options.min then
		return ""
	end
	local number = DEFAULT_OPTIONS.indent
	if options and options.indent ~= nil then
		number = options.indent
	end
	return createIndent(number)
end

local function getSpacingInner(options: OptionsReceived?)
	if options and options.min then
		return " "
	end
	return "\n"
end

local function getSpacingOuter(options: OptionsReceived?)
	if options and options.min then
		return ""
	end
	return "\n"
end
-- ROBLOX FIXME: Can we define ClientChatModules statically in the project config


pcall(function() ChatLocalization = require((game:GetService("Chat") :: any).ClientChatModules.ChatLocalization :: any) end)
if ChatLocalization == nil then ChatLocalization = {} end

if not ChatLocalization.FormatMessageToSend or not ChatLocalization.LocalizeFormattedMessage then
	function ChatLocalization:FormatMessageToSend(key,default) return default end
end

local function EnterTimeIntoLog(tbl)
	table.insert(tbl, tick() + decayTimePeriod)
end

local function Run(ChatService)
	local function FloodDetectionProcessCommandsFunction(speakerName, message, channel)
		if (whitelistedSpeakers[speakerName]) then return false end

		local speakerObj = ChatService:GetSpeaker(speakerName)
		if (not speakerObj) then return false end
		if (chatBotsBypassFloodCheck and not speakerObj:GetPlayer()) then return false end

		if (not floodCheckTable[speakerName]) then
			floodCheckTable[speakerName] = {}
		end

		local t = nil

		if (doFloodCheckByChannel) then
			if (not floodCheckTable[speakerName][channel]) then
				floodCheckTable[speakerName][channel] = {}
			end

			t = floodCheckTable[speakerName][channel]
		else
			t = floodCheckTable[speakerName]
		end

		local now = tick()
		while (#t > 0 and t[1] < now) do
			table.remove(t, 1)
		end

		if (#t < numberMessagesAllowed) then
			EnterTimeIntoLog(t)
			return false
		else

			local timeDiff = math.ceil(t[1] - now)

			if (informSpeakersOfWaitTimes) then
				local msg = ChatLocalization:FormatMessageToSend("GameChat_ChatFloodDetector_MessageDisplaySeconds",
					string.format("You must wait %d %s before sending another message!", timeDiff, (timeDiff > 1) and "seconds" or "second"),
					"RBX_NUMBER",
					tostring(timeDiff)
				)
				speakerObj:SendSystemMessage(msg, channel)
			else
				speakerObj:SendSystemMessage(
					ChatLocalization:FormatMessageToSend(
						"GameChat_ChatFloodDetector_Message",
						"You must wait before sending another message!"
					)
				,channel)
			end

			return true
		end
	end

	ChatService:RegisterProcessCommandsFunction("flood_detection", FloodDetectionProcessCommandsFunction, ChatConstants.LowPriority)

	ChatService.SpeakerRemoved:connect(function(speakerName)
		floodCheckTable[speakerName] = nil
	end)
end

return Run
--хранилище и копии зелий


local storage = game:GetService("ServerStorage")
local healthPotion = storage["Health Potion"]:Clone()
local gun = storage["FAL"]:Clone()
local coins = storage["Coins"]:Clone()


char.Humanoid.Died:Connect(function()
	--подбрасываем кубик
	local rand = math.random(0,2)
	if rand == 0 then --если 0, то
		--падает зелье здоровья
		healthPotion.Handle.Position = char.HumanoidRootPart.Position
		healthPotion.Parent = workspace
		coins.Handle.Position = char.HumanoidRootPart.Position
		coins.Parent = workspace
		
		elseif rand == 1 then --если 1, то
		--падает оружее
		gun.Handle.Position = char.HumanoidRootPart.Position
		gun.Parent = workspace
		coins.Handle.Position = char.HumanoidRootPart.Position
		coins.Parent = workspace
	end
	-- а если на кубике выпадает 3, то ничего не выпадет
	wait(10)
	copy.Parent = workspace
	char:Remove()
	end)
-- 



local BLOCK_ARRAY = fromIndexArray(BLOCK)
local WEDGE_ARRAY = fromIndexArray(WEDGE)
local CORNERWEDGE_ARRAY = fromIndexArray(CORNERWEDGE)
local CYLINDER_ARRAY = cylinder(20)
local SPHERE_ARRAY = icoSphere(2)

return {
	Block = function(cf, size2) return vertShape(cf, size2, BLOCK_ARRAY) end;
	Wedge = function(cf, size2) return vertShape(cf, size2, WEDGE_ARRAY) end;
	CornerWedge = function(cf, size2) return vertShape(cf, size2, CORNERWEDGE_ARRAY) end;
	Cylinder = function(cf, size2) return vertShape(cf, size2, CYLINDER_ARRAY) end;
	Ball = function(cf, size2) return vertShape(cf, size2, SPHERE_ARRAY) end;
	
	GetCentroid = getCentroidFromSet;
	Classify = classify;
}
---------------------------------------------------------------


function onChildAdded(child)
	if child.Name == "SeatWeld" then
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human IN")
			seat.SirenControl.Control.CarName.Value = human.Parent.Name.."'s Car"
			seat.Parent.Name = human.Parent.Name.."'s Car"
			s.Parent.SirenControl:clone().Parent = game.Players:findFirstChild(human.Parent.Name).PlayerGui
			seat.Start:Play()
			wait(1)
			seat.Start:Stop()
			seat.Engine:Play()
		end
	end
end

function onChildRemoved(child)
	if (child.Name == "SeatWeld") then	
		local human = child.part1.Parent:findFirstChild("Humanoid") 
		if (human ~= nil) then
			print("Human OUT")
			seat.Parent.Name = "Empty Car"
			seat.SirenControl.Control.CarName.Value = "Empty Car"
			game.Players:findFirstChild(human.Parent.Name).PlayerGui.SirenControl:remove()
			seat.Engine:Stop()
		end
	end
end


script.Parent.ChildAdded:connect(onChildAdded)
script.Parent.ChildRemoved:connect(onChildRemoved)
--script.Parent.Parent.Parent.Sound.Idle:Stop()
--script.Parent.Parent.Parent.Sound.Grab:Play()


script.Parent.Parent.Prong1.Motor.HingeConstraint.TargetAngle = 75
script.Parent.Parent.Prong2.Motor.HingeConstraint.TargetAngle = 75
script.Parent.Parent.Prong3.Motor.HingeConstraint.TargetAngle = 75
--Control Mapping


Tune.Controls = {

	--Keyboard Controls
	--Mode Toggles
	ToggleABS				= Enum.KeyCode.Y					,
	ToggleTransMode			= Enum.KeyCode.M					,
	--Primary Controls
	Throttle				= Enum.KeyCode.Up					,
	Brake					= Enum.KeyCode.Down					,
	SteerLeft				= Enum.KeyCode.Left					,
	SteerRight				= Enum.KeyCode.Right				,

	--Secondary Controls
	Throttle2				= Enum.KeyCode.W					,
	Brake2					= Enum.KeyCode.S					,
	SteerLeft2				= Enum.KeyCode.A					,
	SteerRight2				= Enum.KeyCode.D					,

	--Manual Transmission
	ShiftUp					= Enum.KeyCode.E					,
	ShiftDown				= Enum.KeyCode.Q					,
	Clutch					= Enum.KeyCode.LeftShift			,

	--Handbrake
	PBrake					= Enum.KeyCode.P					,

	--Mouse Controls
	MouseThrottle			= Enum.UserInputType.MouseButton1	,
	MouseBrake				= Enum.UserInputType.MouseButton2	,
	MouseClutch				= Enum.KeyCode.W					,
	MouseShiftUp			= Enum.KeyCode.E					,
	MouseShiftDown			= Enum.KeyCode.Q					,
	MousePBrake				= Enum.KeyCode.LeftShift			,

	--Controller Mapping
	ContlrThrottle			= Enum.KeyCode.ButtonR2				,
	ContlrBrake				= Enum.KeyCode.ButtonL2				,
	ContlrSteer				= Enum.KeyCode.Thumbstick1			,
	ContlrShiftUp			= Enum.KeyCode.ButtonY				,
	ContlrShiftDown			= Enum.KeyCode.ButtonX				,
	ContlrClutch			= Enum.KeyCode.ButtonR1				,
	ContlrPBrake			= Enum.KeyCode.ButtonL1				,
	ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
	ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
	ContlrToggleABS			= Enum.KeyCode.DPadRight			,
}
--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)
	
	local Object = Tool.Handle:Clone()
	Object.Pin:Destroy()
	Object.ThinkFast:Destroy()
	Object.Parent = workspace
	Object.Swing.Pitch = Random.new():NextInteger(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
	
	local rand = 11.25
	Object.RotVelocity = Vector3.new(Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-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 = "creator"
	tag.Parent = Object
end


PowerRemote.OnServerEvent:Connect(function(player, Power)
	local holder = getPlayer()
	if holder ~= player then return end
	
	AttackVelocity = Power
end)

TossRemote.OnServerEvent:Connect(function(player, mousePosition)
	local holder = getPlayer()
	if holder ~= player then return end
	
	if Cooldown.Value == true then return end
	Cooldown.Value = true
	
	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		TossRemote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit
	
	local SecretRNG = Random.new():NextInteger(1,10) --Change RNG value here
	if SecretRNG == 1 then
		local ChucklenutsSound = Tool.Handle.ThinkFast:Play()
	end
	
	Toss(lookAt)
	
	task.wait(CooldownTime)
	Cooldown.Value = false
end)

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

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




function onRunning(speed)
	if speed > 0.01 then
		if Humanoid.WalkSpeed > 16 then
			playAnimation("run", 0.1, Humanoid)
			pose = "Running"
		else
			playAnimation("walk", 0.1, Humanoid)
			pose = "Walking"
		end
	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("run", 0.1, Humanoid)
	elseif pose == "Walking" then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
-- ONLY SUPPORTS ORDINAL TABLES (ARRAYS). Merges tbl0 and tbl1 together.


Table.join = function (tbl0, tbl1)
	local nt = table.create(#tbl0 + #tbl1)
	local t2 = table.move(tbl0, 1, #tbl0, 1, nt)
	return table.move(tbl1, 1, #tbl1, #tbl0 + 1, nt)
end
--	local now = os.time()
--	if now - lastMoan > 5 then	
--		if math.random() > .3 then
--			zombie.Moan:Play()
----			print("playing moan")
--			lastMoan = now
--		end
--	end


	wait(2)
end

local hum = script.Parent:WaitForChild("Humanoid")
local anim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))
anim.Looped = true
anim:Play()
end
-- Validator for Roblox enums



local UtilityRoot = script.Parent
local UIBloxRoot = UtilityRoot.Parent

local t = require(UIBloxRoot.Parent.t)

local function enumValidator(enum)
	local validators = {}

	for _, enumItem in pairs(enum) do
		validators[#validators + 1] = t.literal(enumItem)
	end

	return t.union(unpack(validators))
end

return enumValidator