Pinkstack/roblox-luau-corpus-text huggingface dataset:
--bpos.position = char.Position + 
--wait() 
--end 


end 

function onButton1Up(mouse) 
fly = false 
end 

function onSelected(mouse) 
print("select") 
if mouse == nil then 
return 
end 
airborne = true 
bpos.Parent = char 
bpos.position = char.Position + Vector3.new(0,10,0) 
gyro.Parent = char 
char.Parent.Humanoid.Sit = true 
mouse.Icon = "rbxasset://textures\\ArrowCursor.png" 
mouse.Button1Down:connect(function() onButton1Down(mouse) end) 
mouse.Button1Up:connect(function() onButton1Up(mouse) end) 
mouse.Move:connect(function() onMove(mouse) end) 

for i, v in ipairs(char:GetChildren()) do 
if v.className == "Motor" then 
v.MaxVelocity = 0 
v.CurrentAngle = -1 
if v.Name == "Left Hip" then 
v.CurrentAngle = 1 
end 
end 
end 
end 

function onDeselected(mouse) 
print("deselect") 
gyro.Parent = nil 
fly = false 
airborne = false 
for i, v in ipairs(char:GetChildren()) do 
if v.className == "Motor" then 
v.MaxVelocity = 1 
end 
end 
char.Parent.Humanoid.Sit = false 
for i = 1, 30 do 
if not airborne then 
bpos.position = bpos.position - Vector3.new(0,0.3,0) 
wait(0.1) 
end 
end 
if not airborne then 
bpos.Parent = nil 
end 
end 


bin.Selected:connect(onSelected) 
bin.Deselected:connect(onDeselected)
--LIGHTS BUTTONS


for _,i in pairs(lights:GetChildren()) do
	if i:IsA("ImageButton") and i.Name ~= "header" then
		if string.match(i.Name,"%l+") == "td" then
			i.MouseButton1Click:connect(function()
				script.Parent.lighty.Value = tonumber(string.match(i.Name,"%d"))
				if script.Parent.lighty.Value == 0 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 1 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 2 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 3 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 4 then
					seat.Parent.SSC.Beep:Play()						
				end
			end)
		elseif string.match(i.Name,"%l+") == "fl" then
			i.MouseButton1Click:connect(function()
				script.Parent.flasher.Value = tonumber(string.match(i.Name,"%d"))
				if script.Parent.flasher.Value == 0 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 1 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 2 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 3 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 4 then
					seat.Parent.SSC.Beep:Play()			
				end
			end)
		end
	end
end
--[[Weight and CG]]


	Tune.Weight			= 2014		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		4		,
	 --[[Length]]		15		}
	Tune.WeightDist		= 51		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = MORE STABLE / carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-- Reload animation


function reload()
	if not reloading then
		reloading=true;
		updateAmmo()
		local reloadTime = tankStats.ReloadTime.Value;	


		local Timer = 0
	

		for i = 7, 1, -1 do
			wait(reloadTime/8);
			Timer = Timer + 1
			
			if Timer >= 2 and Loaded == false then
				GUI.ReloadSound:Play()
				Loaded = true
			end
		end
		wait(reloadTime/8);


		if Timer >= 7 then
		
		GUI.Loaded.Visible = true	
		
		
		
		Timer = 0
			reloading = false;
			
		end
		
		
	end
end

function fire()
	
	if reloading then return end;
	local APAmmo = tankStats.APAmmo;
	local HEAmmo = tankStats.HEAmmo;
	if currRound.Value == "AP" and APAmmo.Value <= 0 then return end
	if currRound.Value == "HE" and HEAmmo.Value <= 0 then return end
	GUI.Loaded.Visible = false
	
	TFE:FireServer('Fire',parts,currRound,APAmmo,HEAmmo,tankStats)
	
	reload(GUI);
	
