советую пользоваться ChatGpt для решения таких задач
local tool = game.Players.LocalPlayer.Backpack.tool
if tool then -- Check if the player is holding a tool print("The player is currently holding a tool: " .. tool.Name) else print("The player is not holding a tool.") end