-- Compiled with roblox-ts v2.3.0 local TS = _G[script] local Players = TS.import(script, TS.getModule(script, "@rbxts", "services")).Players local function getRootPartFromCharacter(character) local humanoid = character:FindFirstChildOfClass("Humanoid") local _result = humanoid if _result ~= nil then _result = _result.RootPart end return _result end local function getHumanoidFromPlayer(player) local character = player.Character if not character then return nil end return character:FindFirstChildOfClass("Humanoid") end local function getRootPartFromPlayer(player) local character = player.Character if not character then return nil end return getRootPartFromCharacter(character) end local function awaitCharacter(player) return player.Character or (player.CharacterAdded:Wait()) end local function awaitHumanoidFromCharacter(character) local humanoid repeat do humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then character.ChildAdded:Wait() end end until humanoid return humanoid end local function awaitHumanoidFromPlayer(player) local character = awaitCharacter(player) local humanoid repeat do humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then character.ChildAdded:Wait() end end until humanoid return humanoid end local function awaitAnimatorFromHumanoid(humanoid) local animator repeat do animator = humanoid:FindFirstChildOfClass("Animator") if not animator then humanoid.ChildAdded:Wait() end end until animator return animator end local function awaitAnimatorFromCharacter(character) local humanoid = awaitHumanoidFromCharacter(character) local animator repeat do animator = humanoid:FindFirstChildOfClass("Animator") if not animator then humanoid.ChildAdded:Wait() end end until animator return animator end local function awaitAnimatorFromPlayer(player) local humanoid = awaitHumanoidFromPlayer(player) local animator repeat do animator = humanoid:FindFirstChildOfClass("Animator") if not animator then humanoid.ChildAdded:Wait() end end until animator return animator end local function awaitRootPartFromHumanoid(humanoid) local root repeat do root = humanoid.RootPart if not root then humanoid:GetPropertyChangedSignal("RootPart"):Wait() end end until root return root end local function awaitRootPartFromCharacter(character) local humanoid = awaitHumanoidFromCharacter(character) local root repeat do root = humanoid.RootPart if not root then humanoid:GetPropertyChangedSignal("RootPart"):Wait() end end until root return root end local function awaitRootPartFromPlayer(player) local humanoid = awaitHumanoidFromPlayer(player) local root repeat do root = humanoid.RootPart if not root then humanoid:GetPropertyChangedSignal("RootPart"):Wait() end end until root return root end local function getCharacterByUserId(userId) local player = Players:GetPlayerByUserId(userId) if not player then return nil end return player.Character end return { getRootPartFromCharacter = getRootPartFromCharacter, getHumanoidFromPlayer = getHumanoidFromPlayer, getRootPartFromPlayer = getRootPartFromPlayer, awaitCharacter = awaitCharacter, awaitHumanoidFromCharacter = awaitHumanoidFromCharacter, awaitHumanoidFromPlayer = awaitHumanoidFromPlayer, awaitAnimatorFromHumanoid = awaitAnimatorFromHumanoid, awaitAnimatorFromCharacter = awaitAnimatorFromCharacter, awaitAnimatorFromPlayer = awaitAnimatorFromPlayer, awaitRootPartFromHumanoid = awaitRootPartFromHumanoid, awaitRootPartFromCharacter = awaitRootPartFromCharacter, awaitRootPartFromPlayer = awaitRootPartFromPlayer, getCharacterByUserId = getCharacterByUserId, }