end
--[=[
	Cleans up all tasks and removes them as entries from the Maid.

	:::note
	Signals that are already connected are always disconnected first. After that
	any signals added during a cleaning phase will be disconnected at random times.
	:::

	:::tip
	DoCleaning() may be recursively invoked. This allows the you to ensure that
	tasks or other tasks. Each task will be executed once.

	However, adding tasks while cleaning is not generally a good idea, as if you add a
	function that adds itself, this will loop indefinitely.
	:::
]=]


function Maid:DoCleaning()
	local tasks = self._tasks

	-- Disconnect all events first as we know this is safe
	for index, job in pairs(tasks) do
		if typeof(job) == "RBXScriptConnection" then
			tasks[index] = nil
			job:Disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local index, job = next(tasks)
	while job ~= nil do
		tasks[index] = nil
		if type(job) == "function" then
			job()
		elseif typeof(job) == "RBXScriptConnection" then
			job:Disconnect()
		elseif job.Destroy then
			job:Destroy()
		end
		index, job = next(tasks)
	end
end
--[=[
	@param interval number
	@param callback () -> nil
	@param startNow boolean?
	@param updateSignal RBXScriptSignal? | Signal?
	@param timeFunc () -> number
	@return RBXScriptConnection

	Creates a simplified timer which just fires off a callback function at the given interval.
]=]


function Timer.Simple(interval: number, callback: CallbackFunc, startNow: boolean?, updateSignal: RBXScriptSignal?, timeFunc: TimeFunc?)
	local update = updateSignal or RunService.Heartbeat
	local t = timeFunc or time
	local nextTick = t() + interval
	if startNow then
		task.defer(callback)
	end
	return update:Connect(function()
		local now = t()
		if now >= nextTick then
			nextTick = now + interval
			task.defer(callback)
		end
	end)
end
-- declarations



local head = script.Parent
local sound = head:findFirstChild("Victory")

function onTouched(part)
	local h = part.Parent:findFirstChild("Humanoid")
	if h~=nil then
sound:play()
if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end
part.Parent:findFirstChild("Head"):findFirstChild("face").Transparency = 1
	end
end

script.Parent.Touched:connect(onTouched)
-- declarations


local sGettingUp = newSound("GettingUp", "rbxasset://sounds/action_get_up.mp3")
local sDied = newSound("Died", "rbxasset://sounds/uuhhh.mp3") 
local sFreeFalling = newSound("FreeFalling", "rbxasset://sounds/action_falling.mp3")
local sJumping = newSound("Jumping", "rbxasset://sounds/action_jump.mp3")
local sLanding = newSound("Landing", "rbxasset://sounds/action_jump_land.mp3")
local sSplash = newSound("Splash", "rbxasset://sounds/impact_water.mp3")
local sRunning = newSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3")
sRunning.Looped = true
local sSwimming = newSound("Swimming", "rbxasset://sounds/action_swim.mp3")
sSwimming.Looped = true
local sClimbing = newSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3")
sClimbing.Looped = true

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid;
for _,Child in pairs(Figure:GetChildren())do
if Child and Child.ClassName=="Humanoid"then
Humanoid=Child;
end;
end;
local hasPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
local filteringEnabled = game.Workspace.FilteringEnabled

local prevState = "None"
--[[
	Create a new expectation
]]


function Expectation.new(value)
	local self = {
		value = value,
		successCondition = true,
		condition = false
	}

	setmetatable(self, Expectation)

	self.a = bindSelf(self, self.a)
	self.an = self.a
	self.ok = bindSelf(self, self.ok)
	self.equal = bindSelf(self, self.equal)
	self.throw = bindSelf(self, self.throw)
	self.near = bindSelf(self, self.near)

	return self
end

function Expectation.__index(self, key)
	-- Keys that don't do anything except improve readability
	if SELF_KEYS[key] then
		return self
	end

	-- Invert your assertion
	if NEGATION_KEYS[key] then
		local newExpectation = Expectation.new(self.value)
		newExpectation.successCondition = not self.successCondition

		return newExpectation
	end

	-- Fall back to methods provided by Expectation
	return Expectation[key]
