local caveDoor = script.Parent
local click = caveDoor:FindFirstChildOfClass("ClickDetector")
click.MouseClick:Connect(function(player)
local backpack = player:FindFirstChild("Backpack")
if backpack and backpack:FindFirstChild("FinalFragmentKey") then
player.Character:MoveTo(workspace.TrueEndingPortal.Position)
else
local msg = Instance.new("Hint", player.PlayerGui)
msg.Text = "Something is missing... (You need the Final Fragment Key)"
wait(3)
msg:Destroy()
end
end)