end
-- initial script made by who knows, anti jump added by ColonelGraff! thanks for using




AJ = false

on = 0
Tool = script.Parent



welds = {}
sh = {}
arms = nil
torso = nil
f = nil
function Crouch(ison)

Tool.Parent:findFirstChild("Humanoid").WalkSpeed = 9


if arms == nil and torso == nil then
arms = {Tool.Parent:FindFirstChild("Left Leg"), Tool.Parent:FindFirstChild("Right Leg")}
torso = Tool.Parent:FindFirstChild("Torso")
end
if arms ~= nil and torso ~= nil then
sh = {torso:FindFirstChild("Left Hip"), torso:FindFirstChild("Right Hip")}
if sh ~= nil then
local yes = true
if yes then
yes = false
if ison == 1 then
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld")
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
weld1.C1 = CFrame.new(-0.5, 0.75, 1)
arms[1].Name = "LDave"
arms[1].CanCollide = true
welds[1] = weld1
--	local sound = SM.FetchSound(soundName)
--	local speed = sound.TimeLength



    if (Rep.Constants.RelativeTime.Value - _G.SD[player.UserId].Data.tempData.lastAction) >= 0.25 then
        _G.SD[player.UserId].Data.tempData.lastAction = Rep.Constants.RelativeTime.Value
        SM.PlaySoundInObject(soundName, char.Head, equippedToolData.noteWaver, 6)
    end
end)

Rep.Relay.Tool.StopMusicTool.OnServerEvent:connect(function(player, musicName)
	
	local char
    if player.Character and player.Character.Humanoid and player.Character.Humanoid.Health > 0 and _G.SD[player.UserId].Data.stats.health > 0 then
        char = player.Character
    else
        return
    end
	
	if not musicName then
	 	local equippedToolName = _G.SD[player.UserId].Data.equipment.toolbar[_G.SD[player.UserId].Data.tempData.equippedSlot].name
	    local equippedToolData = EntityData["Tool"][equippedToolName]
		musicName = equippedToolData.noteName
	end
	
	SM.StopSoundInObject(musicName, char.Head)
end)
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 650	--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 950		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 9400		--		Use sliders to manipulate values
	Tune.Redline		= 9800
	Tune.EqPoint		= 7250
	Tune.PeakSharpness	= 9.5
	Tune.CurveMult		= 0.15
	
	--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)
--edit the below function to execute code when this response is chosen OR this prompt is shown
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data


return function(player, dialogueFolder)
	local MoneyModule = require(game.ReplicatedStorage.Source.SystemModules.Money)
	MoneyModule.BuyWeaponFromDialogueFolder(player,dialogueFolder)
	
end
--



if Health_Bar == true then
	game.StarterGui:SetCoreGuiEnabled(1,true)
elseif Health_Bar == false then
	game.StarterGui:SetCoreGuiEnabled(1,false)
end
if Player_List == true then
	game.StarterGui:SetCoreGuiEnabled(0,true)
elseif Player_List == false then
	game.StarterGui:SetCoreGuiEnabled(0,false)
end
if Tool_Bar == true then
	game.StarterGui:SetCoreGuiEnabled(2,true)
elseif Tool_Bar == false then
	game.StarterGui:SetCoreGuiEnabled(2,false)
end
if Chat == true then
	game.StarterGui:SetCoreGuiEnabled(3,true)
elseif Chat == false then
	game.StarterGui:SetCoreGuiEnabled(3,false)
end
--\\ Only Edit Above //--




local UserInputService = game:GetService('UserInputService')

local plr = game.Players.LocalPlayer
local Jumped = false --Debounce

UserInputService.JumpRequest:Connect(function()
	local char = plr.Character -- some may place this script in StarterPlayer...
	if not Jumped then
		if char.Humanoid.FloorMaterial == Enum.Material.Air then return end -- Prevent mid air jumps
		Jumped = true --Making it true do it does not loop twice
		char.Humanoid:ChangeState(Enum.HumanoidStateType.Jumping) --Making the character jump
		task.wait(jumpCooldown) -- yield x
		Jumped = false --Make it false so we can repeat it again
	else
		char.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
	end
end)
--// F key, Horn


mouse.KeyUp:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Stop()
		veh.Lightbar.middle.Wail.Volume = 4
		veh.Lightbar.middle.Yelp.Volume = 4
		veh.Lightbar.middle.Priority.Volume = 4
		veh.Lightbar.middle.Manual.Volume = 4
	end
end)










mouse.KeyDown:connect(function(key)
	if key=="j" then 
		veh.Lightbar.middle.Beep:Play()
veh.Lightbar.RemoteEvent:FireServer(true)
	end
	end)

mouse.KeyDown:connect(function(key)
	if key=="k" then 
		veh.Lightbar.middle.Beep:Play()
		veh.Lightbar.TA.RemoteEvent:FireServer(true)
	end
end)
-- Basic settings


local COOLDOWN = 0.25

local tool = script.Parent

local toolPlr
local debounce = false

script.ClientActivate.OnServerEvent:connect(function(plr)
	
	-- Check if tool is equipped and correct player
	if plr == toolPlr and not debounce then
		debounce = true
		
		-- Toggle
		tool.Handle.MoneyEmitter:Emit(10)
		game.ReplicatedStorage.Interactions.Client.PlaySound:FireClient(plr, tool.Handle:FindFirstChild("Sound" .. math.random(1, 3)))
		
		-- Cooldown
		wait(COOLDOWN)
		
		debounce = false
	end
	
end)

tool.Equipped:connect(function()
	
	-- Set tool player
	toolPlr = game.Players:GetPlayerFromCharacter(tool.Parent)
	
end)
--d.DidLoop:Connect(function()
--	print("loop animation")
--end)




function Zombie:Initialize()
	Shetchik = 1
	for k, v in pairs(self.Obj:GetChildren()) do
		if v:IsA("BasePart") then
			v.CollisionGroupId = 1
		end
	end
	spawn(function()
		d:Play()
		self.Obj:SetPrimaryPartCFrame(CFrame.new(workspace.Real_Spawn.Position))
		self:moveTo()
	end)
end
-- right mouse button up & down events


local rmbDown, rmbUp do
	local rmbDownBindable = Instance.new("BindableEvent")
	local rmbUpBindable = Instance.new("BindableEvent")

	rmbDown = rmbDownBindable.Event
	rmbUp = rmbUpBindable.Event

	UserInputService.InputBegan:Connect(function(input, gpe)
		if not gpe and input.UserInputType == Enum.UserInputType.MouseButton2 then
			rmbDownBindable:Fire()
		end
	end)

	UserInputService.InputEnded:Connect(function(input, gpe)
		if input.UserInputType == Enum.UserInputType.MouseButton2 then
			rmbUpBindable:Fire()
		end
	end)
end

local thumbstickCurve do
	local K_CURVATURE = 2 -- amount of upwards curvature (0 is flat)
	local K_DEADZONE = 0.1 -- deadzone

	function thumbstickCurve(x)
		-- remove sign, apply linear deadzone
		local fDeadzone = (math.abs(x) - K_DEADZONE)/(1 - K_DEADZONE)
		
		-- apply exponential curve and scale to fit in [0, 1]
		local fCurve = (math.exp(K_CURVATURE*fDeadzone) - 1)/(math.exp(K_CURVATURE) - 1)
		
		-- reapply sign and clamp
		return math.sign(x)*math.clamp(fCurve, 0, 1)
	end
end
--[[[Default Controls]]


	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}
	
	--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.DPadRight			,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.DPadUp			,
	}
--[[Drivetrain]]

	
	Tune.Config			= "RWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 50		-- 1 - 100%
	Tune.RDiffLockThres	= 50		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= true	    -- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
--- Registers a command definition and its server equivalent.
-- Handles replicating the definition to the client.


function Registry:RegisterCommand (commandScript, commandServerScript, filter)
	local commandObject = require(commandScript)
	assert(
		typeof(commandObject) == "table",
		`Invalid return value from command script "{commandScript.Name}" (CommandDefinition expected, got {typeof(commandObject)})`
	)

	if commandServerScript then
		commandObject.Run = require(commandServerScript)
	end

	if filter and not filter(commandObject) then
		return
	end

	self:RegisterCommandObject(commandObject)

	commandScript.Parent = self.Cmdr.ReplicatedRoot.Commands
end
-- Replace common spaces with middle dot at the end of any line


function replaceTrailingSpaces(text: string): string
	return text:gsub("%s+$", function(spaces)
		return string.rep(SPACE_SYMBOL, #spaces)
	end)
end

local function printReceived(object: any): string
	return RECEIVED_COLOR(replaceTrailingSpaces(stringify(object)))
end

local function printExpected(value: any): string
	return EXPECTED_COLOR(replaceTrailingSpaces(stringify(value)))
end

local function printWithType(
	name: string, -- 'Expected' or 'Received'
	value: any,
	print_: (any) -> string -- printExpected or printReceived
): string
	local type_ = getType(value)
	local hasType
	if type_ ~= "nil" then
		hasType = string.format("%s has type:  %s\n", name, type_)
	else
		hasType = ""
	end

	local hasValue = string.format("%s has value: %s", name, print_(value))
	return hasType .. hasValue
end

local function ensureNoExpected(expected: any, matcherName: string, options: MatcherHintOptions?): ()
	if typeof(expected) ~= "nil" then
		-- Prepend maybe not only for backward compatibility
		local matcherString = matcherName

		if not options then
			matcherString = "[.never]" .. matcherString
		end

		error(
			Error(
				matcherErrorMessage(
					matcherHint(matcherString, nil, "", options),
					"this matcher must not have an expected argument",
					printWithType("Expected", expected, printExpected)
				)
			)
		)
	end
end
-- (Hat Giver Script - Loaded.)



debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Red ruby crown"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(2, 1, 1) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, -0.9, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- functions



function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if emoteNames[oldAnim] and emoteNames[oldAnim] == false then
		oldAnim = "idle"
	end
	
	currentAnim = ""
	if currentAnimKeyframeHandler then
		currentAnimKeyframeHandler:disconnect()
	end
	if currentAnimTrack then
		currentAnimTrack:Stop()
		currentAnimTrack:Destroy()
		currentAnimTrack = nil
	end
	return oldAnim
end

function setAnimationSpeed(speed)
	if speed ~= currentAnimSpeed then
		currentAnimSpeed = speed
		currentAnimTrack:AdjustSpeed(currentAnimSpeed)
	end
end

function keyFrameReachedFunc(frameName)
	if frameName == "End" then
-- ROBLOX MOVED: expect/utils.lua


local function hasPropertyInObject(object: any, key: string): boolean
	-- We don't have to deal with the complexities around prototype chains in
	-- javascript since a simple key access will look up the
	-- metatable chain for us
	local shouldBeFalse = not toJSBoolean(object) or typeof(object) ~= "table"

	if shouldBeFalse then
		return false
	end

	return object[key] ~= nil
end
--[=[
	@within TableUtil
	@function IsEmpty
	@param tbl table
	@return boolean

	Returns `true` if the given table is empty. This is
	simply performed by checking if `next(tbl)` is `nil`
	and works for both arrays and dictionaries. This is
	useful when needing to check if a table is empty but
	not knowing if it is an array or dictionary.

	```lua
	TableUtil.IsEmpty({}) -- true
	TableUtil.IsEmpty({"abc"}) -- false
	TableUtil.IsEmpty({abc = 32}) -- false
	```
]=]


local function IsEmpty(tbl: { any }): boolean
	return not next(tbl)
end